WO2023240623A1 - 数据通信方法及装置 - Google Patents

数据通信方法及装置 Download PDF

Info

Publication number
WO2023240623A1
WO2023240623A1 PCT/CN2022/099544 CN2022099544W WO2023240623A1 WO 2023240623 A1 WO2023240623 A1 WO 2023240623A1 CN 2022099544 W CN2022099544 W CN 2022099544W WO 2023240623 A1 WO2023240623 A1 WO 2023240623A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
token code
token
key
code
Prior art date
Application number
PCT/CN2022/099544
Other languages
English (en)
French (fr)
Inventor
金泽
张元星
曾凡
Original Assignee
北京小米移动软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京小米移动软件有限公司 filed Critical 北京小米移动软件有限公司
Priority to PCT/CN2022/099544 priority Critical patent/WO2023240623A1/zh
Priority to CN202280004226.1A priority patent/CN117597891A/zh
Publication of WO2023240623A1 publication Critical patent/WO2023240623A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L27/00Modulated-carrier systems

Definitions

  • the present disclosure relates to the field of data communication, and specifically to a data communication method and device.
  • Data encryption is widely used in the field of data communications to ensure data security by encrypting transmitted data.
  • AIoT Artificial Intelligence Internet of Things
  • Artificial Intelligence Internet of Things the device, cloud and client often need to transmit relevant data.
  • the data transmission security between terminals is poor and vulnerable to Data theft by third-party attackers.
  • embodiments of the present disclosure provide a data communication method, device, system and storage medium.
  • embodiments of the present disclosure provide a data communication method, which is applied to the device side.
  • the method includes:
  • the plaintext data is encrypted using the encryption key to obtain ciphertext data, and the ciphertext data is sent to the peer device.
  • the unique identification code includes a device identification code and/or a device MAC address.
  • using the encryption key to encrypt the plaintext data to obtain ciphertext data includes:
  • the token code is sent to the peer device through the target local area network, so that the peer device stores the token code.
  • the device includes a sweeping robot; and generating plaintext data to be transmitted includes:
  • the map data of the current scene is collected through the sensor of the sweeping robot, and the plaintext data is obtained based on the map data.
  • embodiments of the present disclosure provide a data communication method, which is applied to a peer device.
  • the method includes:
  • the token code is an encrypted string randomly generated by the device end in each network distribution cycle;
  • the data communication method described in the present disclosure further includes:
  • the decryption key is obtained based on the token code stored in the self, and the decryption key is used to decrypt the ciphertext data to obtain the plaintext data corresponding to the ciphertext data, including:
  • the ciphertext data is decrypted using the decryption key to obtain the plaintext data.
  • using the decryption key to decrypt the ciphertext data to obtain plaintext data corresponding to the ciphertext data includes:
  • the AES algorithm is used to decrypt the ciphertext data according to the decryption key and the initial vector to obtain the plaintext data.
  • the data communication method described in the present disclosure further includes:
  • the peer device includes a cloud server or a mobile terminal.
  • an embodiment of the present disclosure provides a data communication device, which is applied to the device side.
  • the device includes:
  • a data generation module configured to generate plaintext data to be transmitted
  • a key generation module configured to generate an encryption key based on the token code generated by the device end in the current network distribution cycle; the token code is randomly generated by the device end in each network distribution cycle. encrypted string;
  • the data encryption module is configured to use the encryption key to encrypt the plaintext data to obtain ciphertext data, and send the ciphertext data to the peer device.
  • the key generation module is configured as:
  • the unique identification code includes a device identification code and/or a device MAC address.
  • the data encryption module is configured as:
  • the AES algorithm is used to encrypt the plaintext data according to the encryption key and the initial vector to obtain the ciphertext data.
  • the data communication device of the present disclosure further includes a token configuration module, and the token configuration module is configured to:
  • the token code is sent to the peer device through the target local area network, so that the peer device stores the token code.
  • the data communication device of the present disclosure further includes a first data download module, and the first data download module is configured to:
  • the device includes a sweeping robot; the data generation module is configured to:
  • the map data of the current scene is collected through the sensor of the sweeping robot, and the plaintext data is obtained based on the map data.
  • an embodiment of the present disclosure provides a data communication device, which is applied to a peer device.
  • the device includes:
  • the first receiving module is configured to receive and store the token code sent by the device; the token code is an encrypted string randomly generated by the device in each network distribution cycle;
  • the second receiving module is configured to receive ciphertext data sent by the device and obtained by encrypting the token code
  • the decryption module is configured to obtain a decryption key based on the token code stored in itself, and use the decryption key to decrypt the ciphertext data to obtain plaintext data corresponding to the ciphertext data.
  • the first receiving module is configured to:
  • the decryption module is configured as:
  • the ciphertext data is decrypted using the decryption key to obtain the plaintext data.
  • the decryption module is configured to:
  • the AES algorithm is used to decrypt the ciphertext data according to the decryption key and the initial vector to obtain the plaintext data.
  • the data communication device of the present disclosure further includes a second data download module, and the second data download module is configured to:
  • the peer device includes a cloud server or a mobile terminal.
  • embodiments of the present disclosure provide a data communication system, including:
  • the memory stores computer instructions, and the computer instructions are used to cause the processor to execute the method according to any implementation manner in the first aspect or the second aspect.
  • an embodiment of the present disclosure provides a storage medium that stores computer instructions, and the computer instructions are used to cause a computer to execute the method according to any implementation in the first or second aspect.
  • the data communication method of the disclosed embodiment is applied to the device side, including generating plaintext data to be transmitted, generating an encryption key according to the token code generated by the device side in the current distribution network cycle, and using the encryption key to encrypt the plaintext data to obtain ciphertext data and send the ciphertext data to the peer device.
  • the token code is dynamically and randomly generated based on the network distribution cycle on the device side, maintaining the randomness and dynamic change of the encryption key and improving data security. Moreover, it protects the key isolation between different devices. Even if the key on one device is cracked, it will not threaten the data security on other devices.
  • Figure 1 is an architectural diagram of a data communication system according to some embodiments of the present disclosure.
  • Figure 2 is an architectural diagram of a data communication system in accordance with some embodiments of the present disclosure.
  • Figure 3 is a flowchart of a data communication method according to some embodiments of the present disclosure.
  • Figure 5 is a flowchart of a data communication method according to some embodiments of the present disclosure.
  • Figure 6 is a flowchart of a data communication method according to some embodiments of the present disclosure.
  • Figure 7 is a flowchart of a data communication method according to some embodiments of the present disclosure.
  • Figure 8 is a flowchart of a data communication method according to some embodiments of the present disclosure.
  • Figure 9 is a flowchart of a data communication method according to some embodiments of the present disclosure.
  • Figure 10 is a flowchart of a data communication method in some embodiments of the present disclosure.
  • Figure 12 is a flowchart of a data communication method according to some embodiments of the present disclosure.
  • Figure 13 is a structural block diagram of a data communication device according to some embodiments of the present disclosure.
  • Figure 14 is a structural block diagram of a data communication device according to some embodiments of the present disclosure.
  • AIoT Artificial Intelligence Internet of Things
  • Artificial Intelligence Internet of Things can realize the interconnection of all things in smart home scenarios and establish interconnected communications between home devices, the cloud and mobile terminals, so that users can control all smart home devices through mobile terminals.
  • Smart home devices may include, for example, smart speakers, sweeping robots, smart lighting, etc.
  • data can be transmitted between any two of home devices, sports and mobile terminals.
  • the sweeping robot can construct a map of the current space through its own sensors.
  • the map data can be stored locally on the sweeping robot, thereby providing a path for the sweeping robot to move.
  • Map data can also be sent to cloud storage, so that the device or mobile phone can download map data from the cloud.
  • Map data can also be sent to the mobile phone, so that the mobile phone can observe the constructed map in real time.
  • map data can present the user's indoor map environment and belong to the user's private data. If it is transmitted in clear text, it will be compromised by a third party. The attacker's theft will cause the loss of user privacy data and bring security risks to users.
  • map data Although some systems encrypt map data, they only use fixed keys or fixed combination keys for symmetric encryption. Attackers can easily crack the password and infer the key combination, which results in poor security. More importantly, once the encryption key of a certain map data is cracked or leaked, not only the map data of the current device will have security risks, but also the map data of all sweeping robots under the entire system will be broken, threatening the entire system. Map data for all products under is secure.
  • the map data encryption key of a sweeping robot is in the form of "device DID code + device MAC address".
  • embodiments of the present disclosure provide a data communication method, device, system and storage medium, aiming to provide security and reliability of data communication between devices.
  • FIG. 1 shows an architectural diagram of a data communication system in some embodiments of the present disclosure.
  • the application environment of the embodiments of the present disclosure will be described below in conjunction with FIG. 1 .
  • the data communication system of the present disclosure includes a device terminal 10 and a peer device 20 .
  • the device end 10 and the opposite end device 20 can establish a two-way communication connection through wireless communication. That is, the device end 10 can send data to the opposite end device 20 through wireless communication, and can also receive data from the opposite end device 20 through wireless communication. sent data.
  • the device 10 and the peer device 20 can directly establish a wireless communication connection through wireless communication modules such as Bluetooth and WiFi, or indirectly establish a wireless communication connection through a transfer device such as a router, which is not limited by this disclosure.
  • wireless communication modules such as Bluetooth and WiFi
  • a transfer device such as a router
  • the device end 10 Before sending data, the device end 10 needs to encrypt the data using the implementation method of the present disclosure, and then transmit the encrypted data to the peer end in ciphertext. Equipment 20. Similarly, before sending data, the peer device 20 also needs to encrypt the data using the implementation method of the present disclosure, and then transmit the encrypted data to the device 10 in ciphertext. After receiving the ciphertext data, the device 10 and the peer device 20 use a decryption algorithm to decrypt the ciphertext data to obtain the plaintext data. In the following embodiments of the present disclosure, the process of data encryption and communication will be described in detail.
  • the device terminal 10 can be any device type suitable for implementation, such as a smartphone, a wearable device, a smart home, etc.
  • the smart home can include, for example, a sweeping robot, smart lamps, smart speakers, etc.
  • the peer device 20 may also be any device type suitable for implementation, such as a smart phone, a wearable device, a cloud server, etc., which is not limited by this disclosure.
  • the sweeping robot 100 can be the device 10, and the mobile phone 200 or the cloud server 300 can be the peer device 20.
  • the sweeping robot 100 can generate map data and send the map data to the mobile phone 200 and/or the cloud server 300 through wireless communication.
  • the data communication method of the embodiment of the present disclosure can be used to improve the map data. Transmission security.
  • the data communication method provided by the present disclosure can be applied to the device end 10. For example, as shown in FIG. side execution.
  • the data communication method of the present disclosure includes:
  • the data to be transmitted may be generated by the device end 10 .
  • the device end 10 is a sweeping robot 100.
  • the sweeping robot 100 is equipped with a variety of sensors, such as IMU (Inertial Measurement Unit), lidar, visual sensor, ToF (Time of Flight, time of flight). ) sensors, etc.
  • SLAM Simultaneous Localization and Mapping
  • the map data generated by the sweeping robot 100 is plain text data before being encrypted, that is, the plain text data to be transmitted according to the present disclosure.
  • the plaintext data needs to be encrypted.
  • S320 Generate an encryption key based on the token code generated by the device in the current network distribution cycle.
  • an encrypted string is randomly generated for each network distribution cycle, and this encrypted string is also the token code (Token) described in this disclosure.
  • token code Token
  • the network distribution cycle of the device side refers to the time period during which the device side establishes a network connection with the peer device. Still taking the above-mentioned example of the sweeping robot 100 as an example, if the sweeping robot 100 wants to communicate with the cloud server 300 or the mobile phone 200, it first needs to be connected to the AIoT system network. That is, the user needs to perform network configuration on the sweeping robot 100 so that it can access the local area network composed of the sweeping robot 100, the mobile phone 200, and the cloud server 300.
  • the sweeping robot 100 If the sweeping robot 100 is re-initialized, or the network configuration of the local area network changes, the sweeping robot 100 needs to be configured again. At this time, it can be considered that the previous network configuration cycle of the sweeping robot 100 has ended and a new configuration has been entered. network cycle.
  • the device will randomly generate a string of encrypted strings, and this encrypted string is the token code Token described in this disclosure.
  • the string length of the token code Token can be set according to the requirements of the encryption algorithm.
  • the encryption algorithm takes AES (Advanced Encryption Standard, Advanced Encryption Standard) symmetric encryption as an example.
  • the token code Token can be a device A 16-byte string randomly generated by the client.
  • each network distribution cycle corresponds to a random token code Token
  • a token code Token is only valid within one network distribution cycle. Therefore, even if a third-party attacker cracks the token code Token, the token code Token will also be invalid in the next network distribution cycle, and different devices will The token code is different. Even if the token code token on a certain device is cracked, it will not affect the data security of other devices in the entire system.
  • the network distribution period can be set to a fixed time period, for example, the sweeping robot 100 is redistributed every preset time.
  • the sweeping robot 100 can be reconfigured every week, so that after reconfiguring the network, a new token code Token will be generated to replace the previous token code Token, that is, every token code Token
  • the validity period is only one week, and the token code Token will change in the next network distribution cycle.
  • the network configuration period can be set to a non-fixed time period.
  • the cleaning robot 100 can be re-configured when the cleaning robot 100 is re-initialized or the network configuration of the local area network changes, so that the cleaning robot 100 can be re-configured. Generate a new token code Token. Those skilled in the art can understand this and will not elaborate on it in this disclosure.
  • the token code Token after the token code Token is randomly generated during the current network distribution cycle, the token code Token can be used as a seed key, and the encryption key can be obtained based on the seed key.
  • Encryption key refers to the key used to encrypt plain text data.
  • a hash operation can be performed based on the token code Token to obtain the encryption key.
  • the hash operation can be, for example, the SHA256 algorithm. After performing the SHA256 operation on the 16-bit token code, the first 16 digits can be used as the encryption key.
  • a combination of "Token code + device unique identification code” can be used as the seed key.
  • the complexity of the encryption key can be further increased and the risk of being cracked can be reduced. This will be described in the following embodiments of the present disclosure and will not be described in detail here.
  • S330 Use the encryption key to encrypt the plaintext data to obtain ciphertext data, and send the ciphertext data to the peer device.
  • the encryption key can be used to encrypt the plaintext data.
  • the encrypted plaintext data is also the ciphertext data described in the present disclosure. Then, the device end 10 The encrypted ciphertext data can then be sent to the peer device 20 .
  • the peer device 20 After receiving the ciphertext data, the peer device 20 can use a decryption algorithm that is opposite to the encryption process to decrypt the ciphertext data to obtain plaintext data. This is explained below in this disclosure and will not be described in detail here.
  • the encryption algorithm may use the AES symmetric encryption algorithm.
  • AES refers to the advanced encryption standard, which is mainly used to replace DES (Des symmetric encryption, data encryption algorithm) and improve the security of the encryption algorithm.
  • DES Des symmetric encryption, data encryption algorithm
  • the token code is dynamically and randomly generated based on the network distribution cycle of the device side, regardless of the device information and user information, and the randomness of the encryption key is maintained. and dynamic changeability to improve data security.
  • the key isolation between different devices can be protected. Even if the key of one device is cracked, it cannot threaten the keys of other devices. Data Security.
  • the process of generating an encryption key based on the token code includes:
  • a network configuration cycle of the sweeping robot 100 is taken as an example. For example, after the sweeping robot 100 is initialized, the sweeping robot 100 needs to be reconfigured in the local area network.
  • this disclosure will be implemented below. The method is explained and will not be described in detail here.
  • the sweeping robot can randomly generate a string of encrypted strings, and the encrypted string serves as the token code of the current network distribution cycle.
  • a device 10 includes at least one unique identification code used to identify its own information, such as device identification code DID, MAC address, device SN code, etc.
  • the token code Token and one or more of the above-mentioned unique device identification codes are combined as a seed key.
  • the string combination of "Token code + device identification code DID + device MAC address” can be used as the seed key for the current network distribution cycle.
  • the device unique identification code can also be other types of identification codes, which are not limited to the above examples, and the combination of seed passwords is not limited to the above examples, which will not be enumerated in this disclosure. .
  • Hash operation is an algorithm that converts input of any length into a fixed-length output through a hash algorithm.
  • Hash operation is a one-way mapping algorithm, that is, it can only be mapped from input to output. Since the input cannot be inferred based on the output, hash operations are widely used in encryption algorithms.
  • the SHA256 hash algorithm can be used to perform a hash operation on the above-mentioned seed key, and then the first 16 characters are taken as the encryption key.
  • the hash operation algorithm can also use any other hash algorithm suitable for implementation, and is not limited to this disclosed example.
  • the token code of the distribution network and the unique identification code of the device are combined as the seed key, which further increases the complexity of the encryption key and improves data security.
  • the encryption algorithm may use the AES symmetric encryption algorithm.
  • AES AES symmetric encryption algorithm
  • an initialization vector IV, Initialization Vector
  • IV the exact same data can be encrypted into different ciphertext data, which can prevent third-party attackers from using message replay to attack. This is explained below with reference to the implementation in Figure 5.
  • the data communication method of this disclosure example encrypts plaintext data to obtain ciphertext data, including:
  • AES block encryption first needs to generate an initial vector IV, and the initial vector IV can be a random string of preset length. For example, in an example, a 16-byte string can be randomly generated as the initial vector IV.
  • the AES encryption algorithm is AES128-CBC
  • the key length is 128 bits (bit)
  • CBC represents Cipher Book Chaining.
  • the plaintext data can be encrypted using the AES algorithm based on the encryption key and initial vector IV obtained in the previous example to obtain encrypted ciphertext data.
  • the initial vector IV is then appended to the header of the encrypted packet in plain text.
  • the encryption process using the AES128-CBC algorithm can be expressed as:
  • map_data_encrypt_with_iv iv_encrypt
  • the plaintext data is encrypted based on the AES algorithm using random token codes corresponding to the device-side network distribution period, thereby maintaining the randomness and dynamic change of the encryption key and improving data security.
  • the key isolation between different devices can be protected. Even if the key of one device is cracked, it cannot threaten the keys of other devices. Data Security.
  • the process of encrypted data transmission by the device end 10 is described above.
  • the peer device 20 After the peer device 20 receives the ciphertext data, it needs to decrypt the ciphertext data to obtain the plaintext data.
  • the transmission data is encrypted using symmetric encryption, that is, the encryption key and the decryption key are the same. Therefore, in the embodiment of the present disclosure, the encryption key also needs to be stored in advance in the peer device 20 to achieve decryption of the ciphertext data. The following description will be made with reference to the embodiment of FIG. 6 .
  • the data communication method of the present disclosure also includes:
  • S610 Obtain the network configuration instruction, and connect the device to the target local area network according to the network distribution instruction.
  • S630 Send the token code to the peer device through the target local area network, so that the peer device can store the token code.
  • the device end 10 randomly generates the token code Token for the current network distribution cycle, and stores the token code Token in its own memory.
  • the device 10 in order to realize the decryption of the peer device 20, the device 10 also needs to send the token code Token to the peer device 20, so that the peer device 20 can store the token code Token of the current network distribution cycle.
  • the device side 10 needs to re-configure the network after initialization or when the network changes.
  • the device 10 can obtain network configuration instructions, which may include information such as network names, network passwords, etc., and perform network configuration on the device 10 according to the network configuration instructions, thereby connecting the device 10 to the target LAN. network.
  • the user when reconfiguring the network of the sweeping robot 100, the user can send network configuration instructions to the sweeping robot 100 through the mobile phone 200.
  • the network configuration instructions may include network name, network password and other information.
  • the sweeping robot 100 can access the target local area network of the sweeping robot 100, the mobile phone 200, and the cloud server 300 according to the network distribution instruction to realize data communication between any two.
  • the device side 10 After completing the above-mentioned network distribution process, the device side 10 is successfully configured. According to the foregoing description of this disclosure, it can be seen that in the new network distribution cycle, the device side 10 needs to generate a new token code Token. Therefore, in the embodiment of the present disclosure, the device end 10 can randomly generate a string of encrypted strings as the token code Token of the current network distribution cycle, and store the token code Token.
  • the device end 10 can use the token code Token to encrypt the plain text data through the aforementioned method steps and then transmit it.
  • the peer device 20 wants to decrypt the ciphertext data after receiving the encrypted ciphertext data, it also needs the token code Token.
  • the token code Token can be sent to the peer device 20 through the target local area network.
  • the peer device 20 receives the token. After coding Token, store the token code Token in its own memory.
  • the sweeping robot 100 after the sweeping robot 100 successfully configures the network and generates the token code Token, it can send the token code Token to the cloud server 300 and/or the mobile phone 200 through the wireless network, and the cloud server 300 or the mobile phone 200 receives the token code. After the token code Token is generated, the token code Token can be stored in its own memory.
  • the encryption key can also be generated according to the foregoing method steps.
  • the token code Token can be used as the seed key, and the SHA256 algorithm is used to perform a hash operation on the seed key to obtain the decryption key.
  • the seed key adopts the combination form of “token code + unique identification code”. Therefore, the peer device 20 not only needs to store the token code Token sent by the device end 10, but also needs to Store the unique identification code sent by the device end 10.
  • the decryption key is generated in the same way as the encryption key. Therefore, the data required for encryption by the device 10 also needs to be shared with the peer device 20 so that the peer device 20 can Device 20 can generate a decryption key.
  • the token code is dynamically and randomly generated based on the network distribution cycle of the device side, regardless of the device information and user information, and the randomness of the encryption key is maintained. and dynamic changeability to improve data security.
  • the key isolation between different devices can be protected. Even if the key of one device is cracked, it cannot threaten the keys of other devices. Data Security.
  • the cloud server 300 can store the map data.
  • the map data stored locally in the sweeping robot 100 is formatted, so the map data needs to be downloaded from the cloud server 300 . This will be described below with reference to the embodiment of FIG. 7 .
  • the data communication method of the present disclosure also includes:
  • S710 Obtain the network configuration instruction, and connect the device to the target local area network according to the network configuration instruction.
  • S720 In response to the successful network configuration on the device side, send a data download request to the opposite end device, so that the opposite end device downloads the target data according to the data download request.
  • S730 Receive the target data sent by the peer device and the token code that encrypts the target data, decrypt the target data according to the token code, and obtain the plaintext data of the target data.
  • the sweeping robot 100 will randomly generate a first token code in the last network distribution cycle, and share the first token code to the cloud server 300 and the mobile phone 200, that is, the sweeping robot 100 , the mobile phone 200 and the cloud server 300 all store the first token code corresponding to the previous network distribution cycle.
  • the sweeping robot 100 used the first token code to encrypt the map data through the aforementioned method steps, then sent the map data to the cloud server 300 and stored the map data in the cloud server 300 .
  • the sweeping robot 100 After the sweeping robot 100 is re-initialized, the sweeping robot needs to be re-networked. Since the sweeping robot 100 is initialized, the locally stored map data and the first token code are formatted.
  • the sweeping robot 100 can directly download the map data stored in the previous network distribution cycle from the cloud server 300, thereby eliminating the need to reconstruct the map data.
  • the sweeping robot 100 after the sweeping robot 100 is successfully configured with a network, it can send a data download request to the cloud server 300.
  • the data download request can carry the device identification code of the sweeping robot 100.
  • the cloud server 300 After receiving the data download request, the cloud server 300 parses the data download request and finds the stored map data corresponding to it through the device identification code carried in the data download request, that is, the target data described in this disclosure.
  • the cloud server 300 sends the target data to the sweeping robot 100. It can be understood that if the target data stored in the cloud server 300 is ciphertext data, the target data can be sent directly. If the target data stored by the cloud server 300 is plaintext data, it can use the first token code stored by itself to encrypt the target data through the above encryption process and then send it. Those skilled in the art can understand this and will not elaborate on it in this disclosure.
  • the target data received by the sweeping robot 100 is encrypted data, but since it has been initialized, the sweeping robot 100 does not have the first token code of the previous network distribution cycle. Therefore, in this embodiment, while sending the target data, the cloud server 300 also needs to send the first token code to the sweeping robot 100 . Therefore, after receiving the target data and the first token code, the sweeping robot 100 can use the first token code to decrypt the target data and obtain plaintext map data.
  • the token code needs to be regenerated, and then the new token code is shared to the cloud server 300 and the mobile phone 200.
  • the cloud server 300 and the mobile phone 200 can use the new token code pair.
  • the first token code stored in the previous network distribution cycle is updated and replaced.
  • the device when it is not connected to the network for the first time, it can download the target data stored in the previous network distribution cycle from the peer device, thereby eliminating the need to regenerate relevant data and improving the work efficiency of the device.
  • the device can download map data directly from the cloud server without rebuilding the map data, thereby improving the efficiency of the sweeping robot.
  • the data communication method provided by the example of this disclosure can be applied to the peer device, including:
  • S810 Receive the token code sent by the device and store it.
  • the device side after the device side successfully configures the network, the device side randomly generates a token code and sends the token code to the opposite end device. After receiving the token code, the peer device can store the token code in its own memory.
  • the peer device directly stores the token code. Just the token code.
  • the peer device After receiving the token code of the current network configuration cycle sent by the device, the peer device uses the current network configuration cycle.
  • the token code of the network distribution cycle can be updated and replaced by the previously stored token code.
  • S820 Receive the ciphertext data encrypted using the token code and sent by the device.
  • the device end after generating plaintext data, the device end can encrypt the plaintext data using the token code of the current distribution network cycle to obtain ciphertext data, and send the ciphertext data to the peer device.
  • the token code of the current distribution network cycle to obtain ciphertext data
  • the sweeping robot 100 uses the token code Token to encrypt the map data and then sends it to the cloud server 300 .
  • S830 Obtain the decryption key according to the token code stored by itself, and use the decryption key to decrypt the ciphertext data to obtain the plaintext data corresponding to the ciphertext data.
  • the token code Token can be used to decrypt the received ciphertext data to obtain the plaintext data.
  • the encryption key is obtained by the device 10 performing a hash operation based on the token code Token. Therefore, on the peer device 20 side, a hash operation can also be performed based on the token code Token, that is, the decryption key is obtained, that is, the encryption key and the decryption key are the same. After obtaining the decryption key, the peer device 20 can use the decryption key to decrypt the ciphertext data and obtain the plaintext data.
  • the encryption key is obtained by performing a hash operation on the device side based on "token code + unique identification code”. Therefore, on the opposite end device 20 side, it is also necessary to perform a hash operation based on the "token code + unique identification code” to calculate the decryption key.
  • the following description will be made with reference to the embodiment of FIG. 9 .
  • the data communication method of the present disclosure also includes:
  • S910 Receive the unique identification code sent by the device and store it.
  • S920 Generate a decryption key based on the token code and unique identification code stored by itself.
  • the device end 10 needs to send a unique identification code to the opposite end device 20 while sending the token code to the opposite end device 20 .
  • the unique identification code may include device identification code DID, MAC address, device SN code, etc., and this disclosure does not limit this.
  • the peer device 20 may store the token code and the unique identification code in its own memory.
  • the peer device 20 After receiving the ciphertext data sent by the device end 10, the peer device 20 can generate the corresponding decryption key based on the token code and unique identification code stored in it.
  • the decryption key and the encryption key are exactly the same. Therefore, the way in which the peer device 20 side generates the decryption key should be consistent with the way in which the device side 10 generates the encryption key.
  • the device side 10 uses the string combination of "Token code + device identification code DID + device MAC address" as the seed key, and uses the SHA256 algorithm to hash the seed key and then takes the first 16 bits as the encryption key.
  • the peer device 20 also uses the pre-received and stored string combination of "Token code + device identification code DID + device MAC address” as a seed key, and uses the SHA256 algorithm to perform a hash operation on the seed key and obtain it. The first 16 bits serve as the decryption key.
  • the decryption key After obtaining the decryption key, you can use the decryption key to decrypt the ciphertext data and obtain the plaintext data. It can be understood that the decryption algorithm and the encryption algorithm use the same algorithm.
  • the device 10 uses the AES128-CBC encryption algorithm, so the opposite device 20 also needs to use the AES128-CBC decryption algorithm. The following is performed in conjunction with the implementation of Figure 10 illustrate.
  • the process of decrypting ciphertext data includes:
  • the device 10 when encrypting, uses a randomly generated initial vector IV and encryption key to encrypt the plaintext data, and appends the initial vector IV to the header of the encrypted packet.
  • the peer device 20 can parse the header of the encrypted packet of the ciphertext data to obtain the initial vector IV, and at the same time generate a decryption key based on its own stored token code Token and unique identification code, and then use AES128-CBC Algorithm, decrypt the ciphertext data according to the initial vector IV and decryption key, and then you can obtain the plaintext data.
  • the decryption process using the AES128-CBC algorithm can be expressed as:
  • iv_decrypt map_data_encrypt_with_iv[0:16];
  • map_data_encrypt map_data_encrypt_with_iv[16:];
  • the token code is dynamically and randomly generated based on the network distribution cycle of the device side, regardless of the device information and user information, and the randomness of the encryption key is maintained. and dynamic changeability to improve data security.
  • the key isolation between different devices can be protected. Even if the key of one device is cracked, it cannot threaten the keys of other devices. Data Security.
  • the peer device 20 may have already stored relevant data required by the device 10, so that the device 10 can re-configure the network. , downloading the required relevant data from the peer device 20 without regenerating the data, thereby improving work efficiency.
  • the device 10 when the device 10 does not access the network for the first time, the peer device 20 may have already stored relevant data required by the device 10, so that the device 10 can re-configure the network. , downloading the required relevant data from the peer device 20 without regenerating the data, thereby improving work efficiency.
  • FIG. 11 the peer device 20 may have already stored relevant data required by the device 10, so that the device 10 can re-configure the network. , downloading the required relevant data from the peer device 20 without regenerating the data, thereby improving work efficiency.
  • the data communication method of the present disclosure includes:
  • S1130 Receive the update token code sent by the device, and use the update token code to replace and update the currently stored token code.
  • the sweeping robot 100 will randomly generate a first token code in the last network distribution cycle, and share the first token code to the cloud server 300 and the mobile phone 200, that is, sweeping the floor
  • the robot 100, the mobile phone 200 and the cloud server 300 all store the first token code corresponding to the previous network distribution cycle.
  • the sweeping robot 100 used the first token code to encrypt the map data through the aforementioned method steps, then sent the map data to the cloud server 300 and stored the map data in the cloud server 300 .
  • the sweeping robot 100 After the sweeping robot 100 is re-initialized, the sweeping robot 100 needs to be reconfigured. After the sweeping robot 100 is successfully configured, it can send a data download request to the cloud server 300.
  • the data download request can carry the device identification of the sweeping robot 100. code.
  • the cloud server 300 After receiving the data download request, the cloud server 300 parses the data download request, finds the stored map data corresponding to it through the device identification code carried in the data download request, that is, the target data described in this disclosure, and then adds the target data to the target data. Just send the data to the sweeping robot 100.
  • the cloud server 300 does not store its corresponding map data. At this time, the cloud server 300 only needs to return empty data to the sweeping robot 100 .
  • the cloud server 300 while sending the target data, the cloud server 300 also needs to send the first token code to the sweeping robot 100 . Therefore, after receiving the target data and the first token code, the sweeping robot 100 can use the first token code to decrypt the target data and obtain plaintext map data.
  • the token code needs to be regenerated, that is, the updated token code corresponding to the current network configuration cycle.
  • the sweeping robot 100 sends the update token code to the cloud server 300, and the cloud server 300 uses the update token code to update and replace the currently stored first token code of the previous network distribution cycle.
  • the device when it is not connected to the network for the first time, it can download the target data stored in the previous network distribution cycle from the peer device, thereby eliminating the need to regenerate relevant data and improving the work efficiency of the device.
  • the device can download map data directly from the cloud server without rebuilding the map data, thereby improving the efficiency of the sweeping robot.
  • Figure 12 shows an interaction flow chart of a data communication method in some embodiments of the present disclosure.
  • the following description takes the device as the sweeping robot 100 and the peer device as the cloud server 300 as an example.
  • the data communication method of the present disclosure includes:
  • the sweeping robot 100 On the side of the sweeping robot 100, when the sweeping robot 100 is connected to the network for the first time, or is initialized, or the network changes, the sweeping robot 100 needs to be re-networked. After the sweeping robot 100 is successfully configured with a network, the sweeping robot 100 can randomly generate a string of encrypted strings, which is the first token code corresponding to the current network distribution cycle.
  • the sweeping robot randomly generates a 16-byte random string as the first token code.
  • the sweeping robot sends the first token code, device DID and MAC address to the cloud server.
  • the sweeping robot 100 needs to send the first token code, device DIDI and MAC address required for calculating the key to the cloud server 300 side.
  • the cloud server stores the first token code, device DID and MAC address.
  • the cloud server 300 After receiving the first token code, device DIDI and MAC address sent by the sweeping robot 100, the cloud server 300 can store the first token code, device DIDI and MAC address in its own memory for subsequent calculation key retrieval. .
  • the sweeping robot generates plaintext map data.
  • the sweeping robot 100 When the sweeping robot 100 is moving, it can use the SLAM algorithm to construct map data of the current space based on data collected by IMU, lidar, visual sensor, ToF sensor and other devices.
  • the sweeping robot uses the AES algorithm to encrypt the map data based on the first token code, device DID and MAC address to obtain ciphertext data.
  • the sweeping robot 100 can use the combination of "first token code + device DID + MAC address" as a seed key, and then use the SHA256 hash algorithm to perform a hash operation on the seed key Get the encryption key. At the same time, the sweeping robot 100 randomly generates a string of 16 Byte as the initial vector IV.
  • the sweeping robot 100 can encrypt the map data according to the initial vector IV and encryption key based on the AES128-CBC algorithm, and then attach the initial vector IV to the header of the encrypted packet to obtain ciphertext data.
  • the sweeping robot sends the ciphertext data to the cloud server 300.
  • the sweeping robot 100 sends the encrypted ciphertext data to the cloud server 300 .
  • the cloud server 300 decrypts and stores the map data.
  • the cloud server 300 may directly store the ciphertext data. In other embodiments, after receiving the ciphertext data, the cloud server 300 may also decrypt the ciphertext data and then store it.
  • the FDS/KS3 cloud server can be used to store map data, and the sweeping robot 100 may simultaneously generate multiple different types of map data that need to be stored, such as permanent maps, temporary maps, etc.
  • the above-mentioned data communication method can be used for data encryption and transmission.
  • the upload address connection is uploaded to the cloud server 300 from the device.
  • the map data can be downloaded from the FDS/KS3 server according to the download connection.
  • the sweeping robot In response to the successful reconfiguration of the network by the sweeping robot, the sweeping robot generates a second token code.
  • the sweeping robot 100 When the sweeping robot 100 is initialized or the network changes, the sweeping robot 100 needs to be reconfigured. After the reconfiguration is completed, the sweeping robot can regenerate the token code Token, that is, the second token code.
  • the sweeping robot sends the data download request and the second token code to the cloud server.
  • the sweeping robot can download the map data sent in the previous network distribution cycle from the cloud server. Therefore, after the network reconfiguration is completed and the second token code is generated, the sweeping robot 100 can send a data download request and the second token to the cloud server 300. code.
  • the cloud server determines the target data according to the data download request.
  • the cloud server 300 parses the data download request to obtain the unique device identifier of the sweeping robot. Based on the unique device identifier, the map data stored in the memory in the previous network distribution cycle is determined, that is, the target data.
  • the cloud server sends the target data and the first token code to the sweeping robot.
  • the cloud server 300 Since the sweeping robot 100 is reconfigured with a network, the sweeping robot 100 does not have the first token code used to decrypt the target data. Therefore, while sending the target data, the cloud server 300 also sends the first token code of the previous network distribution cycle stored by itself to the sweeping robot 100 .
  • the sweeping robot decrypts the target data to obtain map data.
  • the sweeping robot 100 can obtain the seed key based on the combination of "first token code + device DID + MAC address", and then use the SHA256 hash algorithm to hash the seed key. The operation obtains the decryption key. Then the header of the target data encrypted packet is parsed to obtain the initial vector IV. Finally, the target data is decrypted based on the initial vector IV and decryption key based on the AES128-CBC algorithm to obtain the map data.
  • the cloud server uses the second token code to replace and update the first token code.
  • the cloud server 300 uses the received second token code to replace the currently stored first token code. renew.
  • the token code is dynamically and randomly generated based on the network distribution cycle of the device side, regardless of the device information and user information, and the randomness of the encryption key is maintained. and dynamic changeability to improve data security.
  • the key isolation between different devices can be protected. Even if the key of one device is cracked, it cannot threaten the keys of other devices. Data Security.
  • the embodiments of the present disclosure provide a data communication device.
  • the data communication device provided by the present disclosure can be applied to the device side.
  • the data communication device of the present disclosure includes:
  • Data generation module configured to generate plaintext data to be transmitted
  • the key generation module 2 is configured to generate an encryption key based on the token code generated by the device side in the current network distribution cycle; the token code is an encrypted string randomly generated by the device side in each network distribution cycle;
  • the data encryption module 3 is configured to use the encryption key to encrypt plain text data to obtain cipher text data, and send the cipher text data to the peer device.
  • the token code is dynamically and randomly generated based on the network distribution cycle of the device side, regardless of the device information and user information, and the randomness of the encryption key is maintained. and dynamic changeability to improve data security.
  • the key isolation between different devices can be protected. Even if the key of one device is cracked, it cannot threaten the keys of other devices. Data Security.
  • key generation module 2 is configured as:
  • the unique identification code includes a device identification code and/or a device MAC address.
  • the data encryption module 3 is configured as:
  • the AES algorithm is used to encrypt plain text data based on the encryption key and initial vector to obtain cipher text data.
  • the data communication device of the present disclosure also includes a token configuration module, and the token configuration module is configured as:
  • an encrypted string is randomly generated as the token code of the current network configuration cycle, and the token code is stored;
  • the data communication device of the present disclosure further includes a first data download module, and the first data download module is configured to:
  • the device side includes a sweeping robot; the data generation module 1 is configured as:
  • the map data of the current scene is collected through the sensor of the sweeping robot, and plain text data is obtained based on the map data.
  • the token code is dynamically and randomly generated based on the network distribution cycle of the device side, regardless of the device information and user information, and the randomness of the encryption key is maintained. and dynamic changeability to improve data security.
  • the key isolation between different devices can be protected. Even if the key of one device is cracked, it cannot threaten the keys of other devices. Data Security.
  • An embodiment of the present disclosure provides a data communication device.
  • the data communication device provided by the present disclosure can be applied to a peer device.
  • the data communication device of the present disclosure includes:
  • the first receiving module 4 is configured to receive and store the token code sent by the device; the token code is an encrypted string randomly generated by the device in each network distribution cycle;
  • the second receiving module 5 is configured to receive ciphertext data encrypted using the token code and sent by the device;
  • the decryption module 6 is configured to obtain the decryption key based on the token code stored in itself, and use the decryption key to decrypt the ciphertext data to obtain plaintext data corresponding to the ciphertext data.
  • the first receiving module 4 is configured as:
  • Decryption module 6 is configured as:
  • decryption module 6 is configured to:
  • the ciphertext data is decrypted based on the decryption key and initial vector to obtain plaintext data.
  • the data communication device of the present disclosure further includes a second data download module, and the second data download module is configured as:
  • the peer device includes a cloud server or a mobile terminal.
  • the device when it does not access the network for the first time, it can download the target data stored in the previous network distribution cycle from the opposite device, thereby eliminating the need to regenerate relevant data and improving the work efficiency of the device.
  • the device can download map data directly from the cloud server without rebuilding the map data, thereby improving the efficiency of the sweeping robot.
  • embodiments of the present disclosure provide a data communication system, including:
  • the memory stores computer instructions, and the computer instructions are used to cause the processor to execute the method according to any implementation manner in the first aspect or the second aspect.
  • embodiments of the present disclosure provide a storage medium storing computer instructions, and the computer instructions are used to cause a computer to execute the method according to any embodiment of the first aspect or the second aspect.
  • FIG. 15 shows a schematic structural diagram of a data communication system 600 suitable for implementing the method of the present disclosure.
  • the corresponding functions of the above processor and storage medium can be realized.
  • the data communication system 600 includes a processor 601 that can perform various appropriate actions and processes according to programs stored in the memory 602 or loaded into the memory 602 from the storage portion 608 .
  • various programs and data required for the operation of the data communication system 600 are also stored.
  • the processor 601 and the memory 602 are connected to each other via a bus 604.
  • An input/output (I/O) interface 605 is also connected to bus 604.
  • the following components are connected to the I/O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., speakers, etc.; and a storage section 608 including a hard disk, etc. ; and a communication section 609 including a network interface card such as a LAN card, a modem, etc.
  • the communication section 609 performs communication processing via a network such as the Internet.
  • Driver 610 is also connected to I/O interface 605 as needed.
  • Removable media 611 such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.
  • the above method process may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a machine-readable medium, the computer program including program code for performing the above-described method.
  • the computer program may be downloaded and installed from the network via communications portion 609 and/or installed from removable media 611 .
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more components for implementing the specified logical function. Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本公开涉及数据通信领域,具体提供了一种数据通信方法及装置。一种数据通信方法,应用于设备端,包括生成待传输的明文数据,根据当前配网周期中设备端生成的令牌码生成加密密钥,利用加密密钥对明文数据进行加密得到密文数据,并将密文数据发送至对端设备。本公开实施方式中,基于设备端的配网周期动态随机生成令牌码,保持加密密钥的随机性和动态变化性,提高数据安全性。并且,保护不同设备间的密钥隔离,即使破解某个设备端的密钥,也无法威胁到其他设备端的数据安全。

Description

数据通信方法及装置 技术领域
本公开涉及数据通信领域,具体涉及一种数据通信方法及装置。
背景技术
数据加密广泛应用于数据通信领域中,通过对传输数据进行加密以保障数据安全。
对于AIoT(Artificial Intelligence Internet of Things,人工智能物联网)场景,设备端、云端以及客户端往往需要进行相关数据的传输,相关技术中,端与端之间的数据传输安全性较差,容易受到第三方攻击者的数据窃取。
发明内容
为提高数据通信安全,本公开实施方式提供了一种数据通信方法、装置、系统以及存储介质。
第一方面,本公开实施方式提供了一种数据通信方法,应用于设备端,所述方法包括:
生成待传输的明文数据;
根据当前配网周期中所述设备端生成的令牌码,生成加密密钥;所述令牌码是所述设备端在每个所述配网周期随机生成的加密字符串;
利用所述加密密钥对所述明文数据进行加密得到密文数据,并将所述密文数据发送至对端设备。
在一些实施方式中,所述根据当前配网周期中所述设备端生成的令牌码,生成加密密钥,包括:
获取当前配网周期对应的所述令牌码,以及所述设备端对应的唯一标识码;
根据所述令牌码和所述唯一标识码,生成种子密钥;
根据所述种子密钥进行哈希运算,得到所述加密密钥。
在一些实施方式中,所述唯一标识码包括设备标识码和/或设备MAC地址。
在一些实施方式中,所述利用所述加密密钥对所述明文数据进行加密得到密文数据,包括:
生成随机字符串作为初始向量;
利用AES算法,根据所述加密密钥和所述初始向量,对所述明文数据进行加密,得到所述密文数据。
在一些实施方式中,本公开所述的数据通信方法,还包括:
获取配网指令,并根据所述配网指令将所述设备端接入目标局域网络;
响应于所述设备端配网成功,随机生成加密字符串作为当前配网周期的所述令牌码,并存储所述令牌码;
将所述令牌码通过所述目标局域网络发送至所述对端设备,以供所述对端设备存储所述令牌码。
在一些实施方式中,本公开所述的数据通信方法,还包括:
响应于所述设备端配网成功,向所述对端设备发送数据下载请求,以使所述对端设备根据所述数据下载请求下载目标数据;
接收所述对端设备发送的目标数据以及加密所述目标数据的令牌码,根据所述令牌码对所述目标数据进行解密,得到所述目标数据的明文数据。
在一些实施方式中,所述设备端包括扫地机器人;所述生成待传输的明文数据,包括:
通过所述扫地机器人的传感器采集当前场景的地图数据,并根据所述地图数据得到所述明文数据。
第二方面,本公开实施方式提供了一种数据通信方法,应用于对端设备,所述方法包括:
接收设备端发送的令牌码并存储;所述令牌码是所述设备端在每个配网周期随机生成的加密字符串;
接收设备端发送的利用所述令牌码加密得到的密文数据;
根据自身存储的所述令牌码得到解密密钥,并利用所述解密密钥对所述密文数据进行解密,得到所述密文数据对应的明文数据。
在一些实施方式中,本公开所述的数据通信方法,还包括:
接收设备端发送的唯一标识码并存储;
所述根据自身存储的所述令牌码得到解密密钥,并利用所述解密密钥对所述密文数据进行解密,得到所述密文数据对应的明文数据,包括:
根据自身存储的所述令牌码和所述唯一标识码,生成解密密钥;
利用所述解密密钥对所述密文数据进行解密,得到所述明文数据。
在一些实施方式中,所述利用所述解密密钥对所述密文数据进行解密,得到所述密文数据对应的明文数据,包括:
获取所述密文数据携带的初始向量;
利用AES算法,根据所述解密密钥和所述初始向量对所述密文数据进行解密,得到所述明文数据。
在一些实施方式中,本公开所述的数据通信方法,还包括:
接收设备端发送的数据下载请求,根据所述数据下载请求下载目标数据;
将所述目标数据以及当前存储的所述令牌码发送至所述设备端;
接收所述设备端发送的更新令牌码,并利用所述更新令牌码对当前存储的所述令牌码进行替换更新。
在一些实施方式中,所述对端设备包括云端服务器或者移动终端。
第三方面,本公开实施方式提供了一种数据通信装置,应用于设备端,所述装置包括:
数据生成模块,被配置为生成待传输的明文数据;
密钥生成模块,被配置为根据当前配网周期中所述设备端生成的令牌码,生成加密密钥;所述令牌码是所述设备端在每个所述配网周期随机生成的加密字符串;
数据加密模块,被配置为利用所述加密密钥对所述明文数据进行加密得到密文数据,并将所述密文数据发送至对端设备。
在一些实施方式中,所述密钥生成模块,被配置为:
获取当前配网周期对应的所述令牌码,以及所述设备端对应的唯一标识码;
根据所述令牌码和所述唯一标识码,生成种子密钥;
根据所述种子密钥进行哈希运算,得到所述加密密钥。
在一些实施方式中,所述唯一标识码包括设备标识码和/或设备MAC地址。
在一些实施方式中,所述数据加密模块,被配置为:
生成随机字符串作为初始向量;
利用AES算法,根据所述加密密钥和所述初始向量,对所述明文数据进行加密,得到所述密文数据。
在一些实施方式中,本公开所述的数据通信装置,还包括令牌配置模块,所述令牌配置模块被配置为:
获取配网指令,并根据所述配网指令将所述设备端接入目标局域网络;
响应于所述设备端配网成功,随机生成加密字符串作为当前配网周期的所述令牌码,并存储所述令牌码;
将所述令牌码通过所述目标局域网络发送至所述对端设备,以供所述对端设备存储所述令牌码。
在一些实施方式中,本公开所述的数据通信装置,还包括第一数据下载模块,所述第一数据下载模块被配置为:
响应于所述设备端配网成功,向所述对端设备发送数据下载请求,以使所述对端设备根据所述数据下载请求下载目标数据;
接收所述对端设备发送的目标数据以及加密所述目标数据的令牌码,根据所述令牌码对所述目标数据进行解密,得到所述目标数据的明文数据。
在一些实施方式中,所述设备端包括扫地机器人;所述数据生成模块被配置为:
通过所述扫地机器人的传感器采集当前场景的地图数据,并根据所述地图数据得到所述明文数据。
第四方面,本公开实施方式提供了一种数据通信装置,应用于对端设备,所述装置包括:
第一接收模块,被配置为接收设备端发送的令牌码并存储;所述令牌码是所述设备端在每个配网周期随机生成的加密字符串;
第二接收模块,被配置为接收设备端发送的利用所述令牌码加密得到的密文数据;
解密模块,被配置为根据自身存储的所述令牌码得到解密密钥,并利 用所述解密密钥对所述密文数据进行解密,得到所述密文数据对应的明文数据。
在一些实施方式中,所述第一接收模块被配置为:
接收设备端发送的唯一标识码并存储;
所述解密模块被配置为:
根据自身存储的所述令牌码和所述唯一标识码,生成解密密钥;
利用所述解密密钥对所述密文数据进行解密,得到所述明文数据。
在一些实施方式中,所述解密模块被配置为:
获取所述密文数据携带的初始向量;
利用AES算法,根据所述解密密钥和所述初始向量对所述密文数据进行解密,得到所述明文数据。
在一些实施方式中,本公开所述的数据通信装置,还包括第二数据下载模块,所述第二数据下载模块被配置为:
接收设备端发送的数据下载请求,根据所述数据下载请求下载目标数据;
将所述目标数据以及当前存储的所述令牌码发送至所述设备端;
接收所述设备端发送的更新令牌码,并利用所述更新令牌码对当前存储的所述令牌码进行替换更新。
在一些实施方式中,所述对端设备包括云端服务器或者移动终端。
第五方面,本公开实施方式提供了一种数据通信系统,包括:
处理器;和
存储器,存储有计算机指令,所述计算机指令用于使所述处理器执行根据第一方面或者第二方面中任意实施方式所述的方法。
第六方面,本公开实施方式提供了一种存储介质,存储有计算机指令,所述计算机指令用于使计算机执行根据第一方面或者第二方面中任意实施方式所述的方法。
本公开实施方式的数据通信方法,应用于设备端,包括生成待传输的明文数据,根据当前配网周期中设备端生成的令牌码生成加密密钥,利用加密密钥对明文数据进行加密得到密文数据,并将密文数据发送至对端设备。本公开实施方式中,基于设备端的配网周期动态随机生成令牌码,保 持加密密钥的随机性和动态变化性,提高数据安全性。并且,保护不同设备间的密钥隔离,即使破解某个设备端的密钥,也无法威胁到其他设备端的数据安全。
附图说明
为了更清楚地说明本公开具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是根据本公开一些实施方式中数据通信系统的架构图。
图2是根据本公开一些实施方式中数据通信系统的架构图。
图3是根据本公开一些实施方式中数据通信方法的流程图。
图4是根据本公开一些实施方式中数据通信方法的流程图。
图5是根据本公开一些实施方式中数据通信方法的流程图。
图6是根据本公开一些实施方式中数据通信方法的流程图。
图7是根据本公开一些实施方式中数据通信方法的流程图。
图8是根据本公开一些实施方式中数据通信方法的流程图。
图9是根据本公开一些实施方式中数据通信方法的流程图。
图10是根据本公开一些实施方式中数据通信方法的流程图。
图11是根据本公开一些实施方式中数据通信方法的流程图。
图12是根据本公开一些实施方式中数据通信方法的流程图。
图13是根据本公开一些实施方式中数据通信装置的结构框图。
图14是根据本公开一些实施方式中数据通信装置的结构框图。
图15是根据本公开一些实施方式中数据通信系统的结构框图。
具体实施方式
下面将结合附图对本公开的技术方案进行清楚、完整地描述,显然,所描述的实施方式是本公开一部分实施方式,而不是全部的实施方式。基于本公开中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本公开保护的范围。此外,下面所描述的本公开不同实施方式中所涉及的技术特征只要彼此之间未构成冲突就可以相互结合。
现如今,数据加密被广泛应用于各种数据通信领域中,通过对传输数据进行加密以保障数据安全。但是,在部分场景中,数据通信的安全性较差,容易造成数据安全隐患。
AIoT(Artificial Intelligence Internet of Things,人工智能物联网)可以实现智能家居场景中的万物互联,建立家居设备、云端以及移动终端之间的互联通信,从而用户可以通过移动终端控制所有的智能家居设备,智能家居设备例如可包括智能音响、扫地机器人、智能灯具等。
在AIoT场景中,家居设备、运动以及移动终端任意两者之间可进行数据的传输。例如以扫地机器人为例,扫地机器人通过自身传感器可构建出当前所处空间的地图,该地图数据可以存储在扫地机器人本地,从而为扫地机器人移动提供路径。地图数据还可以发送至云端存储,从而设备端或者手机端可以从云端下载地图数据。地图数据还可以发送至手机端,从而手机端可以实时观察到构建的地图情况。
在扫地机器人端向云端发送地图数据、云端向手机端发送地图数据、扫地机器人端向手机端发送地图数据的过程中。相关技术中,部分系统不会对地图数据进行加密,也即以明文数据的方式进行通信,但是地图数据可以呈现出用户室内地图环境,属于用户隐私数据,若以明文形式传输,一旦受到第三方攻击者的窃取,将会造成用户隐私数据丢失,给用户带来安全隐患。
部分系统虽然会对地图数据进行加密,但是也仅仅是采用固定密钥或者固定组合方式密钥进行对称加密,攻击者可以较为容易地破解密码并推断出密钥组合方式,安全性较差。更为重要的是,一旦某个地图数据的加 密密钥被破解或者泄露,不仅仅当前设备的地图数据存在安全隐患,整个系统体系下的所有扫地机器人的地图数据都会被攻破,威胁整个系统体系下所有产品的地图数据安全。
例如一个示例中,扫地机器人的地图数据加密密钥为“设备DID码+设备MAC地址”的形式,一旦某个扫地机器人的地图数据密钥被破解,攻击者很容易可以推断出密钥组合形式,从而导致整个系统体系下的其他扫地机器人的地图数据密钥被破解,威胁用户隐私安全。
基于此,本公开实施方式提供了一种数据通信方法、装置、系统以及存储介质,旨在提供设备间数据通信的安全性和可靠性。
图1示出了本公开一些实施方式中数据通信系统的架构图,下面结合图1对本公开实施方式的应用环境进行说明。
如图1所示,在一些实施方式中,本公开示例的数据通信系统包括设备端10和对端设备20。设备端10和对端设备20可以通过无线通信的方式建立双向通信连接,也即设备端10可以通过无线通信的方式向对端设备20发送数据,也可以通过无线通信的方式接收对端设备20发送的数据。
设备端10与对端设备20可以通过例如蓝牙、WiFi等无线通信模块直接建立无线通信连接,也可以通过例如路由器等中转设备间接建立无线通信连接,本公开对此不作限制。
在设备端10与对端设备20进行数据通信的过程中,设备端10在发送数据之前,需要利用本公开实施方式方法对数据进行加密,然后将加密后的数据以密文方式传输至对端设备20。同理,对端设备20在发送数据之前,也需要利用本公开实施方式方法对数据进行加密,然后将加密后的数据以密文方式传输至设备端10。设备端10和对端设备20在接收到密文数据之后,采用解密算法对密文数据进行解密,即可得到明文数据。本公开下文实施方式中,对数据加密及通信的过程进行详细说明。
本公开实施方式中,设备端10可以是任何适于实施的设备类型,例如可以是智能手机、穿戴设备、智能家居等,智能家居例如可以包括扫地机器人、智能灯具、智能音响等。对端设备20也可以是任何适于实施的设备类型,例如可以是智能手机、穿戴设备、云服务器等,本公开对此不作限制。
例如一个示例中,如图2所示,以AIoT场景为例,扫地机器人100即可是设备端10,而手机200或者云服务器300即可是对端设备20。扫地机器人100可以生成地图数据,并将地图数据以无线通信的方式发送至手机200和/或云服务器300,在地图数据的传输中,即可采用本公开实施方式的数据通信方法,提高地图数据传输的安全性。
当然,本领域技术人员可以理解,本公开数据通信系统并不局限于图2所示,还可以是其他任何适于实施的系统架构,本公开对此不再赘述。
在上述示例的数据通信系统基础上,下面对本公开实施方式的数据通信方法进行说明。
在一些实施方式中,本公开提供的数据通信方法,可应用于设备端10中,例如图2所示,设备端10可以是扫地机器人100,也即本公开示例的数据通信方法可由扫地机器人100侧执行。
如图3所示,在一些实施方式中,本公开示例的数据通信方法,包括:
S310、生成待传输的明文数据。
本公开实施方式中,待传输的数据可以由设备端10生成。例如图2示例中,设备端10为扫地机器人100,扫地机器人100上设有多种传感器,例如IMU(Inertial Measurement Unit,惯性测量单元)、激光雷达、视觉传感器、ToF(Time of Flight,飞行时间)传感器等。
扫地机器人100在移动过程中,可以基于上述传感器采集的数据,利用SLAM(Simultaneous Localization and Mapping,同步定位与建图)构建得到当前所处空间的地图数据。
可以理解,扫地机器人100生成的地图数据,在未进行加密处理之前为明文数据,也即本公开所述的待传输的明文数据。本公开实施方式中,在扫地机器人100向云服务器300或者手机200传输该明文数据时,需要对明文数据进行加密。
上述仅以扫地机器人100的地图数据传输为例进行说明,事实上,本公开实施方式并不局限于地图数据的通信,本公开对此不再赘述。
S320、根据当前配网周期中设备端生成的令牌码,生成加密密钥。
本公开实施方式中,在设备端,对于每个配网周期均会随机生成一串加密字符串,该加密字符串也即本公开所述的令牌码(Token)。
设备端的配网周期,是指设备端与对端设备建立网络连接的一个时间周期。仍以上述示例的扫地机器人100为例,扫地机器人100若想实现与云服务器300或者手机200的通信,首先需要接入AIoT系统网络中。也即,用户需要对扫地机器人100进行网络配置,使其接入由扫地机器人100、手机200以及云服务器300组成的局域网络中。
而若扫地机器人100被重新初始化,或者局域网络的网络配置发生变化时,需要重新对扫地机器人100进行配网,此时,即可认为扫地机器人100的上一个配网周期结束,进入新的配网周期。
本公开实施方式中,在每个配网周期开始时,设备端会随机生成一串加密字符串,该加密字符串即为本公开所述的令牌码Token。可以理解,令牌码Token的字符串长度可以根据加密算法的需求进行设置,例如一个示例中,加密算法以AES(Advanced Encryption Standard,高级加密标准)对称加密为例,令牌码Token可以是设备端随机生成的16byte的字符串。
另外,由于每个配网周期对应一个随机令牌码Token,因此即使同一个设备端10,在不同的配网周期中对应的令牌码Token也是不同的。本公开实施方式中,一个令牌码Token只在一个配网周期内有效,从而即使第三方攻击者破解令牌码Token,在下一个配网周期该令牌码Token也将失效,而且不同设备端的令牌码Token不同,即使破解某一个设备端的令牌码Token,也不会影响到整个系统体系下的其他设备的数据安全。
在一些实施方式中,配网周期可以设置为一个固定的时间周期,例如每隔预设时间对扫地机器人100进行一次重新配网。例如一个示例中,可以每隔一星期对扫地机器人100进行一次重新配网,从而在重新配网之后会生成新的令牌码Token取代之前的令牌码Token,也即每隔令牌码Token的有效期仅为一星期,在下个配网周期中,令牌码Token即发生变化。
在另一些实施方式中,配网周期可以设置为非固定的时间周期,例如,可在扫地机器人100被重新初始化,或者局域网络的网络配置发生变化时,对扫地机器人100进行重新配网,从而生成新的令牌码Token。本领域技术人员对此可以理解,本公开不再赘述。
本公开实施方式中,在当前配网周期内,随机生成令牌码Token之后,即可将令牌码Token作为种子密钥,基于该种子密钥得到加密密钥。加密 密钥是指用来对明文数据进行加密的密钥。
在一些实施方式中,可以基于令牌码Token进行哈希(Hash)运算,得到加密密钥。哈希运算可以是例如SHA256算法,对16位的令牌码进行SHA256运算之后,可取前16位数字作为加密密钥。
在一些实施方式中,可以采用“令牌码Token+设备唯一标识码”的组合方式作为种子密钥,通过进一步融合设备唯一标识码,可以进一步增加加密密钥的复杂性,降低被破解的风险。本公开下文实施方式中对此进行说明,在此暂不详述。
S330、利用加密密钥对明文数据进行加密得到密文数据,并将密文数据发送至对端设备。
本公开实施方式中,在得到加密密钥和明文数据之后,即可利用该加密密钥对明文数据进行加密,加密后的明文数据也即本公开所述的密文数据,然后,设备端10即可将加密得到的密文数据发送至对端设备20。
对端设备20在接收到密文数据之后,可以利用与加密过程相反的解密算法,对密文数据进行解密,即可得到明文数据。本公开下文对此进行说明,在此暂不详述。
在一些实施方式中,加密算法可以采用AES对称加密算法,AES是指高级加密标准,主要用于取代DES(Des symmetric encryption,数据加密算法),提高加密算法的安全性。本公开下文中对AES加密算法的过程进行说明,在此暂不详述。
通过上述可知,本公开实施方式中,在设备端与对端设备进行数据通信时,基于设备端的配网周期动态随机生成令牌码,与设备信息和用户信息无关,保持加密密钥的随机性和动态变化性,提高数据安全性。并且,对于不同设备端,由于各自的令牌码均是在配网周期随机生成的,因此可以保护不同设备间的密钥隔离,即使破解某个设备端的密钥,也无法威胁到其他设备端的数据安全。
如图4所示,在一些实施方式中,本公开示例的数据通信方法,根据令牌码生成加密密钥的过程,包括:
S410、获取当前配网周期对应的令牌码,以及设备端对应的唯一标识码。
S420、根据令牌码和唯一标识码,生成种子密钥。
S430、根据种子密钥进行哈希运算,得到加密密钥。
本公开实施方式中,以扫地机器人100的一个配网周期为例,例如在扫地机器人100被初始化之后,需要重新将扫地机器人100配置在局域网络中,对于具体的配网过程,本公开下文实施方式进行说明,在此暂不详述。
在对扫地机器人100重新配网完成之后,扫地机器人即可随机生成一串加密字符串,该加密字符串即作为当前配网周期的令牌码Token。
同时,对于一个设备端10,其包括至少一个用于标识自身信息的唯一标识码,例如设备标识码DID、MAC地址、设备SN码等。在本公开一些实施方式中,将令牌码Token和上述的一种或者多种设备唯一标识码共同组合作为种子密钥。
例如一个示例中,可以将“令牌码Token+设备标识码DID+设备MAC地址”的字符串组合,作为当前配网周期的种子密钥。当然,本领域技术人员可以理解,设备唯一标识码还可以是其他类型的标识码,并不局限于上述示例,而且种子密码的组合方式也不局限于上述示例,本公开对此不再枚举。
在得到种子密钥之后,可以对种子密钥进行哈希运算,得到最终用于对明文数据进行加密的加密密钥。哈希(Hash)运算是一种把任意长度的输入通过散列算法变换成固定长度的输出的算法,哈希运算是一种单向的映射算法,也即,仅能从输入映射至输出,而无法根据输出倒推处输入,哈希运算广泛应用于加密算法中。
在一些实施方式中,可以采用SHA256哈希算法,对上述的种子密钥进行哈希运算,然后取前16位字符作为加密密钥。当然,哈希运算的算法也可以采用其他任何适于实施的哈希算法,并不局限于本公开示例。
通过上述可知,本公开实施方式中,将配网周期的令牌码与设备端的唯一标识码结合作为种子密钥,进一步增加加密密钥的复杂性,提高数据安全。
在一些实施方式中,加密算法可采用AES对称加密算法,在AES算法中,为达到同文不同密的加密效果,需要采用初始化向量(IV, Initialization Vector)使得数据唯一化。使用初始向量IV之后,完全相同的数据可以被加密成不同的密文数据,可以防止第三方攻击者使用消息重放进行攻击,下面结合图5实施方式进行说明。
如图5所示,在一些实施方式中,本公开示例的数据通信方法,对明文数据进行加密得到密文数据的过程,包括:
S510、生成随机字符串作为初始向量。
S520、利用AES算法,根据加密密钥和初始向量,对明文数据进行加密,得到密文数据。
本公开实施方式中,AES分组加密首先需要生成初始向量IV,初始向量IV可以是预设长度的随机字符串。例如一个示例中,可以随机生成16byte的字符串作为初始向量IV。
在一个示例中,AES加密算法以AES128-CBC为例,密钥长度为128位(bit),CBC表示密码分组链接(Cipher Book Chaining)。在本示例中,可以根据前述示例得到的加密密钥和初始向量IV,利用AES算法对明文数据进行加密,得到加密后的密文数据。然后将初始向量IV以明文形式附加在加密包的包头。
本示例中,利用AES128-CBC算法进行加密的过程可表示为:
//iv生成
iv_encrypt=PRNG(len=16);
//使用token+did+mac计算加密密钥
key_seed=token|did|mac;
input_key=SHA256(key=key_seed,
key_size=sizeof(key_seed))[0:16];
//对明文数据进行AES128-CBC加密
map_data_encrypt=AES128-CBC(key=input_key,
mode=aes_encrypt,
input=map_data_plain,
iv=iv_encrypt);
//附加iv在加密包头部
map_data_encrypt_with_iv=iv_encrypt|map_data_encrypt;
对于AES算法具体的解算过程,本领域技术人员参照相关技术毫无疑问可以理解并充分实现,本公开对此不再展开赘述。
通过上述可知,本公开实施方式中,基于AES算法利用设备端配网周期对应的随机令牌码对明文数据进行加密,保持加密密钥的随机性和动态 变化性,提高数据安全性。并且,对于不同设备端,由于各自的令牌码均是在配网周期随机生成的,因此可以保护不同设备间的密钥隔离,即使破解某个设备端的密钥,也无法威胁到其他设备端的数据安全。
上述对设备端10对数据进行加密传输的过程进行了说明,在对端设备20接收到密文数据之后,需要对密文数据进行解密才能得到明文数据。本公开实施方式中,采用对称加密的方式对传输数据进行加密,也即加密密钥与解密密钥相同。因此,本公开实施方式中,对端设备20中也需要预先存储有加密密钥,实现对密文数据的解密。下面结合图6实施方式进行说明。
如图6所示,在一些实施方式中,本公开示例的数据通信方法,还包括:
S610、获取配网指令,并根据配网指令将设备端接入目标局域网络。
S620、响应于设备端配网成功,随机生成加密字符串作为当前配网周期的令牌码,并存储令牌码。
S630、将令牌码通过目标局域网络发送至对端设备,以供对端设备存储令牌码。
本公开实施方式中,在对设备端10配网完成后,设备端10随机生成当前配网周期的令牌码Token,并将令牌码Token存储在自身存储器中。同时,为实现对端设备20的解密,设备端10还需要将令牌码Token发送至对端设备20,从而对端设备20可以存储当前配网周期的令牌码Token。
具体而言,设备端10在初始化后,或者网络发生变化的情况下,需要进行重新配网。在一些实施方式中,设备端10可以获取配网指令,配网指令可包括例如网络名称、网络密码等信息,根据配网指令对设备端10进行网络配置,从而将设备端10接入目标局域网络。
以图2所示的扫地机器人100为例,在对扫地机器人100重新配网时,用户可通过手机200向扫地机器人100发送配网指令,配网指令可包括网络名称、网络密码等信息。扫地机器人100在接收到配网指令之后,即可根据配网指令接入到由扫地机器人100、手机200以及云服务器300的目标局域网络中,实现任意两者间的数据通信。
在完成上述配网过程之后,设备端10即配网成功,根据本公开前述可 知,在新的配网周期中,设备端10需要生成新的令牌码Token。因此,本公开实施方式中,设备端10可以随机生成一串加密字符串作为当前配网周期的令牌码Token,并且存储该令牌码Token。
可以理解,设备端10在生成当前配网周期对应的令牌码Token之后,即可利用该令牌码Token通过前述的方法步骤对明文数据进行加密后传输。但是,对端设备20在接收到加密的密文数据之后,若想对密文数据进行解密,同样需要该令牌码Token。
因此,在设备端10配网成功并生成当前配网周期对应的令牌码Token之后,可以通过目标局域网络将令牌码Token发送至对端设备20中,对端设备20在接收到令牌码Token之后,将令牌码Token存储在自身存储器中。
例如图2示例中,扫地机器人100在配网成功并且生成令牌码Token之后,可以通过无线网络将该令牌码Token发送至云服务器300和/或手机200,云服务器300或者手机200接收到该令牌码Token之后,可将该令牌码Token存储在自身存储器中。
由于对端设备20中存储有设备端10当前配网周期对应的令牌码Token,因此同样可以根据前述方法步骤生成加密密钥。例如一些实施方式中,可以将令牌码Token作为种子密钥,利用SHA256算法对种子密钥进行哈希运算,得到解密密钥。
值得说明的是,在前述一些实施方式中,种子密钥采用“令牌码+唯一标识码”的组合形式,因此,对端设备20不仅需要存储设备端10发送的令牌码Token,还需要存储设备端10发送的唯一标识码。总之,本领域技术人员可以理解,对于对称式加密,解密密钥的生成方式与加密密钥相同,因此,设备端10加密所需的数据,同样需要共享至对端设备20,以使对端设备20可以生成解密密钥。
对于数据解密的过程,本公开下文实施方式中进行说明,在此暂不详述。
通过上述可知,本公开实施方式中,在设备端与对端设备进行数据通信时,基于设备端的配网周期动态随机生成令牌码,与设备信息和用户信息无关,保持加密密钥的随机性和动态变化性,提高数据安全性。并且,对于不同设备端,由于各自的令牌码均是在配网周期随机生成的,因此可 以保护不同设备间的密钥隔离,即使破解某个设备端的密钥,也无法威胁到其他设备端的数据安全。
以图2所示的场景为例,扫地机器人100在向云服务器300发送地图数据的密文数据之后,云服务器300可以将地图数据进行存储。当扫地机器人100初始化之后,存储于扫地机器人100本地的地图数据被格式化,从而需要从云服务器300中下载地图数据,下面结合图7实施方式进行说明。
如图7所示,在一些实施方式中,本公开示例的数据通信方法,还包括:
S710、获取配网指令,并根据配网指令将设备端接入目标局域网络。
S720、响应于设备端配网成功,向对端设备发送数据下载请求,以使对端设备根据数据下载请求下载目标数据。
S730、接收对端设备发送的目标数据以及加密目标数据的令牌码,根据令牌码对目标数据进行解密,得到目标数据的明文数据。
以图2所示场景为例,扫地机器人100在上一个配网周期中,会随机生成第一令牌码,并且将第一令牌码共享至云服务器300和手机200,也即扫地机器人100、手机200以及云服务器300均存储有上一个配网周期对应的第一令牌码。
在上一个配网周期中,扫地机器人100利用第一令牌码通过前述的方法步骤对地图数据加密之后,将地图数据发送至云服务器300,并将地图数据存储在云服务器300中。
当扫地机器人100重新初始化之后,需要对扫地机器人进行重新配网,由于扫地机器人100初始化,因此本地存储的地图数据和第一令牌码均被格式化。
本公开实施方式中,扫地机器人100可以直接从云服务器300中下载上一个配网周期时存储地图数据,从而无需再重新构建地图数据。
在一些实施方式中,扫地机器人100在配网成功之后,即可向云服务器300发送数据下载请求,数据下载请求中可以携带有扫地机器人100的设备标识码。云服务器300在接收到数据下载请求之后,解析该数据下载请求,通过数据下载请求中携带的设备标识码找到存储的与之对应的地图 数据,也即本公开所述的目标数据。
云服务器300将目标数据发送至扫地机器人100,可以理解,若云服务器300存储的目标数据为密文数据,直接发送该目标数据即可。若云服务器300存储的目标数据为明文数据,可以通过上述加密过程,利用自身存储的第一令牌码对目标数据加密后发送。本领域技术人员对此可以理解,本公开不再赘述。
扫地机器人100接收到的目标数据为加密数据,但是扫地机器人100侧由于被初始化,因此没有上一个配网周期的第一令牌码。因此,本实施方式中,云服务器300在发送目标数据的同时,同时还需要将第一令牌码发送至扫地机器人100。从而,扫地机器人100在接收到目标数据和第一令牌码之后,即可利用第一令牌码对目标数据进行解密,得到明文的地图数据。
另外,由于扫地机器人100的重新配网,因此需要重新生成令牌码,然后将新的令牌码共享至云服务器300和手机200中,云服务器300和手机200可以利用新的令牌码对上一个配网周期存储的第一令牌码进行更新替换。
通过上述可知,本公开实施方式中,设备端在非首次接入网络时,可以从对端设备下载上一个配网周期中存储的目标数据,从而无需重新生成相关数据,提高设备端的工作效率。例如以扫地机器人为例,设备端可以直接从云服务器下载地图数据,无需重新构建地图数据,提高扫地机器人工作效率。
上述主要以设备端10的角度对本公开实施方式的数据通信方法进行了说明,本公开一些实施方式中,还提供了对端设备20侧的数据通信方法,下面结合实施方式进行说明。
如图8所示,在一些实施方式中,本公开示例提供的数据通信方法,可应用于对端设备中,包括:
S810、接收设备端发送的令牌码并存储。
本公开实施方式中,在设备端配网成功之后,设备端随机生成令牌码,并向对端设备发送该令牌码。对端设备在接收到该令牌码之后,可以将该令牌码存储在自身存储器中。
当然,可以理解,若设备端是首次接入网络,也即对端设备中没有存储过该设备端对应的令牌码,在接收到设备端发送的令牌码之后,对端设备直接存储该令牌码即可。
若设备端并非首次接入网络,也即对端设备中已经存储有上个配网周期对应的令牌码,在接收到设备端发送的当前配网周期令牌码之后,对端设备利用当前配网周期的令牌码对之前存储的令牌码进行更新替换即可。
S820、接收设备端发送的利用令牌码加密得到的密文数据。
本公开实施方式中,设备端在生成明文数据之后,可以利用当前配网周期的令牌码对明文数据进行加密,得到密文数据,并将密文数据发送至对端设备。本领域技术人员参照前述实施方式即可,本公开对此不再赘述。
例如图2示例中,扫地机器人100在生成地图数据之后,利用令牌码Token对地图数据进行加密后发送至云服务器300。
S830、根据自身存储的令牌码得到解密密钥,并利用解密密钥对密文数据进行解密,得到密文数据对应的明文数据。
本公开实施方式中,由于对端设备中已经预先存储有当前配网周期的令牌码Token,从而可以利用令牌码Token对接收到的密文数据进行解密,即可得到明文数据。
在一些实施方式中,加密密钥是设备端10基于令牌码Token进行哈希(Hash)运算得到。从而,在对端设备20侧,同样可以基于令牌码Token进行哈希运算,即得到解密密钥,也即加密密钥与解密密钥相同。在得到解密密钥之后,对端设备20即可利用解密密钥对密文数据进行解密,得到明文数据。
在另一些实施方式中,加密密钥是设备端基于“令牌码+唯一标识码”进行哈希(Hash)运算得到。从而,在对端设备20侧,同样需要基于“令牌码+唯一标识码”进行哈希运算,来计算得到解密密钥。下面结合图9实施方式进行说明。
如图9所示,在一些实施方式中,本公开示例的数据通信方法,还包括:
S910、接收设备端发送的唯一标识码并存储。
S920、根据自身存储的令牌码和唯一标识码,生成解密密钥。
S930、利用解密密钥对密文数据进行解密,得到明文数据。
本公开实施方式中,设备端10在配网成功之后,在向对端设备20发送令牌码的同时,还需要向对端设备20发送唯一标识码。唯一标识码可以包括设备设备标识码DID、MAC地址、设备SN码等,本公开对此不作限制。对端设备20在接收到令牌码和设备唯一标识码之后,可以将令牌码和唯一标识码存储在自身存储器中。
对端设备20在接收到设备端10发送的密文数据之后,即可根据自身存储的令牌码和唯一标识码,生成对应的解密密钥。本公开实施方式中,解密密钥与加密密钥完全相同,因此,对端设备20侧生成解密密钥的方式,应当与设备端10生成加密密钥的方式保持一致。
例如一个示例中,设备端10将“令牌码Token+设备标识码DID+设备MAC地址”的字符串组合作为种子密钥,并且利用SHA256算法对种子密钥进行哈希运算后取前16位作为加密密钥。同样,对端设备20侧也将预先接收并存储的“令牌码Token+设备标识码DID+设备MAC地址”的字符串组合作为种子密钥,并且利用SHA256算法对种子密钥进行哈希运算后取前16位作为解密密钥。
在得到解密密钥之后,即可利用解密密钥对密文数据进行解密,得到明文数据。可以理解,解密算法与加密算法采用相同的算法,例如一些实施方式中,设备端10采用AES128-CBC加密算法,从而对端设备20同样需要采用AES128-CBC解密算法,下面结合图10实施方式进行说明。
如图10所示,在一些实施方式中,本公开示例的数据通信方法,对密文数据进行解密的过程包括:
S1010、获取密文数据携带的初始向量。
S1020、利用AES算法,根据解密密钥和初始向量对密文数据进行解密,得到明文数据。
结合前述图5实施方式可知,设备端10在加密时,利用随机生成的初始向量IV和加密密钥对明文数据进行加密,并且将初始向量IV附加在加密包的包头。
对端设备20在得到密文数据之后,可以从密文数据的加密包的包头解析得到初始向量IV,同时根据自身存储的令牌码Token以及唯一标识码生 成解密密钥,然后利用AES128-CBC算法,根据初始向量IV和解密密钥对密文数据进行解密,即可得到明文数据。
在上述示例中,利用AES128-CBC算法进行解密的过程可表示为:
//iv解析
iv_decrypt=map_data_encrypt_with_iv[0:16];
//package解析
map_data_encrypt=map_data_encrypt_with_iv[16:];
//使用token+did+mac计算解密密钥
key_seed=token|did|mac;
output_key=SHA256(key=key_seed,
key_size=sizeof(key_seed))[0:16];
//对密文数据进行AES128-CBC解密
map_data_plain_2=AES128-CBC(key=output_key,
mode=aes_decrypt,
input=map_data_encrypt,
iv=iv_decrypt);
通过上述可知,本公开实施方式中,在设备端与对端设备进行数据通信时,基于设备端的配网周期动态随机生成令牌码,与设备信息和用户信息无关,保持加密密钥的随机性和动态变化性,提高数据安全性。并且,对于不同设备端,由于各自的令牌码均是在配网周期随机生成的,因此可以保护不同设备间的密钥隔离,即使破解某个设备端的密钥,也无法威胁到其他设备端的数据安全。
在一些实施方式中,如前所述,在设备端10非首次接入网络时,对端设备20侧可能已经存储有设备端10所需的相关数据,从而设备端10可以在重新配网之后,从对端设备20侧下载所需的相关数据,无需重新生成数据,提高工作效率。下面结合图11实施方式进行说明。
如图11所示,在一些实施方式中,本公开示例的数据通信方法,包括:
S1110、接收设备端发送的数据下载请求,根据数据下载请求下载目标数据。
S1120、将目标数据以及当前存储的令牌码发送至设备端。
S1130、接收设备端发送的更新令牌码,并利用更新令牌码对当前存储的令牌码进行替换更新。
仍以图2所示的场景为例,扫地机器人100在上一个配网周期中,会随机生成第一令牌码,并且将第一令牌码共享至云服务器300和手机200, 也即扫地机器人100、手机200以及云服务器300均存储有上一个配网周期对应的第一令牌码。
在上一个配网周期中,扫地机器人100利用第一令牌码通过前述的方法步骤对地图数据加密之后,将地图数据发送至云服务器300,并将地图数据存储在云服务器300中。
当扫地机器人100重新初始化之后,需要对扫地机器人进行重新配网,扫地机器人100在配网成功之后,即可向云服务器300发送数据下载请求,数据下载请求中可以携带有扫地机器人100的设备标识码。
云服务器300在接收到数据下载请求之后,解析该数据下载请求,通过数据下载请求中携带的设备标识码找到存储的与之对应的地图数据,也即本公开所述的目标数据,然后将目标数据发送至扫地机器人100即可。当然,可以理解,若扫地机器人100为首次接入网络,云服务器300并未存储其对应的地图数据,此时云服务器300只需要向扫地机器人100返回数据为空即可。
扫地机器人100侧由于被初始化,因此没有上一个配网周期的第一令牌码,也就无法对目标数据进行解密。因此,本公开实施方式中,云服务器300在发送目标数据的同时,同时还需要将第一令牌码发送至扫地机器人100。从而,扫地机器人100在接收到目标数据和第一令牌码之后,即可利用第一令牌码对目标数据进行解密,得到明文的地图数据。
另外,由于扫地机器人100的重新配网,因此需要重新生成令牌码,也即当前配网周期对应的更新令牌码。扫地机器人100将更新令牌码发送至云服务器300,云服务器300利用更新令牌码对当前存储的上一个配网周期的第一令牌码进行更新替换。
通过上述可知,本公开实施方式中,设备端在非首次接入网络时,可以从对端设备下载上一个配网周期中存储的目标数据,从而无需重新生成相关数据,提高设备端的工作效率。例如以扫地机器人为例,设备端可以直接从云服务器下载地图数据,无需重新构建地图数据,提高扫地机器人工作效率。
图12示出了本公开一些实施方式中数据通信方法的交互流程图,下面以设备端为扫地机器人100、对端设备为云服务器300为例进行说明。
如图12所示,在一些实施方式中,本公开示例的数据通信方法,包括:
S01、响应于扫地机器人配网成功,生成第一令牌码。
在扫地机器人100一侧,在扫地机器人100首次接入网络,或者初始化,或者网络发生变化的情况下,需要对扫地机器人100进行重新配网。在扫地机器人100配网成功之后,扫地机器人100可随机生成一串加密字符串,也即当前配网周期对应的第一令牌码。
在一个示例中,扫地机器人随机生成16Byte的随机字符串作为第一令牌码。
S02、扫地机器人发送第一令牌码、设备DID以及MAC地址至云服务器。
扫地机器人100需要将计算密钥所需的第一令牌码、设备DIDI以及MAC地址发送至云服务器300一侧。
S03、云服务器存储第一令牌码、设备DID以及MAC地址。
云服务器300在接收到扫地机器人100发送的第一令牌码、设备DIDI以及MAC地址之后,可以将第一令牌码、设备DIDI以及MAC地址存储在自身存储器中,以供后续计算密钥调用。
S04、扫地机器人生成明文的地图数据。
扫地机器人100在移动过程中,可以基于IMU、激光雷达、视觉传感器、ToF传感器等器件采集的数据,利用SLAM算法构建得到当前所处空间的地图数据。
S05、扫地机器人利用AES算法根据第一令牌码、设备DID以及MAC地址对地图数据进行加密,得到密文数据。
本实施方式中,参见前述的加密过程可知,扫地机器人100可以将“第一令牌码+设备DID+MAC地址”组合作为种子密钥,然后利用SHA256哈希算法对种子密钥进行哈希运算得到加密密钥。同时,扫地机器人100随机生成一串16Byte字符串作为初始向量IV。
然后,扫地机器人100可以基于AES128-CBC算法,根据初始向量IV和加密密钥对地图数据进行加密,然后将初始向量IV附在加密包的包头,得到密文数据。
S06、扫地机器人发送密文数据至云服务器300。
扫地机器人100将加密之后的密文数据发送至云服务器300。
S07、云服务器300解密并存储地图数据。
在一些实施方式中,云服务器300在接收到密文数据之后,可以直接将密文数据进行存储。在另一些实施方式中,云服务器300在接收到密文数据之后,也可以将密文数据进行解密之后存储。
在一些实施方式中,可以采用FDS/KS3云服务器进行地图数据的存储,并且,扫地机器人100可能会同时产生多种不同类型的地图数据需要存储,例如永久地图、临时地图等。本公开实施方式中,对于这些不同类型的地图数据传输,均可以采用上述的数据通信方法进行数据加密和传输。
地图数据在上传至FDS/KS3服务器存储之后,上传地址连接由设备端上传至云服务器300,在需要进行地图数据下载时,可以根据下载连接从FDS/KS3服务器下载得到地图数据。本领域技术人员结合相关技术知识毫无疑问可以理解并充分实现,本公开对此不再赘述。
S08、响应于扫地机器人重新配网成功,扫地机器人生成第二令牌码。
在扫地机器人100被初始化或者网络发生变化的情况下,需要对扫地机器人100进行重新配网,在重新配网完成后,扫地机器人可重新生成令牌码Token,也即第二令牌码。
S09、扫地机器人发送数据下载请求和第二令牌码至云服务器。
扫地机器人可以从云服务器下载上一个配网周期发送的地图数据,从而,扫地机器人100在重新配网完成且生成第二令牌码之后,可以向云服务器300发送数据下载请求和第二令牌码。
S10、云服务器根据数据下载请求确定目标数据。
云服务器300接收到数据下载请求之后,解析该数据下载请求,得到扫地机器人的设备唯一标识,根据该设备唯一标识由存储器中确定上一个配网周期存储的地图数据,也即目标数据。
S11、云服务器发送目标数据和第一令牌码至扫地机器人。
由于扫地机器人100重新配网,因此扫地机器人100没有用来解密目标数据的第一令牌码。从而,云服务器300在发送目标数据的同时,将自身存储的上个配网周期的第一令牌码也发送至扫地机器人100。
S12、扫地机器人解密目标数据得到地图数据。
扫地机器人100在接收到目标数据和第一令牌码之后,可以根据“第一令牌码+设备DID+MAC地址”组合得到种子密钥,然后利用SHA256哈希算法对种子密钥进行哈希运算得到解密密钥。之后解析目标数据加密包的包头得到初始向量IV,最后基于AES128-CBC算法根据初始向量IV和解密密钥对目标数据解密,得到地图数据。
S13、云服务器利用第二令牌码对第一令牌码进行替换更新。
由于扫地机器人重新配网,令牌码发送变化,上一个配网周期的第一令牌码失效,因此云服务器300利用接收到的第二令牌码对当前存储的第一令牌码进行替换更新。
上述仅以扫地机器人100和云服务器300的数据通信进行了说明,对于扫地机器人100与手机200的通信过程与之相同,本领域技术人员在上述公开基础上毫无疑问可以理解并充分实施,本公开对此不再赘述。
通过上述可知,本公开实施方式中,在设备端与对端设备进行数据通信时,基于设备端的配网周期动态随机生成令牌码,与设备信息和用户信息无关,保持加密密钥的随机性和动态变化性,提高数据安全性。并且,对于不同设备端,由于各自的令牌码均是在配网周期随机生成的,因此可以保护不同设备间的密钥隔离,即使破解某个设备端的密钥,也无法威胁到其他设备端的数据安全。
本公开实施方式提供了一种数据通信装置,在一些实施方式中,本公开提供的数据通信装置可以应用于设备端。
如图13所示,在一些实施方式中,本公开示例的数据通信装置,包括:
数据生成模块1,被配置为生成待传输的明文数据;
密钥生成模块2,被配置为根据当前配网周期中设备端生成的令牌码,生成加密密钥;令牌码是设备端在每个配网周期随机生成的加密字符串;
数据加密模块3,被配置为利用加密密钥对明文数据进行加密得到密文数据,并将密文数据发送至对端设备。
通过上述可知,本公开实施方式中,在设备端与对端设备进行数据通信时,基于设备端的配网周期动态随机生成令牌码,与设备信息和用户信息无关,保持加密密钥的随机性和动态变化性,提高数据安全性。并且,对于不同设备端,由于各自的令牌码均是在配网周期随机生成的,因此可 以保护不同设备间的密钥隔离,即使破解某个设备端的密钥,也无法威胁到其他设备端的数据安全。
在一些实施方式中,密钥生成模块2,被配置为:
获取当前配网周期对应的令牌码,以及设备端对应的唯一标识码;
根据令牌码和唯一标识码,生成种子密钥;
根据种子密钥进行哈希运算,得到加密密钥。
在一些实施方式中,唯一标识码包括设备标识码和/或设备MAC地址。
在一些实施方式中,数据加密模块3,被配置为:
生成随机字符串作为初始向量;
利用AES算法,根据加密密钥和初始向量,对明文数据进行加密,得到密文数据。
在一些实施方式中,本公开的数据通信装置,还包括令牌配置模块,令牌配置模块被配置为:
获取配网指令,并根据配网指令将设备端接入目标局域网络;
响应于设备端配网成功,随机生成加密字符串作为当前配网周期的令牌码,并存储令牌码;
将令牌码通过目标局域网络发送至对端设备,以供对端设备存储令牌码。
在一些实施方式中,本公开的数据通信装置,还包括第一数据下载模块,第一数据下载模块被配置为:
响应于设备端配网成功,向对端设备发送数据下载请求,以使对端设备根据数据下载请求下载目标数据;
接收对端设备发送的目标数据以及加密目标数据的令牌码,根据令牌码对目标数据进行解密,得到目标数据的明文数据。
在一些实施方式中,设备端包括扫地机器人;数据生成模块1被配置为:
通过扫地机器人的传感器采集当前场景的地图数据,并根据地图数据得到明文数据。
通过上述可知,本公开实施方式中,在设备端与对端设备进行数据通信时,基于设备端的配网周期动态随机生成令牌码,与设备信息和用户信 息无关,保持加密密钥的随机性和动态变化性,提高数据安全性。并且,对于不同设备端,由于各自的令牌码均是在配网周期随机生成的,因此可以保护不同设备间的密钥隔离,即使破解某个设备端的密钥,也无法威胁到其他设备端的数据安全。
本公开实施方式提供了一种数据通信装置,在一些实施方式中,本公开提供的数据通信装置可以应用于对端设备。
如图14所示,在一些实施方式中,本公开示例的数据通信装置,包括:
第一接收模块4,被配置为接收设备端发送的令牌码并存储;令牌码是设备端在每个配网周期随机生成的加密字符串;
第二接收模块5,被配置为接收设备端发送的利用令牌码加密得到的密文数据;
解密模块6,被配置为根据自身存储的令牌码得到解密密钥,并利用解密密钥对密文数据进行解密,得到密文数据对应的明文数据。
在一些实施方式中,第一接收模块4被配置为:
接收设备端发送的唯一标识码并存储;
解密模块6被配置为:
根据自身存储的令牌码和唯一标识码,生成解密密钥;
利用解密密钥对密文数据进行解密,得到明文数据。
在一些实施方式中,解密模块6被配置为:
获取密文数据携带的初始向量;
利用AES算法,根据解密密钥和初始向量对密文数据进行解密,得到明文数据。
在一些实施方式中,本公开的数据通信装置,还包括第二数据下载模块,第二数据下载模块被配置为:
接收设备端发送的数据下载请求,根据数据下载请求下载目标数据;
将目标数据以及当前存储的令牌码发送至设备端;
接收设备端发送的更新令牌码,并利用更新令牌码对当前存储的令牌码进行替换更新。
在一些实施方式中,对端设备包括云端服务器或者移动终端。
通过上述可知,本公开实施方式中,设备端在非首次接入网络时,可 以从对端设备下载上一个配网周期中存储的目标数据,从而无需重新生成相关数据,提高设备端的工作效率。例如以扫地机器人为例,设备端可以直接从云服务器下载地图数据,无需重新构建地图数据,提高扫地机器人工作效率。
在一些实施方式中,本公开实施方式提供了一种数据通信系统,包括:
处理器;和
存储器,存储有计算机指令,计算机指令用于使处理器执行根据第一方面或者第二方面中任意实施方式的方法。
在一些实施方式中,本公开实施方式提供了一种存储介质,存储有计算机指令,计算机指令用于使计算机执行根据第一方面或者第二方面中任意实施方式的方法。
具体而言,图15示出了适于用来实现本公开方法的数据通信系统600的结构示意图,通过图15所示系统,可实现上述处理器及存储介质相应功能。
如图15所示,数据通信系统600包括处理器601,其可以根据存储在存储器602中的程序或者从存储部分608加载到存储器602中的程序而执行各种适当的动作和处理。在存储器602中,还存储有数据通信系统600操作所需的各种程序和数据。处理器601和存储器602通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。
特别地,根据本公开的实施方式,上文方法过程可以被实现为计算机软件程序。例如,本公开的实施方式包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,计算机程序包含用于执行上述方法的程序代码。在这样的实施方式中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。
附图中的流程图和框图,图示了按照本公开各种实施方式的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
显然,上述实施方式仅仅是为清楚地说明所作的举例,而并非对实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。而由此所引伸出的显而易见的变化或变动仍处于本公开创造的保护范围之中。

Claims (16)

  1. 一种数据通信方法,其特征在于,应用于设备端,所述方法包括:
    生成待传输的明文数据;
    根据当前配网周期中所述设备端生成的令牌码,生成加密密钥;所述令牌码是所述设备端在每个所述配网周期随机生成的加密字符串;
    利用所述加密密钥对所述明文数据进行加密得到密文数据,并将所述密文数据发送至对端设备。
  2. 根据权利要求1所述的方法,其特征在于,所述根据当前配网周期中所述设备端生成的令牌码,生成加密密钥,包括:
    获取当前配网周期对应的所述令牌码,以及所述设备端对应的唯一标识码;
    根据所述令牌码和所述唯一标识码,生成种子密钥;
    根据所述种子密钥进行哈希运算,得到所述加密密钥。
  3. 根据权利要求2所述的方法,其特征在于,
    所述唯一标识码包括设备标识码和/或设备MAC地址。
  4. 根据权利要求1所述的方法,其特征在于,所述利用所述加密密钥对所述明文数据进行加密得到密文数据,包括:
    生成随机字符串作为初始向量;
    利用AES算法,根据所述加密密钥和所述初始向量,对所述明文数据进行加密,得到所述密文数据。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,还包括:
    获取配网指令,并根据所述配网指令将所述设备端接入目标局域网络;
    响应于所述设备端配网成功,随机生成加密字符串作为当前配网周期的所述令牌码,并存储所述令牌码;
    将所述令牌码通过所述目标局域网络发送至所述对端设备,以供所述对端设备存储所述令牌码。
  6. 根据权利要求5所述的方法,其特征在于,还包括:
    响应于所述设备端配网成功,向所述对端设备发送数据下载请求,以使所述对端设备根据所述数据下载请求下载目标数据;
    接收所述对端设备发送的目标数据以及加密所述目标数据的令牌码,根据所述令牌码对所述目标数据进行解密,得到所述目标数据的明文数据。
  7. 根据权利要求1所述的方法,其特征在于,所述设备端包括扫地机器人;所述生成待传输的明文数据,包括:
    通过所述扫地机器人的传感器采集当前场景的地图数据,并根据所述地图数据得到所述明文数据。
  8. 一种数据通信方法,其特征在于,应用于对端设备,所述方法包括:
    接收设备端发送的令牌码并存储;所述令牌码是所述设备端在每个配网周期随机生成的加密字符串;
    接收设备端发送的利用所述令牌码加密得到的密文数据;
    根据自身存储的所述令牌码得到解密密钥,并利用所述解密密钥对所述密文数据进行解密,得到所述密文数据对应的明文数据。
  9. 根据权利要求8所述的方法,其特征在于,还包括:
    接收设备端发送的唯一标识码并存储;
    所述根据自身存储的所述令牌码得到解密密钥,并利用所述解密密钥对所述密文数据进行解密,得到所述密文数据对应的明文数据,包括:
    根据自身存储的所述令牌码和所述唯一标识码,生成解密密钥;
    利用所述解密密钥对所述密文数据进行解密,得到所述明文数据。
  10. 根据权利要求8所述的方法,其特征在于,所述利用所述解密密钥对所述密文数据进行解密,得到所述密文数据对应的明文数据,包括:
    获取所述密文数据携带的初始向量;
    利用AES算法,根据所述解密密钥和所述初始向量对所述密文数据进 行解密,得到所述明文数据。
  11. 根据权利要求8至10任一项所述的方法,其特征在于,还包括:
    接收设备端发送的数据下载请求,根据所述数据下载请求下载目标数据;
    将所述目标数据以及当前存储的所述令牌码发送至所述设备端;
    接收所述设备端发送的更新令牌码,并利用所述更新令牌码对当前存储的所述令牌码进行替换更新。
  12. 根据权利要求8所述的方法,其特征在于,
    所述对端设备包括云端服务器或者移动终端。
  13. 一种数据通信装置,其特征在于,应用于设备端,所述装置包括:
    数据生成模块,被配置为生成待传输的明文数据;
    密钥生成模块,被配置为根据当前配网周期中所述设备端生成的令牌码,生成加密密钥;所述令牌码是所述设备端在每个所述配网周期随机生成的加密字符串;
    数据加密模块,被配置为利用所述加密密钥对所述明文数据进行加密得到密文数据,并将所述密文数据发送至对端设备。
  14. 一种数据通信装置,其特征在于,应用于对端设备,所述装置包括:
    第一接收模块,被配置为接收设备端发送的令牌码并存储;所述令牌码是所述设备端在每个配网周期随机生成的加密字符串;
    第二接收模块,被配置为接收设备端发送的利用所述令牌码加密得到的密文数据;
    解密模块,被配置为根据自身存储的所述令牌码得到解密密钥,并利用所述解密密钥对所述密文数据进行解密,得到所述密文数据对应的明文数据。
  15. 一种数据通信系统,其特征在于,包括:
    处理器;和
    存储器,存储有计算机指令,所述计算机指令用于使所述处理器执行根据权利要求1至7任一项所述的方法,或者执行根据权利要求8至12任一项所述的方法。
  16. 一种存储介质,其特征在于,存储有计算机指令,所述计算机指令用于使计算机执行根据权利要求1至7任一项所述的方法,或者执行根据权利要求8至12任一项所述的方法。
PCT/CN2022/099544 2022-06-17 2022-06-17 数据通信方法及装置 WO2023240623A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2022/099544 WO2023240623A1 (zh) 2022-06-17 2022-06-17 数据通信方法及装置
CN202280004226.1A CN117597891A (zh) 2022-06-17 2022-06-17 数据通信方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/099544 WO2023240623A1 (zh) 2022-06-17 2022-06-17 数据通信方法及装置

Publications (1)

Publication Number Publication Date
WO2023240623A1 true WO2023240623A1 (zh) 2023-12-21

Family

ID=89192896

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/099544 WO2023240623A1 (zh) 2022-06-17 2022-06-17 数据通信方法及装置

Country Status (2)

Country Link
CN (1) CN117597891A (zh)
WO (1) WO2023240623A1 (zh)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105554912A (zh) * 2015-12-10 2016-05-04 成都工百利自动化设备有限公司 基于虚拟sim/usim的物联网终端
US20160142205A1 (en) * 2014-11-19 2016-05-19 Honeywell International Inc. Symmetric secret key protection
CN107872312A (zh) * 2016-09-26 2018-04-03 北京京东尚科信息技术有限公司 对称密钥动态生成方法、装置、设备及系统
US20210258158A1 (en) * 2020-02-17 2021-08-19 Eclypses, Inc. System and method for securely transferring data using generated encryption keys
CN113630246A (zh) * 2021-07-28 2021-11-09 珠海格力电器股份有限公司 一种智能家居控制方法、装置、电子设备及存储介质
US20210367775A1 (en) * 2020-05-21 2021-11-25 Sectigo, Inc. Devices, Systems, And Methods For Providing Security To IoT Networks And Sensors
CN113794702A (zh) * 2021-08-31 2021-12-14 杭州控客信息技术有限公司 智能家居系统中通信高级别加密方法
WO2022021940A1 (zh) * 2020-07-25 2022-02-03 华为技术有限公司 一种预共享密钥psk的更新方法及装置
CN114389804A (zh) * 2021-12-30 2022-04-22 中国电信股份有限公司 一种智能终端控制方法、装置、电子设备及存储介质
CN114422143A (zh) * 2022-01-13 2022-04-29 中国平安人寿保险股份有限公司 基于人工智能的数据动态加密方法、装置、设备及介质

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160142205A1 (en) * 2014-11-19 2016-05-19 Honeywell International Inc. Symmetric secret key protection
CN105554912A (zh) * 2015-12-10 2016-05-04 成都工百利自动化设备有限公司 基于虚拟sim/usim的物联网终端
CN107872312A (zh) * 2016-09-26 2018-04-03 北京京东尚科信息技术有限公司 对称密钥动态生成方法、装置、设备及系统
US20210258158A1 (en) * 2020-02-17 2021-08-19 Eclypses, Inc. System and method for securely transferring data using generated encryption keys
US20210367775A1 (en) * 2020-05-21 2021-11-25 Sectigo, Inc. Devices, Systems, And Methods For Providing Security To IoT Networks And Sensors
WO2022021940A1 (zh) * 2020-07-25 2022-02-03 华为技术有限公司 一种预共享密钥psk的更新方法及装置
CN113630246A (zh) * 2021-07-28 2021-11-09 珠海格力电器股份有限公司 一种智能家居控制方法、装置、电子设备及存储介质
CN113794702A (zh) * 2021-08-31 2021-12-14 杭州控客信息技术有限公司 智能家居系统中通信高级别加密方法
CN114389804A (zh) * 2021-12-30 2022-04-22 中国电信股份有限公司 一种智能终端控制方法、装置、电子设备及存储介质
CN114422143A (zh) * 2022-01-13 2022-04-29 中国平安人寿保险股份有限公司 基于人工智能的数据动态加密方法、装置、设备及介质

Also Published As

Publication number Publication date
CN117597891A (zh) 2024-02-23

Similar Documents

Publication Publication Date Title
US11316677B2 (en) Quantum key distribution node apparatus and method for quantum key distribution thereof
US11323247B2 (en) Methods and systems for secure data communication
AU2018355917B2 (en) Methods and systems for secure data communication
US11575660B2 (en) End-to-end encryption for personal communication nodes
JP3263878B2 (ja) 暗号通信システム
EP3203698B1 (en) Resource access method and apparatus
WO2010064666A1 (ja) 鍵配布システム
CN104023013A (zh) 数据传输方法、服务端和客户端
US11736304B2 (en) Secure authentication of remote equipment
CN105993146A (zh) 不访问私钥而使用公钥密码的安全会话能力
CN103036872B (zh) 数据传输的加密和解密方法、设备及系统
US10419212B2 (en) Methods, systems, apparatuses, and devices for securing network communications using multiple security protocols
US11606193B2 (en) Distributed session resumption
CN111192050B (zh) 一种数字资产私钥存储提取方法及装置
US11765133B2 (en) Authentication scheme in a virtual private network
CN109905310B (zh) 数据传输方法、装置、电子设备
WO2023240623A1 (zh) 数据通信方法及装置
CN108809632B (zh) 一种量子安全套接层装置及系统
CN111797417A (zh) 文件的上传方法和装置、存储介质及电子装置
US11943367B1 (en) Generic cryptography wrapper
KR102303364B1 (ko) 블록체인 기반의 트랜잭션 처리 방법 및 트랜잭션 처리 시스템
US11979382B2 (en) Secure connections between servers in a virtual private network
CN115720160B (zh) 一种基于量子密钥的数据通信方法及系统
US20240098067A1 (en) Utilization of multiple exit internet protocol addresses in a virtual private network
KR101594897B1 (ko) 사물 인터넷에서 경량 사물간 보안 통신 세션 개설 방법 및 보안 통신 시스템

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 202280004226.1

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22946306

Country of ref document: EP

Kind code of ref document: A1