Data uplink method and device based on double decentration, equipment and medium

By matching virtual devices and decentralized identity registration for trusted acquisition devices, the problem of management difficulty when equipment is damaged is solved, the flexibility and security of data on the link are improved, and the flexible binding between virtual devices and blockchain identities is achieved.

CN119628818APending Publication Date: 2025-03-14CHINA MERCHANTS INVESTMENT DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411749173.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Existing data-winding methods are difficult to manage uniformly when the equipment is damaged, resulting in low flexibility in data-winding.

Method used

By matching the trusted acquisition devices with virtual devices, generating virtual device key groups, and decentralized identity registration, the transaction data is signed and linked using the virtual device key groups.

Benefits of technology

It realizes one-to-one matching between virtual devices and real collection locations, improves the flexibility of data on the link, ensures the security and uniqueness of data, and realizes the flexible binding of trusted devices and blockchain identities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119628818A_ABST
    Figure CN119628818A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data uplink, and relates to a data uplink method and device based on double decentration, equipment and a medium, and the method comprises the steps: matching a matched virtual device of trusted collection equipment, and initializing a virtual device key group of the matched virtual device; performing decentralized identity registration on the matched virtual device according to the virtual device key group to obtain a virtual device identity document; acquiring collection environment data and a trusted root key, and performing abstract calculation and trusted root signature on the collection environment data according to the trusted root key to obtain a collection data abstract and a collection data signature; generating transaction data by using the virtual device identity document, the collected data abstract and the collected data signature, and performing transaction signature on the transaction data by using the virtual device key group to obtain signature transaction data; and performing transaction packaging and transaction uplink on the signature transaction data and the transaction data to obtain uplink data. According to the invention, the flexibility of data uplink can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data chain technology, and in particular to a data chain method, device, equipment and medium based on dual decentralization. Background Art

[0002] Data on-chain refers to storing data or data summaries on the blockchain to ensure the credibility and integrity of the data by leveraging the blockchain's immutability, distributed storage, security, and transparency. In the application scenario of smart ports, the collected sensor data needs to be on-chain.

[0003] Most of the existing data chain-up methods are based on trusted devices. The collected data is signed and chained through the unique device identifier of the trusted device. In actual applications, when the device is damaged, the device identity needs to be re-registered, and it is difficult to manage it in a unified manner, which may lead to low flexibility when uploading data to the chain. Summary of the invention

[0004] The present invention provides a data chain-up method, device, equipment and medium based on dual decentralization, the main purpose of which is to solve the problem of low flexibility when uploading data to the chain.

[0005] To achieve the above purpose, the present invention provides a data chain method based on dual decentralization, including:

[0006] Performing virtual device matching on the trusted acquisition device to obtain a matching virtual device, and performing a key initialization operation on the matching virtual device to obtain a virtual device key group;

[0007] Performing decentralized identity registration on the matching virtual device according to the virtual device key group to obtain a virtual device identity document;

[0008] Acquire the collection environment data and the trusted root key of the trusted collection device, and perform summary calculation and trusted root signature on the collection environment data according to the trusted root key to obtain a collection data summary and a collection data signature;

[0009] Generate transaction data using the virtual device identity document, the collected data summary and the collected data signature, and use the virtual device key group to sign the transaction data to obtain signed transaction data;

[0010] The signed transaction data and the transaction data are packaged and put on the chain to obtain the on-chain data.

[0011] Optionally, performing virtual device matching on the trusted acquisition device to obtain a matching virtual device includes:

[0012] Extracting a trusted device identifier from the trusted acquisition device;

[0013] A virtual device match is performed on a preset virtual device set according to the trusted device identifier to obtain a matching virtual device.

[0014] Optionally, performing a key initialization operation on the matching virtual device to obtain a virtual device key group includes:

[0015] Obtaining the device number of the matching virtual device, and performing a hash operation on the device number to obtain a hashed device number;

[0016] Filtering out a first prime number and a second prime number from a preset prime number data set according to the hash device number;

[0017] taking the product of the first prime number and the second prime number as a prime number product, and calculating a decayed prime number product according to the first prime number and the second prime number;

[0018] Filtering a public key coefficient according to the attenuated prime product, and calculating a virtual device public key according to the prime product and the public key coefficient;

[0019] Calculating a private key coefficient according to the attenuated prime product and the public key coefficient, and calculating a virtual device private key according to the prime product and the private key coefficient;

[0020] A virtual device key group is generated according to the virtual device public key and the virtual device private key.

[0021] Optionally, the performing decentralized identity registration on the matching virtual device according to the virtual device key group to obtain a virtual device identity document includes:

[0022] Extracting a virtual device public key from the virtual device key group, and performing a hash operation on the virtual device public key to obtain a hashed virtual device public key;

[0023] Obtaining the decentralization type corresponding to the matching virtual device, and generating a decentralization identifier according to the decentralization type and the hashed virtual device public key;

[0024] Generate a signature type and a key usage statement according to the virtual device key group;

[0025] A virtual device identity document is generated according to the virtual device public key, the decentralized identifier, the signature type, and the key usage statement.

[0026] Optionally, performing digest calculation and trusted root signature on the collected environment data according to the trusted root key to obtain a collected data digest and a collected data signature includes:

[0027] The collected environment data is converted into a collected environment data matrix, and the collected environment data matrix is ​​padded according to a preset padded bit length to obtain a padded data matrix;

[0028] Dividing the padding data matrix into blocks according to the padding bit length to obtain a padding data block set;

[0029] Calculating the collected data summary of the padding data block set according to the padding bit length;

[0030] The collected data summary is signed according to the trusted root key and the padding bit length to obtain a collected data signature.

[0031] Optionally, calculating the collected data summary of the padding data block set according to the padding bit length includes:

[0032] Extracting a total number of data blocks from the set of padding data blocks, and initializing the number of iterations according to the total number of data blocks;

[0033] Circularly right-shifting the bit-by-bit data block set to obtain a right-shifted data block set;

[0034] Initializing a target summary, and performing a bit-by-bit XOR operation on the right-shifted data block set using the target summary to obtain an XOR data block set;

[0035] Using the target summary, performing a data addition operation on the XOR data block set to obtain a summed data block set;

[0036] Performing a modulo operation on the summed data block set using the padding bit length to obtain a data summary set;

[0037] Subtract one from the number of iterations, and determine whether the number of iterations is zero;

[0038] If not, taking the data summary set as the target summary, returning to the step of performing a bit-by-bit circular right shift on the bit-filled data block set to obtain a right-shifted data block set;

[0039] If yes, performing bit-by-bit XOR operation on each data summary in the data summary set to obtain an XOR data summary;

[0040] The XOR data summary is modulo-operated using the padding bit length to obtain a collected data summary.

[0041] Optionally, signing the collected data digest according to the trusted root key and the padding bit length to obtain the collected data signature includes:

[0042] Performing an exponential operation on the collected data summary according to the trusted root key to obtain an exponential data summary;

[0043] Performing a data addition operation on the exponential data summary and the trusted root key to obtain a summed data summary;

[0044] The modulo operation is performed on the summed data summary using the padding bit length to obtain the collected data signature.

[0045] Optionally, the using the virtual device key group to perform a transaction signature on the transaction data to obtain signed transaction data includes:

[0046] The transaction data is converted into a transaction data matrix, and the transaction data matrix is ​​padded according to a preset padded bit length to obtain a padded transaction matrix;

[0047] Dividing the data of the padding transaction matrix into blocks according to the padding bit length to obtain a padding transaction block set;

[0048] Calculating a transaction data summary of the padding transaction block set according to the padding bit length;

[0049] A virtual device private key is extracted from the virtual device key group, and the transaction data summary is signed according to the virtual device private key and the padding bit length to obtain signed transaction data.

[0050] Optionally, the signed transaction data and the transaction data are packaged and put on-chain to obtain on-chain data:

[0051] Performing a hash operation on the transaction data to obtain a transaction identifier;

[0052] Generate a transaction header according to the transaction identifier;

[0053] Packaging the signed transaction data, the transaction header, and the transaction data to obtain a transaction data packet;

[0054] The transaction data packet is uploaded to the chain to obtain the uploaded data.

[0055] In order to solve the above problems, the present invention further provides a data chain-up device based on dual decentralization, the device comprising:

[0056] The device matching module is used to perform virtual device matching on the trusted acquisition device to obtain a matching virtual device, and perform a key initialization operation on the matching virtual device to obtain a virtual device key group;

[0057] An identity registration module, used to perform decentralized identity registration on the matching virtual device according to the virtual device key group to obtain a virtual device identity document;

[0058] The primary encryption module is used to obtain the collection environment data and the trusted root key of the trusted collection device, and perform summary calculation and trusted root signature on the collection environment data according to the trusted root key to obtain the collection data summary and the collection data signature;

[0059] A secondary encryption module is used to generate transaction data using the virtual device identity document, the collected data summary and the collected data signature, and to perform a transaction signature on the transaction data using the virtual device key group to obtain signed transaction data;

[0060] The data on-chain module is used to package the signed transaction data and the transaction data and to chain the transaction data to obtain the on-chain data.

[0061] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0062] at least one processor; and,

[0063] a memory communicatively connected to the at least one processor; wherein,

[0064] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned data chain-up method based on dual decentralization.

[0065] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned data chain-up method based on dual decentralization.

[0066] The embodiment of the present invention performs virtual device matching on the trusted collection device to obtain a matching virtual device, thereby achieving one-to-one matching between the virtual device and the actual collection location. Even when the trusted collection device is damaged, there is no need to replace the virtual device, thereby improving the flexibility of data on-chain. By performing a key initialization operation on the matching virtual device to obtain a virtual device key group, a complex key group can be generated to ensure the security of data on-chain. By performing a decentralized identity registration on the matching virtual device according to the virtual device key group, it can be ensured that the matching virtual device is unique on the global network and can be verified and parsed on the relevant decentralized network.

[0067] By performing summary calculation and trusted root signature on the collected environment data according to the trusted root key, the trusted root device can be used to implement the first decentralized identity encryption of the collected environment data, and the trusted chain of the collected environment data can be realized. The data can be checked and traced, thereby ensuring the data security of the collected environment data and the uniqueness of the data chain. By using the virtual device key group to sign the transaction data, the signed transaction data can be obtained, and the secondary chain encryption operation of the collected environment data can be realized, so that each trusted collection device has a decentralized identity on two blockchains, and the flexible binding of the trusted device and the identity on the blockchain chain is realized, and the flexibility of data chaining is improved. Therefore, the data chaining method, device, equipment and medium based on dual decentralization proposed in the present invention can solve the problem of low flexibility when data chaining. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 A schematic diagram of a process of a data on-chain method based on dual decentralization provided by an embodiment of the present invention;

[0069] Figure 2 A schematic diagram of a process for generating a virtual device key group provided by an embodiment of the present invention;

[0070] Figure 3 A schematic diagram of a process for generating a summary of collected data and a signature of collected data provided by an embodiment of the present invention;

[0071] Figure 4 A functional module diagram of a data uplink device based on dual decentralization provided by an embodiment of the present invention;

[0072] Figure 5 A schematic diagram of the structure of an electronic device for implementing a data uplink method based on dual decentralization provided by an embodiment of the present invention;

[0073] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0074] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0075] The embodiment of the present application provides a data chain method based on dual decentralization. The execution subject of the data chain method based on dual decentralization includes but is not limited to at least one of the electronic devices such as the server, the terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the data chain method based on dual decentralization can be executed by software or hardware installed on the terminal device or the server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0076] Reference Figure 1 FIG. 1 is a flow chart of a method for uploading data to a chain based on dual decentralization provided by an embodiment of the present invention. In this embodiment, the method for uploading data to a chain based on dual decentralization includes:

[0077] S1. Perform virtual device matching on a trusted acquisition device to obtain a matching virtual device, and perform a key initialization operation on the matching virtual device to obtain a virtual device key group.

[0078] Specifically, the trusted collection device is a trusted device used to collect data that needs to be uploaded to the chain. The trusted device refers to a hardware device with high security and credibility in a network environment, which can provide identity authentication, encryption, data protection and other security functions in various computing and communication processes. Such devices are widely used in security-sensitive scenarios, such as the Internet of Things, finance, blockchain, identity authentication and other fields.

[0079] In detail, the matching virtual device refers to a virtual device corresponding to the trusted acquisition device, the virtual device is a virtualized trusted device created by the device, the virtual device key group is a key group corresponding to the virtual device for data uplinking, and the virtual device key group includes a virtual device public key and a virtual device private key.

[0080] In detail, the virtual device matching of the trusted acquisition device to obtain the matching virtual device includes:

[0081] Extracting a trusted device identifier from the trusted acquisition device;

[0082] A virtual device match is performed on a preset virtual device set according to the trusted device identifier to obtain a matching virtual device.

[0083] Specifically, the trusted device identifier refers to a unique device identifier corresponding to the trusted acquisition device, and the virtual device set is a pre-set set including a plurality of different virtual devices, wherein each virtual device corresponds to a different virtual device key group.

[0084] In detail, the virtual device matching is performed on the preset virtual device set according to the trusted device identifier to obtain the matched virtual device, which means matching the device location information according to the trusted device identifier, matching the device serial number according to the device location information, and matching the matched virtual device from the virtual device set according to the device serial number, and each virtual device in the virtual device set corresponds one-to-one to the real location of the trusted acquisition device.

[0085] Specifically, refer to Figure 2 As shown, the key initialization operation is performed on the matching virtual device to obtain a virtual device key group, including:

[0086] S21, obtaining the device number of the matching virtual device, and performing a hash operation on the device number to obtain a hashed device number;

[0087] S22, selecting a first prime number and a second prime number from a preset prime number data set according to the hash device number;

[0088] S23, taking the product of the first prime number and the second prime number as a prime number product, and calculating a decayed prime number product according to the first prime number and the second prime number;

[0089] S24, selecting a public key coefficient according to the attenuated prime product, and calculating a virtual device public key according to the prime product and the public key coefficient;

[0090] S25, calculating a private key coefficient according to the attenuated prime product and the public key coefficient, and calculating a virtual device private key according to the prime product and the private key coefficient;

[0091] S26. Generate a virtual device key group according to the virtual device public key and the virtual device private key.

[0092] In detail, the device number is the sequence number or serial number of the matching virtual device in the virtual device set, and the prime number data set is a pre-set data set consisting of multiple large prime numbers.

[0093] Specifically, the filtering out the first prime number and the second prime number from a preset prime number data set according to the hash device number includes converting the hash device number into a large integer to obtain a large integer hash device value, filtering out the prime number closest to the large integer hash device value from the prime number data set as the first prime number, and filtering out the prime number adjacent to the first prime number in the prime number data set as the second prime number.

[0094] In detail, the attenuated prime product is the product of a value obtained by subtracting one from the first prime number and a value obtained by subtracting one from the second prime number, and the public key coefficient is data smaller than the attenuated prime product.

[0095] Specifically, calculating the virtual device public key according to the prime number product and the public key coefficient means taking the public key coefficient as the exponent of the prime number product and taking the result of the exponential operation as the virtual device public key.

[0096] In detail, calculating the private key coefficient based on the attenuated prime product and the public key coefficient refers to calculating data that satisfies the product of the private key coefficient and the public key coefficient and the modulus value of the attenuated prime product is 1 as the private key coefficient. The public key coefficient can be calculated using the extended Euclidean algorithm. The virtual device private key refers to using the private key coefficient as the exponent of the prime product and using the result of the exponential operation as the virtual device private key.

[0097] In the embodiment of the present invention, by performing virtual device matching on the trusted collection device to obtain a matching virtual device, a one-to-one matching between the virtual device and the actual collection location can be achieved. Even when the trusted collection device is damaged, there is no need to replace the virtual device, thereby improving the flexibility of data on-chain. By performing a key initialization operation on the matching virtual device to obtain a virtual device key group, a complex key group can be generated to ensure the security of data on-chain.

[0098] S2. Perform decentralized identity registration on the matching virtual device according to the virtual device key group to obtain a virtual device identity document.

[0099] Specifically, the virtual device identity document is a decentralized identity document, wherein the decentralized identity (Decentralized Identifier, referred to as DID) is a decentralized identity management method that allows users or devices to own and manage their own identities without relying on centralized institutions. Different from traditional identity devices, DID emphasizes the identity autonomy, privacy protection and cross-platform identity interoperability of individuals or devices. The virtual device identity document includes information such as the virtual device public key, decentralized identification, signature type and key usage statement.

[0100] In detail, the decentralized identity registration of the matching virtual device according to the virtual device key group to obtain the virtual device identity document includes:

[0101] Extracting a virtual device public key from the virtual device key group, and performing a hash operation on the virtual device public key to obtain a hashed virtual device public key;

[0102] Obtaining the decentralization type corresponding to the matching virtual device, and generating a decentralization identifier according to the decentralization type and the hashed virtual device public key;

[0103] Generate a signature type and a key usage statement according to the virtual device key group;

[0104] A virtual device identity document is generated according to the virtual device public key, the decentralized identifier, the signature type, and the key usage statement.

[0105] Specifically, the decentralized type refers to the organization and management method of decentralized devices. The decentralized type includes a consensus mechanism protocol and a data transmission protocol. The generating of a decentralized identifier according to the decentralized type and the hash virtual device public key refers to splicing the decentralized type and the hash virtual device public key into a decentralized identifier. For example, when the consensus mechanism protocol of the decentralized type is did, the data transmission protocol of the decentralized type is method, and the hash virtual device public key is unique-identifier, the corresponding decentralized identifier is the spliced ​​characters of the three, namely: did:method:unique-identifier.

[0106] In detail, generating a signature type and a key usage statement based on the virtual device key group means using the key type of the virtual device key group as the signature type and matching the key usage statement corresponding to the signature type. The key type may be an ECC encryption type or an RSA encryption type, and the key usage statement is a preset method of using a key of the corresponding type.

[0107] Specifically, generating a virtual device identity document according to the virtual device public key, the decentralized identifier, the signature type and the key usage statement means that the virtual device public key, the decentralized identifier, the signature type and the key usage statement form a virtual device identity document.

[0108] In the embodiment of the present invention, by performing decentralized identity registration on the matching virtual device according to the virtual device key group, it is possible to ensure that the matching virtual device is unique on the global network and can be verified and resolved on the relevant decentralized network.

[0109] S3. Acquire the collection environment data and the trusted root key of the trusted collection device, and perform summary calculation and trusted root signature on the collection environment data according to the trusted root key to obtain a collection data summary and a collection data signature.

[0110] In detail, the collected environment data refers to the environmental data that needs to be uploaded to the chain and is collected by the trusted collection device through sensors and other devices, and the trusted root key is a key built into the trusted collection device for encrypting the collected environment data.

[0111] Specifically, the collected data summary is the data summary generated by the trusted collection device for the collection environment data. The data summary is a fixed-length string generated after processing the data through a hash function, usually called a "hash value" or "summary value". The data summary is a unique fingerprint of the data. Even a small change in the data will result in a completely different summary, thereby ensuring the integrity of the data.

[0112] In detail, when the collected data is signed, the trusted collection device generates a data signature for the collected environment data. Data signature is a method of authenticating the authenticity and source of data through encryption technology. Usually, a private key is used to encrypt the data summary to generate a signature, and the recipient can use the sender's public key for verification. The signature ensures that the data has not been tampered with during transmission and that the data does come from the declared sender.

[0113] For details, refer to Figure 3 As shown, the digest calculation and trusted root signature of the collected environment data are performed according to the trusted root key to obtain the collected data digest and the collected data signature, including:

[0114] S31, converting the collected environment data into a collected environment data matrix, performing padding processing on the collected environment data matrix according to a preset padding bit length, to obtain a padding data matrix;

[0115] S32, dividing the padding data matrix into blocks according to the padding bit length to obtain a padding data block set;

[0116] S33, calculating the collected data summary of the padding data block set according to the padding bit length;

[0117] S34. Sign the collected data summary according to the trusted root key and the padding bit length to obtain a collected data signature.

[0118] Specifically, converting the collected environment data into a collected environment data matrix means intercepting the collected environment data according to a preset data bit length to obtain a collected environment data set; and splicing each collected environment data in the collected environment data set as a matrix row vector into a collected environment data matrix.

[0119] In detail, the step of calculating the collected data summary of the padding data block set according to the padding bit length includes:

[0120] Extracting a total number of data blocks from the set of padding data blocks, and initializing the number of iterations according to the total number of data blocks;

[0121] Circularly right-shifting the bit-by-bit data block set to obtain a right-shifted data block set;

[0122] Initializing a target summary, and performing a bit-by-bit XOR operation on the right-shifted data block set using the target summary to obtain an XOR data block set;

[0123] Using the target summary, performing a data addition operation on the XOR data block set to obtain a summed data block set;

[0124] Performing a modulo operation on the summed data block set using the padding bit length to obtain a data summary set;

[0125] Subtract one from the number of iterations, and determine whether the number of iterations is zero;

[0126] If not, taking the data summary set as the target summary, returning to the step of performing a bit-by-bit circular right shift on the bit-filled data block set to obtain a right-shifted data block set;

[0127] If yes, performing bit-by-bit XOR operation on each data summary in the data summary set to obtain an XOR data summary;

[0128] The XOR data summary is modulo-operated using the padding bit length to obtain a collected data summary.

[0129] Specifically, the total number of data blocks is the total number of the place-filling data blocks in the place-filling data block set, and the number of iterations is equal to the total number of data blocks.

[0130] In detail, the bit-by-bit circular right shift is a special right shift operation, which moves each bit of the binary number to the right by a specified number of bits. Different from the ordinary right shift, the bits shifted out from the right after the circular right shift will re-enter the left, thus achieving a circular effect.

[0131] Specifically, the bit-by-bit XOR is to perform an XOR operation on each bit of the binary number, and the rule of XOR is that if the two bits are the same, the result is 0, and if they are different, the result is 1.

[0132] In detail, signing the collected data summary according to the trusted root key and the padding bit length to obtain the collected data signature includes:

[0133] Performing an exponential operation on the collected data summary according to the trusted root key to obtain an exponential data summary;

[0134] Performing a data addition operation on the exponential data summary and the trusted root key to obtain a summed data summary;

[0135] The modulo operation is performed on the summed data summary using the padding bit length to obtain the collected data signature.

[0136] Specifically, the exponential operation refers to using the collected data summary as the base and the trusted root key as the exponent for operation, and the modulo operation refers to using the summed data summary as the modulus, the padding bit length as the modulus, and the remainder as the collected data signature.

[0137] In an embodiment of the present invention, by performing summary calculation and trusted root signature on the collected environment data according to the trusted root key, the first decentralized identity encryption of the collected environment data can be realized by using the trusted root device, and the trusted chain-linking of the collected environment data can be realized. The data can be checked and traced, thereby ensuring the data security of the collected environment data and the uniqueness of the data on the chain.

[0138] S4. Generate transaction data using the virtual device identity document, the collected data summary, and the collected data signature, and use the virtual device key group to sign the transaction data to obtain signed transaction data.

[0139] Specifically, the transaction data refers to data information that needs to be written into the blockchain, including key information for writing data into the blockchain to ensure the integrity, source authenticity and verifiability of the data. The use of the virtual device identity document, the collected data summary and the collected data signature to generate transaction data refers to concatenating the collected data signature, the collected data summary and the virtual device identity document to obtain transaction data.

[0140] In detail, the using the virtual device key group to perform a transaction signature on the transaction data to obtain the signed transaction data includes:

[0141] The transaction data is converted into a transaction data matrix, and the transaction data matrix is ​​padded according to a preset padded bit length to obtain a padded transaction matrix;

[0142] Dividing the data of the padding transaction matrix into blocks according to the padding bit length to obtain a padding transaction block set;

[0143] Calculating a transaction data summary of the padding transaction block set according to the padding bit length;

[0144] A virtual device private key is extracted from the virtual device key group, and the transaction data summary is signed according to the virtual device private key and the padding bit length to obtain signed transaction data.

[0145] Specifically, the padding bit length can be 128 bytes. The method of converting the transaction data into a transaction data matrix is ​​consistent with the method of converting the collection environment data into a collection environment data matrix in the above step S3. The padding processing and the data blocking method are consistent with the method in the above step S3, which will not be repeated here.

[0146] In the embodiment of the present invention, by using the virtual device key group to sign the transaction data to obtain the signed transaction data, it is possible to implement a secondary on-chain encryption operation on the collection environment data, so that each trusted collection device has a decentralized identity on two blockchains, thereby realizing flexible binding of trusted devices with on-chain identities on the blockchain.

[0147] S5. The signed transaction data and the transaction data are packaged and put on the chain to obtain the on-chain data.

[0148] Specifically, the on-chain data refers to data related to the collected environment data recorded on the blockchain.

[0149] In detail, the signed transaction data and the transaction data are packaged and put on the chain to obtain the on-chain data:

[0150] Performing a hash operation on the transaction data to obtain a transaction identifier;

[0151] Generate a transaction header according to the transaction identifier;

[0152] Packaging the signed transaction data, the transaction header, and the transaction data to obtain a transaction data packet;

[0153] The transaction data packet is uploaded to the chain to obtain the uploaded data.

[0154] Specifically, the transaction identifier is a unique identifier of the transaction data, and generating a transaction header according to the transaction identifier includes obtaining a transaction timestamp, a transaction format version number, a sender address, and a receiver address, and concatenating the transaction identifier, the transaction timestamp, the transaction format version number, the sender address, and the receiver address into a transaction header.

[0155] In detail, the transaction packaging refers to splicing the signed transaction data, the transaction header and the transaction data into a transaction data packet, and the data on-chain refers to the act of transmitting the packaged transaction data packet to the blockchain. The data on-chain transmission methods include direct on-chain, cross-chain on-chain and zero-knowledge proof on-chain, etc.

[0156] In the embodiment of the present invention, by packaging the signed transaction data and the transaction data and putting the transaction on the chain to obtain the on-chain data, each trusted collection device can have a decentralized identity on two blockchains, thereby realizing flexible binding of the trusted device with the identity on the blockchain and improving the flexibility of data on the chain.

[0157] The embodiment of the present invention performs virtual device matching on the trusted collection device to obtain a matching virtual device, thereby achieving one-to-one matching between the virtual device and the actual collection location. Even when the trusted collection device is damaged, there is no need to replace the virtual device, thereby improving the flexibility of data on-chain. By performing a key initialization operation on the matching virtual device to obtain a virtual device key group, a complex key group can be generated to ensure the security of data on-chain. By performing a decentralized identity registration on the matching virtual device according to the virtual device key group, it can be ensured that the matching virtual device is unique on the global network and can be verified and parsed on the relevant decentralized network.

[0158] By performing summary calculation and trusted root signature on the collected environment data according to the trusted root key, the first decentralized identity encryption of the collected environment data can be realized by using the trusted root device, and the trusted chain of the collected environment data can be realized. The data can be checked and traced, thereby ensuring the data security of the collected environment data and the uniqueness of the data chain. By using the virtual device key group to sign the transaction data, the signed transaction data can be obtained, and the secondary chain encryption operation of the collected environment data can be realized, so that each trusted collection device has a decentralized identity on two blockchains, and the flexible binding of the trusted device and the identity on the blockchain chain is realized, and the flexibility of data chaining is improved. Therefore, the data chaining method based on dual decentralization proposed in the present invention can solve the problem of low flexibility when data chaining.

[0159] like Figure 4 , is a functional module diagram of a data uplink device based on dual decentralization provided by an embodiment of the present invention.

[0160] The data uplink device 100 based on dual decentralization of the present invention can be installed in an electronic device. According to the functions implemented, the data uplink device 100 based on dual decentralization can include a device matching module 101, an identity registration module 102, a primary encryption module 103, a secondary encryption module 104 and a data uplink module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0161] In this embodiment, the functions of each module / unit are as follows:

[0162] The device matching module 101 is used to perform virtual device matching on the trusted acquisition device to obtain a matching virtual device, and perform a key initialization operation on the matching virtual device to obtain a virtual device key group;

[0163] The identity registration module 102 is used to perform decentralized identity registration on the matching virtual device according to the virtual device key group to obtain a virtual device identity document;

[0164] The primary encryption module 103 is used to obtain the collection environment data and the trusted root key of the trusted collection device, and perform summary calculation and trusted root signature on the collection environment data according to the trusted root key to obtain the collection data summary and the collection data signature;

[0165] The secondary encryption module 104 is used to generate transaction data using the virtual device identity document, the collected data summary and the collected data signature, and use the virtual device key group to perform a transaction signature on the transaction data to obtain signed transaction data;

[0166] The data on-chain module 105 is used to package the signed transaction data and the transaction data and to chain the transaction data to obtain the on-chain data.

[0167] In detail, each module described in the data uplink device 100 based on dual decentralization in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The data on-chain method based on dual decentralization described in the article has the same technical means and can produce the same technical effects, so I will not go into details here.

[0168] like Figure 5 , is a schematic diagram of the structure of an electronic device for implementing a data chain-up method based on dual decentralization provided by an embodiment of the present invention.

[0169] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a data uplink program based on dual decentralization.

[0170] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing a data uplink program based on dual decentralization, etc.), and calls the data stored in the memory 11 to execute various functions of the electronic device and process data.

[0171] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 can also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 can also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the data chain program based on dual decentralization, but also can be used to temporarily store data that has been output or is to be output.

[0172] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0173] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0174] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0175] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0176] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0177] The data uplink program based on dual decentralization stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0178] Performing virtual device matching on the trusted acquisition device to obtain a matching virtual device, and performing a key initialization operation on the matching virtual device to obtain a virtual device key group;

[0179] Performing decentralized identity registration on the matching virtual device according to the virtual device key group to obtain a virtual device identity document;

[0180] Acquire the collection environment data and the trusted root key of the trusted collection device, and perform summary calculation and trusted root signature on the collection environment data according to the trusted root key to obtain a collection data summary and a collection data signature;

[0181] Generate transaction data using the virtual device identity document, the collected data summary and the collected data signature, and use the virtual device key group to sign the transaction data to obtain signed transaction data;

[0182] The signed transaction data and the transaction data are packaged and put on the chain to obtain the on-chain data.

[0183] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0184] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0185] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0186] Performing virtual device matching on the trusted acquisition device to obtain a matching virtual device, and performing a key initialization operation on the matching virtual device to obtain a virtual device key group;

[0187] Performing decentralized identity registration on the matching virtual device according to the virtual device key group to obtain a virtual device identity document;

[0188] Acquire the collection environment data and the trusted root key of the trusted collection device, and perform summary calculation and trusted root signature on the collection environment data according to the trusted root key to obtain a collection data summary and a collection data signature;

[0189] Generate transaction data using the virtual device identity document, the collected data summary and the collected data signature, and use the virtual device key group to sign the transaction data to obtain signed transaction data;

[0190] The signed transaction data and the transaction data are packaged and put on the chain to obtain the on-chain data.

[0191] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0192] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0193] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0194] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0195] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application device that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0196] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the device embodiment can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0197] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A data chain-up method based on dual decentralization, characterized in that: The method comprises: Performing virtual device matching on the trusted acquisition device to obtain a matching virtual device, and performing a key initialization operation on the matching virtual device to obtain a virtual device key group; Performing decentralized identity registration on the matching virtual device according to the virtual device key group to obtain a virtual device identity document; Acquire the collection environment data and the trusted root key of the trusted collection device, and perform summary calculation and trusted root signature on the collection environment data according to the trusted root key to obtain a collection data summary and a collection data signature; Generate transaction data using the virtual device identity document, the collected data summary and the collected data signature, and use the virtual device key group to sign the transaction data to obtain signed transaction data; The signed transaction data and the transaction data are packaged and put on-chain to obtain on-chain data.

2. The data on-chain method based on dual decentralization as claimed in claim 1, characterized in that: The step of performing virtual device matching on the trusted acquisition device to obtain a matching virtual device includes: Extracting a trusted device identifier from the trusted acquisition device; A virtual device match is performed on a preset virtual device set according to the trusted device identifier to obtain a matching virtual device.

3. The data on-chain method based on dual decentralization as claimed in claim 1, characterized in that: The performing a key initialization operation on the matching virtual device to obtain a virtual device key group includes: Obtaining the device number of the matching virtual device, and performing a hash operation on the device number to obtain a hashed device number; Filtering out a first prime number and a second prime number from a preset prime number data set according to the hash device number; taking the product of the first prime number and the second prime number as a prime number product, and calculating a decayed prime number product according to the first prime number and the second prime number; Filtering a public key coefficient according to the attenuated prime product, and calculating a virtual device public key according to the prime product and the public key coefficient; Calculating a private key coefficient according to the attenuated prime product and the public key coefficient, and calculating a virtual device private key according to the prime product and the private key coefficient; A virtual device key group is generated according to the virtual device public key and the virtual device private key.

4. The data on-chain method based on dual decentralization as claimed in claim 1, characterized in that: The performing decentralized identity registration on the matching virtual device according to the virtual device key group to obtain a virtual device identity document includes: Extracting a virtual device public key from the virtual device key group, and performing a hash operation on the virtual device public key to obtain a hashed virtual device public key; Obtaining the decentralization type corresponding to the matching virtual device, and generating a decentralization identifier according to the decentralization type and the hashed virtual device public key; Generate a signature type and a key usage statement according to the virtual device key group; A virtual device identity document is generated according to the virtual device public key, the decentralized identifier, the signature type, and the key usage statement.

5. The data on-chain method based on dual decentralization as claimed in claim 1, characterized in that: The step of performing summary calculation and trusted root signature on the collected environment data according to the trusted root key to obtain a collected data summary and a collected data signature includes: The collected environment data is converted into a collected environment data matrix, and the collected environment data matrix is ​​padded according to a preset padded bit length to obtain a padded data matrix; Dividing the padding data matrix into blocks according to the padding bit length to obtain a padding data block set; Calculate the collected data summary of the padding data block set according to the padding bit length; The collected data summary is signed according to the trusted root key and the padding bit length to obtain a collected data signature.

6. The data on-chain method based on dual decentralization as claimed in claim 5, characterized in that: The step of calculating the collected data summary of the bit-padded data block set according to the bit-padded length includes: Extracting a total number of data blocks from the set of padding data blocks, and initializing the number of iterations according to the total number of data blocks; Circularly right-shifting the bit-by-bit data block set to obtain a right-shifted data block set; Initializing a target summary, and performing a bit-by-bit XOR operation on the right-shifted data block set using the target summary to obtain an XOR data block set; Using the target summary, performing a data addition operation on the XOR data block set to obtain a summed data block set; Performing a modulo operation on the summed data block set using the padding bit length to obtain a data summary set; Subtract one from the number of iterations, and determine whether the number of iterations is zero; If not, taking the data summary set as the target summary, returning to the step of performing a bit-by-bit circular right shift on the bit-filled data block set to obtain a right-shifted data block set; If yes, performing bit-by-bit XOR operation on each data summary in the data summary set to obtain an XOR data summary; The XOR data summary is modulo-operated using the padding bit length to obtain a collected data summary.

7. The data on-chain method based on dual decentralization as claimed in claim 5, characterized in that: The step of signing the collected data summary according to the trusted root key and the padding bit length to obtain the collected data signature includes: Performing an exponential operation on the collected data summary according to the trusted root key to obtain an exponential data summary; Performing a data addition operation on the exponential data summary and the trusted root key to obtain a summed data summary; The modulo operation is performed on the summed data summary using the padding bit length to obtain the collected data signature.

8. A data chain device based on dual decentralization, characterized in that: The device comprises: The device matching module is used to perform virtual device matching on the trusted acquisition device to obtain a matching virtual device, and perform a key initialization operation on the matching virtual device to obtain a virtual device key group; An identity registration module, used to perform decentralized identity registration on the matching virtual device according to the virtual device key group to obtain a virtual device identity document; The primary encryption module is used to obtain the collection environment data and the trusted root key of the trusted collection device, and perform summary calculation and trusted root signature on the collection environment data according to the trusted root key to obtain the collection data summary and the collection data signature; A secondary encryption module is used to generate transaction data using the virtual device identity document, the collected data summary and the collected data signature, and to perform a transaction signature on the transaction data using the virtual device key group to obtain signed transaction data; The data on-chain module is used to package the signed transaction data and the transaction data and to chain the transaction data to obtain the on-chain data.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data chain-up method based on dual decentralization as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data on-chain method based on dual decentralization is implemented as described in any one of claims 1 to 7.