CN109194701B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN109194701B
CN109194701B CN201811457359.6A CN201811457359A CN109194701B CN 109194701 B CN109194701 B CN 109194701B CN 201811457359 A CN201811457359 A CN 201811457359A CN 109194701 B CN109194701 B CN 109194701B
Authority
CN
China
Prior art keywords
target data
key
information
data
parameters
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201811457359.6A
Other languages
Chinese (zh)
Other versions
CN109194701A (en
Inventor
张立国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baiwu Tech Co ltd
Original Assignee
Beijing Baiwu Tech Co ltd
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 Beijing Baiwu Tech Co ltd filed Critical Beijing Baiwu Tech Co ltd
Priority to CN201811457359.6A priority Critical patent/CN109194701B/en
Publication of CN109194701A publication Critical patent/CN109194701A/en
Application granted granted Critical
Publication of CN109194701B publication Critical patent/CN109194701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Telephonic Communication Services (AREA)
  • Storage Device Security (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a data processing method and a device, comprising the following steps: the server receives encrypted data information from the Internet of things equipment; decrypting the encrypted data information by adopting a preset algorithm and utilizing a first key stored in advance to obtain target data and parameter information; acquiring a second key by adopting a preset algorithm and utilizing the length of the target data and the first key; and acquiring the corresponding relation between the target data and the parameter according to the second key and the parameter information. According to the technical scheme provided by the embodiment of the invention, the server can acquire the information of the parameter of the data from the second secret key only by using the preset algorithm which is determined with the terminal in advance, so that the corresponding meaning of the data is determined, therefore, an attacker is prevented from acquiring the meaning of the data to tamper the data, and the safety of the data is ensured.

Description

Data processing method and device
Technical Field
The embodiment of the invention relates to the technical field of Internet of things, in particular to a data processing method and device.
Background
The narrowband Internet of Things (NB-IoT) is a new narrowband Power Wide Area Network (LPWAN) technology for narrowband cellular communication, and the technology is widely applied to the Low-rate service market. However, as the security of the network environment becomes increasingly poor, NB-IoT technology also faces security threats such as data tampering. Therefore, how to ensure the security of the device data has become an urgent problem to be solved in practical application of NB-IoT technology.
In the related art, when the NB-IoT device transmits data to the server, the NB-IoT device encrypts the data and the parameter to which the data belongs, and then transmits the encrypted data and the parameter to which the data belongs to the server.
However, once an attacker intercepts and decrypts the encrypted data and the parameters to which the data belongs, the method can determine the meaning of the corresponding data according to the parameters to which the data belongs, and further carry out data tampering, so that the safety of the data cannot be guaranteed.
Disclosure of Invention
In order to solve the technical problem, embodiments of the present invention provide a data processing method and apparatus, which can prevent an attacker from obtaining the meaning of data and then tampering the data, and ensure the security of the data.
To achieve the object of the embodiment of the present invention, an embodiment of the present invention provides a data processing method, including:
the server receives encrypted data information from the Internet of things equipment; the encrypted data information is generated by the internet of things equipment by adopting a preset algorithm and encrypting target data and parameter information by using a first secret key, the first secret key is generated by the internet of things equipment by adopting the preset algorithm and by using the length of the target data and a second secret key, the second secret key is generated by the internet of things equipment according to the number of parameters to which the target data belongs and identification information, and the parameter information is obtained by splicing the parameters to which the target data belongs by the internet of things equipment;
decrypting the encrypted data information by adopting the preset algorithm and utilizing a first key stored in advance to obtain the target data and the parameter information;
acquiring the second key by adopting the preset algorithm and utilizing the length of the target data and the first key;
and acquiring the corresponding relation between the target data and the parameter according to the second key and the parameter information.
The second key is generated by splicing the number of parameters and the identification information of the target data by the Internet of things equipment;
the obtaining of the corresponding relationship between the target data and the parameter according to the second key and the parameter information includes:
acquiring the number and identification information of parameters to which the target data belongs according to the second key;
segmenting the parameter information according to the number of the parameters to which the target data belongs and the identification information to obtain the parameters of the target data;
and respectively corresponding the target data with the affiliated parameters of the target data to obtain the corresponding relation between the target data and the affiliated parameters.
The identification information of the parameter to which the target data belongs includes: and the initial letter of the parameter to which the target data belongs.
The preset algorithm comprises the following steps: the national secret 4 algorithm.
The embodiment of the invention provides a data processing method, which comprises the following steps:
the Internet of things equipment generates a second key according to the number of parameters to which the target data to be transmitted belong and the identification information, and splices the parameters to which all the target data belong to obtain parameter information;
generating a first key by adopting a preset algorithm and utilizing the length of the target data and the second key;
encrypting the target data and the parameter information by adopting the preset algorithm and utilizing the first key to obtain encrypted data information;
and sending the encrypted data information to a server.
The generating a second key according to the number of the parameters to which the target data to be transmitted belongs and the identification information includes:
and splicing the number of the parameters to which the target data belongs and the identification information of the parameters to which the target data belongs to obtain the second key.
The identification information of the parameter to which the target data belongs includes: the first letter of the parameter of the target data.
The preset algorithm comprises the following steps: the national secret 4 algorithm.
An embodiment of the present invention provides a server, including:
the receiving module is used for receiving encrypted data information from the Internet of things equipment; the encrypted data information is generated by the internet of things equipment by adopting a preset algorithm and encrypting target data and parameter information by using a first secret key, the first secret key is generated by the internet of things equipment by adopting the preset algorithm and by using the length of the target data and a second secret key, the second secret key is generated by the internet of things equipment according to the number of parameters to which the target data belongs and identification information, and the parameter information is obtained by splicing the parameters to which the target data belongs by the internet of things equipment;
the first processing module decrypts the encrypted data information by adopting the preset algorithm and utilizing a first key stored in advance to obtain the target data and the parameter information;
the first processing module is further configured to obtain the second key by using the preset algorithm and using the length of the target data and the first key;
the first processing module is further configured to obtain a corresponding relationship between the target data and the parameter according to the second key and the parameter information.
The embodiment of the invention provides an Internet of things device, which comprises:
the second processing module is used for generating a second key according to the number of parameters to which the target data to be transmitted belong and the identification information, and splicing the parameters to which all the target data belong to obtain parameter information;
the second processing module is further configured to generate a first key by using a preset algorithm and using the length of the target data and the second key;
the second processing module is further configured to encrypt the target data and the parameter information by using the preset algorithm and the first key to obtain encrypted data information;
and the sending module is used for sending the encrypted data information to a server.
Additional features and advantages of embodiments of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of the invention. The objectives and other advantages of the embodiments of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the examples of the application do not constitute a limitation of the embodiments of the invention.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another data processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating a further data processing method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an internet of things device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
An embodiment of the present invention provides a data processing method, as shown in fig. 1, the method includes:
step 101, a server receives encrypted data information from an internet of things device.
The encrypted data information is generated by the internet of things equipment through a preset algorithm and by utilizing a first secret key to encrypt target data and parameter information, the first secret key is generated by the internet of things equipment through the preset algorithm and utilizing the length of the target data and a second secret key, the second secret key is generated by the internet of things equipment according to the number of parameters to which the target data belong and identification information, and the parameter information is obtained by splicing the parameters to which the target data belong by the internet of things equipment.
It is noted that the internet of things device may be an NB-IoT device.
And 102, decrypting the encrypted data information by adopting a preset algorithm and utilizing a first key stored in advance to obtain target data and parameter information.
And 103, acquiring a second key by adopting a preset algorithm and utilizing the length of the target data and the first key.
And 104, acquiring the corresponding relation between the target data and the corresponding parameter according to the second key and the parameter information.
According to the data processing method provided by the embodiment of the invention, a server receives encrypted data information from Internet of things equipment; the encrypted data information is generated by the Internet of things equipment by adopting a preset algorithm and encrypting target data and parameter information by using a first secret key, the first secret key is generated by the Internet of things equipment by adopting the preset algorithm and by using the length of the target data and a second secret key, the second secret key is generated by the Internet of things equipment according to the number of parameters to which the target data belongs and identification information, and the parameter information is obtained by splicing the parameters to which the target data belongs by the Internet of things equipment; decrypting the encrypted data information by adopting a preset algorithm and utilizing a first key stored in advance to obtain target data and parameter information; acquiring a second key by adopting a preset algorithm and utilizing the length of the target data and the first key; and acquiring the corresponding relation between the target data and the parameter according to the second key and the parameter information. According to the technical scheme provided by the embodiment of the invention, the server can acquire the information of the parameter of the data from the second secret key only by using the preset algorithm which is determined with the terminal in advance, so that the corresponding meaning of the data is determined, therefore, an attacker is prevented from acquiring the meaning of the data to tamper the data, and the safety of the data is ensured.
Optionally, the second key is generated by splicing the number of parameters to which the target data belongs and the identification information by the internet of things device.
Acquiring the corresponding relation between the target data and the corresponding parameter according to the second key and the parameter information, wherein the corresponding relation comprises the following steps:
and 104a, acquiring the number and the identification information of the parameters to which the target data belongs according to the second secret key.
And step 104b, segmenting the parameter information according to the number of the parameters to which the target data belongs and the identification information to obtain the parameters of the target data.
And step 104c, respectively corresponding the target data to the affiliated parameters of the target data to obtain the corresponding relation between the target data and the affiliated parameters.
Optionally, the identification information of the parameter to which the target data belongs includes: the first letter of the parameter to which the target data belongs.
Optionally, the preset algorithm includes: the national secret 4 algorithm.
Specifically, the national crypto-4 (SM4) algorithm refers to an encryption algorithm that is issued by the national crypto-authority on 21/3/2012 and is used in the Wireless local area network Authentication and Privacy Infrastructure (WAPI) standard widely used in China, and is a packet encryption algorithm with a 32-round iterative unbalanced Feistel structure, and both the key length and the packet length are 128. The algorithms used in the encryption and decryption process of the SMS4 algorithm are the same, and the only difference is that the decryption key of the algorithm is obtained by reverse-order transformation of its encryption key (i.e. the key is symmetric).
An embodiment of the present invention provides a data processing method, as shown in fig. 2, the method includes:
step 201, the internet of things equipment generates a second key according to the number of parameters to which target data to be transmitted belong and the identification information, and splices the parameters to which all the target data belong to obtain parameter information.
Step 202, generating a first key by using a preset algorithm and using the length of the target data and the second key.
And 203, encrypting the target data and the parameter information by adopting a preset algorithm and utilizing the first key to obtain encrypted data information.
And step 204, sending the encrypted data information to a server.
According to the data processing method provided by the embodiment of the invention, the Internet of things equipment generates a second key according to the number of parameters to which target data to be transmitted belong and identification information, and splices the parameters to which all the target data belong to obtain parameter information; generating a first key by adopting a preset algorithm and utilizing the length of the target data and the second key; encrypting the target data and the parameter information by adopting a preset algorithm and utilizing a first secret key to obtain encrypted data information; and sending the encrypted data information to the server. According to the technical scheme provided by the embodiment of the invention, the server can acquire the information of the parameter of the data from the second secret key only by using the preset algorithm which is determined with the terminal in advance, so that the corresponding meaning of the data is determined, therefore, an attacker is prevented from acquiring the meaning of the data to tamper the data, and the safety of the data is ensured.
Optionally, generating a second key according to the number of parameters to which the target data to be transmitted belongs and the identification information, includes:
and splicing the number of the parameters to which the target data belongs and the identification information of the parameters to which the target data belongs to obtain a second key.
Optionally, the identification information of the parameter to which the target data belongs includes: first letter of the target data parameter.
Optionally, the preset algorithm includes: the national secret 4 algorithm.
An embodiment of the present invention further provides a data processing method, as shown in fig. 3, the method includes the following steps:
step 301, starting NB-IoT equipment and an Internet of things card, namely firstly inserting the NBIOT equipment into the Internet of things card, and executing a corresponding networking initialization command according to the type of the Internet of things card to achieve the successful network access state of the equipment.
Step 302, the NB-IoT device generates a second key Tkey: after The NBIOT device accesses The network, The number and length of parameters for finally sending The AT command are obtained according to a network transmission Protocol, such as Message Queue Telemetry Transport (MQTT), The restricted Application Protocol (CAoP), or HyperText Transfer Protocol (HTTP). Then writing an encryption function, wherein the implementation method of the encryption function comprises the following steps: a. the parameters are sorted according to the first letter, and the number of the parameters and the value of the first letter are obtained. b. The obtained value is used for obtaining binary data through a gebyte method, then 16bit data in the binary data is used as a second key Tkey, and the second key Tkey is mainly used for preparing a key for generating a true sm4 algorithm, namely the first key, so that the first 16 bits and the second 16 bits can be selected, and the method can be selected according to the user.
Step 303, the NB-IoT device generates the first key: and calling the sm4_ setkey function by taking the length of the encrypted data and the second key Tkey as parameters to generate a first key.
Step 304, NB-IoT device calls SM4 encryption: and (3) encrypting the target data and the parameter information by using a key call sm4_ setkey _ enc (sm4_ context ctx, signed char key [16]) function generated in the step (3) to generate a ciphertext.
Step 305, the NB-IoT device sends the ciphertext to the server: and the NB-IoT equipment encrypts the sm4 through the AT instruction to obtain a ciphertext, and the ciphertext is transmitted to the server through the NB-IoT network.
Step 306, the server calls SM4 to decrypt: the server receives the data packet, analyzes the ciphertext data by adopting a first key stored in advance, and calls an m4_ setkey _ dec (sm4_ context _ ctx, signed key [16]) function to decrypt, so as to obtain target data and parameter information.
Step 307, the server acquires a second key Tkey: the server calls the m4_ setkey function to acquire the second key Tkey by taking the length of the target data and the first key as parameters.
Step 308, the server obtains the parameters corresponding to the encrypted data: and the server divides the parameter information according to the second key Tkey to obtain the parameter of each item of encrypted data.
It should be noted that, after the SM4 algorithm is broken in the reverse order, only the author of the definition rule knows the meaning of the plaintext, so that the obtained data is still unusable plaintext data, thereby ensuring the integrity of the data, improving the encryption strength, and finally ensuring the data security of the NBIOT device.
An embodiment of the present invention further provides a server, as shown in fig. 4, where the server 4 includes:
a receiving module 41, configured to receive encrypted data information from an internet of things device; the encrypted data information is generated by the internet of things equipment through a preset algorithm and by utilizing a first secret key to encrypt target data and parameter information, the first secret key is generated by the internet of things equipment through the preset algorithm and utilizing the length of the target data and a second secret key, the second secret key is generated by the internet of things equipment according to the number of parameters to which the target data belong and identification information, and the parameter information is obtained by splicing the parameters to which the target data belong by the internet of things equipment.
And the first processing module 42 is configured to decrypt the encrypted data information by using a preset algorithm and using a first key stored in advance to obtain the target data and the parameter information.
The first processing module 42 is further configured to obtain a second key by using a preset algorithm and using the length of the target data and the first key.
The first processing module 42 is further configured to obtain a corresponding relationship between the target data and the parameter according to the second key and the parameter information.
Optionally, the second key is generated by splicing the number of parameters to which the target data belongs and the identification information by the internet of things device. The first processing module 42 is specifically configured to:
and acquiring the number and the identification information of the parameters to which the target data belongs according to the second key.
And segmenting the parameter information according to the number of the parameters to which the target data belongs and the identification information to obtain the parameters of the target data.
And respectively corresponding the target data with the affiliated parameters of the target data to obtain the corresponding relation between the target data and the affiliated parameters.
Optionally, the identification information of the parameter to which the target data belongs includes: the first letter of the parameter to which the target data belongs.
Optionally, the preset algorithm includes: the national secret 4 algorithm.
The server provided by the embodiment of the invention receives encrypted data information from the equipment of the Internet of things; the encrypted data information is generated by the Internet of things equipment by adopting a preset algorithm and encrypting target data and parameter information by using a first secret key, the first secret key is generated by the Internet of things equipment by adopting the preset algorithm and by using the length of the target data and a second secret key, the second secret key is generated by the Internet of things equipment according to the number of parameters to which the target data belongs and identification information, and the parameter information is obtained by splicing the parameters to which the target data belongs by the Internet of things equipment; decrypting the encrypted data information by adopting a preset algorithm and utilizing a first key stored in advance to obtain target data and parameter information; acquiring a second key by adopting a preset algorithm and utilizing the length of the target data and the first key; and acquiring the corresponding relation between the target data and the parameter according to the second key and the parameter information. According to the technical scheme provided by the embodiment of the invention, the server can acquire the information of the parameter of the data from the second secret key only by using the preset algorithm which is determined with the terminal in advance, so that the corresponding meaning of the data is determined, therefore, an attacker is prevented from acquiring the meaning of the data to tamper the data, and the safety of the data is ensured.
In practical applications, the receiving module 41 and the first Processing module 42 may be implemented by a Central Processing Unit (CPU), a microprocessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like located in a server.
An embodiment of the present invention further provides an internet of things device, as shown in fig. 5, where the internet of things device 5 includes:
the second processing module 51 is configured to generate a second key according to the number of parameters to which the target data to be transmitted belongs and the identification information, and splice the parameters to which all the target data belong to obtain parameter information.
The second processing module 51 is further configured to generate a first key by using a preset algorithm and using the length of the target data and the second key.
The second processing module 51 is further configured to encrypt the target data and the parameter information by using a preset algorithm and using the first key, so as to obtain encrypted data information.
And a sending module 52, configured to send the encrypted data information to the server.
Optionally, the second processing module 51 is specifically configured to splice the number of the parameters to which the target data belongs and the identification information of the parameters to which the target data belongs, so as to obtain a second key.
Optionally, the identification information of the parameter to which the target data belongs includes: first letter of the target data parameter.
Optionally, the preset algorithm includes: the national secret 4 algorithm.
According to the Internet of things equipment provided by the embodiment of the invention, a second key is generated according to the number of parameters to which target data to be transmitted belong and identification information, and the parameters to which all the target data belong are spliced to obtain parameter information; generating a first key by adopting a preset algorithm and utilizing the length of the target data and the second key; encrypting the target data and the parameter information by adopting a preset algorithm and utilizing a first secret key to obtain encrypted data information; and sending the encrypted data information to the server. According to the technical scheme provided by the embodiment of the invention, the server can acquire the information of the parameter of the data from the second secret key only by using the preset algorithm which is determined with the terminal in advance, so that the corresponding meaning of the data is determined, therefore, an attacker is prevented from acquiring the meaning of the data to tamper the data, and the safety of the data is ensured.
In practical application, the second processing module 51 and the sending module 52 can be implemented by a CPU, an MPU, a DSP or an FPGA located in the internet of things device.
The embodiment of the present invention further provides a data processing apparatus, including a first memory and a first processor, where the first memory stores the following commands that can be executed by the first processor:
receiving encrypted data information from the Internet of things equipment; the encrypted data information is generated by the internet of things equipment through a preset algorithm and by utilizing a first secret key to encrypt target data and parameter information, the first secret key is generated by the internet of things equipment through the preset algorithm and utilizing the length of the target data and a second secret key, the second secret key is generated by the internet of things equipment according to the number of parameters to which the target data belong and identification information, and the parameter information is obtained by splicing the parameters to which the target data belong by the internet of things equipment.
And decrypting the encrypted data information by adopting a preset algorithm and utilizing a first key stored in advance to obtain target data and parameter information.
And acquiring a second key by adopting a preset algorithm and utilizing the length of the target data and the first key.
And acquiring the corresponding relation between the target data and the parameter according to the second key and the parameter information.
Optionally, the second key is generated by splicing the number of parameters to which the target data belongs and the identification information by the internet of things device. The first memory has stored therein the following commands executable by the first processor:
and acquiring the number and the identification information of the parameters to which the target data belongs according to the second key.
And segmenting the parameter information according to the number of the parameters to which the target data belongs and the identification information to obtain the parameters of the target data.
And respectively corresponding the target data with the affiliated parameters of the target data to obtain the corresponding relation between the target data and the affiliated parameters.
Optionally, the identification information of the parameter to which the target data belongs includes: the first letter of the parameter to which the target data belongs.
Optionally, the preset algorithm includes: the national secret 4 algorithm.
The embodiment of the present invention further provides a data processing apparatus, which includes a second memory and a second processor, where the second memory stores the following commands that can be executed by the second processor:
and generating a second key according to the number of the parameters to which the target data to be transmitted belong and the identification information, and splicing the parameters to which all the target data belong to obtain parameter information.
And generating a first key by adopting a preset algorithm and utilizing the length of the target data and the second key.
And encrypting the target data and the parameter information by adopting a preset algorithm and utilizing the first secret key to obtain encrypted data information.
And sending the encrypted data information to the server.
Optionally, the second memory stores the following commands executable by the second processor:
and splicing the number of the parameters to which the target data belongs and the identification information of the parameters to which the target data belongs to obtain a second key.
Optionally, the identification information of the parameter to which the target data belongs includes: first letter of the target data parameter.
Optionally, the preset algorithm includes: the national secret 4 algorithm.
The embodiment of the invention also provides a computer-readable storage medium, wherein the storage medium is stored with a computer-executable command, and the computer-executable command is used for executing the following steps:
receiving encrypted data information from the Internet of things equipment; the encrypted data information is generated by the internet of things equipment through a preset algorithm and by utilizing a first secret key to encrypt target data and parameter information, the first secret key is generated by the internet of things equipment through the preset algorithm and utilizing the length of the target data and a second secret key, the second secret key is generated by the internet of things equipment according to the number of parameters to which the target data belong and identification information, and the parameter information is obtained by splicing the parameters to which the target data belong by the internet of things equipment.
And decrypting the encrypted data information by adopting a preset algorithm and utilizing a first key stored in advance to obtain target data and parameter information.
And acquiring a second key by adopting a preset algorithm and utilizing the length of the target data and the first key.
And acquiring the corresponding relation between the target data and the parameter according to the second key and the parameter information.
Optionally, the second key is generated by splicing the number of parameters to which the target data belongs and the identification information by the internet of things device. The computer executable command is specifically for performing the steps of:
and acquiring the number and the identification information of the parameters to which the target data belongs according to the second key.
And segmenting the parameter information according to the number of the parameters to which the target data belongs and the identification information to obtain the parameters of the target data.
And respectively corresponding the target data with the affiliated parameters of the target data to obtain the corresponding relation between the target data and the affiliated parameters.
Optionally, the identification information of the parameter to which the target data belongs includes: the first letter of the parameter to which the target data belongs.
Optionally, the preset algorithm includes: the national secret 4 algorithm.
The embodiment of the invention also provides a computer-readable storage medium, wherein the storage medium is stored with a computer-executable command, and the computer-executable command is used for executing the following steps:
and generating a second key according to the number of the parameters to which the target data to be transmitted belong and the identification information, and splicing the parameters to which all the target data belong to obtain parameter information.
And generating a first key by adopting a preset algorithm and utilizing the length of the target data and the second key.
And encrypting the target data and the parameter information by adopting a preset algorithm and utilizing the first secret key to obtain encrypted data information.
And sending the encrypted data information to the server.
Optionally, the computer-executable command is specifically configured to perform the following steps:
and splicing the number of the parameters to which the target data belongs and the identification information of the parameters to which the target data belongs to obtain a second key.
Optionally, the identification information of the parameter to which the target data belongs includes: first letter of the target data parameter.
Optionally, the preset algorithm includes: the national secret 4 algorithm.
Although the embodiments of the present invention have been described above, the descriptions are only used for understanding the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the embodiments of the invention as defined by the appended claims.

Claims (10)

1. A data processing method, comprising:
the server receives encrypted data information from the Internet of things equipment; the encrypted data information is generated by the internet of things equipment by adopting a preset algorithm and encrypting target data and parameter information by using a first secret key, the first secret key is generated by the internet of things equipment by adopting the preset algorithm and by using the length of the target data and a second secret key, the second secret key is generated by splicing the number and the identification information of the parameters to which the target data belongs by the internet of things equipment, and the parameter information is obtained by splicing the parameters to which the target data belongs by the internet of things equipment;
decrypting the encrypted data information by adopting the preset algorithm and utilizing a first key stored in advance to obtain the target data and the parameter information;
acquiring the second key by adopting the preset algorithm and utilizing the length of the target data and the first key;
and acquiring the corresponding relation between the target data and the parameter according to the second key and the parameter information.
2. The data processing method according to claim 1, wherein the second key is generated by splicing the number of parameters to which the target data belongs and identification information by the internet of things device;
the obtaining of the corresponding relationship between the target data and the parameter according to the second key and the parameter information includes:
acquiring the number and identification information of parameters to which the target data belongs according to the second key;
segmenting the parameter information according to the number of the parameters to which the target data belongs and the identification information to obtain the parameters of the target data;
and respectively corresponding the target data with the affiliated parameters of the target data to obtain the corresponding relation between the target data and the affiliated parameters.
3. The data processing method according to claim 1 or 2, wherein the identification information of the parameter to which the target data belongs includes: and the initial letter of the parameter to which the target data belongs.
4. The data processing method of claim 1, wherein the predetermined algorithm comprises: the national secret 4 algorithm.
5. A data processing method, comprising:
the Internet of things equipment splices the number of parameters to which target data to be transmitted belong and the identification information to generate a second key, and splices the parameters to which all the target data belong to obtain parameter information;
generating a first key by adopting a preset algorithm and utilizing the length of the target data and the second key;
encrypting the target data and the parameter information by adopting the preset algorithm and utilizing the first key to obtain encrypted data information;
and sending the encrypted data information to a server.
6. The data processing method according to claim 5, wherein the generating a second key according to the number of parameters to which the target data to be transmitted belongs and the identification information includes:
and splicing the number of the parameters to which the target data belongs and the identification information of the parameters to which the target data belongs to obtain the second key.
7. The data processing method according to claim 5 or 6, wherein the identification information of the parameter to which the target data belongs includes: the first letter of the parameter of the target data.
8. The data processing method of claim 5, wherein the predetermined algorithm comprises: the national secret 4 algorithm.
9. A server, comprising:
the receiving module is used for receiving encrypted data information from the Internet of things equipment; the encrypted data information is generated by the internet of things equipment by adopting a preset algorithm and encrypting target data and parameter information by using a first secret key, the first secret key is generated by the internet of things equipment by adopting the preset algorithm and by using the length of the target data and a second secret key, the second secret key is generated by splicing the number and the identification information of the parameters to which the target data belongs by the internet of things equipment, and the parameter information is obtained by splicing the parameters to which the target data belongs by the internet of things equipment;
the first processing module decrypts the encrypted data information by adopting the preset algorithm and utilizing a first key stored in advance to obtain the target data and the parameter information;
the first processing module is further configured to obtain the second key by using the preset algorithm and using the length of the target data and the first key;
the first processing module is further configured to obtain a corresponding relationship between the target data and the parameter according to the second key and the parameter information.
10. An internet of things device, comprising:
the second processing module is used for splicing the number of parameters to which the target data to be transmitted belongs and the identification information to generate a second key, and splicing the parameters to which all the target data belong to obtain parameter information;
the second processing module is further configured to generate a first key by using a preset algorithm and using the length of the target data and the second key;
the second processing module is further configured to encrypt the target data and the parameter information by using the preset algorithm and the first key to obtain encrypted data information;
and the sending module is used for sending the encrypted data information to a server.
CN201811457359.6A 2018-11-30 2018-11-30 Data processing method and device Active CN109194701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811457359.6A CN109194701B (en) 2018-11-30 2018-11-30 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811457359.6A CN109194701B (en) 2018-11-30 2018-11-30 Data processing method and device

Publications (2)

Publication Number Publication Date
CN109194701A CN109194701A (en) 2019-01-11
CN109194701B true CN109194701B (en) 2021-02-19

Family

ID=64938465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811457359.6A Active CN109194701B (en) 2018-11-30 2018-11-30 Data processing method and device

Country Status (1)

Country Link
CN (1) CN109194701B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110033286A (en) * 2019-04-09 2019-07-19 安谋科技(中国)有限公司 Product false proof verification method, device, readable medium, system and equipment
CN110868294B (en) * 2019-12-09 2023-03-24 北京智宝云科科技有限公司 Key updating method, device and equipment
CN113630370B (en) * 2020-05-08 2023-03-31 许继集团有限公司 Communication system based on STM32 and Internet of things communication module and improved MQTT communication method
CN113992427B (en) * 2020-12-23 2023-08-25 技象科技(南京)有限公司 Data encryption sending method and device based on adjacent nodes

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853985A (en) * 2012-12-05 2014-06-11 中国移动通信集团黑龙江有限公司 Data encryption method, decryption method and decryption device
CN106973048A (en) * 2017-03-21 2017-07-21 南京云创大数据科技股份有限公司 A kind of method that intelligent hardware devices data are safely and fast stored on publicly-owned cloud service platform
CN107800716A (en) * 2017-11-14 2018-03-13 中国银行股份有限公司 A kind of data processing method and device
CN107911370A (en) * 2017-11-22 2018-04-13 深圳市智物联网络有限公司 A kind of data ciphering method and device, data decryption method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9374222B2 (en) * 2014-09-02 2016-06-21 Alcatel Lucent Secure communication of data between devices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853985A (en) * 2012-12-05 2014-06-11 中国移动通信集团黑龙江有限公司 Data encryption method, decryption method and decryption device
CN106973048A (en) * 2017-03-21 2017-07-21 南京云创大数据科技股份有限公司 A kind of method that intelligent hardware devices data are safely and fast stored on publicly-owned cloud service platform
CN107800716A (en) * 2017-11-14 2018-03-13 中国银行股份有限公司 A kind of data processing method and device
CN107911370A (en) * 2017-11-22 2018-04-13 深圳市智物联网络有限公司 A kind of data ciphering method and device, data decryption method and device

Also Published As

Publication number Publication date
CN109194701A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN104144049B (en) A kind of encryption communication method, system and device
CN109194701B (en) Data processing method and device
CN107454079B (en) Lightweight equipment authentication and shared key negotiation method based on Internet of things platform
CN107358441B (en) Payment verification method and system, mobile device and security authentication device
CN105553951A (en) Data transmission method and data transmission device
CN107786331B (en) Data processing method, device, system and computer readable storage medium
CN105376261B (en) Encryption method and system for instant messaging message
CN109309650B (en) Data processing method, terminal equipment and network equipment
CN108989325A (en) Encryption communication method, apparatus and system
CN101707767B (en) Data transmission method and devices
CN111970114B (en) File encryption method, system, server and storage medium
CN112672342B (en) Data transmission method, device, equipment, system and storage medium
CN105208005A (en) Fingerprint authentication method, connection equipment and terminal equipment
CN105208028A (en) Data transmission method and related device and equipment
CN113347143A (en) Identity authentication method, device, equipment and storage medium
CN111224958A (en) Data transmission method and system
CN108966214B (en) Authentication method of wireless network, and secure communication method and system of wireless network
CN105262759A (en) Method and system for encrypted communication
CN114386049A (en) Encryption method, decryption method, device and equipment
KR20180138349A (en) IoT TERMINAL APPARATUS FOR GENERATING DYNAMIC SESSION KEY AND METHOD FOR USING THE SAME
CN105827601A (en) Data encryption application method and system of mobile device
CN112019351B (en) Mobile terminal information interaction method based on SDKey
CN105743859A (en) Method, device and system for authenticating light application
EP3908950B1 (en) Near field communication forum data exchange format (ndef) messages with authenticated encryption
CN111431846B (en) Data transmission method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant