Blockchain data cloud storage method

By constructing a multi-objective block migration optimization model and an evolutionary algorithm for cascading selection, some blocks of blockchain nodes are dynamically migrated to cloud storage, solving the problem of limited storage resources for blockchain nodes and realizing the release of storage space and improvement of system response speed.

CN121478884BActive Publication Date: 2026-04-10NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NORTHEASTERN UNIV CHINA
Filing Date
2026-01-08
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In industrial IoT scenarios, blockchain nodes have limited storage resources and cannot withstand the long-term accumulation of data. Existing technologies cannot effectively release storage space, and synchronizing to the cloud will introduce high costs and delays.

Method used

By constructing a multi-objective block migration optimization model, the migration trigger threshold of blockchain nodes is dynamically determined, and a cascaded selection evolutionary algorithm is used to optimize the migration of blocks to cloud storage, balancing data availability, economic cost and transmission overhead.

Benefits of technology

Without compromising the integrity and verifiability of the blockchain, this approach frees up local storage space for blockchain nodes, reduces storage costs, improves system response speed, and meets the needs of real-time applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121478884B_ABST
    Figure CN121478884B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of blockchains, in particular to a blockchain data cloud storage method.The method comprises the following steps: determining a block migration triggering threshold of a blockchain node in a blockchain according to a storage state index of the blockchain node in an observation time window; if the number of newly added blocks of the blockchain node in the observation time window is greater than the block migration triggering threshold of the blockchain node, a multi-target block migration optimization model of the blockchain is constructed; the multi-target block migration optimization model is solved to obtain a target migration number corresponding to the blockchain node; and target migration blocks of the target migration number are determined from candidate migration blocks of the blockchain node in the observation time window and are migrated to cloud storage.The application can release the local storage space of the blockchain node in the blockchain, reduce storage costs, improve system response speed, and meet the demand of real-time applications.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of blockchains, and in particular to a blockchain data cloud storage method. BACKGROUND

[0002] In the industrial Internet of Things scene such as intelligent manufacturing, in order to protect the non-tamperability and traceability of key production, process and quality data, a lightweight blockchain network is often deployed in the industrial field to store data. Industrial Internet of Things devices continuously generate massive data and store them on the chain, so that the storage copies of each blockchain node of the blockchain linearly increase over time. However, the storage resources of the blockchain nodes in the industrial field are usually limited, and their storage capacity cannot withstand the long-term accumulation of data.

[0003] In the related art, the pressure is mainly indirectly relieved by optimizing the utilization rate of local storage or using data sharding strategies, but the local physical storage space of the blockchain node cannot be truly released. If all the data of the blockchain node is simply synchronized to the cloud, high transmission costs and query delays will be introduced, and data sovereignty and real-time performance may be compromised. SUMMARY

[0004] Therefore, the present application provides a blockchain data cloud storage method, which intelligently selects part of the blocks from each blockchain node of the blockchain to migrate to the cloud storage under the premise of not damaging the integrity and verifiability of the blockchain, thereby truly releasing the local storage space of the blockchain node in the blockchain, reducing the storage cost, improving the system response speed, and meeting the needs of real-time applications.

[0005] According to one aspect of the present application, a blockchain data cloud storage method is provided, comprising:

[0006] According to the storage state index of the blockchain node in the observation time window, a block migration trigger threshold of the blockchain node is determined, the blockchain is deployed in an industrial field, the storage state index is determined according to the blocks stored in the blockchain node, and the blocks stored in the blockchain node are determined based on the industrial data generated by the industrial devices in the industrial field through the industrial Internet of Things deployed in the industrial field;

[0007] If the number of new blocks of the blockchain node in the observation time window is greater than the block migration trigger threshold of the blockchain node, a multi-objective block migration optimization model of the blockchain is constructed;

[0008] The multi-objective block migration optimization model is solved to obtain a target migration number corresponding to the blockchain node;

[0009] determine the target migration quantity of target migration blocks from candidate migration blocks of the blockchain node in the observation time window, the candidate migration blocks being determined according to new blocks of the blockchain node in the observation time window.

[0010] According to another aspect of the present application, a blockchain data cloud storage device is provided, comprising:

[0011] A determining module is configured to determine a block migration triggering threshold of a blockchain node according to a storage state indicator of the blockchain node in an observation time window, the blockchain being deployed in an industrial site, the storage state indicator being determined according to blocks stored in the blockchain node, the blocks stored in the blockchain node being determined by an industrial Internet of Things deployed in the industrial site based on industrial data generated by industrial equipment in the industrial site.

[0012] A constructing module is configured to construct a multi-target block migration optimization model of the blockchain if a number of new blocks of the blockchain node in the observation time window is greater than the block migration triggering threshold of the blockchain node, and to solve the multi-target block migration optimization model to obtain a target migration quantity corresponding to the blockchain node.

[0013] A migration module is configured to determine target migration blocks of the target migration quantity from candidate migration blocks of the blockchain node in the observation time window, the candidate migration blocks being determined according to new blocks of the blockchain node in the observation time window.

[0014] According to still another aspect of the present application, a readable storage medium is provided, the readable storage medium having a program or instructions stored thereon, the program or instructions being executed by a processor to implement the steps of the above-described blockchain data cloud storage method.

[0015] According to yet another aspect of the present application, a computer device is provided, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor executing the program to implement the steps of the above-described blockchain data cloud storage method.

[0016] By the technical scheme, the application provides a blockchain data cloud storage method, according to the storage state data of the blockchain nodes in the blockchain within the observation time window, the block migration trigger threshold of each blockchain node is dynamically determined. When the number of new blocks of any blockchain node within the observation time window exceeds the block migration trigger threshold, a high-dimensional multi-objective block migration optimization model is constructed, which aims to minimize the future use probability loss of the block, the cloud storage cost, the weighted space occupancy rate of the blockchain and the migration transmission cost. Then, an evolutionary algorithm based on cascade selection is used to solve the multi-objective block migration optimization model, and the target migration number of the blocks that each blockchain node should migrate to the cloud storage is obtained. Finally, the target migration number of target migration blocks is selected from the candidate migration blocks of each blockchain node, and the target migration blocks are migrated to the cloud storage after encryption and hash anchor chain processing. The application can realize the release of the local storage space of the blockchain node without destroying the integrity and verifiability of the blockchain data, and effectively alleviate the pressure of the storage resource limited node. Moreover, through the multi-objective block migration optimization model, the data availability, economic cost, space release efficiency and transmission overhead are intelligently balanced, avoiding inefficient migration when the network is congested or the storage is relaxed. At the same time, the efficient solving algorithm used in the application ensures that high-quality decisions can still be obtained under the real-time constraints of industrial internet of things. Thus, the application provides a systematic solution for the sustainable operation and maintenance of the blockchain system in industrial internet of things.

[0017] The above description is only a summary of the technical scheme of the application, in order to more clearly understand the technical means of the application, the specific embodiments of the application can be implemented in accordance with the content of the description, and in order to make the above and other purposes, features and advantages of the application more obvious and easy to understand, the following specific embodiments of the application are described. BRIEF DESCRIPTION OF DRAWINGS

[0018] The drawings described herein are used to provide further understanding of the application, and form a part of the application. The schematic embodiments of the application and their descriptions are used to explain the application, and do not constitute an improper limitation on the application. In the drawings:

[0019] Figure 1 A flowchart of the blockchain data cloud storage method provided by the embodiment of the application is shown;

[0020] Figure 2 A flowchart of the blockchain data cloud storage method provided by another embodiment of the application is shown;

[0021] Figure 3 A structure block diagram of the blockchain data cloud storage device provided by the embodiment of the application is shown. DETAILED DESCRIPTION

[0022] Hereinafter, the application will be described in detail with reference to the drawings and examples. It should be noted that the examples in the application and the features in the examples can be combined with each other without conflict.

[0023] The embodiments of the application are described in detail below, examples of which are shown in the drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the drawings are exemplary and are used only to explain the application, and cannot be interpreted as a limitation of the application.

[0024] Those skilled in the art can understand that the singular forms "a", "an" and "the" used herein can also include the plural forms unless specifically stated otherwise. It should be further understood that the use of the term "include" in the specification of the application means that the features, integers, steps, operations, elements and / or components described therein are present, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we say an element is "connected" or "joined" to another element, it can be directly connected or joined to the other element, or there can be an intermediate element. In addition, "connected" or "joined" used herein can include wireless connection or wireless connection. The phrase "and / or" used herein includes all or any single unit and all combinations of the associated listed items.

[0025] Now, exemplary embodiments according to the present application will be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in various different forms, and should not be interpreted as being limited only to the embodiments set forth herein. It should be understood that these embodiments are provided so that the disclosure of the present application is complete and complete, and the concepts of these exemplary embodiments are fully conveyed to those skilled in the art.

[0026] A blockchain data cloud storage method is provided in the embodiments of the present application, as shown in Figure 1 The method comprises:

[0027] Step 101, according to the storage state index of the blockchain node in the observation time window in the blockchain, determine the block migration trigger threshold of the blockchain node.

[0028] Among them, the blockchain is deployed in the industrial field, the storage state index is determined according to the block stored in the blockchain node, and the block stored in the blockchain node is determined based on the industrial data generated by the industrial equipment in the industrial field through the industrial Internet of Things deployed in the industrial field.

[0029] In this step, within a preset observation time window, the storage state indicators of the blockchain nodes deployed in the industrial field in the blockchain are acquired by telemetry collection, including storage space occupancy rate and storage available capacity. Based on the storage state indicators, the storage pressure index of each blockchain node is calculated, reflecting the tension degree of the node storage resources. At the same time, the transmission network congestion index between the blockchain and the cloud is calculated, which is used to represent the fluctuation of the transmission state of the external uplink data transmission network between the blockchain and the cloud. Finally, the storage pressure index, the transmission network congestion index and the preset block migration benchmark threshold are combined to calculate the dynamically adjusted block migration trigger threshold of each blockchain node, which can adaptively adjust the sensitivity of block migration trigger according to the node storage pressure and network condition.

[0030] Step 102, if the number of new blocks of the blockchain node in the observation time window is greater than the block migration trigger threshold of the blockchain node, a multi-objective block migration optimization model of the blockchain is constructed.

[0031] In this step, when the number of new blocks of any blockchain node in the observation time window reaches its corresponding block migration trigger threshold, the block migration operation of the entire blockchain is started. The block migration operation models the block migration problem as a high-dimensional multi-objective block migration optimization model, and the decision variable of the multi-objective block migration optimization model is a vector composed of the number of blocks migrated to the cloud storage of each blockchain node. The multi-objective block migration optimization model minimizes four key objectives: the block usage probability objective function of the blockchain node, the cloud storage cost objective function, the blockchain space occupancy rate objective function and the block migration cost objective function, to provide a balanced migration number configuration scheme for each blockchain node in data availability, economy, space release efficiency and transmission overhead.

[0032] Step 103, solving the multi-objective block migration optimization model to obtain the target migration number corresponding to the blockchain node.

[0033] In this step, an evolutionary algorithm based on cascade selection is used to solve the multi-objective block migration optimization model, so as to determine the number of blocks that each blockchain node should migrate to the cloud storage, i.e. the target migration number.

[0034] Step 104, migrating the target migration blocks of the target migration number from the candidate migration blocks of the blockchain node in the observation time window to the cloud storage.

[0035] Among them, the candidate migration blocks are determined according to the new blocks of the blockchain node in the observation time window.

[0036] In this step, after obtaining the target migration quantity of each blockchain node, the first generated candidate migration block of the target migration quantity is selected as the final migration target migration block from the candidate migration blocks generated by each blockchain node within the observation time window and having exceeded the preset protection time period according to the block generation time sequence. Thus, conditional selection of partial blocks stored in the cloud is realized without destroying the verifiability on the chain, realizing the real release of the local storage space of the blockchain node, expanding the overall storage capacity of the blockchain, significantly reducing the storage pressure, and thus benefiting the real-time, security and economy applications.

[0037] The embodiment can realize the release of the local storage space of the blockchain node without destroying the integrity and verifiability of the blockchain data, effectively alleviate the pressure of the storage resource limited node. Moreover, through the multi-target block migration optimization model, the data availability, economic cost, space release efficiency and transmission overhead are intelligently balanced, and inefficient migration when the network is congested or the storage is relaxed is avoided. The efficient solving algorithm adopted in the embodiment ensures that high-quality decisions can still be obtained under the real-time constraints of the industrial Internet of Things. Thus, a systematic solution is provided for the sustainable operation and maintenance of the blockchain system in the industrial Internet of Things.

[0038] In another embodiment of the present application, a blockchain data cloud storage method is provided, as shown in Figure 2 The method comprises:

[0039] Step 201, obtaining the storage state indicators of the blockchain nodes in the blockchain within the observation time window.

[0040] The blockchain is deployed in an industrial site, the storage state indicators are determined according to the blocks stored in the blockchain nodes, and the blocks stored in the blockchain nodes are determined based on the industrial data generated by the industrial equipment in the industrial site through the industrial Internet of Things deployed in the industrial site.

[0041] It should be noted that in the embodiment, the industrial site refers to a physical environment for actual production. In order to realize digital monitoring and accurate control of physical industrial equipment and its production process in the industrial site, a series of industrial Internet of Things devices need to be deployed in the industrial site. The industrial Internet of Things devices are installed on the industrial equipment or integrated in the production line, used to directly collect key production, process and quality data (i.e. key industrial data) such as equipment state data reflecting the running status of the industrial equipment, process parameter data reflecting the process execution, and quality records of the output quality, so as to obtain the production status, product quality and operation compliance in the industrial site based on these industrial data. The industrial Internet of Things devices are organized, connected and cooperated through a unified industrial Internet of Things architecture. In order to ensure the non-tamperability, traceability and operation compliance of these industrial data in the long-term storage and circulation process, a lightweight blockchain is deployed in the industrial site. The blockchain includes a plurality of blockchain nodes deployed on the industrial site server or industrial computer. The industrial Internet of Things sends the industrial data collected by the industrial Internet of Things devices to the gateway deployed nearby. The gateway performs preliminary cleaning and format standardization on the industrial data submitted by the industrial Internet of Things, and encapsulates it as a standard blockchain transaction, and broadcasts it to the blockchain. Each blockchain node in the blockchain receives and verifies these blockchain transactions, and packs the blockchain transactions into blocks through the consensus algorithm configured in the blockchain, and stores them in its local blockchain copy. At this time, all blockchain nodes store the same data copy. As the blocks are continuously generated, the local storage space of all blockchain nodes is being synchronously consumed, resulting in increased storage pressure of the blockchain nodes in the industrial Internet of Things scene with limited storage resources.

[0042] Here, the blockchain consensus algorithm refers to a method agreed upon by the blockchain nodes in the blockchain, used to determine which blockchain node can create the next block and add it to the blockchain, and ensure that the local blockchain copies of all blockchain nodes remain consistent in content. For example, the improved Byzantine fault tolerance consensus algorithm can be used in the embodiment, such as the improved practical Byzantine fault tolerance consensus algorithm, the authorized Byzantine fault tolerance consensus algorithm, etc.

[0043] For example, the industrial site can be a smart factory and an automated production line, such as an automobile assembly line, a numerical control machine tool workshop, or a food packaging production line. The industrial equipment can be the core production equipment, equipment, or production line itself in the industrial site, such as a machine tool, a robot, a reaction kettle, a conveying line, etc. The industrial Internet of Things equipment can be various sensors, actuators, programmable logic controllers, and RFID (Radio Frequency IDentification) readers for collecting industrial equipment vibration, temperature, vision, etc. Data. The device state data can include electrical parameters, mechanical parameters, running states, positions, and postures of the industrial equipment, such as voltage, current, power, power consumption, speed, torque, vibration amplitude, frequency, noise, temperature, pressure, displacement, start and stop state, running mode (automatic, manual), alarm data, fault signal, cumulative running time, GPS coordinates, mechanical arm joint angle, AGV (Automated Guided Vehicle) real-time position, etc. Process parameter data can include process parameters, program data, environmental parameters, operations, and events in the production and manufacturing process of industrial equipment, such as welding current, welding voltage, welding speed, spraying pressure, spraying flow, heat treatment temperature, heat treatment time, injection molding pressure, injection molding temperature, injection molding pressure holding time, executed numerical control program number, process formula version number, operation process step number, workshop environment temperature, humidity, cleanliness, operator number, shift, operation start / end timestamp, material batch number input record, equipment abnormal stop record, etc. Quality records can include output measurement size, output physical and chemical properties, output appearance defects, output functionality test results, output identification and traceability data, such as the measured value of the key size (such as diameter, thickness, hole diameter) of the output, weight, hardness, strength, composition analysis result, detection result of surface scratch, stain, color difference, power-on test result, sealing test pressure value, performance test curve, unique serial number, printed or engraved two-dimensional code / bar code information, RFID tag data, etc.

[0044] The embodiment is directed to a lightweight blockchain deployed to protect the reliable evidence of key industrial data in an industrial Internet of Things scene with limited storage resources, and proposes a blockchain data cloud storage method that expands the overall local storage capacity of the blockchain without changing the original blockchain consensus and structure. Specifically, the embodiment monitors the storage state of each blockchain node to trigger the execution of the block migration operation, intelligently selects part of the blocks from each blockchain node of the blockchain to migrate to the cloud storage on a conditional basis without damaging the integrity and verifiability of the blockchain, thereby truly releasing the local storage space of the blockchain node in the blockchain, reducing the storage cost, improving the system response speed, meeting the real-time application requirements, and ensuring the security and integrity of the data in the transmission and storage process.

[0045] In this step, the storage state indicators of each blockchain node in the blockchain within the observation time window are monitored through telemetry collection. The storage state indicators include storage space occupancy rate and storage available capacity.

[0046] Here, the observation time window is a preset time period, for example, 5-15 minutes. The storage space occupancy rate refers to the percentage of the local storage capacity of the blockchain node that has been occupied by the blocks stored in the local blockchain replica within the observation time window. The storage available capacity refers to the size of the space that can store blocks remaining in the local storage capacity of the blockchain node within the observation time window. The storage space occupancy rate can directly indicate the degree of tension of the storage resources of the blockchain node within the observation time window, and the storage available capacity can directly indicate how much data the blockchain node can accommodate after the observation time window.

[0047] In step 202, the storage pressure index of the blockchain node within the observation time window is determined according to the weighted sum of the storage space occupancy rate and the storage available capacity of the blockchain node within the observation time window. The transmission network congestion index between the blockchain and the cloud within the observation time window is determined according to the variance and mean value of the single effective throughput of the block migration record of the blockchain within the observation time window. The block migration trigger threshold of the blockchain node is determined according to the transmission network congestion index between the blockchain and the cloud within the observation time window, the storage pressure index of the blockchain node, and the preset block migration reference threshold and the preset gain coefficient of the transmission network congestion index and the storage pressure index.

[0048] In this embodiment, the proportional weight of the storage space occupancy rate and the storage available capacity (i.e., the preset proportional weight) is set in advance. Therefore, in this step, the storage pressure index of the blockchain node within the observation time window is determined according to the storage space occupancy rate and the storage available capacity of the blockchain node within the observation time window, and the preset proportional weight of the storage space occupancy rate and the storage available capacity, so as to reflect the relative usage degree and absolute tension degree of the storage resources of the blockchain node according to the storage pressure index.

[0049] For example, the storage pressure index of the blockchain node within the observation time window is obtained according to the following formula:

[0050] ,

[0051] wherein, is the storage space occupancy rate of the blockchain node within the observation time window, is the storage available capacity of the blockchain node within the observation time window. ​​for a blockchain node in an observation time window of storage pressure index. for a preset proportion weight of storage space occupancy , for a preset proportion weight of storage available capacity .

[0052] Here, the preset proportion weights of the storage space occupancy and the storage available capacity can be set according to the actual storage requirements of the actual industrial Internet of Things scene, and the best risk warning and resource scheduling effect can be achieved, which is not limited in the embodiment. For example, if the actual storage requirement of the actual industrial Internet of Things scene is to prevent storage overflow and ensure the continuous operation of the blockchain, the preset proportion weight of the storage available capacity is given a higher value.

[0053] It should be noted that in the embodiment, the process of conditionally selecting part of the blocks from each blockchain node of the blockchain to migrate to the cloud storage needs to be transmitted through the external uplink data transmission network between the blockchain and the cloud to realize the migration.

[0054] In this step, all batch block migration records of the blockchain in the observation time window are obtained. For each batch block migration record, the total amount of transmission bytes, the transmission start time and the transmission end time of the block migration record are calculated. Then, according to the average value and the variance of all single effective throughputs in the observation time window, the transmission network congestion index between the blockchain and the cloud in the observation time window is determined.

[0055] For example, the single effective throughput of the block migration record of the blockchain in the observation time window is calculated according to the following formula: . Wherein, is the total amount of transmission bytes of the th batch block migration record of the blockchain in the observation time window ; is the transmission start time stamp of the th batch block migration record of the blockchain in the observation time window ; is the transmission end time stamp of the th batch block migration record of the blockchain in the observation time window ; is the single effective throughput of the th batch block migration record of the blockchain in the observation time window , unit: Mbit / s (Megabit per second).

[0056] a transmission network congestion index between the blockchain and the cloud within an observation time window is determined according to the following formula:

[0057] ,

[0058] wherein, is a variance of all single effective throughputs of the blockchain within the observation time window . is a mean value of all single effective throughputs of the blockchain within the observation time window . is a very small positive number to prevent the denominator from being 0. represents limiting to the closed interval of 0 to 1. is a transmission network congestion index of the blockchain within the observation time window .

[0059] Here, the transmission network congestion index is used to represent the fluctuation degree of the transmission speed of the blockchain within the observation time window, and is used to quantify the fluctuation of the network transmission rate of the external uplink data transmission network between the blockchain and the cloud, so as to avoid inefficient or high-risk block migration when the network condition is unstable.

[0060] Here, if the current observation time window is the first observation time window in time sequence, or the last observation time window of the current observation time window does not trigger the block migration operation, resulting in insufficient block migration records within the current observation time window, the transmission network congestion index can be set to a preset conservative value, such as 0 or a smaller value, indicating that the data transmission network state between the blockchain and the cloud is assumed to be stable or low congestion.

[0061] It should be noted that in the present embodiment, through telemetry collection, the number of new blocks (i.e. new added blocks) successfully stored to the local blockchain copy of the blockchain node within the observation time window is monitored by using the local counter in the blockchain node, to obtain the number of new added blocks of the blockchain node within the observation time window. The larger the number of new added blocks, the faster the blockchain node receives and confirms new data from the industrial equipment within the observation time window, and the faster the consumption speed of its local storage space, which can be used to predict the future storage pressure growth trend of the blockchain node. Moreover, in the present embodiment, a protection time period (i.e. a preset protection time period) is set in advance, which is less than the observation time window. Here, the preset protection time period specifies the minimum time for a block to be stored on the local blockchain copy of the blockchain node after being generated. Within the preset protection time period, no matter how large the local storage pressure of the blockchain node is, the block is not allowed to be migrated to the cloud storage. Thus, the present embodiment determines the generation time of each new added block according to the difference between the generation timestamp carried by the new added block and the current time within the observation time window. Then, the new added blocks of the blockchain node within the observation time window and having a generation time greater than the preset protection time period are taken as candidate migration blocks that can be migrated to the cloud storage within the observation time window, and the candidate number of candidate migration blocks of the blockchain node within the observation time window is obtained. Thus, the latest production, process and quality data generated by the industrial equipment in the industrial field can be ensured to be locally available to the blockchain node.

[0062] In the present step, the block migration trigger threshold of the blockchain node corresponding to the observation time window is determined according to the storage pressure index of the blockchain node within the observation time window and the transmission network congestion index of the blockchain within the observation time window. The block migration trigger threshold is used to determine whether to trigger the block migration operation of the entire blockchain after the end of the observation time window, i.e. whether to conditionally select part of the candidate migration blocks from the candidate migration blocks of each blockchain node of the blockchain within the observation time window to migrate to the cloud storage.

[0063] For example, the block migration trigger threshold of the blockchain node corresponding to the observation time window is determined according to the following formula:

[0064] ,

[0065] wherein, is a preset block migration reference threshold, representing a reference threshold required to trigger the block migration operation of the blockchain under the ideal external uplink data transmission network of the blockchain to the cloud and the reference state of no storage pressure of the blockchain node, which can be specifically determined according to the average block generation speed of the blockchain and the expected migration frequency in the actual industrial Internet of Things scene, for example, 150-300, which is not specifically limited in the present embodiment. with are preset gain coefficients of the transmission network congestion index and the storage pressure index, respectively, used to control the influence strength of the transmission network congestion index and the storage pressure index on the block migration triggering threshold. Specifically, for example, with The value range is 0.2-0.8, which can be set according to the actual storage demand of the actual industrial Internet of Things scene, and the embodiment does not make specific limitations. is a rounding function. is the block migration triggering threshold of the blockchain node .

[0066] It is worth mentioning that when the transmission network congestion index of the regional chain is large and in the network congestion situation, the corresponding block migration triggering threshold is increased, thereby reducing the frequency of initiating the migration task of the blockchain under poor network conditions, avoiding the accumulation of the transmission queue and the timeout of the task, and thus protecting the network resources for more critical production data on-chain business. When the storage pressure index of the regional chain node is large and in the situation of increased storage pressure, the corresponding block migration triggering threshold is reduced, thereby accelerating the release speed of the blockchain storage space and preferentially preventing it from being down due to storage overflow.

[0067] Step 203, if the number of new blocks of the blockchain node within the observation time window is greater than the block migration triggering threshold of the blockchain node, triggering the block migration operation of the blockchain.

[0068] In this step, if the number of new blocks of any blockchain node within the observation time window is greater than or equal to its block migration triggering threshold, the block migration operation of the entire blockchain is triggered, that is, from the candidate migration blocks of each blockchain node of the blockchain within the observation time window, some candidate migration blocks are conditionally selected to migrate to the cloud storage.

[0069] Step 204, constructing a multi-objective block migration optimization model of the blockchain.

[0070] In this step, the block migration operation of the entire blockchain is modeled as a high-dimensional multi-objective block migration optimization model. The decision variable of the multi-objective block migration optimization model is a vector consisting of the target migration number of the target migration block of each blockchain node that should be migrated to the cloud storage , wherein is the number of blockchain nodes in the blockchain, = 1, 2, …, ; represents the block migration triggering threshold of the blockchain node The target migration quantity of the target migration block to be migrated to the cloud storage. It should be noted that the target migration block of the blockchain node is selected from the candidate migration blocks of the blockchain node within the observation time window.

[0071] Further, as a refinement and extension of the above embodiment, in order to fully describe the specific implementation process of the embodiment, step 204, i.e., constructing the multi-objective block migration optimization model of the blockchain, specifically includes: determining the sum of the future use loss values of the target migration blocks migrated by the blockchain node according to the preset block use frequency function corresponding to the candidate migration blocks of the blockchain node within the observation time window, the candidate quantity of the candidate migration blocks, the target migration quantity of the target migration blocks migrated by the blockchain node, and the preset use frequency reference value; constructing a block use probability objective function of the blockchain node with the minimization of the sum of the future use loss values of the target migration blocks migrated by the blockchain node as the target; determining the cloud storage cost of the blockchain according to the preset cost ratio of the cloud storage to the blockchain storage, the average size of the new blocks within the observation time window of the blockchain node, and the target migration quantity of the target migration blocks migrated by the blockchain node; constructing a cloud storage cost objective function with the minimization of the cloud storage cost of the blockchain as the target; determining the weighted space occupancy rate of the candidate migration blocks in the blockchain after migration according to the candidate quantity of the candidate migration blocks within the observation time window of the blockchain node, the target migration quantity of the target migration blocks migrated by the blockchain node, and the preset node weight coefficient of the blockchain node; constructing a blockchain space occupancy rate objective function with the minimization of the weighted space occupancy rate of the blockchain after migration as the target; determining the transmission cost of the blockchain for migrating the target migration blocks to the cloud storage according to the target migration quantity of the target migration blocks migrated by the blockchain node, the average size of the new blocks within the observation time window of the blockchain node, and the effective uplink bandwidth used by the blockchain for migrating the blocks to the cloud storage within the observation time window; constructing a blockchain migration cost objective function with the minimization of the transmission cost of the blockchain as the target; and constructing the multi-objective block migration optimization model according to the block use probability objective function of the blockchain node, the cloud storage cost objective function, the blockchain space occupancy rate objective function, and the blockchain migration cost objective function.

[0072] It should be noted that in the present embodiment, for any candidate migration block of all blockchain nodes within the observation time window, a corresponding block use frequency model (i.e., a preset block use frequency function) is set for the candidate migration block in advance according to the data type of the industrial data contained in the candidate migration block. Here, the industrial data contained in the candidate migration block is the industrial data included in the blockchain transaction before the candidate migration block is packaged by the blockchain node.

[0073] Specifically, if the industrial data contained in the candidate migration block is used by the outside world at a stable frequency and needs to be queried in real time and quickly, the industrial data belongs to the first preset data type, and the candidate migration block containing the industrial data belonging to the first preset data type is used for the preset block usage frequency function corresponding to the constant mode. If the industrial data contained in the candidate migration block is concentrated in the initial stage of production and then the frequency of use decreases sharply, the industrial data belongs to the second preset data type, and the candidate migration block containing the industrial data of the second preset data type is used for the preset block usage frequency function corresponding to the exponential decay mode. If the industrial data contained in the candidate migration block is used by the outside world at a stable frequency and decreases at a uniform speed, the industrial data belongs to the third preset data type, and the industrial data containing the third preset data type is used for the preset block usage frequency function corresponding to the linear decay mode.

[0074] For example, the preset block usage frequency function of the constant mode is represented as:

[0075] ,

[0076] wherein, is the time experienced after the candidate migration block is generated; is the preset block usage frequency function, is the preset usage frequency reference value.

[0077] The preset block usage frequency function of the exponential decay mode is represented as:

[0078] ,

[0079] wherein, is the exponential decay coefficient, used to control the exponential decay speed.

[0080] The preset block usage frequency function of the linear decay mode is represented as:

[0081] ,

[0082] wherein, is the linear decay coefficient, used to control the linear decay speed.

[0083] For example, the industrial data of the first preset data type can be real-time alarm logs and other data of industrial equipment, and engineers may need to trace back to the history alarm at any time, and the need for query exists all the time. The industrial data of the second preset data type can be production batch quality records of output products, which are queried frequently during the audit period, and are rarely used once the audit is passed. The industrial data of the third preset data type can be stage analysis reports of industrial equipment or output products, and the reference value thereof decreases gradually with time.

[0084] Here, the preset use frequency reference value can be determined according to the urgency or importance of the industrial data in the actual industrial field after being generated, for example, c is set to be between 0.5-1, and the embodiment is not specifically limited. The exponential decay coefficient and the linear decay coefficient can be determined according to the decay speed of the data value of the industrial data of the second preset data type and the third preset data type with time, for example, the exponential decay coefficient is a fraction of the preset use frequency reference value, and the linear decay coefficient is 0.01-0.05, and the embodiment is not specifically limited.

[0085] In this step, the block use frequency of the candidate migration block is converted into the use probability of the target migration block migrated by the block chain node, so as to construct the block use probability target function of each block chain node.

[0086] For example, the block use probability target function is expressed as:

[0087] ,

[0088] Wherein, is the block use probability target function of the block chain node . is the index of the target migration block migrated by the block chain node , The value of is 1 to ; here, the candidate migration block of the block chain node in the observation time window is sorted in ascending order of generation time to obtain the block order, and the position sequence of each target migration block migrated by the block chain node in the block order is , =1 represents the earliest generated candidate migration block, The larger the value is, the newer the block is. is the preset block use frequency function corresponding to the target migration block migrated by the block chain node . is the number of candidate migration blocks of the block chain node in the observation time window ; approximately represents the generation time of the target migration block migrated by the block chain node . is used to calculate the integral of the preset block use frequency function corresponding to the target migration block migrated by the block chain node in its generation time, which is used to represent the target migration block the historical usage intensity of the target migration block; the greater the integral, the more frequently the target migration block has been used historically. The score term is a conversion function mapping the historical usage intensity of the target migration block to a future usage probability, for representing the future usage loss value of the target migration block . When the historical usage intensity of the target migration block is maximal, i.e., the integral tends to infinity, the score term approaches 1, indicating that the target migration block is extremely likely to be accessed in the future, and the loss of migrating it is large. When the historical usage intensity of the target migration block is minimal, i.e., the integral tends to 0, the score term approaches 0, indicating that the target migration block is almost not likely to be accessed in the future, and the loss of migrating it is small.

[0089] Thus, the sum of the future usage loss values of all the target migration blocks migrated by the blockchain node is minimized as an objective, and a block usage probability objective function of the blockchain node is constructed to preferentially select those candidate migration blocks with low future usage probability for migration.

[0090] It should be noted that in the present embodiment, the ratio of the unit cost of the cloud storage to the local storage of the blockchain, i.e., the cost ratio of the cloud storage to the local storage of the blockchain (i.e., the preset cost ratio), is set in advance, and the preset cost ratio is less than 1, indicating that the cloud storage is cheaper, so that the economic cost of the storage is optimized using the preset cost ratio in the subsequent steps. Moreover, by remote sensing collection, the total size of the blocks in the local blockchain copy of the blockchain node is recorded at the start and end time of the observation time window, respectively, and the size at the end time is subtracted from the size at the start time to obtain the node new block size of the blockchain node in the observation time window. Then, the node new block size is divided by the number of new blocks of the blockchain node in the observation time window, i.e., the average size of the new blocks of the blockchain node in the observation time window is obtained. The average size of the new blocks indicates that the amount of transaction data packaged in each new block of the blockchain node in the observation time window is large or the content is more intensive, and migrating each new block will occupy more network bandwidth and cloud storage space.

[0091] ​​For specific examples, the preset cost ratio can be determined based on the actual industrial IoT scenario and cloud service market prices. For instance, the cost of local blockchain storage includes capital expenditures and operating costs such as hardware procurement, depreciation, maintenance, and data center energy consumption for blockchain nodes, while the cost of cloud storage can be measured based on the service provider's pricing, according to operating expenses such as local storage capacity, duration, and number of calls. As long as the actual preset cost ratio can be calculated, this embodiment does not impose specific limitations.

[0092] In this step, the cloud storage cost of the blockchain relative to local storage is determined based on the preset cost ratio between cloud storage and local blockchain storage, the average size of new blocks added by blockchain nodes within the observation time window, and the target migration number of target migration blocks for blockchain node migration. Then, a cloud storage cost objective function is constructed with the goal of minimizing the cloud storage cost of the blockchain.

[0093] For example, the objective function for cloud storage costs Represented as:

[0094] ,

[0095] here, For blockchain nodes During the observation time window The average size of newly added blocks within the block, This is the preset cost ratio. This represents the total amount of data that needs to be transferred during this blockchain migration operation, i.e., the total amount of additional cloud storage space that will be occupied by this migration operation. Multiplying the total amount of additional cloud storage space by a preset cost ratio yields the cloud storage cost relative to using local blockchain storage. The objective function for cloud storage cost is to minimize the final calculated cloud storage cost by adjusting the target number of target migration blocks that each blockchain node needs to migrate. This quantifies economic efficiency and prevents uncontrolled cloud migration.

[0096] It should be noted that in this embodiment, the local storage capacity of each blockchain node is obtained in advance. It should also be noted that the local storage capacity of each blockchain node is not the same. Furthermore, a node weight coefficient (preset node weight coefficient) is determined in advance based on the differences in the local storage capacity of the blockchain nodes. This allows for the allocation of higher weights to blockchain nodes with smaller local storage capacities and more limited resources, thereby ensuring that this embodiment can more effectively alleviate the storage pressure on the most vulnerable blockchain nodes and achieve overall blockchain balance.

[0097] In this step, according to the candidate number of the candidate migration block of the blockchain node within the observation time window, the target migration number of the target migration block of the blockchain node migration, and the preset node weight coefficient, the weighted retention ratio of the candidate migration block of the blockchain node after the migration operation is determined. Thus, according to the sum of the weighted retention ratio of the candidate migration block of the blockchain node after the migration operation, the weighted space occupancy rate of the candidate migration block of the blockchain after the migration operation is determined. The blockchain space occupancy rate target function is constructed with the minimum weighted space occupancy rate of the blockchain after the migration as the target.

[0098] For example, the blockchain space occupancy rate target function is expressed as:

[0099] ,

[0100] Here, is the preset node weight coefficient of the blockchain node . . represents the candidate migration block retention ratio of the blockchain node after the migration operation. The smaller the ratio, the more blocks are migrated from the blockchain node , and the local storage of the blockchain node is released more fully. represents the weighted retention ratio of the candidate migration block of the blockchain node after the migration operation. represents the weighted space occupancy rate of the blockchain after the migration operation. Thus, the storage pressure of the blockchain node in the blockchain is relieved through the blockchain space occupancy rate target function, so that after the target migration block of the blockchain node is migrated to the cloud storage, the remaining candidate migration block should occupy the local storage space as little as possible, thereby avoiding the "overflow" phenomenon of the blockchain node with smaller storage capacity.

[0101] It should be noted that in this embodiment, the effective uplink bandwidth used by the blockchain to migrate blocks to cloud storage within the observation time window is pre-calculated. Specifically, if the number of block migration records for the blockchain to migrate blocks to cloud storage within the observation time window exceeds a preset threshold, this step adopts a passive measurement method, using all batches of block migration records to calculate the effective uplink bandwidth used by the blockchain to migrate blocks to cloud storage within the observation time window. Specifically, firstly, abnormal effective throughput in all single effective throughput of the blockchain within the observation time window is removed to update the single effective throughput of the blockchain within the observation time window. Then, the single effective throughput of the blockchain within the observation time window is sorted in ascending order, and the median of the single effective throughput of the blockchain within the observation time window is determined based on the sorted single effective throughput. This median is used as the effective uplink bandwidth used by the blockchain to migrate blocks to cloud storage within the observation time window, so as to obtain a reference value that can represent the reliable network capability of the blockchain within the observation window, which is not easily affected by transient abnormal interference. If the number of block migration records that the blockchain migrates to cloud storage within the observation time window is less than or equal to a preset threshold, resulting in insufficient samples, this embodiment adopts an active detection method of short burst detection. A blockchain node is randomly selected in the blockchain, and the blockchain node is controlled to send a certain number of bytes of samples to the cloud at an approximately constant rate within a preset short period of time. The effective uplink bandwidth used by the blockchain to migrate blocks to cloud storage within the observation time window is calculated by using the transmission duration and the number of bytes transmitted based on the measured byte samples.

[0102] For example, if the number of block migration records for all batches of blockchains migrating to cloud storage within the observation time window is less than or equal to a preset threshold, the effective uplink bandwidth of the blockchain node within the observation time window is calculated according to the following formula:

[0103] ,

[0104] in, For blockchain nodes During the observation time window Effective uplink bandwidth within, The number of bytes sent for the byte sample. The duration for sending byte samples.

[0105] For example, if the current observation time window is the first observation time window in chronological order, or if the previous observation time window did not trigger a block migration operation, resulting in insufficient block migration records within the current observation time window, then an active detection method using short burst detection is adopted. Conversely, a passive measurement method is used to calculate the effective uplink bandwidth.

[0106] Here, the preset threshold value can be determined and set according to the actual network stability and measurement effect after the deployment of the blockchain, for example, the preset threshold value can be moderately increased to 5 in a stable network environment, and the preset threshold value can be kept at 2 or 3 in a network environment with large fluctuations.

[0107] In this step, according to the target migration quantity of the target migration block of the blockchain node, the average size of the newly added block of the blockchain node in the observation time window, and the effective uplink bandwidth used by the blockchain to migrate the block to the cloud storage in the observation time window, the energy and time transmission cost of the blockchain to migrate the target migration block to the cloud storage is determined, and a blockchain migration cost objective function is constructed with the minimum transmission cost of the blockchain as the target.

[0108] For example, the blockchain migration cost objective function is represented as:

[0109] .

[0110] Here, The total amount of data to be transmitted by the blockchain migration operation is divided by the effective uplink bandwidth of the current blockchain to obtain the total transmission time required to complete the migration operation in theory. Thus, by adjusting the target migration quantity of the target migration block migrated by each blockchain node, the value of the blockchain migration cost objective function is made as small as possible, so that in the industrial Internet of Things scene with limited storage resources, the case that the high transmission overhead may cause the delay of the newly added block to be chained, affect the real-time performance of the blockchain, and even reduce the synchronization efficiency and security of the blockchain node is prevented.

[0111] Therefore, in this step, a multi-objective block migration optimization model is constructed according to the block usage probability objective function, the cloud storage cost objective function, the block space occupancy rate objective function, and the blockchain migration cost objective function. Thus, by minimizing multiple conflicting objectives through the multi-objective block migration optimization model, a configuration scheme of the target migration quantity of the target migration block for each blockchain node is calculated.

[0112] For example, the multi-objective block migration optimization model is represented as:

[0113] ,

[0114] .

[0115] wherein, , .

[0116] Here, is a set of + 3 components, representing the objective function that needs to be minimized simultaneously. The block usage probability objective function corresponding to each blockchain node respectively, minimizing It can reduce the loss of future data usage efficiency caused by migration, and ensure that high-frequency query data is retained in the blockchain as much as possible. Minimizing It can control the economic cost of long-term use of cloud storage. Minimizing It can maximize the release of local storage space of each blockchain node, and preferentially alleviate the pressure of blockchain nodes with smaller storage capacity. Minimizing It can reduce the network time occupied by the migration operation, and avoid affecting the real-time performance and synchronization efficiency of the blockchain network.

[0117] Step 205, according to the candidate number of candidate migration blocks of the blockchain node in the observation time window, determine the candidate solution of the preset number of multi-objective block migration optimization model, the candidate solution includes the candidate value of the target migration number of the target migration block to which the blockchain node in the blockchain migrates to the cloud storage; The candidate solution is used as an individual to form a parent population according to the individual; Calculate the objective function value of the individual through the objective function in the multi-objective block migration optimization model, the objective function includes the block usage probability objective function of the blockchain node, the cloud storage cost objective function, the blockchain space occupancy rate objective function and the blockchain migration cost objective function; Genetic operation is performed on the parent population to obtain a child population, and the parent population and the child population are combined to obtain a joint population.

[0118] It should be noted that due to the large number of objective functions in the multi-objective block migration optimization model, and the conflict between the objective functions, the evolutionary algorithm based on cascade selection is used to solve the multi-objective block migration optimization model, so that a small population size can still obtain a set of solutions that are widely distributed in the target space and have good convergence, thereby being suitable for the application scenarios of storage resource limited and delay sensitive in industrial Internet of Things.

[0119] In this step, the population size in the evolutionary algorithm is set to the preset number and the maximum number of iterations. The maximum number of iterations is the termination condition of the evolutionary algorithm to ensure that the calculation time is controllable and meets the real-time constraints of the industrial Internet of Things scenario. Here, the population size can be set according to the search ability and calculation overhead of the industrial Internet of Things scenario. For example, in the industrial Internet of Things scenario with limited storage resources, the population size is set to be small, such as 20-50, to balance the optimization effect and real-time requirements.

[0120] Further, since the solution of the multi-objective block migration optimization model is the target migration number of the target migration block that each blockchain node should migrate, i.e. the decision variable, the embodiment adopts an integer coding form, initializes a preset number of candidate decision variables from the feasible region of the decision variable as candidate solutions of the multi-objective block migration optimization model, and takes the candidate decision variables as initialized individuals. It can be understood that the individuals are also candidate solutions of the multi-objective block migration optimization model. It should be noted that each individual includes candidate values of the target migration number of the target migration block that each blockchain node in the blockchain migrates, i.e. the number of blocks that each blockchain node can migrate.

[0121] It should be noted that the feasible region of the decision variable is determined according to the candidate number of the candidate migration block of the blockchain node within the observation time window, and is represented as: , Integer coding means that the candidate values of each target migration number in the candidate solution are integers.

[0122] Further, the initial parent population is formed according to the initialized individuals. Then, the initial parent population is randomly matched, selected, simulated binary crossed and polynomial mutated to generate a new population of the same size as the preset number of offspring populations. The initial parent population and the offspring population are combined to obtain a joint population. It can be understood that the joint population includes twice the preset number of individuals.

[0123] Further, the objective function value of each individual in the joint population is calculated through the objective function in the multi-objective block migration optimization model. It can be understood that the objective function in the multi-objective block migration optimization model includes the block usage probability objective function of the blockchain node, the cloud storage cost objective function, the blockchain space occupancy rate objective function and the blockchain migration cost objective function. The objective function value of the individual includes the block usage probability objective function value, the cloud storage cost objective function value, the blockchain space occupancy rate objective function value and the blockchain migration cost objective function value of each blockchain node. Thus, in the subsequent steps, based on the objective function value of the individual, the next generation of parent populations is determined from the joint population.

[0124] In step 206, the objective function values of the individuals in the joint population are normalized, the normalized objective function values of the individuals in the joint population are transformed, the individuals in the joint population are subjected to Pareto dominance processing based on the transformed objective function values of the individuals in the joint population, the convergence evaluation values of the individuals in the joint population are obtained, the individuals in the joint population are sorted according to the convergence evaluation values, the first convergence order is obtained, the individual at the first position in the first convergence order is added to the next generation of parent populations, and the individual at the first position in the first convergence order is removed from the joint population.

[0125] In this step, all objective function values ​​of all individuals in the joint population are normalized to eliminate the influence of differences in objective dimensions and scales on the selection operation.

[0126] For example, normalization is performed according to the following formula:

[0127] ,

[0128] in, The index of the objective function; In this embodiment, the number of objective functions is... = +3; From 1 to At that time, respectively corresponding to The blocks of each blockchain node use a probabilistic objective function; for +1 to When +3, it corresponds to the objective function of cloud storage cost, the objective function of blockchain space occupancy rate, and the objective function of blockchain migration cost, respectively. For a joint population medium-sized individuals The The objective function value, For a joint population medium-sized individuals Normalized The objective function value. , They are joint populations The first of all individuals The maximum and minimum values ​​among the objective function values.

[0129] Furthermore, in the normalized target space, the normalized objective function values ​​of individuals in the joint population are transformed to enhance the distinguishability between individuals in the high-dimensional target space, thereby more effectively guiding the population to converge.

[0130] For example, the transformation includes an initial transformation and a target transformation. The initial transformation is performed on the normalized target function values ​​of individuals in the joint population according to the following formula:

[0131] ,

[0132] in, For a circular index, It will sequentially take values ​​from 1 to 1. All integer values, but It will skip the currently being calculated joint population. medium-sized individuals Normalized The objective function value. For individuals in a syndicated population Normalized The objective function value. Indicates that they will unite the population medium-sized individuals After normalization, the first All other than the objective function value -1 normalized objective function value Perform summation. To preset weights, The synod population was preserved. medium-sized individuals In the Performance on each objective function This individual was introduced. Other objective functions Overall performance. When When large, syngas medium-sized individuals The first after initial transformation The objective function value It depends mainly on the individual. Normalized The objective function value This makes the initial transformation focus more on the individual's performance on a single target; conversely, The initial transformation is more influenced by the performance of other objectives, making it more important to emphasize the overall balance of an individual across all objectives.

[0133] Therefore, after the initial transformation, the objective function value of each individual in the joint population after the initial transformation integrates the local objective and the global performance. This makes an individual with moderate and balanced performance in all objectives more advantageous in the high-dimensional objective space than an individual with excellent performance in one objective but poor performance in other objectives. This significantly increases the possibility of Pareto dominance among individuals and effectively strengthens the guidance on population convergence.

[0134] Here, the preset weights are determined based on the level of attention given to each objective function of the multi-objective block migration optimization model in the actual industrial IoT scenario, and are sufficient to meet the actual solution requirements. For example, the preset weights are set to 0.3-0.7, and this embodiment does not impose specific limitations. It can be understood that the objective is the optimization objective of the multi-objective block migration optimization model, which corresponds to each objective function in the multi-objective block migration optimization model.

[0135] The objective function value of an individual in the joint population after initial transformation is transformed according to the following formula:

[0136] ,

[0137] where, is also a loop index, will take all integer values from 1 to in turn, but will skip the individual in the joint population whose initial transformed objective function value is . whose initial transformed objective function value is . denotes the sum of all other -1 initial transformed objective function values of the individual in the joint population except for the initial transformed objective function value . -1 initial transformed objective function values of the individual in the joint population as a penalty term, so that the objective transformation results in the maximum of the initial transformed objective function value of the individual in the joint population and its penalty term, and finally in the th transformed objective function value of the individual . .

[0138] Here, if an individual in the joint population performs extremely well on one objective, but extremely poorly on the other objectives, then after the maximum is taken over the objective transformation, the transformed objective function value of the individual on the well-performed objective will be large, thus penalizing the individual for performing unevenly on the objectives, and thus more encouraging individuals that perform evenly on all objectives.

[0139] Thus, the transformed objective function value of any individual in the joint population is denoted as:

[0140] , ,

[0141] ,

[0142] where, denotes that the following content is a constraint on the individual . denotes belongs to. denotes the feasible region. denotes dimensional real number space, i.e. the individual is represented by​ a vector composed of real components. denotes a subset of the feasible region.

[0143] Further, in the transformed objective space, based on the transformed objective function value of any individual in the joint population, the number of individuals in the joint population that can be Pareto dominated by the individual is calculated, and the number of individuals is taken as the convergence evaluation value of the individual.

[0144] For example, the convergence evaluation value of an individual in the joint population is determined according to the following formula:

[0145] ,

[0146] wherein, is the other individual in the joint population except for the individual . denotes Pareto domination. denotes the individual in the joint population that can be dominated by the individual . is the convergence evaluation value of the individual in the joint population .

[0147] It should be noted that the condition that the individual in the joint population can dominate the individual is that the individual is at least equal to the individual in all objectives, and is better than the individual in at least one objective. In the present embodiment, the individual is at least equal to the individual in all objectives, which is manifested as that all transformed objective function values of the individual are at least equal to those of the individual ; the individual is better than the individual in at least one objective, which is manifested as that at least one of the transformed objective function values of the individual is smaller than that of the individual .

[0148] Thus, based on the convergence evaluation value, the individuals in the joint population are sorted from small to large, a first convergence order is obtained, and the individual at the first position in the first convergence order is added to the parent population of the next generation, so as to select the individual with the best convergence (i.e., the maximum convergence evaluation value) from the joint population and directly save it to the parent population of the next generation, and remove the individual from the joint population, so as to ensure rapid convergence of the population.

[0149] In step 207, the joint population after removal is subjected to Pareto non-dominated sorting, and different levels of non-dominated front layers are obtained.

[0150] In this step, the remaining individuals in the joint population after removal are subjected to Pareto non-dominated sorting, and are divided into multiple non-dominated front layers, so as to divide the remaining individuals in the joint population into different levels, thereby preferentially selecting high-level individuals to join the parent population of the next generation. Exemplarily, the non-dominated front layer can be represented as: wherein, are different levels of non-dominated front layers from high to low, is the optimal layer.

[0151] It should be noted that the non-dominated front layer of the first level includes individuals in the joint population that are not dominated by any other individual, and these individuals are not dominated by each other. The non-dominated front layer of the second level includes individuals in the joint population excluding the non-dominated front layer of the first level, which are not dominated by any other individual, and the same applies to the multiple non-dominated front layers of the joint population.

[0152] Thus, in subsequent steps, the cascade selection operation of diversity selection and convergence selection is performed on the non-dominated front layers of different levels in a cycle, so as to select individuals from the non-dominated front layers of different levels to join the parent population of the next generation, until the population size of the parent population of the next generation reaches the preset number.

[0153] In step 208, the non-dominated front layers are sorted according to the levels, a level order is obtained, and the first level in the level order is taken as a target level; the minimum adaptive mapping parallel distance between the individuals in the non-dominated front layer of the target level and the selected individuals in the parent population of the next generation is calculated, and the number of individuals to be selected in the parent population of the next generation is determined according to the difference between the preset number and the number of selected individuals in the parent population of the next generation; based on the comparison result of the number of individuals in the non-dominated front layer of the target level and the number of individuals to be selected in the parent population of the next generation, the temporary population is determined from the non-dominated front layer of the target level according to the numerical size of the minimum adaptive mapping parallel distance.

[0154] In this step, diversity selection is performed. Specifically, the non-dominated frontier layers are sorted from highest to lowest level to obtain a hierarchical order. The layer at the top of the hierarchical order is then selected as the target layer, thus choosing the non-dominated frontier layer with the highest priority. Next, calculate the current highest priority non-dominated frontier layer. The minimum adaptive mapping parallel distance between each individual and all individuals in the next generation parent population is considered. The larger the minimum adaptive mapping parallel distance, the sparser the region to which the individual belongs and the better the diversity.

[0155] At the same time, according to the preset population size (i.e., preset number) ) and the next generation of parent population The difference in the number of selected individuals in the parent population is used to determine the number of candidate individuals to be added in the next generation (i.e., the number of individuals to be added in the parent population). If the current highest priority non-dominated frontier layer... The number of individuals in the middle generation is greater than the number of candidate individuals in the next generation parent population. Then, based on the minimum adaptive mapping parallel distance, prioritize the non-dominated front layers with the largest current priority from high to low. Sort the individuals to obtain their order, and then select the first individuals in the order. Individuals with good diversity were preserved in the temporary population. In the middle. If the current highest priority non-dominated frontier layer If the number of candidate individuals is less than or equal to the number of parent individuals in the next generation, then the current highest priority non-dominated frontier layer will be selected. All individuals are preserved in a temporary population. It should be noted that the selected individuals in the next generation parent population are those that have already entered the next generation parent population in the combined population.

[0156] For example, the minimum adaptive mapping parallel distance is calculated according to the following formula:

[0157] , ,

[0158] in, For individuals in the non-dominated frontier layer of the target level, For the next generation of individuals already selected from the parent population, For individuals in the non-dominated frontier layer of the target level Between the selected individuals in the next generation of the parent population The adaptive mapping parallel distance, For individuals in the non-dominated frontier layer of the target level Between and all selected individuals in the next generation of the parent population The minimum adaptive mapping parallel distance. For individuals Normalized The objective function value, For individuals Normalized There are several objective function values; min() is the function to find the minimum value.

[0159] here, Measuring the distance between two individuals using Euclidean distance and The total difference in absolute values ​​across all targets. This is used to capture the consistency of the direction of difference between two individuals across various targets. If the two individuals differ by a similar amount across all targets, such as individual... Superior to individuals in all goals If the two individuals have different absolute positions, their adaptive mapping parallel distance will decrease, meaning that although they are in different positions, they are homogeneous in the target space and contribute little to increasing population diversity. If the two individuals have different strengths and weaknesses on different targets, their adaptive mapping parallel distance will increase, meaning that they are heterogeneous and can provide different trade-off perspectives, contributing significantly to diversity. This ensures that the final output target population can uniformly and broadly cover the entire target space, providing decision-makers with a rich variety of choices.

[0160] Step 209: Sort the individuals in the temporary population according to the convergence evaluation value to obtain the second convergence order, add the first individual in the second convergence order to the next generation parent population, and remove the first individual in the second convergence order from the non-dominated front layer and the joint population of the target level.

[0161] In this step, convergence selection is performed. Specifically, it is based on the convergence evaluation value. For temporary populations The individuals in the middle are sorted to obtain a second convergent order, and the individual at the top of the second convergent order is added to the next generation of the parent population. To transition from temporary populations Select The largest and most convergent individual is added to the next generation of the parent population. In the middle, and remove the individual from the current highest priority non-dominated frontier layer. With the joint population Removed from the middle.

[0162] Step 210: If there are individuals in the non-dominated front layer of the target level after removal, and the number of selected individuals in the next generation parent population is less than the preset number, recalculate the minimum adaptive mapping parallel distance between the individuals in the non-dominated front layer of the target level after removal and the selected individuals in the next generation parent population, until there are no individuals in the non-dominated front layer of the target level after removal or the number of selected individuals in the next generation parent population is equal to the preset number.

[0163] In this step, the cyclical execution of cascading selection is evaluated. Specifically, if the currently highest-priority non-dominated frontier layer is removed... The process is not yet complete, and the population size of the next generation of parent species has not reached the preset number, meaning the current highest priority non-dominant frontier layer after removal... If individuals still exist in the population, and the number of selected individuals in the next generation's parent population is less than the preset number, then diversity selection continues to be performed on the same layer, that is, on the currently highest-priority non-dominant frontier layer after removal. Perform diversity selection and recalculate the current highest priority non-dominated frontier layer after removal. The minimum adaptive mapping parallel distance between the selected individuals in the middle generation and the selected individuals in the next generation parent population is used until the same layer is processed or the population size of the next generation parent population reaches a preset number, i.e., the current highest priority non-dominated front layer after removal. There are no individuals in the population or the number of selected individuals in the next generation parent population is equal to the preset number.

[0164] Step 211: If there are no individuals in the non-dominated front layer of the target level after removal, and the number of selected individuals in the next generation parent population is less than the preset number, update the level next to the target level in the hierarchical order to the target level, and calculate the minimum adaptive mapping parallel distance between individuals in the non-dominated front layer of the updated target level and selected individuals in the next generation parent population, until the number of selected individuals in the next generation parent population is equal to the preset number.

[0165] In this step, if the currently highest priority non-dominated frontier layer is removed... The process has been completed, and the population size of the next generation of parent species has not yet reached the preset number, meaning the current highest priority non-dominant frontier layer after removal... If no individuals are found in the parent population and the number of selected individuals in the next generation is less than the preset number, then the process moves to the next non-dominant frontier layer. So as to make the non-dominated frontier layer Update the current highest priority non-dominated frontier layer, that is, update the layer that is one level below the target layer in the hierarchy to the target layer. Then update the updated current highest priority non-dominated frontier layer. Perform diversity selection and compute the updated current top-priority non-dominated frontier layer. The minimum adaptive mapping parallel distance between the individuals in the current generation and the selected individuals in the next generation paternal population is calculated until the population size of the next generation paternal population reaches the preset number, i.e., the number of the selected individuals in the next generation paternal population is equal to the preset number.

[0166] In step 212, the paternal population output when the number of evolution iterations is equal to the preset maximum iteration number is taken as the target population.

[0167] In this step, if the number of the selected individuals in the next generation paternal population is equal to the preset number, the current evolution iteration is completed, and the genetic operation is performed on the next generation paternal population until the number of evolution iterations is equal to the preset maximum iteration number. The paternal population output when the number of evolution iterations is equal to the preset maximum iteration number is taken as the solution result of the multi-objective block migration optimization model, i.e., the target population.

[0168] In step 213, the target migration number of the target migration block corresponding to the target population is determined according to the individuals in the target population; and the target migration block is determined from the candidate migration blocks of the blockchain node in the observation time window, and the target migration number of the target migration block is migrated to the cloud storage.

[0169] In this step, the solution result of the multi-objective block migration optimization model, i.e., the target population, includes a plurality of feasible solutions that achieve different trade-offs between targets. According to the actual demand and target preference in the actual industrial field and the industrial Internet of Things scene, a final target individual to be executed can be selected from all individuals in the target population. The target individual is the target migration number of the target migration block to be migrated to the cloud storage in the blockchain.

[0170] For example, if the actual demand and target preference in the actual industrial field and the industrial Internet of Things scene can be to prioritize real-time performance, minimize cost, or quickly release storage space of a specific node, etc. If real-time performance is prioritized in the industrial Internet of Things scene of limited storage resources in smart medical care or real-time control of equipment, the individual with the minimum value of the block usage probability target function is selected as the target individual from the target population. If the cost is minimized in the industrial Internet of Things scene of limited storage resources in cost-sensitive warehousing logistics, the individual with the minimum value of the weighted sum of the cloud storage cost target function value and the blockchain migration cost target function value is selected as the target individual from the target population. If the storage capacity of a specific blockchain node is about to be exhausted in the industrial Internet of Things scene of limited storage resources, the individual with the minimum value of the blockchain space occupancy rate target function of the specific blockchain node is selected as the target individual from the target population.

[0171] Then, the target migration quantity of the target migration block determined to migrate to the cloud storage is determined according to each blockchain node in the target individual, and the block migration operation of the entire blockchain is performed in the next observation time window, thereby generating a block migration record in the next observation time window. That is, from the candidate migration blocks of each blockchain node in the blockchain in the current observation time window, according to the generation time of the candidate migration block, the candidate migration block with the target migration quantity corresponding to the blockchain node in the target individual and generated first is taken as the target migration block, and the target migration block of the blockchain node is symmetrically encrypted and redundantly processed and migrated to the cloud storage, so as to ensure data confidentiality and improve storage reliability. After the block migration operation is completed, the Merkle root hash value of the migrated target migration block is calculated, and the Merkle root hash value is embedded as metadata into the block header of the subsequent added block of the blockchain, thereby constructing a hash anchor chain from the chain to the cloud, so that any tampering of the block data stored in the cloud can be found by the on-chain verification, thereby ensuring the integrity and verifiability of the entire data system without leaving all data in the local.

[0172] The embodiment fundamentally solves the storage problem in the industrial Internet of Things enabled by the blockchain. The core idea is not to optimize local storage, but to conditionally select part of the blocks to store in the cloud without destroying the on-chain verifiability, thereby realizing the real release of the local storage space of the blockchain node, expanding the overall storage capacity of the blockchain, and significantly reducing the storage pressure, thereby benefiting real-time, security and economic applications. Moreover, the high-dimensional multi-objective optimization realizes the best trade-off between block usage probability, storage cost, space occupancy rate and transmission cost, thereby providing the best block migration quantity configuration scheme for each blockchain node. At the same time, the hash anchor chain and the encryption redundancy mechanism used ensure the integrity, security and verifiability of the data while using the cloud storage. In addition, the method for solving the multi-objective migration optimization model used in the embodiment can efficiently solve high-dimensional optimization problems, and the diversity-first cascading environment selection mechanism ensures that even in the case of small population size, a set of optimal solution sets that are uniformly distributed in the target space and approximate the real frontiers can be efficiently obtained, perfectly adapting to the low-latency requirements and resource-limited application scenarios of the industrial Internet of Things.

[0173] In yet another embodiment of the present application, the industrial site is an intelligent production line of automobile parts, and the industrial equipment of the industrial site includes a welding robot (reporting welding current, voltage waveform data, station number, program number), a torque wrench (reporting the accurate tightening torque value of each bolt), and a barcode scanner (reporting the part serial number). These key industrial data directly determining the safety and compliance of the product are deployed in the real-time on-chain storage of the industrial Internet of Things in the industrial site. After the blockchain runs for a period of time, the on-chain data reaches TB level, and the disk of part of the blockchain nodes approaches the warning threshold, so it is necessary to release the local occupation while ensuring verifiable traceability. The blockchain data cloud storage method described in the present application is used for processing:

[0174] The blockchain deployed in the intelligent production line of automobile parts has four blockchain nodes, and the value of each blockchain node is set to 200. The observation time window is set to 10 minutes and follows the non-migration criterion of newly added blocks in the last 2 minutes. The cost ratio of cloud storage to blockchain storage is set to . The initial access frequency reference value and the decay coefficient are set to , the linear decay coefficient , and the exponential decay coefficient . The node weight coefficients of the four blockchain nodes are set to 0.3, 0.2, 0.4, and 0.1, respectively, to reflect their different storage capabilities and importance. The population size is set to 20, and the maximum iteration number as the termination condition is set to 10,000 to meet the real-time requirements of the industrial Internet of Things.

[0175] This embodiment obtains a Pareto optimal solution set (i.e., the target population). Table 1 lists the three solutions obtained under the constant, linear decay, and exponential decay modes of the block usage frequency function. Due to space limitations, only three solutions are given in this embodiment.

[0176] In the constant mode: 85, 132, 42, and 184 blocks are migrated from the four blockchain nodes to the cloud, respectively, and the saved storage space ratio for each node is 42.5%, 66%, 21%, and 92%, respectively.

[0177] In the linear decay mode: 58, 112, 38, and 165 blocks are migrated from the four blockchain nodes, saving storage space by 29%, 56%, 19%, and 82.5%, respectively.

[0178] In the exponential decay mode: 75, 118, 83, and 135 blocks are migrated from the four blockchain nodes, saving storage space by 37.5%, 59%, 41.5%, and 67.5%, respectively.

[0179] The effective weighted storage space saved by the blockchain as a whole in the three cases is 42.3%, 35.75%, and 46.4%, respectively, according to the node weight coefficient calculation of each blockchain node. The results show that the embodiment can effectively and significantly release the local storage pressure of the blockchain node, verifying the effectiveness of the embodiment in solving the storage problem in the blockchain-enabled industrial Internet of Things.

[0180] In Table 1, 、 、 、 are the target migration numbers of the target migration blocks of the four blockchain nodes migrated to the cloud storage. 、 、 、 are the block usage probability objective function values of the four blockchain nodes in the multi-objective block migration optimization model. 、 、 are the cloud storage cost objective function value, the blockchain space occupancy rate objective function value, and the blockchain migration cost objective function value in the multi-objective block migration optimization model.

[0181] Table 1

[0182]

[0183] The method for solving the multi-objective migration optimization model adopted in the embodiment is compared with three other advanced high-dimensional multi-objective optimization algorithms.

[0184] The three high-dimensional multi-objective evolutionary algorithms include RVEA (Reference Vector Guided Evolutionary Algorithm), VaEA (A·Vector Angle-Based Evolutionary Algorithm for Unconstrained Many-Objective Optimization), and MaOEA-CSS (Many-Objective Evolutionary Algorithms Based on Coordinated Selection Strategy).

[0185] Table 2 Statistics of the HV (hyper-volume) index values of each algorithm running independently on the multi-objective migration optimization model for 20 times, where the HV can measure the convergence and diversity of the solution set. From Table 2, it can be seen that the HV value obtained by the method for solving the multi-objective migration optimization model in the embodiment is significantly better than that of other comparative algorithms.

[0186] In Table 2, the scientific notation is used to represent the average value and standard deviation of the HV index. For example, 3.2462e-2 (5.28e-3) represents that the average value of the HV index of the RVEA algorithm in the linear decay mode is 0.032462, and the standard deviation is 0.00528.

[0187] Table 2

[0188]

[0189] At the same time, Table 3 gives the average value comparison of each objective function of each algorithm in the exponential decay scenario. From Table 3, it can be seen that the method for solving the multi-objective migration optimization model in the embodiment can achieve the best performance on all objectives. This proves that the diversity priority principle and cascade selection mechanism used in the method for solving the multi-objective migration optimization model in the embodiment can effectively balance the convergence and diversity, thereby obtaining an optimal decision set closer to the true Pareto front.

[0190] Table 3

[0191]

[0192] It should be noted that the size of the serial number of each step in the above embodiment does not mean the order of execution. The execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0193] Further, as shown in Figure 3 As a specific implementation of the above blockchain data cloud storage method, the embodiments of the present application provide a blockchain data cloud storage device 300, which comprises a determination module 301, a construction module 302 and a migration module 303.

[0194] The determination module 301 is configured to determine a block migration trigger threshold of a blockchain node according to a storage state index of the blockchain node in an observation time window, the blockchain being deployed in an industrial site, the storage state index being determined according to blocks stored in the blockchain node, the blocks stored in the blockchain node being determined based on industrial data generated by industrial equipment in the industrial site through an industrial Internet of Things deployed in the industrial site.

[0195] The construction module 302 is configured to construct a multi-objective block migration optimization model of the blockchain if the number of newly added blocks of the blockchain node within the observation time window is greater than the block migration triggering threshold of the blockchain node, and to solve the multi-objective block migration optimization model to obtain the target migration number corresponding to the blockchain node.

[0196] The migration module 303 is configured to determine target migration blocks for the target migration number from candidate migration blocks of the blockchain node within the observation time window, and migrate the target migration blocks to the cloud storage, wherein the candidate migration blocks are determined according to the newly added blocks of the blockchain node within the observation time window.

[0197] The specific limitations of the blockchain data cloud storage device can be referred to the limitations of the blockchain data cloud storage method described above, which will not be repeated here. The above-mentioned various modules in the blockchain data cloud storage device can be realized by software, hardware and their combinations in whole or in part. The above-mentioned various modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to call and execute the operations corresponding to the above-mentioned various modules by the processor.

[0198] Based on the above-mentioned method as shown in Figures 1 to 2 Accordingly, the embodiments of the present application also provide a readable storage medium having a computer program stored thereon, which is executed by a processor to implement the above-mentioned blockchain data cloud storage method as shown in Figures 1 to 3

[0199] Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation scenarios of the present application.

[0200] Based on the above-mentioned method as shown in Figures 1 to 2 and the virtual device embodiment as shown in Figure 3 In order to achieve the above-mentioned purpose, the embodiments of the present application also provide a computer device, which can be a personal computer, a server, a network device, etc., and the computer device includes a storage medium and a processor; the storage medium is configured to store a computer program; and the processor is configured to execute the computer program to implement the above-mentioned blockchain data cloud storage method as shown in Figures 1 to 2

[0201] ​​Optionally, the computer device can further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface can include a display, an input unit such as a keyboard, and the like. Optionally, the user interface can further include a USB interface, a card reader interface, and the like. The network interface can optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), and the like.

[0202] Those skilled in the art can understand that the computer device structure provided by the embodiment does not constitute a limitation on the computer device, and can include more or fewer components, or combine certain components, or different component arrangements.

[0203] The storage medium can further include an operating system and a network communication module. The operating system is a program for managing and saving computer device hardware and software resources, and supports the running of information processing programs and other software and / or programs. The network communication module is used to realize communication between components in the storage medium, and communication with other hardware and software in the entity device.

[0204] Those skilled in the art can clearly understand from the above description of the embodiments that the present application can be implemented by means of software and a necessary general hardware platform, or by hardware.

[0205] Those skilled in the art can understand that the accompanying drawings are only a schematic diagram of a preferred implementation scenario, and the modules or processes in the drawings are not necessarily essential for implementing the present application. Those skilled in the art can understand that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the description of the implementation scenario, or can be changed and located in one or more devices different from the implementation scenario. The modules of the above implementation scenario can be combined as one module, or can be further split into multiple sub-modules.

[0206] The above serial numbers of the present application are only for description, and do not represent the advantages and disadvantages of the implementation scenario. The above disclosure is only several specific implementation scenarios of the present application, but the present application is not limited thereto. Any changes that can be thought of by those skilled in the art should fall within the protection scope of the present application.

Claims

1. A blockchain data cloud storage method, characterized in that, The method comprises: According to the storage state index of the blockchain node in the blockchain within the observation time window, determine the block migration trigger threshold of the blockchain node, the blockchain is deployed in the industrial field, the storage state index is determined according to the block stored in the blockchain node, and the block stored in the blockchain node is determined by the industrial internet deployed in the industrial field based on the industrial data generated by the industrial equipment in the industrial field; If the number of new blocks of the blockchain node within the observation time window is greater than the block migration trigger threshold of the blockchain node, a multi-objective block migration optimization model of the blockchain is constructed; Solving the multi-objective block migration optimization model, obtaining the target migration number corresponding to the blockchain node; From the candidate migration blocks of the blockchain node within the observation time window, determine the target migration block of the target migration number to migrate to the cloud storage, and the candidate migration block is determined according to the new block of the blockchain node within the observation time window; The construction of the multi-objective block migration optimization model of the blockchain comprises: According to the preset block usage frequency function corresponding to the candidate migration block of the blockchain node within the observation time window, the candidate number of the candidate migration block, the target migration number of the target migration block migrated by the blockchain node, and the preset usage frequency benchmark value, the sum of the future usage loss values of the target migration block migrated by the blockchain node is determined; With the minimization of the sum of the future usage loss values of the target migration block migrated by the blockchain node as the target, a block usage probability objective function of the blockchain node is constructed; According to the preset cost ratio of cloud storage and blockchain storage, the average size of the new block of the blockchain node within the observation time window, and the target migration number of the target migration block migrated by the blockchain node, the cloud storage cost of the blockchain is determined; With the minimization of the cloud storage cost of the blockchain as the target, a cloud storage cost objective function is constructed; According to the candidate number of the candidate migration block of the blockchain node within the observation time window, the target migration number of the target migration block migrated by the blockchain node, and the preset node weight coefficient of the blockchain node, the weighted space occupancy rate of the candidate migration block in the blockchain after migration is determined; With the minimization of the weighted space occupancy rate of the blockchain after migration as the target, a blockchain space occupancy rate objective function is constructed; According to the target migration number of the target migration block migrated by the blockchain node, the average size of the new block of the blockchain node within the observation time window, and the effective uplink bandwidth used by the blockchain to migrate the block to the cloud storage within the observation time window, the transmission cost of the blockchain to migrate the target migration block to the cloud storage is determined; With the minimization of the transmission cost of the blockchain as the target, a blockchain migration cost objective function is constructed. According to the block usage probability objective function of the blockchain node, the cloud storage cost objective function, the blockchain space occupancy rate objective function and the blockchain migration cost objective function, the multi-objective block migration optimization model is constructed.

2. The method of claim 1, wherein, The storage state indicators include the storage space occupancy rate and the storage available capacity of the blockchain node in the observation time window, and the block migration trigger threshold of the blockchain node is determined according to the storage state indicators of the blockchain node in the observation time window. Specifically, the block migration trigger threshold of the blockchain node is determined according to the weighted sum of the storage space occupancy rate and the storage available capacity of the blockchain node in the observation time window. According to the block usage probability objective function of the blockchain node, the cloud storage cost objective function, the blockchain space occupancy rate objective function and the blockchain migration cost objective function, the multi-objective block migration optimization model is constructed. According to the block usage probability objective function of the blockchain node, the cloud storage cost objective function, the blockchain space occupancy rate objective function and the blockchain migration cost objective function, the multi-objective block migration optimization model is constructed. According to the block usage probability objective function of the blockchain node, the cloud storage cost objective function, the blockchain space occupancy rate objective function and the blockchain migration cost objective function, the multi-objective block migration optimization model is constructed. 3.The method of claim 1, wherein, The method further comprises: If the number of block migration records of the blockchain in the observation time window is greater than a preset threshold, the median of the single effective throughput of the block migration records is taken as the effective uplink bandwidth according to the total amount of transmission bytes, the transmission start time and the transmission end time of the block migration records. If the number of block migration records of the blockchain in the observation time window is less than or equal to the preset threshold, the effective uplink bandwidth is determined according to the transmission duration and the transmission byte amount of the byte sample sent by the blockchain node selected randomly in the blockchain to the cloud. 4.The method of claim 1, wherein, The solving of the multi-objective block migration optimization model obtains the target migration quantity corresponding to the blockchain node, and specifically comprises: According to the candidate number of the candidate migration blocks of the blockchain node in the observation time window, a preset number of candidate solutions of the multi-objective block migration optimization model are determined, and the candidate solution includes a candidate value of the target migration quantity of the target migration block migrated by the blockchain node to the cloud storage in the blockchain. The candidate solution is taken as an individual to form a parent population according to the individual. The objective function value of the individual is calculated through the objective function in the multi-objective block migration optimization model, and the objective function includes the block usage probability objective function of the blockchain node, the cloud storage cost objective function, the blockchain space occupancy rate objective function and the blockchain migration cost objective function. The parent population is subjected to genetic operation to obtain a child population, and the parent population and the child population are merged to obtain a joint population. determining, from the joint population, a next generation of the parent population based on the objective function values of the individuals until an evolution iteration number is equal to a preset maximum iteration number, and outputting the parent population as a target population; determining, according to the individuals in the target population, a target migration number corresponding to the blockchain node. 5.The method of claim 4, wherein, The method for determining, from the joint population, a next generation of the parent population based on the objective function values of the individuals specifically includes: performing normalization processing on the objective function values of the individuals in the joint population; performing transformation on the normalized objective function values of the individuals in the joint population; performing Pareto dominance processing on the individuals in the joint population based on the transformed objective function values of the individuals in the joint population, to obtain convergence evaluation values of the individuals in the joint population; sorting the individuals in the joint population according to the convergence evaluation values, to obtain a first convergence order, adding the individual at the first position in the first convergence order to the next generation of the parent population, and removing the individual at the first position in the first convergence order from the joint population; performing Pareto non-dominance sorting on the joint population after the removal, to obtain non-dominance front layers of different levels; sorting the non-dominance front layers according to the levels, to obtain a level order, and taking the level at the first position in the level order as a target level; calculating minimum adaptive mapping parallel distances between the individuals in the non-dominance front layer of the target level and selected individuals in the next generation of the parent population, and determining a number of to-be-selected individuals in the next generation of the parent population according to a difference between the preset number and a number of the selected individuals in the next generation of the parent population, the selected individuals being the individuals that have entered the next generation of the parent population; determining the next generation of the parent population from the non-dominance front layers of different levels based on the minimum adaptive mapping parallel distances, the number of to-be-selected individuals in the next generation of the parent population, and the convergence evaluation values. 6.The method of claim 5, wherein, The method for determining the next generation of the parent population from the non-dominance front layers of different levels based on the minimum adaptive mapping parallel distances, the number of to-be-selected individuals in the next generation of the parent population, and the convergence evaluation values specifically includes: determining a temporary population from the non-dominance front layer of the target level according to the minimum adaptive mapping parallel distances, based on a comparison result between a number of the individuals in the non-dominance front layer of the target level and the number of to-be-selected individuals in the next generation of the parent population; sorting the individuals in the temporary population according to the convergence evaluation values, to obtain a second convergence order, adding the individual at the first position in the second convergence order to the next generation of the parent population, and removing the individual at the first position in the second convergence order from the non-dominance front layer of the target level and the joint population; and If there are individuals in the non-dominated front of the target level after removal, and the number of selected individuals in the next generation of the parent population is less than the preset number, the minimum adaptive mapping parallel distance between the individuals in the non-dominated front of the target level after removal and the selected individuals in the next generation of the parent population is recalculated until there are no individuals in the non-dominated front of the target level after removal or the number of selected individuals in the next generation of the parent population is equal to the preset number; If there are no individuals in the non-dominated front of the target level after removal, and the number of selected individuals in the next generation of the parent population is less than the preset number, the level next to the target level in the level order is updated as the target level, and the minimum adaptive mapping parallel distance between the individuals in the non-dominated front of the updated target level and the selected individuals in the next generation of the parent population is calculated until the number of selected individuals in the next generation of the parent population is equal to the preset number. 7.The method of claim 5, wherein, The normalized objective function value of the individual in the joint population is transformed according to the following formula: , , in, For circular indices, the value ranges from 1 to... ; The number of the objective functions; The index of the objective function; For individuals in the aforementioned joint population Normalized One objective function value; For individuals in the aforementioned joint population Normalized One objective function value; Preset weights; For individuals in the aforementioned joint population The first after initial transformation One objective function value; For individuals in the aforementioned joint population The first after initial transformation The objective function has several values; max() is the function to find the maximum value. For individuals in the aforementioned joint population The transformed first The objective function value. 8.The method of claim 5, wherein, The minimum adaptive mapping parallel distance between the individuals in the non-dominated front of the target level and the selected individuals in the next generation of the parent population is calculated according to the following formula: The minimum adaptive mapping parallel distance between the individuals in the non-dominated front of the target level and the selected individuals in the next generation of the parent population is calculated according to the following formula: , , wherein, is the number of the objective function; is the index of the objective function; is the individual in the non-dominated front of the objective level the normalized first objective function value; is the selected individual in the parent population of the next generation the normalized first objective function value; is the individual in the non-dominated front of the objective level the adaptive mapping parallel distance between the selected individual in the parent population of the next generation, the minimum adaptive mapping parallel distance between the individual in the non-dominated front of the objective level and all selected individuals in the parent population of the next generation; is the parent population of the next generation; min() is the minimum function; is the individual the normalized first objective function value, is the individual the normalized first objective function value.

Citation Information

Patent Citations

  • Data storage method and device based on block chain and related equipment

    CN120066381A

  • Data flow management system and method based on block chain technology

    CN120197232A