Block chain-based intelligent Internet of Things and meta universe data interaction fusion method and system
By encapsulating the physical and virtual world data into blockchain transaction information in the interactive integration of intelligent IoT and metacosmic data, and using distributed timing databases and two-way data indexes for storage and query, the problems of data format differences and low storage efficiency are solved, and efficient and secure data interaction and integration are achieved.
Patent Information
- Application Number
- CN202510488205.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-04-18
AI Technical Summary
The existing blockchain-based intelligent IoT and metacosmic data interaction fusion method faces the large differences in the formats and structures of physical world data and virtual world data, and the lack of effective data mapping and fusion mechanisms, resulting in low data interaction efficiency; at the same time, blockchain storage solutions are difficult to meet the needs of efficient storage and rapid retrieval of massive IoT and metacosmic data, which affects the real-time nature of data interaction.
By obtaining the physical world data in the intelligent IoT device and the virtual world data in the metaverse virtual scene, they are encapsulated into blockchain transaction information respectively, and the correspondence between the physical world data and the virtual world data is established based on the preset multi-dimensional mapping rules. Use a distributed timing database to classify and store blockchain transaction information, and establish a two-way data index between the physical data layer and the virtual data layer to achieve efficient storage and rapid retrieval.
It realizes the seamless integration of the physical world and the virtual world data, improves data storage efficiency and query speed, provides a unified data interaction interface, meets the special needs of intelligent IoT and meta-universe scenarios, and ensures the secure and trustworthy interaction of data.
Smart Images

Figure CN120011371A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to intelligent Internet of Things technology, and in particular to a method and system for interactive fusion of intelligent Internet of Things and metaverse data based on blockchain. Background Art
[0002] With the rapid development of the Internet of Things and Metaverse technologies, data interaction between smart IoT devices and virtual reality scenes is becoming increasingly important. Traditional data interaction methods mainly rely on centralized data storage and processing systems, which have problems such as low data security, poor real-time performance, and limited scalability. Blockchain technology, with its decentralized, tamper-proof, and traceable characteristics, provides a new approach to solving these problems.
[0003] However, the current blockchain-based smart IoT and metaverse data interaction and fusion methods still face some challenges. First, the formats and structures of physical world data and virtual world data are quite different, and there is a lack of effective data mapping and fusion mechanisms, resulting in low data interaction efficiency. Second, the existing blockchain storage solutions are difficult to meet the needs of efficient storage and fast retrieval of massive IoT and metaverse data, affecting the real-time nature of data interaction. Finally, traditional data access methods are difficult to take into account the data characteristics of the physical world and the virtual world at the same time, and cannot provide users with a unified and convenient data interaction experience.
[0004] In order to solve these problems, a new method is urgently needed that can effectively integrate physical and virtual world data, support efficient storage and fast retrieval, and provide a unified data interaction interface. This method should be able to fully utilize the advantages of blockchain technology to achieve secure and reliable data interaction, while meeting the special needs of smart IoT and metaverse scenarios. Summary of the invention
[0005] The embodiments of the present invention provide a method and system for interactive fusion of smart Internet of Things and metaverse data based on blockchain, which can solve the problems in the prior art.
[0006] The first aspect of the embodiment of the present invention provides a method for interactive fusion of smart IoT and metaverse data based on blockchain, including: Acquire physical world data from smart IoT devices; and at the same time, acquire virtual world data from the virtual scene of the Metaverse; Encapsulating the physical world data and the virtual world data into blockchain transaction information respectively, and establishing a corresponding relationship between the physical world data and the virtual world data based on a preset data mapping rule; The blockchain transaction information is classified and stored through a distributed time series database, wherein the distributed time series database includes a physical data layer and a virtual data layer, and a bidirectional data index is established between the physical data layer and the virtual data layer; Receiving a data interaction request initiated by a user, the data interaction request including identification information of physical world data or virtual world data to be accessed; processing the data interaction request, and acquiring corresponding blockchain transaction information according to the bidirectional data index; Parse the acquired blockchain transaction information into physical world data or virtual world data, and return the parsed data to the user.
[0007] Encapsulating the physical world data and the virtual world data into blockchain transaction information respectively, and establishing a corresponding relationship between the physical world data and the virtual world data based on a preset data mapping rule includes: Establishing a correspondence between physical world data and virtual world data based on a preset multi-dimensional mapping rule, wherein the multi-dimensional mapping rule includes a space mapping rule, a state mapping rule, and an environment data mapping rule; The multi-dimensional mapping rules are compressed and encoded, and a cascade operation is performed in combination with the timestamp information and the version identification information to obtain verification data, and the blockchain transaction data that has passed the verification is stored in the blockchain according to the storage hierarchy structure, and an index structure of the blockchain transaction data is established based on a multi-level index mechanism; Based on the index structure, the physical world data and the virtual world data are mapped and updated synchronously in real time. When an abnormal mapping is detected, an abnormal handling mechanism is triggered, and the abnormal handling mechanism includes rechecking and adjusting the mapping rules.
[0008] The multi-dimensional mapping rules are compressed and encoded, and the timestamp information and the version identification information are combined to perform cascade operations to obtain verification data, and the blockchain transaction data that passes the verification is stored in the blockchain according to the storage hierarchy structure. The index structure of the blockchain transaction data is established based on the multi-level index mechanism, including: Compressing and encoding the multi-dimensional mapping rule to obtain compressed rule data, performing a cascade operation on the compressed rule data, the timestamp information and the version identification information, and then performing a hash calculation to obtain verification data; Verification is performed according to the verification data, and after verification, the blockchain transaction data is stored in the blockchain according to a storage hierarchy structure, wherein the storage hierarchy structure includes block header information, transaction list information, and index table information, wherein the block header information is used to record blockchain basic information, the transaction list information is used to store transaction data information, and the index table information is used to establish a data retrieval path; An index structure for the blockchain transaction data is established based on a multi-level index mechanism, wherein the multi-level index mechanism includes a primary key index, a version tree index, and a time index, wherein the primary key index is used to uniquely identify transaction data, the version tree index is used to record the rule version evolution relationship, and the time index is used to implement time series retrieval.
[0009] Establishing a bidirectional data index between the physical data layer and the virtual data layer, and obtaining corresponding blockchain transaction information according to the bidirectional data index includes: Constructing a physical data index structure based on the device identification information, the data type information, the time range information, and the physical block pointer information, wherein the physical block pointer information is used to point to the physical data stored in the blockchain; Constructing a virtual data index structure based on virtual object identification information, scene type information, state information, and virtual block pointer information, wherein the virtual block pointer information is used to point to virtual data stored in the blockchain; Establishing a bidirectional data index based on the physical data index structure and the virtual data index structure, wherein the bidirectional data index includes a forward mapping relationship from a physical index key to a virtual index set and a reverse mapping relationship from a virtual index key to a physical index set; Corresponding blockchain transaction information is obtained according to the bidirectional data index.
[0010] The method further includes adaptively caching the blockchain transaction information: Obtaining data size information and system cache capacity information of the blockchain transaction information, calculating a space occupancy benchmark value based on a ratio of the data size information to the system cache capacity information, and taking the product of the space occupancy benchmark value and a data priority factor as a space occupancy assessment value, wherein the data priority factor is used to characterize the importance of the target data; Obtaining update time information of the blockchain transaction information and current system time information, calculating the time difference between the update time information and the current system time information, substituting the time difference and the timeliness decay coefficient into an exponential decay function to calculate a timeliness evaluation value, wherein the timeliness decay coefficient is used to control the rate of timeliness decay; The space occupancy evaluation value and the timeliness evaluation value are respectively multiplied by corresponding weight coefficients and the sum is calculated to obtain a cache priority score, wherein the weight coefficient is used to balance the influence of different evaluation indicators; The cache strategy of the blockchain transaction information is adjusted based on the cache priority score. When the cache priority score is higher than a preset cache threshold, the blockchain transaction information is loaded into the cache. When the cache priority score is lower than the preset cache threshold, the blockchain transaction information is removed from the cache.
[0011] Parsing the acquired blockchain transaction information into physical world data or virtual world data and returning the parsed data to the user includes: Obtaining a data identification field in the blockchain transaction information, and determining whether the blockchain transaction information belongs to physical world data or virtual world data according to the data identification field; When the blockchain transaction information belongs to physical world data, extracting device identification information, sensor data information and timestamp information in the blockchain transaction information according to a preset physical data parsing template to generate physical world parsed data; When the blockchain transaction information belongs to virtual world data, extracting virtual object identification information, scene state information, and interactive behavior information in the blockchain transaction information according to a preset virtual data parsing template to generate virtual world parsing data; The physical world parsed data or the virtual world parsed data is returned to the user.
[0012] A second aspect of an embodiment of the present invention provides a blockchain-based intelligent IoT and metaverse data interactive fusion system, including: The first unit is used to obtain the physical world data in the smart IoT device and the virtual world data in the virtual scene of the Metaverse; The second unit is used to encapsulate the physical world data and the virtual world data into blockchain transaction information respectively, and establish a corresponding relationship between the physical world data and the virtual world data based on a preset data mapping rule; A third unit is used to classify and store the blockchain transaction information through a distributed time series database, wherein the distributed time series database includes a physical data layer and a virtual data layer, and a bidirectional data index is established between the physical data layer and the virtual data layer; A fourth unit is configured to receive a data interaction request initiated by a user, wherein the data interaction request includes identification information of physical world data or virtual world data to be accessed; process the data interaction request, and obtain corresponding blockchain transaction information according to the bidirectional data index; The fifth unit is used to parse the acquired blockchain transaction information into physical world data or virtual world data, and return the parsed data to the user.
[0013] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0014] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0015] The beneficial effects of this application are as follows: By encapsulating physical world data and virtual world data into blockchain transaction information and establishing corresponding relationships, the seamless integration of physical world and virtual world data is achieved, laying the foundation for the deep interaction between smart Internet of Things and the metaverse.
[0016] A distributed time-series database is used to classify and store blockchain transaction information, and a bidirectional data index is established, which improves data storage efficiency and query speed, and is conducive to efficient management and rapid access to large-scale data.
[0017] Based on the user's data interaction request, it can flexibly parse and return relevant data from the physical world or the virtual world, providing users with a convenient cross-domain data access experience and promoting information flow and value transfer between the physical world and the virtual world. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flowchart of a method for interactively integrating smart IoT and metaverse data based on blockchain according to an embodiment of the present invention; Figure 2 This is a schematic diagram of comparing cache hit rates under different blockchain transaction data volumes in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0021] Figure 1 The flowchart of the method for interactive fusion of smart IoT and metaverse data based on blockchain in an embodiment of the present invention is as follows: Figure 1 As shown, the method includes: Acquire physical world data from smart IoT devices; and at the same time, acquire virtual world data from the virtual scene of the Metaverse; Encapsulating the physical world data and the virtual world data into blockchain transaction information respectively, and establishing a corresponding relationship between the physical world data and the virtual world data based on a preset data mapping rule; The blockchain transaction information is classified and stored through a distributed time series database, wherein the distributed time series database includes a physical data layer and a virtual data layer, and a bidirectional data index is established between the physical data layer and the virtual data layer; Receiving a data interaction request initiated by a user, the data interaction request including identification information of physical world data or virtual world data to be accessed; processing the data interaction request, and acquiring corresponding blockchain transaction information according to the bidirectional data index; Parse the acquired blockchain transaction information into physical world data or virtual world data, and return the parsed data to the user.
[0022] In an optional implementation, encapsulating the physical world data and the virtual world data into blockchain transaction information respectively, and establishing a corresponding relationship between the physical world data and the virtual world data based on a preset data mapping rule includes: Establishing a correspondence between physical world data and virtual world data based on a preset multi-dimensional mapping rule, wherein the multi-dimensional mapping rule includes a space mapping rule, a state mapping rule, and an environment data mapping rule; The multi-dimensional mapping rules are compressed and encoded, and a cascade operation is performed in combination with the timestamp information and the version identification information to obtain verification data, and the blockchain transaction data that has passed the verification is stored in the blockchain according to the storage hierarchy structure, and an index structure of the blockchain transaction data is established based on a multi-level index mechanism; Based on the index structure, the physical world data and the virtual world data are mapped and updated synchronously in real time. When an abnormal mapping is detected, an abnormal handling mechanism is triggered, and the abnormal handling mechanism includes rechecking and adjusting the mapping rules.
[0023] In the data encapsulation stage, the system encapsulates the physical world data and the virtual world data into blockchain transaction information respectively. Blockchain transaction information consists of three parts: transaction header information, data payload information and digital signature information. The transaction header information contains version number information (such as v1.0.2), timestamp information (accurate to milliseconds, such as 2023-10-15 13:45:28.352) and transaction type identification information (such as "Physical data" is identified as "P" and "Virtual data" is identified as "V"). The data payload information contains data feature value information and data source information. For example, the data feature value collected by a temperature sensor is "28.5℃", and the data source is "Sensor ID: TSN20231015A"; the position feature value of a virtual object is "Coordinates (125.3,78.9, 10.2)", and the data source is "Virtual Object ID: VO20231015B".
[0024] The digital signature information is generated by ECDSA (Elliptic Curve Digital Signature Algorithm), and the secp256k1 curve parameters are used in the specific implementation. The signing process is as follows: First, the transaction header information and data payload information are hashed by SHA-256 to obtain a 32-byte summary, and then the summary is signed by ECDSA using the private key to generate a 65-byte signature data. In this way, the integrity and source non-repudiation of the transaction data are ensured.
[0025] The corresponding relationship between the physical world data and the virtual world data is established based on the preset multi-dimensional mapping rules. The multi-dimensional mapping rules include space mapping rules, state mapping rules and environment data mapping rules.
[0026] The spatial mapping rule is used to realize the conversion from the physical coordinate system to the virtual coordinate system and coordinate offset correction. In the specific implementation, the physical coordinates use the GPS standard (WGS84), such as the location of a certain IoT device is "34.12345 degrees north latitude, 108.54321 degrees east longitude"; the virtual coordinates use the 3D Cartesian coordinate system, such as "X:350.25, Y:120.75, Z:15.50". The conversion process includes two steps: coordinate system conversion and scale scaling. First, the GPS coordinates are converted to the local rectangular coordinate system, and then the physical world distance is mapped to the virtual world distance according to the preset scale factor (such as 1:100). When it is detected that the coordinate offset error exceeds the preset threshold (such as 0.5 meters), the system automatically starts the correction mechanism to eliminate the offset error through multi-point sampling and weighted averaging.
[0027] The state mapping rule is used to define the correspondence between the physical device state and the virtual object state. For example, the physical state of the IoT device "smart light" includes three parameters: "on / off", "brightness percentage", and "color temperature", and the corresponding virtual object states are "display state", "luminous intensity", and "light source color". The system uses the state transition table to achieve accurate mapping between the two. For example, the physical brightness "85%" is mapped to the virtual luminous intensity "0.85", and the physical color temperature "3200K" is mapped to the virtual light source color "RGB (255,244,229)". To ensure the accuracy of the mapping, the system implements an adaptive adjustment mechanism, which automatically evaluates the mapping accuracy and makes fine adjustments after every 100 state changes.
[0028] Environmental data mapping rules are used to achieve the conversion of physical environment parameters to virtual environment parameters. For example, the temperature "28℃" in the physical world is mapped to the heat effect parameter "0.65" in the virtual world, and the humidity "75%" in the physical world is mapped to the water vapor effect parameter "0.75" in the virtual world. The mapping uses a piecewise linear interpolation algorithm to map the physical parameter range (such as temperature -10℃ to 40℃) to the virtual parameter range (such as heat effect 0 to 1.0). The system dynamically adjusts the visual effects, particle system parameters, and physical simulation parameters of the virtual world based on the environmental data collected in real time.
[0029] The multi-dimensional mapping rules are compressed and encoded, and the timestamp information and version identification information are combined for cascade operation to obtain verification data. The compression encoding adopts Huffman encoding to encode the commonly used mapping rule parameters into a shorter binary sequence, and the compression rate reaches more than 65%. Taking the space mapping rule as an example, the original rule data is about 150KB, and after compression, it only occupies 52KB of storage space. The timestamp is represented by a 64-bit long integer (millisecond accuracy), and the version identification is represented by a 16-bit integer (such as version "2.5.3" is encoded as "0x0253").
[0030] The cascade operation process is as follows: first, the compressed and encoded mapping rule data is divided into 64-byte data blocks, then XORed with the timestamp and version identifier, and finally the check value is generated by the SHA-256 algorithm. Each check value is 32 bytes long and is used to verify the integrity and validity of the mapping rule. The verified blockchain transaction data is stored according to the storage hierarchy, using a four-layer storage structure: block layer, transaction layer, data layer, and index layer.
[0031] The index structure of blockchain transaction data is established based on a multi-level index mechanism, including time index, space index and type index. The time index is implemented based on the B+ tree, and the index key is the transaction timestamp; the space index is implemented based on the R tree, and the index key is the coordinate information of the device or object; the type index is implemented based on the hash table, and the index key is the transaction type identifier. The index structure supports compound queries, such as "query all temperature sensor data in a specific area within a specific time range". The index storage uses prefix compression technology to further save about 25% of storage space.
[0032] Based on the index structure, the physical world data and the virtual world data are mapped and updated synchronously in real time. The update cycle is divided into three levels according to the importance of the data: high priority (updated every 50 milliseconds), medium priority (updated every 200 milliseconds), and low priority (updated every 1 second). For example, location data related to user interaction belongs to high priority, ambient lighting data belongs to medium priority, and background sound parameters belong to low priority.
[0033] When an abnormal mapping is detected, the exception handling mechanism is triggered. The criteria for abnormal mapping include: coordinate offset exceeding the preset threshold (such as the mapping error between the physical location and the virtual location > 2 meters), inconsistent status (such as the physical device is turned on but the virtual object is displayed as off), and large differences in environmental parameters (such as the mapping deviation between the physical temperature and the virtual heat parameter > 20%). The exception handling mechanism includes re-verification and adjustment of the mapping rules, which is divided into three steps: first suspend the affected mapping process, then use the backup rules for temporary replacement, and finally recalculate the optimal mapping parameters in the background and update the rule base. The system will record the abnormal situation and generate an analysis report to help administrators optimize the mapping rule configuration.
[0034] Table 1: Comparison of data synchronization efficiency between the physical world and the virtual world in the embodiment of the present invention
[0035] As shown in Table 1, this is a performance comparison data of different data types under three technical solutions. The table contains 6 data types: location coordinate data, state change data, environmental parameter data, batch interaction data, low-latency high-priority data, and large-scale user interaction data. The performance of the three solutions of this technical solution (multi-dimensional mapping), one-way mapping method and traditional data synchronization are compared. From the specific data, this technical solution shows obvious advantages in all kinds of data processing, with an average processing performance of 16.5, which is much better than 53.5 of the one-way mapping method and 97.5 of traditional data synchronization. Especially in terms of large-scale user interaction data, this technical solution only takes 32.8 processing time, which is 682.6% higher than the 256.7 of the traditional method. Other data types such as location coordinate data (12.3 vs 58.7), state change data (8.5 vs 45.2), environmental parameter data (15.7 vs 67.8), batch interaction data (24.6 vs 124.3) and low-latency high-priority data (5.2 vs 32.5) all showed significant performance advantages, with efficiency improvements of 377.2%, 431.8%, 331.8%, 405.3% and 525.0% respectively. Overall, the technical solution achieved a 3-6 times performance improvement on all test data types, with an average efficiency improvement of 459.0%, showing excellent technical advantages.
[0036] In an optional implementation, the multi-dimensional mapping rules are compressed and encoded, and the timestamp information and the version identification information are combined to perform a cascade operation to obtain verification data, and the blockchain transaction data that passes the verification is stored in the blockchain according to the storage hierarchy structure, and the index structure of the blockchain transaction data is established based on the multi-level index mechanism, including: Compressing and encoding the multi-dimensional mapping rule to obtain compressed rule data, performing a cascade operation on the compressed rule data, the timestamp information and the version identification information, and then performing a hash calculation to obtain verification data; Verification is performed according to the verification data, and after verification, the blockchain transaction data is stored in the blockchain according to a storage hierarchy structure, wherein the storage hierarchy structure includes block header information, transaction list information, and index table information, wherein the block header information is used to record blockchain basic information, the transaction list information is used to store transaction data information, and the index table information is used to establish a data retrieval path; An index structure for the blockchain transaction data is established based on a multi-level index mechanism, wherein the multi-level index mechanism includes a primary key index, a version tree index, and a time index, wherein the primary key index is used to uniquely identify transaction data, the version tree index is used to record the rule version evolution relationship, and the time index is used to implement time series retrieval.
[0037] The multi-dimensional mapping rules are compressed and encoded to obtain compressed rule data. The multi-dimensional mapping rules contain a large amount of coordinate transformation parameters, state correspondence and environmental parameter mapping information, and direct storage will take up a large space. Adaptive Huffman coding technology is used for compression, and short codes are assigned to high-frequency parameters in the mapping rules, and long codes are assigned to low-frequency parameters. Taking the spatial mapping rule as an example, it contains data such as coordinate system transformation matrix, scaling factor and offset, and the original data volume is about 168KB. After compression coding, the compressed rule data obtained is only 42KB, and the compression rate reaches 75%. The state mapping rules and environmental data mapping rules are also compressed using the same method, compressed from 92KB and 124KB to 28KB and 35KB respectively.
[0038] During the compression process, the original regular data is first scanned to count the frequency of occurrence of each parameter and generate a frequency table. For example, the unit matrix element "1.0000" in the coordinate transformation matrix has an occurrence frequency of up to 32%, and is assigned a 2-bit code "01"; while special mapping parameters such as "rotation angle correction factor (0.1745)" have an occurrence frequency of only 0.1%, and are assigned a 12-bit code "011010101101". The coding table is constructed through a binary tree, and each parameter is replaced with the corresponding binary code according to the coding table, and finally a regular compressed binary stream is generated. At the same time, the coding table is recorded in the compressed data header for subsequent decompression.
[0039] The compression rule data is concatenated with the timestamp information and the version identification information, and then hashed to obtain the verification data. The timestamp information uses a 64-bit long integer to represent the current millisecond time, for example, "1662345678432" represents September 5, 2022 08:21:18.432. The version identification information is represented by a 32-bit integer, with the upper 8 bits representing the major version number, the middle 12 bits representing the minor version number, and the lower 12 bits representing the revision number, such as version "2.5.11" is encoded as "0x02050B".
[0040] The cascade operation uses a block XOR connection method to divide the compression rule data into 64-byte blocks, and each block is XORed with the timestamp and version identification information. For example, if the first block of the compression rule data is "A5B7C2...", the 8 bytes after the timestamp is truncated are "75678432", and the version identification is "02050B", then the XOR result is "D7D2F9...". After processing all blocks, they are connected into a complete data stream. Finally, the SHA-256 hash algorithm is executed on the data stream to generate 32 bytes of verification data.
[0041] Verification is performed based on the verification data. After verification, the blockchain transaction data is stored in the blockchain according to the storage hierarchy. During the verification process, the receiving end repeatedly performs the cascade operation and hash calculation of the compression rule data and compares it with the received verification data. If the comparison is consistent, the verification passes; otherwise, the transaction is rejected and requires to be resent.
[0042] The storage hierarchy includes block header information, transaction list information, and index table information. Block header information is used to record basic blockchain information, including block height (such as 425786), previous block hash value (32 bytes), timestamp (such as 1662345738562), difficulty target (such as 0x1d00ffff), random number (such as 2158734) and Merkle root (32 bytes). Transaction list information is used to store transaction data information, organized in a Merkle tree structure. Each transaction contains a transaction ID (32 bytes), a transaction type identifier (such as "IOTDATA"), transaction content (including device ID, data type, data value, etc.) and signature information (65 bytes).
[0043] The index structure of blockchain transaction data is established based on the multi-level index mechanism to improve data retrieval efficiency. The multi-level index mechanism includes primary key index, version tree index and time index. The primary key index is implemented using a hash table to uniquely identify transaction data. The index key is the transaction ID and the index value is the transaction storage location. For example, when querying the transaction "tx_a4b8c7...", the 12th transaction of block 425786 is directly located through the primary key index, and the query complexity is O(1).
[0044] The version tree index is implemented using a B+ tree structure to record the evolution of rule versions. The index key is the version identifier, and the index value is the transaction ID list of the corresponding version rule. The version tree maintains the parent-child relationship, such as the parent version of version "2.5.11" is "2.5.10", and the root node is the initial version "1.0.0". When querying a mapping rule for a specific version, if version "2.5.11" does not exist, then backtrack along the version tree to find the nearest available version "2.5.10".
[0045] The time index is implemented using a skip table structure to achieve time series retrieval. The index key is the timestamp, and the index value is the transaction ID list of the corresponding time. The skip table has a multi-layer structure, with the 0th layer containing all nodes, and the upper layer nodes serving as indexes to accelerate access.
[0046] In actual applications, a smart home scenario was tested, including 100 IoT devices and corresponding virtual objects. Each device generates 2 pieces of data per second. After compression encoding and storage optimization, the 24-hour data volume was reduced from the original 7.2GB to 1.8GB, saving 75% of storage space. The query efficiency test showed that the average query time for a single piece of data was reduced from 135ms in the traditional way to 12ms, an increase of 11 times. The time range query performance was reduced from 850ms to 78ms, an increase of nearly 11 times.
[0047] Compared with the prior art, the technical innovation of this application lies in the efficient compression coding and multi-level index structure design of multi-dimensional mapping rules. Existing blockchain storage technology usually adopts a single index structure and is not specifically optimized for mapping rules, resulting in storage redundancy and low query efficiency. For example, traditional blockchain systems usually use sequential scanning or simple hash indexes. Querying data within a specific time range requires traversing a large number of blocks, and the average query delay exceeds 500ms. In addition, in the prior art, mapping rules are usually stored in their original form, which takes up a lot of space and has low update efficiency.
[0048] Table 2: Comparative data table of multi-dimensional mapping rule compression and storage space optimization in the embodiment of the present invention
[0049] Table 2 shows the performance comparison data of different data types under various compression schemes. The table contains seven data types, namely space mapping rules (1000), state mapping rules (5000), environmental data mapping rules (2000), physical device state data (10000 / day), virtual object data (20000 / day), mapping relationship update data (5000 / day) and complete system (24 hours) data. By comparing the data performance of the original data size, this technical solution (adaptive Huffman + multi-level index), standard compression (gzip), basic compression (RLE) and no compression, the results show that this technical solution has a significant space saving advantage. Specifically, the space mapping rule is compressed from 168.5 to 42.3, with a saving rate of 74.9%; the state mapping rule is compressed from 92.4 to 28.2, with a saving rate of 69.5%; the environment data mapping rule is compressed from 124.8 to 35.6, with a saving rate of 71.5%; the physical device state data is compressed from 256.3 to 58.4, with a saving rate of 77.2%; the virtual object data is compressed from 384.7 to 82.5, with a saving rate of 78.6%; the mapping relationship update data is compressed from 124.2 to 24.6, with a saving rate of up to 80.2%. In the 24-hour operation data of the complete system, it is compressed from 7250.6 to 1812.5, with a saving rate of 75.0%. Compared with other compression schemes, this technical scheme shows the best compression effect on all data types, with an average space saving of more than 75%, which is far better than the standard gzip compression and basic RLE compression schemes.
[0050] This application designs an adaptive compression algorithm based on the characteristics of the mapping rules to significantly reduce storage space; introduces cascade operations and verification mechanisms to ensure data integrity; and adopts a multi-level index structure to optimize query paths and greatly improve retrieval efficiency. These improvements enable the system to process large-scale physical and virtual world data mappings in real time, support highly concurrent data interaction requests, and provide a solid technical foundation for the deep integration of smart IoT and the metaverse. Experimental verification has shown that compared with existing technologies, this technical solution improves storage efficiency by 75%, query performance by 11 times, and overall system throughput by 8.5 times, effectively supporting real-time data mapping and interaction needs of tens of millions of devices.
[0051] In an optional implementation, a bidirectional data index is established between the physical data layer and the virtual data layer, and obtaining corresponding blockchain transaction information according to the bidirectional data index includes: Constructing a physical data index structure based on the device identification information, the data type information, the time range information, and the physical block pointer information, wherein the physical block pointer information is used to point to the physical data stored in the blockchain; Constructing a virtual data index structure based on virtual object identification information, scene type information, state information, and virtual block pointer information, wherein the virtual block pointer information is used to point to virtual data stored in the blockchain; Establishing a bidirectional data index based on the physical data index structure and the virtual data index structure, wherein the bidirectional data index includes a forward mapping relationship from a physical index key to a virtual index set and a reverse mapping relationship from a virtual index key to a physical index set; Corresponding blockchain transaction information is obtained according to the bidirectional data index.
[0052] Construct a physical data index structure. The index structure is based on the following information: device identification information, data type information, time range information, and physical block pointer information. The device identification information can be the unique ID of the device, such as "Device_001". The data type information indicates the nature of the data, such as "temperature", "humidity", etc. The time range information specifies the valid time period of the data, such as "2023-01-01 00:00:00" to "2023-01-31 23:59:59". The physical block pointer information is used to point to the location where the actual physical data is stored in the blockchain, which can be the hash value of the block, such as "0x1a2b3c...".
[0053] Construct a virtual data index structure. The structure is based on the following information: virtual object identification information, scene type information, state information, and virtual block pointer information. Virtual object identification information can be the unique ID of an object in the virtual world, such as "VirtualObj_001". Scene type information describes the environment in which the virtual object is located, such as "indoor", "outdoor", etc. State information indicates the current state of the virtual object, such as "normal", "abnormal", etc. Virtual block pointer information points to the location where virtual data is stored in the blockchain, which can also be the hash value of the block.
[0054] After building the physical data index and virtual data index, the next step is to build a bidirectional data index. This bidirectional index consists of two parts: the forward mapping of the physical index key to the virtual index collection, and the reverse mapping of the virtual index key to the physical index collection. This bidirectional index structure allows us to quickly associate and query between physical data and virtual data.
[0055] Obtain the corresponding blockchain transaction information based on the bidirectional data index. Receive query request: The system receives a query request, which may contain query conditions for physical data (such as device ID, data type, time range) or query conditions for virtual data (such as virtual object ID, scene type, status). Index search: Based on the query conditions, the system searches for relevant index items in the bidirectional data index. If it is a physical data query, the system uses forward mapping; if it is a virtual data query, the system uses reverse mapping. Obtain block pointer: Obtain the corresponding block pointer information from the index item. Access blockchain: Use the block pointer to access the blockchain and obtain the actual data stored in the corresponding block. Data parsing and return: Parse the data obtained from the blockchain and return the results to the initiator of the query request.
[0056] Suppose we want to query the temperature data of "Device_001" in January 2023, as well as the virtual object information related to it. The system receives a query request containing the device ID "Device_001", the data type "temperature", and the time range "2023-01-01 00:00:00" to "2023-01-31 23:59:59". In the forward mapping, we search for the index "Device_001_temperature_20230101-20230131" and get the related virtual object list ["VirtualObj_001", "VirtualObj_002"]. We get the block pointer "0x1a2b3c..." from the physical data index. We use this pointer to access the blockchain and get the stored temperature data. At the same time, the system can further query the information of the virtual objects "VirtualObj_001" and "VirtualObj_002". The indexes of the two virtual objects are searched in the reverse mapping to obtain the related physical device and data information. The system combines the physical temperature data and the related virtual object information and returns it to the initiator of the query request.
[0057] In this way, bidirectional association and fast query of physical data and virtual data are realized. This method not only improves the efficiency of data retrieval, but also provides strong support for data integration between the physical world and the virtual world. In practical applications, the index structure can be optimized according to specific needs, such as adding a cache mechanism, or using a more efficient data structure to store and query indexes.
[0058] In order to ensure the security and integrity of data, authentication and access control mechanisms can be added during the index building and query process. For example, digital signatures can be used to verify the legitimacy of index updates, or role-based access control can be implemented to ensure that only authorized users can query specific data.
[0059] This bidirectional data indexing method provides an efficient and flexible solution for data interaction between the physical data layer and the virtual data layer, laying the foundation for building complex Internet of Things and virtual reality applications.
[0060] In an optional implementation, the method further includes adaptively caching the blockchain transaction information: Obtaining data size information and system cache capacity information of the blockchain transaction information, calculating a space occupancy benchmark value based on a ratio of the data size information to the system cache capacity information, and taking the product of the space occupancy benchmark value and a data priority factor as a space occupancy assessment value, wherein the data priority factor is used to characterize the importance of the target data; Obtaining update time information of the blockchain transaction information and current system time information, calculating the time difference between the update time information and the current system time information, substituting the time difference and the timeliness decay coefficient into an exponential decay function to calculate a timeliness evaluation value, wherein the timeliness decay coefficient is used to control the rate of timeliness decay; The space occupancy evaluation value and the timeliness evaluation value are respectively multiplied by corresponding weight coefficients and the sum is calculated to obtain a cache priority score, wherein the weight coefficient is used to balance the influence of different evaluation indicators; The cache strategy of the blockchain transaction information is adjusted based on the cache priority score. When the cache priority score is higher than a preset cache threshold, the blockchain transaction information is loaded into the cache. When the cache priority score is lower than the preset cache threshold, the blockchain transaction information is removed from the cache.
[0061] Get the data size information of blockchain transaction information and system cache capacity information. For example, the data size of a blockchain transaction information is 10MB, and the current available cache capacity of the system is 100MB.
[0062] The space occupancy benchmark value is calculated based on the ratio of the data size information to the system cache capacity information. In this example, the space occupancy benchmark value is 10MB / 100MB=0.1.
[0063] The data priority factor is introduced to characterize the importance of the target data. The data priority factor can be set according to business needs. For example, it can be set to an integer from 1 to 10. The larger the value, the more important the data. Assume that the data priority factor of the current transaction information is 8.
[0064] The product of the space occupancy baseline value and the data priority factor is taken as the space occupancy assessment value. In this example, the space occupancy assessment value is 0.1 * 8 = 0.8.
[0065] Get the update time information of blockchain transaction information and the current system time information. For example, the last update time of a transaction information is 12:00:00 on May 1, 2023, and the current system time is 12:00:00 on May 2, 2023.
[0066] Calculate the time difference between the update time information and the current system time information. In this example, the time difference is 24 hours.
[0067] The time-effect decay coefficient is introduced to control the rate of time-effect decay. The time-effect decay coefficient can be adjusted according to actual needs, for example, it can be set to 0.1.
[0068] Substitute the time difference and the time-effectiveness attenuation coefficient into the exponential decay function to calculate the time-effectiveness evaluation value. The specific calculation method can be: time-effectiveness evaluation value = e^(-time-effectiveness attenuation coefficient * time difference). In this example, the time-effectiveness evaluation value is approximately 0.0907.
[0069] The weight coefficient is introduced to balance the influence of different evaluation indicators. The weight coefficient can be set for the space occupancy evaluation value and the timeliness evaluation value respectively. For example, the weight coefficient of the space occupancy evaluation value is 0.6, and the weight coefficient of the timeliness evaluation value is 0.4.
[0070] Multiply the space occupancy evaluation value and the timeliness evaluation value by the corresponding weight coefficients and sum them up to get the cache priority score. In this example, the cache priority score = 0.8 * 0.6 + 0.0907 * 0.4 ≈ 0.5163.
[0071] The cache strategy of blockchain transaction information is adjusted based on the cache priority score. A preset cache threshold is set, such as 0.5. When the cache priority score is higher than the preset cache threshold, the blockchain transaction information is loaded into the cache; when the cache priority score is lower than the preset cache threshold, the blockchain transaction information is removed from the cache.
[0072] Since the calculated cache priority score of 0.5163 is higher than the preset cache threshold of 0.5, the blockchain transaction information will be loaded into the cache.
[0073] Adjustment of data priority factor: The data priority factor can be adjusted dynamically based on factors such as transaction amount and transaction frequency. For example, for transaction information with a transaction amount exceeding 1 million yuan, its data priority factor can be increased to a maximum value of 10. Adjustment of timeliness decay coefficient: Different timeliness decay coefficients can be set for different types of transaction information. For example, for high-frequency transaction information, the timeliness decay coefficient can be set to 0.2 to speed up its timeliness decay.
[0074] Adjustment of weight coefficient: The weight coefficient can be adjusted dynamically according to the system load. For example, when the system cache space is tight, the weight coefficient of the space occupancy evaluation value can be increased to 0.8, and the weight coefficient of the timeliness evaluation value can be reduced to 0.2 to take more space factors into account. Adjustment of preset cache threshold: The preset cache threshold can be adjusted dynamically according to the overall system performance. For example, when the system response time is significantly slower, the preset cache threshold can be increased to 0.6 to reduce the amount of data in the cache.
[0075] In practical applications, various parameters can be fine-tuned according to specific business needs and system characteristics. For example, the optimal time-effectiveness attenuation coefficient and weight coefficient configuration can be determined through a large amount of test data. At the same time, machine learning algorithms can also be introduced to analyze the access patterns of historical data and predict the data that may be frequently accessed in the future, thereby further optimizing the cache strategy.
[0076] Regular cleanup: Set up scheduled tasks to regularly check and clean up data in the cache that has not been accessed for a long time to free up cache space. Hierarchical cache: Divide the cache into multiple levels, such as memory cache, SSD cache, and hard disk cache, and store the data in caches of different levels according to its importance and access frequency. Concurrency control: In high-concurrency scenarios, use mechanisms such as read-write locks to ensure the consistency and integrity of cached data. Fault-tolerance mechanism: Implement cache backup and recovery mechanisms to quickly restore data when cache fails. Monitoring and alarm: Real-time monitoring of cache usage, and timely issuance of alarms when cache usage exceeds the preset threshold so that operation and maintenance personnel can handle it in a timely manner.
[0077] Figure 2 This is a schematic diagram of cache hit rate comparison under different blockchain transaction data volumes in an embodiment of the present invention: The figure shows the comparison of cache hit rates of three different cache strategies when the amount of blockchain transaction data continues to increase. The horizontal axis represents the amount of blockchain transaction data, ranging from 100 to 50,000; the vertical axis represents the cache hit rate, expressed as a percentage. Three different line types are used in the figure to represent different cache strategies: the solid line marked with a triangle represents the present technical solution (adaptive cache optimization), the dotted line marked with a square represents the LRU cache strategy, and the dotted line marked with a circle represents the FIFO cache strategy. From the data trend, when the amount of transaction data is 100, the hit rates of the three strategies are approximately 88% (present solution), 79% (LRU) and 72% (FIFO), respectively. As the amount of data increases to 50,000, the performance difference of the three strategies further expands. The present technical solution still maintains a high hit rate of about 75%, while the LRU strategy drops to about 50%, and the FIFO strategy drops to about 40%. Overall, the present technical solution maintains the optimal cache hit rate at all data levels, and the performance degradation is minimal with the increase of data volume, showing significant performance advantages and good scalability. Especially in the scenario of large data volume (more than 10,000 entries), this solution has more obvious advantages than traditional caching strategies, and the hit rate is always maintained above 75%.
[0078] In an optional implementation, parsing the acquired blockchain transaction information into physical world data or virtual world data, and returning the parsed data to the user includes: Obtaining a data identification field in the blockchain transaction information, and determining whether the blockchain transaction information belongs to physical world data or virtual world data according to the data identification field; When the blockchain transaction information belongs to physical world data, extracting device identification information, sensor data information and timestamp information in the blockchain transaction information according to a preset physical data parsing template to generate physical world parsed data; When the blockchain transaction information belongs to virtual world data, extracting virtual object identification information, scene state information, and interactive behavior information in the blockchain transaction information according to a preset virtual data parsing template to generate virtual world parsing data; The physical world parsed data or the virtual world parsed data is returned to the user.
[0079] Get the data identification field in the blockchain transaction information, and determine whether the blockchain transaction information belongs to physical world data or virtual world data based on the field. The data identification field is usually located in the header or metadata part of the transaction information, and is distinguished by a specific identifier. For example, the physical world data can use the "PHY" prefix, and the virtual world data can use the "VIR" prefix. In specific implementation, after the system obtains the complete transaction information from the blockchain node, it first parses the first 8 bytes of the transaction header and extracts the data type identifier. If the transaction information is "PHY_TEMP_24A75B...", the "PHY" identifier is extracted, indicating that this is a physical world data. In addition, the system also supports composite identifiers, such as "PHY_TEMP" for physical world temperature data, "VIR_AVTR" for virtual world avatar data, etc., to achieve more refined data classification.
[0080] When blockchain transaction information is determined to be physical world data, relevant information is extracted according to the preset physical data parsing template. The physical data parsing template is a structured data description file defined in JSON or XML format, which specifies the parsing rules for different types of physical data. The template defines information such as the location, length, encoding method, and data type of the necessary fields. For example, the temperature sensor data template can be defined as: the device identification information is located at byte offset 8-24, encoded in UTF-8; the sensor data information is located at byte offset 25-32, using IEEE 754 floating point format; the timestamp information is located at byte offset 33-40, using Unix timestamp format.
[0081] The physical data parsing template is used to parse out: the device identifier is "24A75B" (indicating a specific temperature sensor), the sensor data is "28.5" (indicating 28.5 degrees Celsius), and the timestamp is "1662345678" (indicating September 5, 2022, 08:21:18). In addition, the system has prepared a variety of parsing templates for different types of physical data, such as humidity data templates, location data templates, and illumination data templates, to achieve accurate parsing of various types of physical world data. To improve parsing efficiency, the system uses a template cache mechanism to load frequently used parsing templates into memory to reduce template loading time.
[0082] When blockchain transaction information is determined to be virtual world data, relevant information is extracted according to the preset virtual data parsing template. The virtual data parsing template also adopts a structured definition method, but its field design focuses more on the characteristics of the virtual scene. A typical virtual data parsing template contains virtual object identification information, scene state information, and interactive behavior information. Virtual object identification usually uses a unique ID to represent a specific virtual entity; scene state information describes the location, orientation, action status, etc. of the virtual object; interactive behavior information records the interaction method and results between the user and the virtual object.
[0083] Through the virtual data parsing template, it is parsed that: the virtual object identifier is "18F2D5" (indicating a virtual character), the scene state information includes the position coordinates "125.4,78.2,42.1" and the action state "WALK" (indicating the walking state), and the interaction behavior information includes the interaction duration "30" seconds and the interaction user "USER456". For complex virtual world data, the system supports hierarchical parsing, first parsing the basic structure, and then recursively parsing each substructure, such as multiple virtual objects contained in a virtual scene, each object contains multiple attributes and states.
[0084] A data validity verification mechanism is also implemented to check the legitimacy of the parsed data. For example, the temperature data is checked to see if it is within a reasonable range (such as -50°C to 150°C), and the virtual location coordinates are checked to see if they are within the scene boundaries. When abnormal data is detected, the system will mark and record it, and try to restore the data or provide an alternative value through a data repair algorithm. For example, when the temperature value is obviously abnormal (such as 9999°C), the system may return the most recent valid temperature value or a preset default value.
[0085] The parsed physical world data or virtual world data is returned to the user. The returned data format supports multiple standards, including JSON, XML, Protocol Buffers, etc., to meet the needs of different application scenarios. The system will perform corresponding conversions based on the data format parameters specified in the user request. In addition, the system also provides a data annotation function to add additional descriptive information to the returned data, such as data units, precision, collection methods, etc., to enhance the interpretability of the data.
[0086] To improve performance, the system implements parallel processing of the parsing process. When a large amount of transaction information needs to be parsed, the system assigns the task to multiple processing threads, each of which is responsible for parsing a portion of the data and finally merging the results. Actual measurements show that on an 8-core processor, parallel parsing can increase the processing speed by about 5.8 times compared to serial parsing. In addition, the system also implements parsing result caching. For the same transaction data that is repeatedly requested in a short period of time, the cached results are directly returned to avoid repeated parsing, further improving the response speed.
[0087] Compared with the prior art, this application has made significant improvements in blockchain transaction information parsing. Existing blockchain data parsing technologies usually use fixed format parsing methods and lack special adaptation for physical and virtual world data. This leads to low parsing efficiency and difficulty in processing diverse data formats. For example, traditional parsing methods can usually only identify basic transaction information (such as sender, receiver, amount, etc.), but cannot deeply parse IoT sensor data or virtual scene interaction data contained in the payload data.
[0088] A special data identification mechanism is introduced to accurately distinguish data from the physical world and the virtual world; a targeted parsing template system is designed to adapt to the characteristics of different types of data; data validity verification and exception handling capabilities are added to improve the reliability of parsing results; the parsing process is optimized, and performance is greatly improved through parallel processing and result caching. Through these technical improvements, this application makes the conversion of blockchain transaction information to physical / virtual world data more efficient and accurate, providing a solid foundation for the deep integration of smart IoT and the metaverse.
[0089] In actual tests, compared with traditional methods, the data recognition accuracy of the analysis method of this application has increased from 92.3% to 99.7%, the analysis speed has increased by about 4.2 times, and the abnormal data processing capability has increased by 3.5 times. These improvements provide more reliable and efficient data support for the interaction between the blockchain-based Internet of Things and the Metaverse, effectively promoting the data interoperability and integration of the two worlds.
[0090] A second aspect of an embodiment of the present invention provides a blockchain-based intelligent IoT and metaverse data interactive fusion system, including: The first unit is used to obtain physical world data in the smart IoT device, wherein the physical world data includes IoT device identification information and IoT device status information; and simultaneously obtain virtual world data in the metaverse virtual scene, wherein the virtual world data includes virtual object identification information and virtual object status information; The second unit is used to encapsulate the physical world data and the virtual world data into blockchain transaction information respectively, and establish a corresponding relationship between the physical world data and the virtual world data based on a preset data mapping rule; A third unit is used to classify and store the blockchain transaction information through a distributed time series database, wherein the distributed time series database includes a physical data layer and a virtual data layer, the physical data layer is used to store the blockchain transaction information corresponding to the physical world data, the virtual data layer is used to store the blockchain transaction information corresponding to the virtual world data, and a bidirectional data index is established between the physical data layer and the virtual data layer; A fourth unit is configured to receive a data interaction request initiated by a user, wherein the data interaction request includes identification information of physical world data or virtual world data to be accessed; process the data interaction request, and obtain corresponding blockchain transaction information according to the bidirectional data index; The fifth unit is used to parse the acquired blockchain transaction information into physical world data or virtual world data, and return the parsed data to the user.
[0091] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0092] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0093] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A blockchain-based intelligent IoT and metaverse data interactive fusion method, characterized in that: include: Obtain physical world data from smart IoT devices; At the same time, obtain the virtual world data in the virtual scene of the metaverse; Encapsulating the physical world data and the virtual world data into blockchain transaction information respectively, and establishing a corresponding relationship between the physical world data and the virtual world data based on a preset data mapping rule; The blockchain transaction information is classified and stored through a distributed time series database, wherein the distributed time series database includes a physical data layer and a virtual data layer, and a bidirectional data index is established between the physical data layer and the virtual data layer; Receiving a data interaction request initiated by a user, the data interaction request including identification information of physical world data or virtual world data to be accessed; processing the data interaction request, and acquiring corresponding blockchain transaction information according to the bidirectional data index; Parse the acquired blockchain transaction information into physical world data or virtual world data, and return the parsed data to the user.
2. The method according to claim 1, characterized in that Encapsulating the physical world data and the virtual world data into blockchain transaction information respectively, and establishing a corresponding relationship between the physical world data and the virtual world data based on a preset data mapping rule includes: Establishing a correspondence between physical world data and virtual world data based on a preset multi-dimensional mapping rule, wherein the multi-dimensional mapping rule includes a space mapping rule, a state mapping rule, and an environment data mapping rule; The multi-dimensional mapping rules are compressed and encoded, and a cascade operation is performed in combination with the timestamp information and the version identification information to obtain verification data, and the blockchain transaction data that has passed the verification is stored in the blockchain according to the storage hierarchy structure, and an index structure of the blockchain transaction data is established based on a multi-level index mechanism; Based on the index structure, the physical world data and the virtual world data are mapped and updated synchronously in real time. When an abnormal mapping is detected, an abnormal handling mechanism is triggered, and the abnormal handling mechanism includes rechecking and adjusting the mapping rules.
3. The method according to claim 2, characterized in that The multi-dimensional mapping rules are compressed and encoded, and the timestamp information and the version identification information are combined to perform cascade operations to obtain verification data, and the blockchain transaction data that passes the verification is stored in the blockchain according to the storage hierarchy structure. The index structure of the blockchain transaction data is established based on the multi-level index mechanism, including: Compressing and encoding the multi-dimensional mapping rule to obtain compressed rule data, performing a cascade operation on the compressed rule data, the timestamp information and the version identification information, and then performing a hash calculation to obtain verification data; Verification is performed according to the verification data, and after verification, the blockchain transaction data is stored in the blockchain according to a storage hierarchy structure, wherein the storage hierarchy structure includes block header information, transaction list information, and index table information, wherein the block header information is used to record blockchain basic information, the transaction list information is used to store transaction data information, and the index table information is used to establish a data retrieval path; An index structure for the blockchain transaction data is established based on a multi-level index mechanism, wherein the multi-level index mechanism includes a primary key index, a version tree index, and a time index, wherein the primary key index is used to uniquely identify transaction data, the version tree index is used to record the rule version evolution relationship, and the time index is used to implement time series retrieval.
4. The method according to claim 1, characterized in that: Establishing a bidirectional data index between the physical data layer and the virtual data layer, and obtaining corresponding blockchain transaction information according to the bidirectional data index includes: Constructing a physical data index structure based on the device identification information, the data type information, the time range information, and the physical block pointer information, wherein the physical block pointer information is used to point to the physical data stored in the blockchain; Constructing a virtual data index structure based on virtual object identification information, scene type information, state information, and virtual block pointer information, wherein the virtual block pointer information is used to point to virtual data stored in the blockchain; Establishing a bidirectional data index based on the physical data index structure and the virtual data index structure, wherein the bidirectional data index includes a forward mapping relationship from a physical index key to a virtual index set and a reverse mapping relationship from a virtual index key to a physical index set; Corresponding blockchain transaction information is obtained according to the bidirectional data index.
5. The method according to claim 4, characterized in that The method further includes adaptively caching the blockchain transaction information: Obtaining data size information and system cache capacity information of the blockchain transaction information, calculating a space occupancy benchmark value based on a ratio of the data size information to the system cache capacity information, and taking the product of the space occupancy benchmark value and a data priority factor as a space occupancy assessment value, wherein the data priority factor is used to characterize the importance of the target data; Obtaining update time information of the blockchain transaction information and current system time information, calculating the time difference between the update time information and the current system time information, substituting the time difference and the timeliness decay coefficient into an exponential decay function to calculate a timeliness evaluation value, wherein the timeliness decay coefficient is used to control the rate of timeliness decay; The space occupancy evaluation value and the timeliness evaluation value are respectively multiplied by corresponding weight coefficients and the sum is calculated to obtain a cache priority score, wherein the weight coefficient is used to balance the influence of different evaluation indicators; The cache strategy of the blockchain transaction information is adjusted based on the cache priority score. When the cache priority score is higher than a preset cache threshold, the blockchain transaction information is loaded into the cache. When the cache priority score is lower than the preset cache threshold, the blockchain transaction information is removed from the cache.
6. The method according to claim 1, characterized in that Parsing the acquired blockchain transaction information into physical world data or virtual world data and returning the parsed data to the user includes: Obtaining a data identification field in the blockchain transaction information, and determining whether the blockchain transaction information belongs to physical world data or virtual world data according to the data identification field; When the blockchain transaction information belongs to physical world data, extracting device identification information, sensor data information and timestamp information in the blockchain transaction information according to a preset physical data parsing template to generate physical world parsed data; When the blockchain transaction information belongs to virtual world data, extracting virtual object identification information, scene state information, and interactive behavior information in the blockchain transaction information according to a preset virtual data parsing template to generate virtual world parsing data; The physical world parsed data or the virtual world parsed data is returned to the user.
7. A blockchain-based intelligent IoT and metaverse data interactive fusion system, used to implement the method described in any one of claims 1 to 6, characterized in that: include: The first unit is used to obtain the physical world data in the smart IoT device and the virtual world data in the virtual scene of the Metaverse; The second unit is used to encapsulate the physical world data and the virtual world data into blockchain transaction information respectively, and establish a corresponding relationship between the physical world data and the virtual world data based on a preset data mapping rule; A third unit is used to classify and store the blockchain transaction information through a distributed time series database, wherein the distributed time series database includes a physical data layer and a virtual data layer, and a bidirectional data index is established between the physical data layer and the virtual data layer; A fourth unit is configured to receive a data interaction request initiated by a user, wherein the data interaction request includes identification information of physical world data or virtual world data to be accessed; process the data interaction request, and obtain corresponding blockchain transaction information according to the bidirectional data index; The fifth unit is used to parse the acquired blockchain transaction information into physical world data or virtual world data, and return the parsed data to the user.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Digital twinning-based automatic driving high-precision map model and high-precision static map making method
CN116129066A
Financial service providing method and device based on meta universe and storage medium
CN116579852A
Customer group ecological scene construction method and system based on meta-universe virtual reality technology
CN117170497A
Intelligent logistics optimization method and device, equipment and storage medium
CN119558742A
Virtual reality system
US20180342106A1