[0038] In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments It is only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0039] The terms "first", "second", "third", "fourth", etc. (if present) in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to Describe a particular order or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the invention described herein can, for example, be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
[0040] With the development of IoT technology, more and more IoT devices are connected to the Internet. Many IoT-driven shared devices are also developing rapidly, such as shared bicycles, shared power banks, and shared smart laundry equipment.
[0041] In the related art, the laundry care IoT cloud platform allocates a shared smart laundry device interface to each operating business, and the shared smart laundry device is authenticated through the interface on the laundry care IoT cloud platform, and then when the user needs to use the shared smart laundry device, the corresponding The shared smart laundry device sends user identity information to the laundry IoT cloud platform, so that the laundry IoT cloud platform controls the user's access rights.
[0042]However, the data transmission between the smart laundry device and the laundry care IoT cloud platform is directly carried out, or some simple encryption is carried out before transmission, which can easily cause the transmitted data to be intercepted and the transmission protocol to be cracked, resulting in data transmission. The safety and reliability are greatly reduced. In addition, the related data of traditional smart laundry devices (such as device usage records, personal identity information filled in when users use smart laundry devices) are stored in ordinary relational databases, but the data information in ordinary relational databases It is easy to be stolen and tampered with by hackers, thus threatening the authenticity and security of stored data.
[0043] In view of this defect, the main technical solutions of the present application include: providing a blockchain-based data transmission method based on the distributed data storage, consensus mechanism and non-tampering properties of the blockchain. A symmetric key and a pair of public and private keys are generated based on the unique hardware serial number of the smart laundry device. The symmetric key is used to encrypt or decrypt the data to be transmitted, and the public and private key pairs are used for the identity authentication of the smart laundry device. And the symmetric key and the public-private key pair exist on the server node of the blockchain. For smart laundry devices, these two keys are stored in the security chip, which is almost difficult for hackers to crack, and each smart laundry device is used for encryption. The symmetric keys are different, and the difficulty of cracking is greatly improved. In addition, since the data related to the smart laundry equipment are stored on the blockchain server nodes, the security and authenticity of data transmission are guaranteed due to the characteristics of the blockchain node consensus.
[0044] The preferred technical solutions of the blockchain-based data transmission method and system of the present invention are described below with reference to the above drawings.
[0045] figure 1 It is an application scenario diagram of the blockchain-based data transmission method shown in an exemplary embodiment of the present invention.
[0046] like figure 1 As shown, the basic architecture of the application scenario provided by this embodiment mainly includes: a smart laundry device authentication platform 101, at least one smart laundry device 102, a blockchain server 103, and a client device 104; wherein, the smart laundry devices are all in the smart laundry Register and authenticate on the laundry equipment authentication platform, so that the intelligent laundry equipment authentication platform can obtain the management rights of the equipment; the user sends an application request to the intelligent laundry equipment through the client device (such as a mobile phone), and uses the intelligent laundry equipment when the request is passed. ; Among them, the intelligent laundry equipment authentication platform, the intelligent laundry equipment and the relevant information sent by the user through the client device are all sent to the blockchain server for uploading to the blockchain for storage in the blockchain.
[0047] figure 2 It is a schematic flowchart of a blockchain-based data transmission method according to an exemplary embodiment of the present invention.
[0048] like figure 2 As shown, the method provided by this embodiment may include the following steps.
[0049] S201, the device authentication platform obtains the identification information of the intelligent laundry device, generates a symmetric key and a public-private key pair according to the identification information, and stores the symmetric key and the public-private key pair in a blockchain server node, and the identification information There is a one-to-one correspondence with the intelligent laundry equipment.
[0050] The identification information may include, but is not limited to, the unique hardware serial number (device id) of the smart laundry device and the Integrate circuit card identity (ICCID) of the laundry IoT SIM card, and each smart laundry device corresponds to a unique hardware serial number. and ICCID.
[0051] Specifically, the smart laundry authentication platform provides each merchant with a smart laundry device binding interface, and obtains the management right of the device by binding the hardware serial number and ICCID of each laundry device, and according to the hardware serial number and ICCID of each device is Each smart laundry device generates a symmetric key and a public-private key pair, and each smart laundry device's symmetric key and public-private key pair are unique, and different smart laundry devices have different symmetric keys and public-private key pairs. The symmetric key is used to encrypt or decrypt the transmitted data, and the public-private key pair is used to authenticate the identity of the smart laundry device. Then store the generated symmetric key and public-private key pair of each smart laundry device in the blockchain server node.
[0052] In this step, different symmetric keys and public-private key pairs are generated for each intelligent laundry device, and the symmetric keys and public-private key pairs are stored in the blockchain server node, which greatly improves the difficulty of cracking.
[0053] S202, the intelligent laundry device encrypts the data to be transmitted by using the symmetric key, digitally signs the encrypted data by using the public and private keys, obtains the signed data, and sends the signed data to the blockchain server node.
[0054] The data to be transmitted includes equipment usage records, identity information filled in by the user using the smart laundry equipment, and the like.
[0055] Specifically, the symmetric key and public-private key pair of each smart laundry device are pre-burned into the extra security chip of each device module; then the security chip in the smart laundry device encrypts the data to be transmitted to obtain encrypted data. Then digitally sign the encrypted data according to the public key in the public-private key pair, and store the signed data on the blockchain server node.
[0056] In this step, the symmetric key and public-private key pair of each intelligent laundry device are stored in the security chip, which further improves the difficulty of cracking, and the data to be transmitted is encrypted and signed before transmission, which ensures the reliability of the data transmission process. The encrypted and signed data are stored in the blockchain, and the consensus mechanism and non-tampering characteristics based on the blockchain ensure the security and authenticity of the data.
[0057] S203, the blockchain server node verifies the signed data, decrypts the encrypted data when the verification is successful, parses the decrypted data, and uploads the parsed data to the chain.
[0058] Specifically, the blockchain server node obtains the public-private key pair corresponding to the intelligent laundry device on the chain, and verifies the signed data through the private key in the public-private key pair. If the verification fails, it means that The data is forged; if the verification is successful, the symmetric key of the smart laundry device will be obtained on the chain, the encrypted data will be decrypted using the symmetric key, and then the decrypted data will be parsed to obtain the parsed data. , upload the parsed data to the chain.
[0059] In this embodiment, since each intelligent laundry device corresponds to unique identification information, the generated symmetric key and public-private key pair of each laundry device are different, which greatly increases the difficulty of cracking. The symmetric key is used for transmission. The encrypted data of the smart laundry device is encrypted to ensure that user privacy is not leaked. The digital identity of the smart laundry device is verified by using the symmetric key pair and the signature mechanism of the blockchain to ensure the validity of the device, and the relevant data of the smart laundry device is encrypted. The chain is stored in the blockchain server node, making the data transparent and immutable, thus greatly increasing the reliability of data transmission.
[0060] For a clearer understanding of this application, the following figure 2 On the basis of the illustrated embodiment, the process of data transmission by the intelligent laundry device is further described in detail.
[0061] First, the device authentication platform obtains the identification information of the intelligent laundry device, generates a symmetric key and a public-private key pair according to the identification information, and stores the symmetric key and the public-private key pair in the blockchain server node, and the identification information There is a one-to-one correspondence with the intelligent laundry equipment.
[0062] The identification information may include, but is not limited to, the unique hardware serial number (device id) of the smart laundry device and the Integrate circuit card identity (ICCID) of the laundry IoT SIM card, and each smart laundry device corresponds to a unique hardware serial number. and ICCID.
[0063] Specifically, the smart laundry authentication platform provides a smart laundry device binding interface for each merchant, and obtains the management right of the device by binding the hardware serial number and ICCID of each laundry device. When the smart laundry device is bound and registered with the smart laundry authentication platform, it obtains and stores the hardware serial number and ICCID of each device, and generates a symmetric key and a public-private key pair for each smart laundry device according to each device. The symmetric key and public-private key pair of smart laundry devices are unique, and the symmetric key and public-private key pair of different smart laundry devices are different. The symmetric key is used to encrypt or decrypt the transmitted data, and the public-private key pair is used to authenticate the identity of the smart laundry device. Then store the generated symmetric key and public-private key pair of each smart laundry device in the blockchain server node.
[0064] Further, a software development kit SDK is stored in the security chip of the intelligent laundry device; the SDK is used to generate blockchain transaction information according to the public-private key pair, and the blockchain transaction information includes the public-private key pair. ; store the blockchain transaction information and the symmetric key in the security chip.
[0065] Specifically, the hyperchain hvm smart contract is deployed on the blockchain server node, which provides each smart laundry device with a suitable SDK for operating the smart contract. The public-private key pair of the smart laundry device generates an Account string, which contains the public-private key pair and transaction information. The Account string is the main body that initiates the blockchain transaction, and then the Account string and the symmetric key are burned into each device In the device module's additional security chip.
[0066] Further, the method further includes: the intelligent laundry device receives the device instruction sent by the service cloud platform, and processes the device instruction to obtain the data to be transmitted.
[0067] Specifically, the SDK is different from the embedded program of the smart laundry device itself. The SDK provides a limited interface for the embedded program to report the device status or report the usage record. The embedded program is used to receive the device instructions issued by the business cloud platform, and process the received device instructions to obtain the data to be transmitted. The data to be transmitted may include the usage record data of the device and the identity filled in by the user when using the device. information or device status information, etc.
[0068] Further, the intelligent laundry device uses the symmetric key to encrypt the data to be transmitted, and uses the public and private keys to digitally sign the encrypted data, obtain the signed data, and send the signed data. to the blockchain server node.
[0069] Specifically, the SDK operating the hvm smart contract in the security chip of the smart laundry device encrypts the data to be transmitted through the symmetric key of the device to obtain encrypted data; and then digitally signs the encrypted data with the public key in the public-private key pair ; Call the interface provided by the SDK in the security chip to perform the data upload operation, that is, send the signed data to the blockchain server node through the interface provided by the SDK.
[0070] Further, the blockchain server node verifies the signed data, decrypts the encrypted data when the verification is successful, parses the decrypted data, and uploads the parsed data to the chain.
[0071] Specifically, the blockchain server node obtains the public-private key pair corresponding to the smart laundry device on the chain, and verifies the signed data through the private key in the public-private key pair. If the verification fails, it means that the data is forged; if the verification is successful, the symmetric key of the smart laundry device is obtained on the chain, and the encrypted data is decrypted using the symmetric key; then the device of the smart laundry device is obtained. The decrypted data is parsed through the device protocol, the parsed data is obtained, and the parsed data is finally uploaded to the chain.
[0072]Further, all the information registered by the user through the client application APP is encrypted with a symmetric key and sent to the blockchain server node for storage.
[0073] In this embodiment, the digital signature mechanism of the blockchain is used to authenticate the identity of the intelligent laundry device, which realizes the strict verification of the digital identity of the device and ensures the validity of the intelligent laundry device; further, the symmetric encryption algorithm is used to decipher the user information. Sensitive processing ensures that the data will not be intercepted and leaked during data transmission; in addition, all relevant data of the smart laundry equipment are encrypted and stored on the blockchain, based on blockchain distributed data storage, consensus mechanism and non-tampering The characteristics of the data make the data open, transparent and non-tamperable, and ensure the authenticity and reliability of the data.
[0074] image 3 It is a schematic structural diagram of a blockchain-based data transmission system according to an exemplary embodiment of the present invention.
[0075] like image 3 As shown, the system provided in this embodiment includes: a smart laundry device authentication platform 301, a blockchain server node 302, and a smart laundry device 303; the smart laundry device authentication platform is used for: acquiring the identification information of the smart laundry device, according to the The identification information generates a symmetric key and a public-private key pair, and stores the symmetric key and the public-private key pair in the blockchain server node, and the identification information is in a one-to-one correspondence with the intelligent laundry device; the The intelligent laundry device is used for: encrypting the data to be transmitted by using the symmetric key, digitally signing the encrypted data by using the public and private keys, obtaining the signed data, and sending the signed data to the blockchain server node; the blockchain server node is used to: verify the signed data, decrypt the encrypted data when the verification is successful, and parse the decrypted data , upload the parsed data to the chain.
[0076] Wherein, the number of intelligent laundry devices is at least one.
[0077] Further, see image 3 , the system provided by this embodiment further includes: a service cloud platform 304, which is used to call an interface to the intelligent laundry device and send device instructions to the intelligent laundry device; the intelligent laundry device is also used to: receive device instructions sent by the service cloud platform , and process the device instruction to obtain the data to be transmitted.
[0078] Further, a software development kit SDK is stored in the security chip of the smart laundry device; the smart laundry device authentication platform is also used for: using the SDK to generate blockchain transaction information according to the public-private key pair, the The blockchain transaction information includes the public-private key pair; the blockchain transaction information and the symmetric key are stored in the security chip.
[0079] Further, the intelligent laundry device is specifically used for: performing a data signature on the encrypted data by using the public key in the public-private key pair to obtain the signed data.
[0080] Further, the blockchain server node is specifically used for: the blockchain server node obtains the public-private key pair corresponding to the intelligent laundry device on the chain, and uses the private key in the public-private key pair to pair the The signed data is verified.
[0081] Further, the blockchain server node is specifically configured to: obtain a device protocol corresponding to the smart laundry device; and parse the decrypted data according to the device protocol.
[0082] Further, the intelligent laundry device is specifically used for: calling the interface in the SDK in the security chip, and sending the signed data to the blockchain server node through the interface.
[0083] For the detailed functional description of each module in this embodiment, please refer to the description in the embodiment of the method, and no detailed description is given here.
[0084] Figure 4 A schematic diagram of a hardware structure of a computer device provided by an embodiment of the present invention. like Figure 4 As shown, the computer device 40 provided in this embodiment includes: at least one processor 401 and a memory 402 . The processor 401 and the memory 402 are connected through a bus 403 .
[0085] In a specific implementation process, at least one processor 401 executes the computer-executed instructions stored in the memory 402, so that at least one processor 401 executes the blockchain-based data transmission method in the above method embodiments.
[0086] For the specific implementation process of the processor 401, reference may be made to the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again in this embodiment.
[0087] in the above Figure 4 In the embodiment shown, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, referred to as: CPU), and may also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, referred to as: DSP), Application Specific Integrated Circuit (English: Application Specific Integrated Circuit, ASIC for short), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the invention can be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0088] The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory.
[0089] The bus may be an Industry Standard Architecture (Industry Standard Architecture, ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus, or the like. The bus can be divided into address bus, data bus, control bus and so on. For convenience of representation, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
[0090] Another embodiment of the present application provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium. When a processor executes the computer-executable instructions, the region-based region-based method in the foregoing method embodiment is implemented. Blockchain data transfer method.
[0091] The above-mentioned computer-readable storage medium, the above-mentioned readable storage medium can be realized by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
[0092] An exemplary readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium may be located in application specific integrated circuits (Application Specific Integrated Circuits, ASIC for short). Of course, the processor and the readable storage medium may also exist in the device as discrete components.
[0093] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by program instructions related to hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps including the above method embodiments are executed; and the foregoing storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0094] So far, the technical solutions of the present invention have been described with reference to the preferred embodiments shown in the accompanying drawings, however, those skilled in the art can easily understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.