A method and system for hierarchical storage of blockchain data in the field of urban renewal

By using blockchain technology to store data in urban renewal projects in layered data and building a multi-level index structure, the problem of insufficient performance and security in traditional databases when facing large-scale data is solved, and efficient and secure data management and storage are achieved.

CN119537382BActive Publication Date: 2025-05-02BEIJING UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510100264.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-02
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

In urban renewal projects, traditional centralized databases have limited performance and scalability when facing large-scale and multi-source data, and are vulnerable to hackers, resulting in data leakage or loss, and lack effective data audit mechanisms, resulting in inefficient management and low security.

Method used

Blockchain technology is used for data hierarchical storage. According to the life cycle stage of urban renewal projects, data is divided into multiple levels. Data with high frequency updates and high access requirements are stored on the blockchain chain, data with low frequency updates and low access requirements are stored off-chain, and a multi-level index structure is built to quickly locate off-chain data and set data migration strategies to adjust the data storage level according to changes in access mode.

Benefits of technology

It improves the efficiency and security of urban renewal project management, ensures the transparency, security and immutability of high-frequency data, reduces storage costs, optimizes data access efficiency, and enhances data traceability and authenticity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537382B_ABST
    Figure CN119537382B_ABST
Patent Text Reader

Abstract

The present application provides a method and system for hierarchical storage of blockchain data in the field of urban renewal. According to the life cycle stage of the urban renewal project, the project data of the urban renewal project is divided into multiple data layers, and the project data of each data layer is classified and stored according to the update frequency and access requirements, wherein the project data with high frequency updates and high access requirements are stored on the blockchain, and the project data with low frequency updates and low access requirements are stored off the blockchain; a multi-level index structure is constructed on the chain, and the multi-level index structure is used to quickly locate the project data stored off the chain, while ensuring the integrity and traceability of the on-chain data; a data migration strategy is set, and when a change in the access mode of the project data in any data layer is detected, the migration of project data between data layers is triggered. The technical solution provided by the present application improves the efficiency and security of urban renewal project management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of data management for urban renewal projects, and in particular, to a method and system for hierarchical storage of blockchain data in the field of urban renewal. Background Art

[0002] With the acceleration of urbanization, urban renewal projects are increasing day by day, covering many aspects such as old district reconstruction, infrastructure upgrade, environmental protection, etc. During the implementation of the project, a large amount of data involving different stages such as planning, construction, and operation will be generated.

[0003] At present, data management in urban renewal projects mostly uses traditional centralized database systems. Although such systems can meet basic data storage needs, their performance and scalability have obvious limitations when faced with large-scale, multi-source data.

[0004] In other words, traditional centralized databases are vulnerable to hacker attacks, resulting in data leakage or loss. At the same time, due to the lack of an effective data audit mechanism, once data tampering occurs, it is difficult to track the responsible party, resulting in inefficient and low security management of urban renewal projects. Summary of the invention

[0005] The embodiments of the present application provide a method and system for hierarchical storage of blockchain data in the field of urban renewal, so as to solve the problems of low efficiency and low security in urban renewal project management in the prior art.

[0006] In a first aspect, an embodiment of the present application provides a method for hierarchical storage of blockchain data in the field of urban renewal, including:

[0007] According to the life cycle stage of the urban renewal project, the project data of the urban renewal project is divided into multiple data levels, and the project data of each data level is classified and stored according to the update frequency and access requirements, wherein the project data with high frequency update and high access requirements are stored on the blockchain, and the project data with low frequency update and low access requirements are stored off the blockchain;

[0008] Constructing a multi-level index structure on the chain, the multi-level index structure is used to quickly locate the project data stored off the chain, while ensuring the integrity and traceability of the on-chain data;

[0009] Set up data migration strategies to trigger project data migration between data tiers when changes in access patterns of project data in any data tier are detected.

[0010] Optionally, the project data of the urban renewal project is divided into multiple data levels according to the life cycle stage of the urban renewal project, and the project data of each data level is classified and stored according to the update frequency and access requirements, including:

[0011] Dividing the project data of the urban renewal project into multiple data levels according to the life cycle stages of the urban renewal project, wherein the life cycle stages include the planning stage, the design stage, the construction stage, the acceptance stage and the maintenance stage;

[0012] At each of the life cycle stages, the project data is divided into first-category data or second-category data according to the update frequency and access requirements of the project data, wherein the first-category data includes project data with high frequency updates and high access requirements, and the second-category data includes project data with low frequency updates and low access requirements;

[0013] Storing the first type of data on a blockchain, and using blockchain technology to ensure the transparency, security, and immutability of the first type of data;

[0014] The second type of data is stored off-chain in the blockchain, and data compression and encryption technology is used to reduce the storage cost of the second type of data and ensure data security. At the same time, the hash value or digital fingerprint on the chain is used to establish an association with the first type of data stored on the chain to ensure the traceability and authenticity of the off-chain data.

[0015] Optionally, constructing a multi-level index structure on the chain includes:

[0016] Defining and initializing an index node in the blockchain, wherein the index node is used to store location information and metadata information pointing to off-chain project data, so as to establish an association relationship between the on-chain project data and the off-chain project data;

[0017] Design and implement a multi-level index structure consisting of a basic index layer and an advanced index layer. The basic index layer is used to link to the location information of the project data under the chain, while the advanced index layer is used to aggregate the information of the basic index layer to form a hierarchical index structure.

[0018] A hash algorithm is used to generate a unique identifier for the project data stored off-chain, and the unique identifier is recorded in the corresponding index node together with metadata information to achieve fast retrieval. The metadata includes data type and creation date.

[0019] Optionally, the setting of the data migration strategy, when detecting a change in the access mode of the project data in any data layer, triggers the migration of the project data between the data layers, includes:

[0020] Continuously monitor the access frequency and pattern of project data in each data layer, record and analyze access logs to identify access patterns of project data, including access time distribution and access volume peaks;

[0021] By comparing access patterns over different time periods, identify the degree of change in access patterns;

[0022] Setting a threshold condition, when it is detected that the change in the access mode exceeds the preset threshold condition, triggering the migration of project data between data levels, wherein the process of project data migration between data levels includes migrating high-frequency access project data from off-chain to on-chain storage, or migrating low-frequency access project data from on-chain to off-chain storage;

[0023] After the data migration is completed, the multi-level index structure and metadata information on the chain are updated.

[0024] Optionally, it also includes:

[0025] Implement cross-chain interoperability protocols to allow project data sharing and exchange between different urban renewal projects, ensuring the consistency and security of project data between different blockchains.

[0026] Optionally, in the process of triggering the migration of project data between data levels, the following is also included:

[0027] Calculate the priority score of data migration, which is used to determine the priority score of migrating frequently accessed project data from off-chain to on-chain storage, or the priority score of migrating infrequently accessed project data from on-chain to off-chain storage;

[0028] Among them, data migration priority score Calculated by the following formula:

[0029] ;

[0030] in, Represents the access frequency of project data, Represents the access value of the project data, Represents the migration cost of project data, Represents the size of the project data, Represents the weight of the project data, which is dynamically adjusted according to the importance of the project data. Represents the current time, Represents the time when the project data was last accessed, is the time attenuation coefficient, are the weight coefficients of access frequency, access value, migration cost and data size, and satisfy .

[0031] Optionally, in the process of implementing a cross-chain interoperability protocol to allow project data sharing and exchange between different urban renewal projects, it also includes:

[0032] Calculating a data sharing security score, where the data sharing security score is used to evaluate the security level of data entries shared between different blockchains;

[0033] Wherein, the data sharing security score Calculated by the following formula:

[0034] ;

[0035] in, Represents the access control level of project data, Represents the encryption strength of the project data. Represents the redundant backup level of the project data, Represents the current time, Represents the time when the project data was last updated. Represents the frequency of use of project data, Represents the maximum frequency of use, Represents the life cycle length of the project data, Represents the initial life cycle length of the project data, is the time attenuation coefficient, They are the weight coefficients of access control level, encryption strength and redundant backup level, and they satisfy .

[0036] In a second aspect, the embodiment of the present application provides a system for hierarchical storage of blockchain data in the field of urban renewal, including:

[0037] A division module is used to divide the project data of the urban renewal project into multiple data levels according to the life cycle stage of the urban renewal project, and the project data of each data level is classified and stored according to the update frequency and access requirements, wherein the project data with high frequency update and high access requirements are stored on the chain, and the project data with low frequency update and low access requirements are stored off the chain;

[0038] A construction module for building a multi-level index structure on the chain, which is used to quickly locate project data stored off-chain while ensuring the integrity and traceability of the on-chain data;

[0039] The setting module is used to set the data migration strategy, and when a change in the access mode of the project data in any data layer is detected, the migration of the project data between the data layers is triggered.

[0040] In the third aspect, an embodiment of the present application provides a computing device, comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement a blockchain data hierarchical storage method in the field of urban renewal as described in any one of the first aspects.

[0041] In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program. When the computer program is executed by a computer, it implements a method for hierarchical storage of blockchain data in the field of urban renewal as described in any one of the first aspects.

[0042] In the embodiment of the present application, the project data of the urban renewal project is divided into multiple data levels according to the life cycle stage of the urban renewal project, and the project data of each data level is classified and stored according to the update frequency and access requirements, wherein the project data with high frequency update and high access requirements are stored on the blockchain, and the project data with low frequency update and low access requirements are stored off the blockchain; a multi-level index structure is constructed on the chain, and the multi-level index structure is used to quickly locate the project data stored off the chain, while ensuring the integrity and traceability of the on-chain data; a data migration strategy is set, and when a change in the access mode of the project data in any data level is detected, the migration of project data between data levels is triggered. The technical solution provided by the present application improves the efficiency and security of urban renewal project management.

[0043] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 A flowchart of a method for hierarchical storage of blockchain data in the field of urban renewal provided in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of the structure of a blockchain data hierarchical storage system in the field of urban renewal provided by an embodiment of the present application;

[0047] Figure 3 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0049] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0051] Figure 1 A flowchart of a method for storing blockchain data in a hierarchical manner in the field of urban renewal is provided for an embodiment of the present application, such as Figure 1 As shown, the method includes:

[0052] 101. According to the life cycle stage of the urban renewal project, the project data of the urban renewal project is divided into multiple data levels, and the project data of each data level is classified and stored according to the update frequency and access requirements, wherein the project data with high frequency update and high access requirements are stored on the blockchain, and the project data with low frequency update and low access requirements are stored off the blockchain;

[0053] In this step, according to the different life cycle stages of urban renewal projects from planning to implementation to post-maintenance, the relevant project data is divided into different data levels according to the update frequency and access requirements. Data that is frequently updated and often needs to be queried is stored on the blockchain to ensure the real-time and security of the data; while data that is less updated and has lower access requirements is stored in the off-chain database to save storage costs and improve system performance.

[0054] In this application example, in a city renewal project, the project team decided to store daily updated project progress reports and weekly updated fund usage information on the chain, because this information is crucial for project management and needs to be accessed at any time. The preliminary design drawings, early planning documents and other information of the project are stored off-chain because they are rarely changed once they are determined and the access frequency is relatively low.

[0055] In the existing urban renewal project management, project data is usually stored and managed in a centralized manner. Although this method is convenient for unified management and access, it also has some obvious shortcomings. First, since all data is stored in the same system, as the scale of the project expands, the amount of data increases dramatically, resulting in high storage costs. Secondly, centralized storage is easy to become a target of attack, and data security and privacy protection face challenges. In addition, the transparency and traceability of project data are poor, making it difficult to meet the needs of multi-party collaboration.

[0056] In order to solve the above problems, the embodiment of the present invention proposes a data management solution for urban renewal projects based on blockchain. By classifying and storing project data according to different life cycle stages, update frequencies, and access requirements, it not only ensures the security and transparency of the data, but also effectively reduces storage costs and improves the overall performance of the system.

[0057] The options are as follows:

[0058] Optionally, in step 101, the project data of the urban renewal project is divided into multiple data levels according to the life cycle stage of the urban renewal project, and the project data of each data level is classified and stored according to the update frequency and access requirements, including: dividing the project data of the urban renewal project into multiple data levels according to the life cycle stage of the urban renewal project, and the life cycle stage includes the planning stage, the design stage, the construction stage, the acceptance stage and the maintenance stage; in each of the life cycle stages, the project data is divided into the first category of data or the second category of data according to the update frequency and access requirements of the project data, wherein the first category of data includes project data with high frequency updates and high access requirements, and the second category of data includes project data with low frequency updates and low access requirements; the first category of data is stored on the blockchain, and the blockchain technology is used to ensure the transparency, security and immutability of the first category of data; the second category of data is stored off the blockchain, and data compression and encryption technology is used to reduce the storage cost of the second category of data and ensure data security, and at the same time, an association is established with the first category of data stored on the chain through the hash value or digital fingerprint on the chain to ensure the traceability and authenticity of the off-chain data.

[0059] In this step, the life cycle stage refers to the different stages that an urban renewal project goes through from the beginning to the end, including the planning stage, design stage, construction stage, acceptance stage, and maintenance stage. The first type of data is project data with high frequency updates and high access requirements, such as construction progress, capital flow, etc. The second type of data is project data with low frequency updates and low access requirements, such as historical documents, meeting minutes, etc. The blockchain on-chain is the data stored in the blockchain network, which has the characteristics of transparency, security, and immutability. The blockchain off-chain is the data stored in the traditional database, which is associated with the on-chain data through hash values ​​or digital fingerprints to ensure the traceability and authenticity of the data. The hash value is a fixed-length string generated by a hash algorithm, which is used to verify the integrity and authenticity of the data. A digital fingerprint is a feature code similar to a hash value that is used to uniquely identify data.

[0060] First, project data are divided into multiple data levels according to the life cycle stages of urban renewal projects.

[0061] At each life cycle stage, data is divided into first-category data and second-category data based on the update frequency and access requirements of project data.

[0062] Secondly, the first type of data is stored on the blockchain, and blockchain technology is used to ensure the transparency, security and immutability of the data.

[0063] The second type of data is stored off-chain in the blockchain, and data compression and encryption technology are used to reduce storage costs and ensure data security.

[0064] Finally, the hash value or digital fingerprint on the chain is associated with the first type of data stored on the chain to ensure the traceability and authenticity of the off-chain data.

[0065] In an embodiment of the present application, it is assumed that a city is carrying out a large-scale urban renewal project, which includes multiple phases, and each phase has a large amount of project data that needs to be managed.

[0066] Planning stage: project plan, preliminary design plan, etc.

[0067] The first type of data: project plan (high frequency updates, high access requirements).

[0068] The second type of data: preliminary design plans (low-frequency updates, low access requirements).

[0069] Design stage: detailed design drawings, technical specifications, etc.

[0070] The first type of data: detailed design drawings (high frequency updates, high access requirements).

[0071] The second type of data: technical specifications (low-frequency updates, low access requirements).

[0072] Construction phase: construction progress report, cash flow records, etc.

[0073] The first type of data: construction progress report (high frequency update, high access demand).

[0074] The second type of data: construction logs (low-frequency updates, low access requirements).

[0075] Acceptance stage: acceptance report, quality inspection results, etc.

[0076] The first type of data: acceptance report (high frequency update, high access demand).

[0077] The second type of data: quality inspection results (low-frequency updates, low access requirements).

[0078] Maintenance phase: maintenance records and user feedback.

[0079] Category 1 data: maintenance records (high frequency updates, high access requirements).

[0080] The second type of data: user feedback (low-frequency updates, low access demand).

[0081] All data with high frequency updates and high access requirements is stored on the blockchain.

[0082] All data with low frequency updates and low access requirements are stored off-chain on the blockchain, using data compression and encryption technology.

[0083] For the second type of data stored off-chain, its hash value or digital fingerprint is generated, and these hash values ​​or digital fingerprints are stored on-chain and associated with the corresponding first type of data. For example, the hash value of the preliminary design plan is stored on-chain and associated with the project plan to ensure the authenticity and traceability of the preliminary design plan.

[0084] Through the above scheme, the following beneficial effects can be achieved: data with low frequency of updates and low access requirements are stored off-chain, which reduces the storage burden of the blockchain and reduces storage costs. The first type of data is stored on the blockchain, ensuring the transparency, security and immutability of the data; the second type of data is associated with the on-chain data through hash values ​​or digital fingerprints to ensure the authenticity of the data. Data with high frequency of updates and high access requirements are stored on the chain, which facilitates quick access and real-time updates, and improves the overall performance of the system. Through blockchain technology, all important data change records can be traced, which enhances the transparency of the project and facilitates multi-party collaboration and supervision.

[0085] 102. Construct a multi-level index structure on the chain, the multi-level index structure is used to quickly locate the project data stored off the chain, while ensuring the integrity and traceability of the on-chain data;

[0086] In this step, in order to enable the data stored off-chain to be efficiently retrieved and accessed, a multi-level index structure is built on the chain. This index not only helps users quickly locate specific off-chain data, but also ensures the integrity of the on-chain data, that is, any modification of the off-chain data must be tracked through the on-chain index, thereby ensuring the traceability of the data.

[0087] In this application example, in the above-mentioned urban renewal project, the development team created a unique identifier for each important document off-chain, and stored these identifiers and the basic information of the document as index items on the chain. When project members need to find a specific design drawing or meeting minutes, they can quickly locate the specific location of the document through the index on the chain, and then access the files stored off-chain.

[0088] With the development of blockchain technology, more and more applications are beginning to use blockchain to ensure the transparency, integrity and immutability of data. However, in practical applications, it is not realistic to store large amounts of data directly on the blockchain due to the high storage cost and limited processing speed of the blockchain. Therefore, many applications choose to store data off-chain and only retain the index or summary information of the data on the chain. However, this approach also brings new challenges, namely how to efficiently manage and retrieve off-chain data while maintaining the integrity and traceability of on-chain data.

[0089] Existing solutions often use simple hash pointers or direct off-chain storage addresses as indexes. Although this approach is simple, it has low retrieval efficiency when facing large-scale data sets and is difficult to meet real-time requirements. In addition, the simple indexing method lacks a hierarchical structure, which is not conducive to data classification management and query optimization. Therefore, an embodiment of the present invention proposes a method for constructing a multi-level index structure, which aims to improve the retrieval efficiency of off-chain data while ensuring the integrity and traceability of on-chain data.

[0090] The options are as follows:

[0091] Optionally, the building of a multi-level index structure on the chain in step 102 includes: defining and initializing index nodes in the blockchain, the index nodes being used to store location information and metadata information pointing to off-chain project data to establish an association relationship between the on-chain project data and the off-chain project data; designing and implementing a multi-level index structure, the multi-level index structure consisting of a basic index layer and an advanced index layer, the basic index layer being used to link to the location information of the off-chain project data, and the advanced index layer being used to aggregate the information of the basic index layer to form a hierarchical index structure; using a hash algorithm to generate a unique identifier for the project data stored off-chain, and recording the unique identifier together with the metadata information in the corresponding index node to achieve fast retrieval, the metadata including the data type and creation date.

[0092] In this step, the index node is a special data structure defined in the blockchain, which is used to store the location information and metadata information pointing to the off-chain data, and is a bridge connecting the on-chain and off-chain data. The multi-level index structure is a hierarchical index design, which usually includes a basic index layer and an advanced index layer. The former directly points to the specific location of the off-chain data, and the latter is used to summarize the information of the basic layer to facilitate fast retrieval at the high level. The hash algorithm is an algorithm that converts data of any length into a fixed-length output. It is often used to generate a unique identifier for the data to ensure the integrity and tamper-proofness of the data. Metadata is data that describes the data, such as data type and creation date, which helps to classify and manage the data.

[0093] First, a specific data structure is defined in the blockchain, the index node, which is used to store the location information and metadata information of the off-chain data. Each index node not only points to the specific off-chain data, but also contains important descriptive information about the data, which helps with subsequent data retrieval and management.

[0094] Next, design a multi-level index structure, which is usually divided into a basic index layer and an advanced index layer. The basic index layer is responsible for directly linking to the specific location information of the off-chain data, while the advanced index layer aggregates the information of the basic layer to form a hierarchical index system. The advantage of this design is that it can flexibly switch between different levels according to different query requirements, thereby improving retrieval efficiency.

[0095] A hash algorithm is used to generate a unique hash value for each piece of project data stored off-chain as an identifier for the data. This identifier is recorded in the corresponding index node together with the metadata to ensure the uniqueness and integrity of the data.

[0096] In this application example, it is assumed that there is a blockchain-based digital copyright management system for managing artists' works. The system needs to process a large amount of work data, including multimedia files such as pictures and videos. These files are not suitable for direct storage on the blockchain due to their large size. Therefore, the above multi-level index structure is used to manage these off-chain data.

[0097] When an artist uploads a new work, the system first uses the IPFS protocol to store the work file off-chain and obtains a unique IPFS address.

[0098] Next, the system calculates the hash value of the work file using the SHA-256 algorithm as its unique identifier.

[0099] Then, an index node is created on the blockchain to record the IPFS address, hash value, and metadata (such as the work name, author, creation date, etc.) of the work.

[0100] For a large number of works, the system further constructs a multi-level index structure, in which the basic index layer contains detailed index information of all works, while the advanced index layer aggregates this information by category (such as music, painting, photography, etc.) to form a classified catalog.

[0101] Through this design, users can quickly find the category of works they are interested in through the advanced index layer, and then accurately access specific works through the basic index layer, which greatly improves the efficiency of data retrieval. At the same time, since each work has a unique identifier based on the hash algorithm, the integrity and tamper-proofness of the data are ensured, meeting the needs of digital copyright management.

[0102] 103. Set a data migration strategy to trigger the migration of project data between data levels when a change in the access mode of project data in any data level is detected.

[0103] In this step, as the project develops, some data that was originally accessed less frequently may become more and more important, and the access demand may increase. Therefore, it is necessary to set a set of data migration strategies. When a significant change in the data access pattern in a certain data layer is detected, the migration of data between different layers can be automatically or manually triggered to optimize the utilization efficiency of storage resources and improve user experience.

[0104] In this application example, continuing with the above project as an example, assume that at the beginning of the project, the public did not pay much attention to the environmental impact assessment report, so the report was initially stored off-chain. However, as the project progressed, the report became the focus of public attention and the number of visits surged. At this time, the project team migrated the report and its related materials to the chain according to the pre-set data migration strategy, so as to meet the public's query needs more conveniently and quickly.

[0105] In a distributed storage system based on blockchain, on-chain storage is more expensive, while off-chain storage is cheaper but has a slower access speed. In order to balance storage cost and access efficiency, a mechanism to dynamically adjust the data storage location is needed. Existing solutions often adopt static data storage strategies that cannot be flexibly adjusted according to changes in actual access patterns, resulting in a waste of storage resources and a decline in user experience.

[0106] The data migration strategy proposed in the embodiment of the present invention aims to automatically trigger migration between data levels by continuously monitoring and analyzing the access mode of project data, thereby optimizing the allocation of storage resources, improving data access efficiency, and reducing storage costs. This strategy can effectively respond to dynamic changes in access patterns and improve the flexibility and responsiveness of the system.

[0107] The options are as follows:

[0108] Optionally, the data migration strategy is set in step 103, and when a change in the access pattern of the project data in any data layer is detected, the project data migration between data layers is triggered, including: continuously monitoring the access frequency and pattern of the project data in each data layer, recording and analyzing the access logs to identify the access pattern of the project data, wherein the access pattern includes the access time distribution and the peak access volume; identifying the degree of change in the access pattern by comparing the access patterns in different time periods; setting a threshold condition, and when it is detected that the degree of change in the access pattern exceeds the preset threshold condition, triggering the project data migration between data layers, wherein the process of project data migration between data layers includes migrating the frequently accessed project data from the off-chain to the on-chain storage, or migrating the infrequently accessed project data from the on-chain to the off-chain storage; after the data migration is completed, updating the multi-level index structure and metadata information on the chain.

[0109] In this step, the data migration strategy is a mechanism that automatically adjusts the data storage location according to the changes in the data access pattern, with the aim of optimizing the allocation of storage resources and improving data access efficiency. The access pattern describes the way and regularity of data access, including the access time distribution and the access volume peak. The access time distribution is the frequency distribution of data access in different time periods. The access volume peak is the maximum number of times the data is accessed in a specific time period. The threshold condition is a pre-set standard. When the degree of change in the access pattern exceeds this standard, data migration is triggered. The multi-level index structure is a hierarchical index design for efficient management and retrieval of data.

[0110] First, the system regularly collects and records the access logs of project data in each data layer, including information on access time, access frequency, and access volume. These access logs are stored in the system for subsequent analysis.

[0111] Secondly, by counting and analyzing the access logs, we can identify the access time distribution and access volume peak of the data. For example, some data may be frequently accessed in the morning on weekdays, but less frequently accessed in the evening on weekends.

[0112] Next, the access pattern of the current time period is compared with the access pattern of the historical time period to calculate the degree of change in the access pattern. For example, the degree of change can be measured using standard deviation or percentage change.

[0113] Furthermore, a standard for the degree of change is preset. When the actual degree of change exceeds this standard, data migration is triggered. Once triggered, the system will start the data migration process, migrating high-frequency access data from the off-chain to the on-chain, or migrating low-frequency access data from the on-chain to the off-chain. After the data migration is completed, the multi-level index structure and metadata information on the chain are updated:

[0114] Finally, after the data migration is completed, the system updates the multi-level index structure on the chain to ensure that the index node points to the correct data location and updates the metadata information, such as the access frequency and migration time of the data.

[0115] In the embodiment of this application, it is assumed that there is a blockchain-based medical health data management system for storing and managing patients' medical records. The system needs to process a large amount of patient data, including medical records, examination reports, etc., some of which are stored on the chain and some are stored off the chain.

[0116] The system regularly collects and records access logs for each patient’s data, including information such as the time of each visit, visitor identity, and visit frequency.

[0117] By analyzing the access logs, the system found that some patients' medical records were accessed more frequently in the mornings on weekdays and less frequently in the evenings on weekends.

[0118] The system compares the access patterns of the current time period with the access patterns of the historical time period and calculates the degree of change in the access patterns. For example, the access frequency of a patient's medical records in the last week increased by 50% compared with the previous week.

[0119] A threshold value of the degree of change is preset, for example, 30%. When the degree of change in the access pattern is detected to exceed 30%, data migration is triggered.

[0120] In this example, because the access frequency increased by 50%, exceeding the 30% threshold, the system triggered data migration.

[0121] The system migrates frequently accessed medical record data from off-chain to on-chain to increase access speed.

[0122] At the same time, infrequently accessed medical record data is migrated from the chain to the off-chain to save on-chain storage space.

[0123] After the data migration is completed, the system updates the multi-level index structure on the chain to ensure that the index node points to the correct data location.

[0124] Update metadata information to record data migration time and new access frequency.

[0125] Through the above data migration strategy, the system can dynamically adjust the storage location of data to ensure that frequently accessed data is stored on the chain, and infrequently accessed data is stored off the chain. This not only improves data access efficiency and reduces storage costs, but also improves the flexibility and responsiveness of the system. Specifically: frequently accessed data is stored on the chain, which reduces access latency and improves user experience. Infrequently accessed data is stored off the chain, which saves on-chain storage space and reduces storage costs. The system can automatically adjust the data storage location according to changes in actual access patterns to adapt to different usage scenarios.

[0126] This strategy effectively solves the problems of resource waste and degraded user experience caused by static data storage strategies in existing technologies, and improves the overall performance of the system.

[0127] In multi-city or multi-organization blockchain applications, project data of different cities need to be shared and exchanged between multiple blockchains. However, since each blockchain system may have different technical architectures, consensus mechanisms, and data formats, traditional data sharing methods are difficult to ensure data consistency and security. The cross-chain interoperability protocol proposed in the embodiment of the present invention aims to achieve project data sharing and exchange between different blockchains through standardized interfaces and security mechanisms, ensure data consistency and security, and improve the collaborative efficiency of multi-city projects.

[0128] The options are as follows:

[0129] Optionally, it also includes:

[0130] Implement cross-chain interoperability protocols to allow project data sharing and exchange between different urban renewal projects, ensuring the consistency and security of project data between different blockchains.

[0131] In this step, the cross-chain interoperability protocol is a standardized communication protocol that allows data sharing and exchange between different blockchain systems to ensure data consistency and security. Project data sharing is the sharing of project-related data between different blockchain systems, such as project status and transaction records. Project data exchange is the exchange of project-related data between different blockchain systems, such as updating project status and synchronizing transaction records. Data consistency is to ensure that the same data has the same value and status in different blockchain systems. Data security is to ensure that data is not tampered with, leaked or lost during data sharing and exchange.

[0132] First, design a set of standardized communication protocols, including data format, communication interface, and security mechanism, to ensure seamless connection between different blockchain systems. Standardize the protocol and make it an industry standard, which is convenient for developers of different blockchain systems to refer to and implement.

[0133] Secondly, define a unified data format to ensure that data between different blockchain systems can be understood and processed by each other. Develop standardized interfaces to allow different blockchain systems to share data through these interfaces. Design a data synchronization mechanism to ensure data consistency between different blockchain systems.

[0134] Furthermore, we will develop standardized interfaces to allow different blockchain systems to exchange data through these interfaces. We will design data verification mechanisms to ensure that the exchanged data is not tampered with during transmission. We will implement cross-chain transaction management to ensure the atomicity and consistency of data exchange.

[0135] Finally, regularly check the data consistency in different blockchain systems to find and repair inconsistent data. Use encryption technology to protect the security of data during transmission. Implement an identity authentication mechanism to ensure that only authorized blockchain systems can share and exchange data.

[0136] In this application example, it is assumed that there is a blockchain-based urban traffic management system involving traffic data management in multiple cities. Each city has its own blockchain system, and it is necessary to share and exchange traffic data such as road condition information, traffic accident records, etc. between these systems.

[0137] Design a set of standardized cross-chain interoperability protocols, including data formats, communication interfaces, security mechanisms, etc.

[0138] Standardize the protocol and publish it as an industry standard for reference and implementation in blockchain systems of various cities.

[0139] Define a unified data format to ensure that data between different city blockchain systems can be understood and processed by each other.

[0140] Develop standardized interfaces to allow different city blockchain systems to share data through these interfaces.

[0141] Design data synchronization mechanisms, such as periodic synchronization or event-driven synchronization, to ensure data consistency between different city blockchain systems.

[0142] Develop standardized interfaces, such as message queues, to allow different city blockchain systems to exchange data through these interfaces.

[0143] Design data verification mechanisms, such as digital signatures and hash checks, to ensure that the exchanged data is not tampered with during transmission.

[0144] Implement cross-chain transaction management, such as two-phase commit, to ensure the atomicity and consistency of data exchange.

[0145] Ensure data consistency and security:

[0146] Regularly check the data consistency in different city blockchain systems to find and fix inconsistent data.

[0147] Use encryption technology to protect the security of data during transmission.

[0148] Implement identity authentication mechanisms, such as public key infrastructure, to ensure that only authorized city blockchain systems can share and exchange data.

[0149] By implementing the cross-chain interoperability protocol, traffic management systems in different cities can efficiently and securely share and exchange traffic data. The specific effects are as follows: Traffic data between different cities can be synchronized in real time, which improves the collaborative efficiency of multi-city traffic management. Through standardized data formats and synchronization mechanisms, the consistency of data between blockchain systems in different cities is ensured. Through data encryption and identity authentication mechanisms, the security and integrity of data during transmission are ensured. Standardized cross-chain interoperability protocols promote the interoperability of blockchain systems in different cities and promote technological innovation and application development.

[0150] This strategy effectively solves the problem of data sharing and exchange between different blockchain systems in existing technologies, and improves the collaborative efficiency and data security of multi-city projects.

[0151] In a blockchain-based distributed storage system, data migration is an important optimization method to balance storage cost and access efficiency. Existing data migration strategies are usually based on simple access frequency or data size, lacking an assessment of the comprehensive value of data. This single assessment method may lead to waste of resources and a decline in user experience. For example, although some data is not frequently accessed, its access value is very high. If it is migrated based solely on access frequency, the optimization opportunity of these high-value data may be missed.

[0152] The method for calculating the priority score of data migration proposed in the embodiment of the present invention determines the priority of data migration more scientifically by comprehensively considering factors such as data access frequency, access value, migration cost and data size. This method not only improves the efficiency of data migration, but also optimizes the allocation of storage resources and improves the overall performance of the system.

[0153] The options are as follows:

[0154] Optionally, in the process of triggering the migration of project data between data levels, the following is also included:

[0155] Calculate the priority score of data migration, which is used to determine the priority score of migrating frequently accessed project data from off-chain to on-chain storage, or the priority score of migrating infrequently accessed project data from on-chain to off-chain storage;

[0156] Among them, data migration priority score Calculated by the following formula:

[0157] ;

[0158] in, Represents the access frequency of project data, Represents the access value of the project data, Represents the migration cost of project data, Represents the size of the project data, Represents the weight of the project data, which is dynamically adjusted according to the importance of the project data. Represents the current time, Represents the time when the project data was last accessed, is the time attenuation coefficient, are the weight coefficients of access frequency, access value, migration cost and data size, and satisfy .

[0159] In this step, the cross-chain interoperability protocol is a standardized communication protocol that allows data sharing and exchange between different blockchain systems to ensure data consistency and security. The data migration priority score is a comprehensive evaluation indicator used to determine the priority of data migration, including factors such as access frequency, access value, migration cost, and data size.

[0160] First, design a set of standardized communication protocols, including data format, communication interface, security mechanism, etc., to ensure seamless connection between different blockchain systems. Standardize the protocol and make it an industry standard, which is convenient for developers of different blockchain systems to refer to and implement.

[0161] Secondly, define a unified data format to ensure that data between different blockchain systems can be understood and processed by each other. Develop standardized interfaces to allow different blockchain systems to share data through these interfaces. Develop standardized interfaces to allow different blockchain systems to exchange data through these interfaces. Design a data verification mechanism to ensure that the exchanged data is not tampered with during transmission. Implement cross-chain transaction management to ensure the atomicity and consistency of data exchange.

[0162] Furthermore, the access frequency of each project data is collected , access value , Migration costs , Data size and weight .

[0163] ;

[0164] in, Represents the access frequency of project data, Represents the access value of the project data, Represents the migration cost of project data, Represents the size of the project data, Represents the weight of the project data, which is dynamically adjusted according to the importance of the project data. Represents the current time, Represents the time when the project data was last accessed, is the time attenuation coefficient, are the weight coefficients of access frequency, access value, migration cost and data size, and satisfy .

[0165] Use the above formula to calculate the priority score of each project data .

[0166] Score by priority Sort your project data and prioritize migration.

[0167] Finally, high-priority high-frequency access data is migrated from the off-chain to the on-chain. Low-priority low-frequency access data is migrated from the on-chain to the off-chain. After the data migration is completed, the multi-level index structure and metadata information on the chain are updated.

[0168] In the embodiment of this application, it is assumed that there is a multi-city medical health data management system based on blockchain, involving medical data of multiple cities such as Beijing, Shanghai, and Guangzhou. The system needs to share and exchange medical data between these cities, and dynamically adjust the storage location of the data according to the access mode of the data.

[0169] Design a set of standardized cross-chain interoperability protocols, including data formats, communication interfaces, security mechanisms, etc.

[0170] The protocol will be standardized and published as an industry standard for reference and implementation in medical data management systems of various cities.

[0171] Define a unified data format to ensure that data between medical data management systems in different cities can be understood and processed by each other.

[0172] Develop standardized interfaces to allow medical data management systems in different cities to share data through these interfaces.

[0173] Develop standardized interfaces to allow different city medical data management systems to exchange data through these interfaces.

[0174] Design data verification mechanisms, such as digital signatures and hash checks, to ensure that the exchanged data is not tampered with during transmission.

[0175] Implement cross-chain transaction management, such as two-phase commit, to ensure the atomicity and consistency of data exchange.

[0176] Calculate the priority score for data migration:

[0177] Frequency of visits to collect data for each patient , access value , Migration costs , Data size and weight .

[0178] Use the formula to calculate the priority score for each patient data .

[0179] For example, suppose the parameters of a patient data are as follows:

[0180] Second-rate sky; point; unit; ; ;

[0181] ; ; ; ;

[0182] Calculating Priority Scores :

[0183] ;

[0184] Score by priority Sort patient data, migrate high-scoring data from off-chain to on-chain, and low-scoring data from on-chain to off-chain.

[0185] Update the multi-level index structure and metadata information on the chain to ensure that the index node points to the correct data location.

[0186] By implementing the cross-chain interoperability protocol and data migration priority scoring method, the system can efficiently and securely share and exchange medical data in multiple cities, and dynamically adjust the storage location of the data according to the comprehensive value of the data. The specific effects are as follows: Medical data between different cities can be synchronized in real time, which improves the collaborative efficiency of multi-city medical management. By comprehensively evaluating the access frequency, access value, migration cost and data size of the data, the priority of data migration is scientifically determined, and the allocation of storage resources is optimized. High-value data with high frequency of access is stored on the chain, which improves the data access speed and enhances the user experience. Through the cross-chain interoperability protocol and data synchronization mechanism, the consistency of data between blockchain systems in different cities is ensured. Through data encryption and identity authentication mechanisms, the security and integrity of data during transmission are ensured.

[0187] This strategy effectively solves the problems of single data migration strategy, resource waste and degraded user experience in existing technologies, and improves the overall performance and user experience of the system.

[0188] In multi-city or multi-organization blockchain applications, data sharing and exchange between different blockchain systems is a common requirement. However, in the process of sharing and exchanging data between different blockchain systems, there are challenges in security and consistency. Existing data sharing solutions often lack a comprehensive assessment of data security, making data vulnerable to attacks or leaks during transmission and storage.

[0189] The method for calculating the data sharing security score proposed in the embodiment of the present invention evaluates the security level of data sharing between different blockchains by comprehensively considering factors such as the data's access control level, encryption strength, and redundant backup level. This method not only improves the security of data sharing, but also ensures the consistency and reliability of data between different blockchain systems.

[0190] The options are as follows:

[0191] Optionally, in the process of implementing a cross-chain interoperability protocol to allow project data sharing and exchange between different urban renewal projects, it also includes:

[0192] Calculating a data sharing security score, where the data sharing security score is used to evaluate the security level of data entries shared between different blockchains;

[0193] Wherein, the data sharing security score Calculated by the following formula:

[0194] ;

[0195] in, Represents the access control level of project data, Represents the encryption strength of the project data. Represents the redundant backup level of the project data, Represents the current time, Represents the time when the project data was last updated. Represents the frequency of use of project data, Represents the maximum frequency of use, Represents the life cycle length of the project data, Represents the initial life cycle length of the project data, is the time attenuation coefficient, They are the weight coefficients of access control level, encryption strength and redundant backup level, and they satisfy .

[0196] In this step, the cross-chain interoperability protocol is a standardized communication protocol that allows data sharing and exchange between different blockchain systems to ensure data consistency and security. The data sharing security score is a comprehensive evaluation indicator used to assess the security level of data entries shared between different blockchains.

[0197] First, design a set of standardized communication protocols, including data format, communication interface, security mechanism, etc., to ensure seamless connection between different blockchain systems. Standardize the protocol and make it an industry standard, which is convenient for developers of different blockchain systems to refer to and implement.

[0198] Secondly, define a unified data format to ensure that data between different blockchain systems can be understood and processed by each other. Develop standardized interfaces to allow different blockchain systems to share data through these interfaces. Develop standardized interfaces to allow different blockchain systems to exchange data through these interfaces. Design a data verification mechanism to ensure that the exchanged data is not tampered with during transmission. Implement cross-chain transaction management to ensure the atomicity and consistency of data exchange.

[0199] Furthermore, the access control level of each data entry is collected , encryption strength , Redundancy backup level , Current time , Last updated Frequency of use , Maximum frequency of use , life cycle length and initial life cycle length .

[0200] ;

[0201] in, Represents the access control level of project data, Represents the encryption strength of the project data. Represents the redundant backup level of the project data, Represents the current time, Represents the time when the project data was last updated. Represents the frequency of use of project data, Represents the maximum frequency of use, Represents the life cycle length of the project data, Represents the initial life cycle length of the project data, is the time attenuation coefficient, They are the weight coefficients of access control level, encryption strength and redundant backup level, and they satisfy .

[0202] Calculate the security score for each data entry using the above formula .

[0203] Based on safety rating Assess the security level of data entries shared across different blockchains.

[0204] Finally, according to the safety score Select appropriate data entries for sharing and exchange. Share the selected data entries from one blockchain system to another through the cross-chain interoperability protocol. After the data sharing is completed, update the multi-level index structure and metadata information on the chain.

[0205] In the embodiment of this application, it is assumed that there is a multi-city medical and health data management system based on blockchain, involving medical data from multiple cities such as Beijing, Shanghai, and Guangzhou. The system needs to share and exchange medical data between these cities, while evaluating the security level of data sharing.

[0206] Design a set of standardized cross-chain interoperability protocols, including data format, communication interface, and security mechanism. Standardize the protocol and publish it as an industry standard for reference and implementation by medical data management systems in various cities.

[0207] Define a unified data format to ensure that data between medical data management systems in different cities can be understood and processed by each other. Develop standardized interfaces to allow medical data management systems in different cities to share data through these interfaces. Develop standardized interfaces to allow medical data management systems in different cities to exchange data through these interfaces. Design a data verification mechanism to ensure that the exchanged data is not tampered with during transmission. Implement cross-chain transaction management to ensure the atomicity and consistency of data exchange.

[0208] The level of access control that is collected for each patient’s data , encryption strength , several backup levels , Current time , Last updated Frequency of use , Maximum frequency of use , life cycle length and initial life cycle length .

[0209] Use the formula to calculate the safety score for each patient's data .

[0210] For example, suppose the parameters of a patient data are as follows:

[0211] (up to 5); Points (maximum 100); (up to 5); ; ; Jihara; times / day; sky; sky; ; ; ;

[0212] ;

[0213] Based on safety rating Select appropriate data items for sharing and exchange. For example, data items with high scores are shared first.

[0214] Selected data entries are shared from one city’s blockchain system to another city’s blockchain system through a cross-chain interoperability protocol.

[0215] Update the multi-level index structure and metadata information on the chain to ensure that the index node points to the correct data location.

[0216] By implementing the cross-chain interoperability protocol and data sharing security scoring method, the system can efficiently and securely share and exchange medical data in multiple cities. The specific effects are as follows: By comprehensively evaluating the access control level, encryption strength and redundant backup level of the data, the security of the data between different blockchain systems is ensured. Through the cross-chain interoperability protocol and data synchronization mechanism, the consistency of data between blockchain systems in different cities is ensured. According to the security score of the data, appropriate data entries are selected for sharing and exchange, which optimizes the allocation of resources. High-security data with high frequency of access is shared first, which improves the data access speed and enhances the user experience. The reliability and recovery capability of the data are enhanced through the redundant backup mechanism.

[0217] This strategy effectively solves the problems of insufficient data sharing security, resource waste and degraded user experience in existing technologies, and improves the overall performance and security of the system.

[0218] Figure 2 A schematic diagram of the structure of a blockchain data hierarchical storage system in the field of urban renewal is provided for the embodiment of the present application, such as Figure 2 As shown, the system includes:

[0219] A division module 21 is used to divide the project data of the urban renewal project into multiple data levels according to the life cycle stage of the urban renewal project, and the project data of each data level is classified and stored according to the update frequency and access requirements, wherein the project data with high frequency update and high access requirements are stored on the chain, and the project data with low frequency update and low access requirements are stored off the chain;

[0220] Construction module 22, used to construct a multi-level index structure on the chain, the multi-level index structure is used to quickly locate the project data stored off-chain, while ensuring the integrity and traceability of the on-chain data;

[0221] The setting module 23 is used to set a data migration strategy, and when a change in the access mode of the project data in any data layer is detected, the migration of the project data between the data layers is triggered.

[0222] Figure 2 The urban renewal field blockchain data hierarchical storage system can perform Figure 1 The implementation principle and technical effects of the method for storing blockchain data in the urban renewal field described in the illustrated embodiment will not be described in detail. The specific manner in which each module and unit performs operations in the blockchain data layered storage system in the urban renewal field in the above embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.

[0223] In one possible design, Figure 2The urban renewal field blockchain data hierarchical storage system of the illustrated embodiment can be implemented as a computing device, such as Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32;

[0224] The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 32 .

[0225] The processing component 32 is used to: divide the project data of the urban renewal project into multiple data levels according to the life cycle stage of the urban renewal project, and classify and store the project data of each data level according to the update frequency and access requirements, wherein the project data with high frequency updates and high access requirements are stored on the blockchain, and the project data with low frequency updates and low access requirements are stored off the blockchain; construct a multi-level index structure on the chain, and the multi-level index structure is used to quickly locate the project data stored off the chain while ensuring the integrity and traceability of the on-chain data; set a data migration strategy, and when a change in the access mode of the project data in any data level is detected, trigger the migration of project data between data levels.

[0226] The processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0227] The storage component 31 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0228] Of course, the computing device may also include other components, such as input / output interfaces, display components, communication components, etc.

[0229] The input / output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc.

[0230] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.

[0231] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.

[0232] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The illustrated embodiment is a method for hierarchical storage of blockchain data in the field of urban renewal.

[0233] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0234] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0235] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0236] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for hierarchical storage of blockchain data in the field of urban renewal, characterized in that: include: According to the life cycle stage of the urban renewal project, the project data of the urban renewal project is divided into multiple data levels, and the project data of each data level is classified and stored according to the update frequency and access requirements, wherein the project data with high frequency update and high access requirements are stored on the blockchain, and the project data with low frequency update and low access requirements are stored off the blockchain; Constructing a multi-level index structure on the chain, the multi-level index structure is used to quickly locate the project data stored off the chain, while ensuring the integrity and traceability of the on-chain data; Set up data migration strategies to trigger project data migration between data levels when a change in access pattern of project data in any data level is detected; The process of triggering project data migration between data hierarchies also includes: Calculate the priority score of data migration, which is used to determine the priority score of migrating frequently accessed project data from off-chain to on-chain storage, or the priority score of migrating infrequently accessed project data from on-chain to off-chain storage; Among them, data migration priority score Calculated by the following formula: ; in, Represents the access frequency of project data, Represents the access value of the project data, Represents the migration cost of project data, Represents the size of the project data, Represents the weight of the project data, which is dynamically adjusted according to the importance of the project data. Represents the current time, Represents the time when the project data was last accessed, is the time attenuation coefficient, are the weight coefficients of access frequency, access value, migration cost and data size, and satisfy .

2. The method according to claim 1, characterized in that According to the life cycle stage of the urban renewal project, the project data of the urban renewal project is divided into multiple data levels, and the project data of each data level is classified and stored according to the update frequency and access requirements, including: Dividing the project data of the urban renewal project into multiple data levels according to the life cycle stages of the urban renewal project, wherein the life cycle stages include the planning stage, the design stage, the construction stage, the acceptance stage and the maintenance stage; At each of the life cycle stages, the project data is divided into first-category data or second-category data according to the update frequency and access requirements of the project data, wherein the first-category data includes project data with high frequency updates and high access requirements, and the second-category data includes project data with low frequency updates and low access requirements; Storing the first type of data on a blockchain, and using blockchain technology to ensure the transparency, security, and immutability of the first type of data; The second type of data is stored off-chain in the blockchain, and data compression and encryption technology is used to reduce the storage cost of the second type of data and ensure data security. At the same time, the hash value or digital fingerprint on the chain is used to establish an association with the first type of data stored on the chain to ensure the traceability and authenticity of the off-chain data.

3. The method according to claim 1, characterized in that The multi-level index structure is constructed on the chain, including: Defining and initializing an index node in the blockchain, wherein the index node is used to store location information and metadata information pointing to off-chain project data to establish an association relationship between the on-chain project data and the off-chain project data; Design and implement a multi-level index structure consisting of a basic index layer and an advanced index layer. The basic index layer is used to link to the location information of the project data under the chain, while the advanced index layer is used to aggregate the information of the basic index layer to form a hierarchical index structure. A hash algorithm is used to generate a unique identifier for the project data stored off-chain, and the unique identifier is recorded in the corresponding index node together with metadata information to achieve fast retrieval. The metadata includes data type and creation date.

4. The method according to claim 1, characterized in that The setting of the data migration strategy triggers the migration of project data between data levels when a change in the access mode of project data in any data level is detected, including: Continuously monitor the access frequency and pattern of project data in each data layer, record and analyze access logs to identify access patterns of project data, including access time distribution and access volume peaks; By comparing access patterns over different time periods, identify the degree of change in access patterns; Setting a threshold condition, when it is detected that the change in the access mode exceeds the preset threshold condition, triggering the migration of project data between data levels, wherein the process of project data migration between data levels includes migrating high-frequency access project data from off-chain to on-chain storage, or migrating low-frequency access project data from on-chain to off-chain storage; After the data migration is completed, the multi-level index structure and metadata information on the chain are updated.

5. The method according to claim 1, characterized in that Also includes: Implement cross-chain interoperability protocols to allow project data sharing and exchange between different urban renewal projects, ensuring the consistency and security of project data between different blockchains.

6. The method according to claim 5, characterized in that In the process of implementing a cross-chain interoperability protocol to allow project data sharing and exchange between different urban renewal projects, it also includes: Calculating a data sharing security score, where the data sharing security score is used to evaluate the security level of data entries shared between different blockchains; Wherein, the data sharing security score Calculated by the following formula: ; in, Represents the access control level of project data, Represents the encryption strength of the project data. Represents the redundant backup level of the project data, Represents the current time, Represents the time when the project data was last updated. Represents the frequency of use of project data, Represents the maximum frequency of use, Represents the life cycle length of the project data, Represents the initial life cycle length of the project data, is the time attenuation coefficient, They are the weight coefficients of access control level, encryption strength and redundant backup level, and they satisfy .

7. A system for hierarchical storage of blockchain data in the field of urban renewal, characterized in that: include: A division module is used to divide the project data of the urban renewal project into multiple data levels according to the life cycle stage of the urban renewal project, and the project data of each data level is classified and stored according to the update frequency and access requirements, wherein the project data with high frequency update and high access requirements are stored on the chain, and the project data with low frequency update and low access requirements are stored off the chain; A construction module for building a multi-level index structure on the chain, which is used to quickly locate project data stored off-chain while ensuring the integrity and traceability of the on-chain data; A setting module is used to set data migration strategies, and trigger the migration of project data between data levels when a change in the access mode of project data in any data level is detected; The process of triggering project data migration between data hierarchies also includes: Calculate the priority score of data migration, which is used to determine the priority score of migrating frequently accessed project data from off-chain to on-chain storage, or the priority score of migrating infrequently accessed project data from on-chain to off-chain storage; Among them, data migration priority score Calculated by the following formula: ; in, Represents the access frequency of project data, Represents the access value of the project data, Represents the migration cost of project data, Represents the size of the project data, Represents the weight of the project data, which is dynamically adjusted according to the importance of the project data. Represents the current time, Represents the time when the project data was last accessed, is the time attenuation coefficient, are the weight coefficients of access frequency, access value, migration cost and data size, and satisfy .

8. A computing device, characterized in that It comprises a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the method according to any one of claims 1 to 6.

9. A computer storage medium, characterized in that A computer program is stored, and when the computer program is executed by a computer, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Verifiable traceability method and device based on block chain

    CN116894047A

  • Data storage method and system based on legal knowledge service platform and storage medium

    CN118964496A

  • Clinical data statistical management analysis method based on block chain

    CN119249473A