[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN107872315A - Data processing method and intelligent terminal - Google Patents

Data processing method and intelligent terminal Download PDF

Info

Publication number
CN107872315A
CN107872315A CN201710632844.1A CN201710632844A CN107872315A CN 107872315 A CN107872315 A CN 107872315A CN 201710632844 A CN201710632844 A CN 201710632844A CN 107872315 A CN107872315 A CN 107872315A
Authority
CN
China
Prior art keywords
encryption
intelligent terminal
character string
data
target device
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.)
Granted
Application number
CN201710632844.1A
Other languages
Chinese (zh)
Other versions
CN107872315B (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.)
Shenzhen H&T Intelligent Control Co Ltd
Original Assignee
Shenzhen H&T Intelligent Control 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 Shenzhen H&T Intelligent Control Co Ltd filed Critical Shenzhen H&T Intelligent Control Co Ltd
Priority to CN201710632844.1A priority Critical patent/CN107872315B/en
Publication of CN107872315A publication Critical patent/CN107872315A/en
Application granted granted Critical
Publication of CN107872315B publication Critical patent/CN107872315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0866Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the invention discloses a kind of data processing method and intelligent terminal, wherein, data processing method can include:When detecting that intelligent terminal needs the request to be communicated with target device, the facility information of caused random number and the intelligent terminal in real time is obtained, the facility information is used for intelligent terminal described in unique mark;According to the random number and the facility information of the intelligent terminal, encryption seed is generated;Using predetermined encryption algorithm and the encryption seed to the first data encryption, the first encryption data is obtained;First encryption data is sent to the target device.Using the present invention, the security of communication can be provided.

Description

Data processing method and intelligent terminal
Technical field
The present invention relates to electronic technology field, more particularly to a kind of data processing method and intelligent terminal.
Background technology
With the development of technology of Internet of things, various intelligent terminals arise at the historic moment, such as intelligent refrigerator, intelligent washing machine, intelligence Energy air-conditioning etc..Communication between intelligent terminal and server, or the communication between intelligent terminal and mobile terminal, are required to The data of communication are encrypted, to ensure Internet of Things communication security.
The mode that public key employed in ciphering process is talked between intelligent terminal and server or mobile terminal is entered Row alternating transmission.Private key employed in ciphering process is then that the mode of the built-in fixed character string in each intelligent terminal is produced It is raw, and the fixed character string built in same category equipment is identical, for example the fixed character string built in all refrigerators is identical.Intelligence Terminal is again using private key data generation encryption seed.So encryption seed used in encryption is equal every time for the equipment of identical category It is identical, it is easy to by assault, to obtain encryption seed, reduce the safety coefficient of Internet of Things Network Communication.
The content of the invention
The embodiment of the present invention provides a kind of data processing method and intelligent terminal, it is ensured that each intelligent terminal leads to every time The encryption seed of letter is all unique, so as to improve the security of communication.
In a first aspect, the embodiment of the present invention provides a kind of data processing method, including:
When detecting that intelligent terminal needs request communicate with target device, real-time caused random number and described is obtained The facility information of intelligent terminal, the facility information are used for intelligent terminal described in unique mark;
According to the random number and the facility information of the intelligent terminal, encryption seed is generated;
Using predetermined encryption algorithm and the encryption seed to the first data encryption, the first encryption data is obtained;
First encryption data is sent to the target device.
In a kind of possible design, the facility information includes the MAC address of the intelligent terminal At least one of with the device identification of the intelligent terminal.
It is described to be added according to the random number and the facility information of the intelligent terminal, generation in a kind of possible design Close seed, including:
According to the facility information of the intelligent terminal, the first character string is generated;
According to the random number, the second character string is generated;
According to preset rules, the element in the element in first character string and second character string is arranged Combination, obtain the 3rd character string;
The value of element in 3rd character string is defined as encryption seed.
In a kind of possible design, after the 3rd character string of the acquisition, in addition to:
The value of element in the 3rd character string is encrypted using Message Digest Algorithm 5 md5 encryption algorithm, The 3rd character string after being encrypted;
Using the value of element in the 3rd character string as encryption seed, including:
The value of element in the 3rd character string after the encryption is defined as encryption seed.
In a kind of possible design, the random number is produced by the target device, and methods described also includes:
The facility information of the intelligent terminal is sent to the target device, so as to the target device according to it is described with The facility information of machine number and the intelligent terminal generates the encryption seed;
The second encryption data that the target device is sent is received, second encryption data is that the target device uses The encryption data that the predetermined encryption algorithm and the encryption seed obtain to the second data encryption;
According to decipherment algorithm corresponding with the predetermined encryption algorithm and the encryption seed, to second encryption data Decryption, obtain second data.
Second aspect, the embodiment of the present invention provide a kind of intelligent terminal, including:
Acquisition module, for when detecting that intelligent terminal needs the request to be communicated with target device, obtaining and producing in real time Random number and the intelligent terminal facility information, the facility information is used for intelligent terminal described in unique mark;
Generation module, for the facility information according to the random number and the intelligent terminal, generate encryption seed;
Encrypting module, for, to the first data encryption, obtaining first using predetermined encryption algorithm and the encryption seed and adding Ciphertext data;
Sending module, for first encryption data to be sent to the target device.
In a kind of possible design, the facility information includes the MAC address of the intelligent terminal At least one of with the device identification of the intelligent terminal.
In a kind of possible design, the generation module includes:
First generation unit, for the facility information according to the intelligent terminal, generate the first character string;
Second generation unit, for according to the random number, generating the second character string;
Arrangement units, for according to preset rules, by the element in first character string and second character string Element carry out permutation and combination, obtain the 3rd character string;
Determining unit, for the value of element in the 3rd character string to be defined as into encryption seed.
In a kind of possible design, the generation module also includes:
Ciphering unit, for using Message Digest Algorithm 5 md5 encryption algorithm to element in the 3rd character string Value be encrypted, the 3rd character string after being encrypted;
The determining unit is specifically used for the value of element in the 3rd character string after the encryption being defined as encryption seed.
In a kind of possible design, the random number is produced by the target device;
The sending module is additionally operable to send the facility information of the intelligent terminal to the target device, so as to described Target device generates the encryption seed according to the facility information of the random number and the intelligent terminal;
The intelligent terminal also includes:
Receiving module, the second encryption data sent for receiving the target device, second encryption data is institute State the encryption data that target device uses the predetermined encryption algorithm and the encryption seed to obtain the second data encryption;
Deciphering module, for basis decipherment algorithm corresponding with the predetermined encryption algorithm and the encryption seed, to institute The decryption of the second encryption data is stated, obtains second data.
The third aspect, the embodiment of the present invention provide a kind of intelligent terminal, including:
Communication interface, for being communicated with external equipment;
Storage medium, have program stored therein instruction, and described program instruction is suitable to be loaded by the processor;
Processor, instruct for loading described program and perform following operation:
When detecting that the intelligent terminal needs request communicate with target device, obtain in real time caused random number with The facility information of the intelligent terminal, the facility information are used for intelligent terminal described in unique mark;
According to the random number and the facility information of the intelligent terminal, encryption seed is generated;
Using predetermined encryption algorithm and the encryption seed to the first data encryption, the first encryption data is obtained;
First encryption data is sent to the target device by the communication interface.
In a kind of possible design, the facility information includes the MAC address of the intelligent terminal At least one of with the device identification of the intelligent terminal.
In a kind of possible design, processor loading described program instruction perform following operation with according to it is described with The facility information of machine number and the intelligent terminal, generate encryption seed:
According to the facility information of the intelligent terminal, the first character string is generated;
According to the random number, the second character string is generated;
According to preset rules, the element in the element in first character string and second character string is arranged Combination, obtain the 3rd character string;
The value of element in 3rd character string is defined as encryption seed.
In a kind of possible design, the processor loading described program instruction is additionally operable to perform following operation:
The value of element in the 3rd character string is encrypted using md5 encryption algorithm, the 3rd word after being encrypted Symbol string;
The value of element in the 3rd character string after the encryption is defined as encryption seed.
In a kind of possible design, the random number is produced by the target device, and the processor loads the journey Sequence instruction is additionally operable to perform following operation:
The facility information of the intelligent terminal is sent to the target device, so as to the target device according to it is described with The facility information of machine number and the intelligent terminal generates the encryption seed;
The second encryption data that the target device is sent is received, second encryption data is that the target device uses The encryption data that the predetermined encryption algorithm and the encryption seed obtain to the second data encryption;
According to decipherment algorithm corresponding with the predetermined encryption algorithm and the encryption seed, to second encryption data Decryption, obtain second data.
Fourth aspect, the embodiment of the present invention provide a kind of storage medium, and being stored with a plurality of program in the storage medium refers to Order, described program instruction are suitable to be loaded by processor and perform data processing method as described in relation to the first aspect.
Implement the embodiment of the present invention, when detecting that intelligent terminal needs to communicate with target device, obtain caused in real time The facility information of random number and the unique mark intelligent terminal, according to random number and facility information, encryption seed is generated, so may be used The uniqueness of encryption seed during ensureing that intelligent terminal communicates every time, improve the security of communication.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of system architecture diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet of data processing method provided in an embodiment of the present invention;
Fig. 3 is a kind of data processing method interaction figure provided in an embodiment of the present invention;
Fig. 4 is another data processing method interaction figure provided in an embodiment of the present invention;
Fig. 5 is data encryption block diagram provided in an embodiment of the present invention;
Fig. 6 is a kind of data encryption schematic diagram provided in an embodiment of the present invention;
Fig. 7 is a kind of structural representation of intelligent terminal provided in an embodiment of the present invention;
Fig. 8 is the structural representation of another intelligent terminal provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
As shown in figure 1, it is the system architecture diagram of the embodiment of the present invention, as illustrated, the system architecture of the embodiment of the present invention Mobile terminal, intelligent terminal and server can be included, wherein, mobile terminal can include PC, notebook computer, intelligence Energy mobile phone, tablet personal computer, car-mounted terminal and portable wearable device etc..Intelligent terminal can include but is not limited to various household electrical appliances Equipment (such as intelligent air condition, Intelligent bracelet, intelligent washing machine and intelligent refrigerator), office equipment, transit equipment etc..Intelligence Terminal can enter row data communication between mobile terminal, and intelligent terminal can also enter row data communication between server.Nothing By being communication between intelligent terminal and mobile terminal, or the communication between intelligent terminal and server, it is required to data It is encrypted, generation encryption data is sent.
The target device of the embodiment of the present invention can be mobile terminal or server in Fig. 1, intelligent terminal need to , it is necessary to which first data are encrypted using predetermined encryption algorithm and encryption seed when target device sends data, generation encryption number According to then intelligent terminal sends encryption data to target device.Target device is decrypted to obtain the data of intelligent terminal transmission.Phase Answer, when target device is needed to intelligent terminal transmission data, target device is also required to using predetermined encryption algorithm and encryption kind Data are encrypted son, generate encryption data, and then target device sends encryption data to intelligent terminal.Intelligent terminal solution It is close to obtain the data of target device transmission.
In embodiments of the present invention, in order to ensure each time communicate in encryption seed uniqueness, the embodiment of the present invention The facility information of random number and intelligent terminal according to caused by real-time, generate encryption seed.The facility information of intelligent terminal is used for The unique mark intelligent terminal, facility information can include the device identification of the intelligent terminal and the media interviews control of intelligent terminal Make at least one of (Media Access Control, MAC) address.
Fig. 2 is refer to, is a kind of schematic flow sheet of data processing method provided in an embodiment of the present invention, as illustrated, The data processing method of the embodiment of the present invention can include but is not limited to following steps:
S101, when detecting that intelligent terminal needs the request to be communicated with target device, obtain caused random number in real time With the facility information of the intelligent terminal, the facility information is used for intelligent terminal described in unique mark;
In one embodiment, target device can be server or mobile terminal.When intelligent terminal foundation and target After data connection between equipment, you can be communicated between target device.In order to improve intelligent terminal and target device Between the security that communicates, it usually needs using predetermined encryption algorithm and encryption seed, the data of communication are encrypted.If energy When enough ensureing that each equipment communicates every time, the uniqueness of encryption seed, then the reliability of encryption can be greatly improved.
In embodiments of the present invention, when detecting that intelligent terminal needs the request to be communicated with target device, that is, obtain real The facility information of caused random number and the intelligent terminal.Optionally, the intelligent terminal can produce random number in real time, or Person, when intelligent terminal asks random number to target device, random number is produced by target device in real time.
Optionally, the facility information of intelligent terminal can be the device identification of the MAC Address and intelligent terminal of intelligent terminal At least one of.
It is specific optional, if random number is produced by target device, when establishing data between intelligent terminal and target device After connection, i.e., predetermined encryption algorithm and random number are asked to target device, target device returns to predetermined encryption to intelligent terminal Algorithm and random number.If random number is produced by intelligent terminal, after data connection is established between intelligent terminal and target device, Predetermined encryption algorithm is asked to target device, target device returns to predetermined encryption algorithm to intelligent terminal.The predetermined encryption is calculated Method is used to encrypt data and the encryption seed of generation.
S102, according to the random number and the facility information of the intelligent terminal, generate encryption seed;
In one embodiment, after intelligent terminal gets the facility information of random number and intelligent terminal, i.e., according to random The facility information of number and intelligent terminal, generate encryption seed.It should be noted that intelligent terminal produces calculation using encryption seed Method, the facility information of random number and intelligent terminal is handled, obtain encryption seed.
Specific optional, the method that intelligent terminal generates encryption seed according to the facility information of random number and intelligent terminal can To include but is not limited to following steps:
Step 1, according to the facility information of the intelligent terminal, generate the first character string;
Step 2: according to the random number, the second character string is generated;
Step 3: according to preset rules, by the element in the element in first character string and second character string Permutation and combination is carried out, obtains the 3rd character string;
Step 4: the value of element in the 3rd character string is defined as encryption seed.
Or after step 3 obtains the 3rd character string, using Message Digest Algorithm 5 (Message Digest Algorithm, MD5) value of element in the 3rd character string is encrypted AES, the 3rd character after being encrypted String, and the value of element in the 3rd character after encryption is defined as encryption seed.
Optionally, the number of the first character string and element in the second character string can be with identical, for example the first character string includes 16 bytes, the second character string also include 16 bytes, it is necessary to illustrate, if element in the first character string or the second character string Number is not up to 16 bytes, then can by way of filling element polishing.
Optionally, the preset rules can be regularly arranged according to the size of each element value in the first character string, or, The preset rules can be arranged according to the typing rule of each element value in the first character string, such as the element row of same type Be listed in together, same type can be all be belong to letter or be all to belong to numeral etc..
Optionally, the facility information of intelligent terminal is included in the device identification of the MAC Address and intelligent terminal of intelligent terminal At least one.Device identification using the facility information of intelligent terminal as the MAC Address and intelligent terminal of intelligent terminal herein is Example illustrates:As shown in figure 5, intelligent terminal encrypts kind according to acquired MAC Address, device identification and generating random number Son.It is specific optional, MAC Address and device identification are combined, random number individually combines, and is produced finally by encryption seed Raw algorithm is handled MAC Address, device identification and random number, generates encryption seed, is added using encryption seed with default Data are encrypted close algorithm, form encryption data.
Optionally, as shown in fig. 6, using the first character string as A character strings, the second character string is B character strings, is said as an example Bright, A character strings and B character strings are 16 bytes.It is specific optional, using the MAC Address of 6 bytes, the device identification of 8 bytes, And two bytes are filled, produce character string A.Using the random numbers of 16 bytes, (random number of 16 byte is intelligent terminal for reception Server in real time caused by 16 byte random numbers) produce character string B.
Intelligent terminal is using division hashing algorithm (such as hash functions) respectively to each of character string A and character string B Element is handled, and obtains character string A ' and character string B '.It should be noted that using division hashing algorithm respectively to character string The step of A and character string B are handled is optional step.
According to preset rules, all elements in character string A ' and character string B ' are subjected to permutation and combination, obtain character string C, Character string C includes 32 bytes.In embodiments of the present invention can be directly using the value of each element in character string C as encryption Seed.
Or using md5 encryption algorithm, the value of each element in character string C is encrypted, corresponding to generation MD5 values, all MD5 values form character string D, 32 bytes are also included in character string D.In embodiments of the present invention can also be by word The value of each element is as encryption seed in symbol string D.
S103, using predetermined encryption algorithm and the encryption seed to the first data encryption, obtain the first encryption data;
In one embodiment, intelligent terminal uses predetermined encryption algorithm and encryption seed to the first data encryption, so that Obtain the first encryption data.Optionally, the first data can be the data that intelligent terminal is sent to target device, for example control Director data.
Optionally, predetermined encryption algorithm can be the algorithm asked from intelligent terminal to target device, predetermined encryption algorithm Including but not limited to Advanced Encryption Standard (Advanced Encryption Standard, AES128), data encryption standards (Data Encryption Standard, DES), key exchange (Diffie-Hellman, DH) scheduling algorithm.
S104, first encryption data is sent to the target device.
In one embodiment, intelligent terminal is connected by the data established between target device, by the first encryption Data are sent to target device.Optionally, data connection can be transmission control protocol (Transmission Control Protocol, TCP) connection.
Implement the embodiment of the present invention, when detecting that intelligent terminal needs to communicate with target device, obtain caused in real time The facility information of random number and the unique mark intelligent terminal, according to random number and facility information, encryption seed is generated, so may be used The uniqueness of encryption seed during ensureing that intelligent terminal communicates every time, improve the security of communication.
Fig. 3 is refer to, is the interaction figure of another data processing method provided in an embodiment of the present invention, as illustrated, this The data processing method of inventive embodiments includes but is not limited to following steps:
S201, when detecting that intelligent terminal needs the request to be communicated with target device, intelligent terminal obtains to be produced in real time Random number and the intelligent terminal facility information, the facility information is used for intelligent terminal described in unique mark;
S202, intelligent terminal generate encryption seed according to the random number and the facility information of the intelligent terminal;
S203, intelligent terminal, to the first data encryption, are obtained first and added using predetermined encryption algorithm and the encryption seed Ciphertext data;
S204, intelligent terminal send first encryption data to the target device.
Step of embodiment of the present invention S201~S204 refer to Fig. 2 embodiment step S101~S104, no longer superfluous herein State.
S205, target device receives the first encryption data, and decrypts and obtain the first data;
In one embodiment, target device receive intelligent terminal transmission the first encryption data after, to this first plus Ciphertext data is decrypted, and obtains the first data carried in first encryption data.First data are intelligent terminal needs It is sent to the data of target device.
Specific optional, target device obtains decipherment algorithm corresponding with predetermined encryption algorithm, use the decipherment algorithm with And the first encryption data is decrypted encryption seed, the first data are obtained.It should be noted that target device can according to The facility information of machine number and intelligent terminal generates encryption seed, the encryption seed phase that the encryption seed is generated with intelligent terminal Together.
Optionally, random number is produced by target device, and intelligent terminal sends the facility information of the intelligent terminal to target Equipment, target device can generate encryption seed according to random number and facility information.It should be noted that the embodiment of the present invention For target device according to random number and the facility information of intelligent terminal, the process for generating encryption seed refer to explaining for step S207 State, will not be repeated here.
S206, intelligent terminal send the facility information of the intelligent terminal to target device;
S207, target device generate encryption seed according to random number and the facility information of intelligent terminal;
In one embodiment, random number can be produced by target device, and intelligent terminal believes the equipment of intelligent terminal Breath is sent to target device., can be according to the random number after target device gets the facility information of random number and intelligent terminal And facility information, encryption seed is generated, specific generation method refer to step S102 elaboration, will not be repeated here.
S208, target device, to the second data encryption, obtain the second encryption number using predetermined encryption algorithm and encryption seed According to;
In one embodiment, when target device needs to be communicated with intelligent terminal, predetermined encryption can also be used Algorithm and encryption seed obtain the second encryption data to the second data encryption.Wherein, the second data can be target device needs Send to the data of intelligent terminal, such as control instruction.Specific cipher mode is referred to step S103 description, herein no longer Repeat.
S209, target device send the second encryption data to intelligent terminal;
S210, the encryption data of intelligent terminal for reception second;
In one embodiment, data connection is established between intelligent terminal and target device, intelligent terminal can be by this Data connection receives the second encryption data that target device is sent.
S211, intelligent terminal is according to decipherment algorithm corresponding with predetermined encryption algorithm and encryption seed, to the second encryption number According to decryption, the second data are obtained.
In one embodiment, intelligent terminal can obtain decipherment algorithm corresponding with predetermined encryption algorithm, the i.e. decryption Algorithm is the inverse process of the predetermined encryption algorithm.Intelligent terminal is according to decipherment algorithm and encryption seed, to second encryption data It is decrypted, obtains the second data that target device is sent.If second data are control instruction, intelligent terminal is according to the control System instruction, perform corresponding operation.
Fig. 4 is refer to, is a kind of simple process interaction figure provided in an embodiment of the present invention, the interaction mainly includes following several Individual step:
S20, TCP connections are established between intelligent terminal and target device;
S21, intelligent terminal ask AES and random number to target device;
S22, target device determine predetermined encryption algorithm and random number, and by identified predetermined encryption algorithm and at random Number occurs to arrive intelligent terminal;
S23, intelligent terminal generate encryption seed according to the facility information of random number and intelligent terminal;
S24, target device generate encryption seed according to the facility information of random number and intelligent terminal, and intelligent terminal is set Standby information can be sent by intelligent terminal to target device;
S25, row data communication can be entered based on the encryption seed between target device and intelligent terminal.
Implement the embodiment of the present invention, when detecting that intelligent terminal needs to communicate with target device, obtain caused in real time The facility information of random number and the unique mark intelligent terminal, according to random number and facility information, encryption seed is generated, meanwhile, Target device can also generate encryption seed according to the facility information of random number and intelligent terminal, can so ensure intelligent terminal And the uniqueness of target device encryption seed when communicating every time, improve the security of communication.
Fig. 7 is refer to, is a kind of structural representation of intelligent terminal provided in an embodiment of the present invention, as illustrated, this hair The intelligent terminal of bright embodiment can include:
Acquisition module 10, for when detecting that intelligent terminal needs the request to be communicated with target device, obtaining production in real time Raw random number and the facility information of the intelligent terminal, the facility information are used for intelligent terminal described in unique mark;
In one embodiment, target device can be server or mobile terminal.When intelligent terminal foundation and target After data connection between equipment, you can be communicated between target device.In order to improve intelligent terminal and target device Between the security that communicates, it usually needs using predetermined encryption algorithm and encryption seed, the data of communication are encrypted.If energy When enough ensureing that each equipment communicates every time, the uniqueness of encryption seed, then the reliability of encryption can be greatly improved.
In embodiments of the present invention, when detecting that intelligent terminal needs the request to be communicated with target device, that is, obtain real The facility information of caused random number and the intelligent terminal.Optionally, the intelligent terminal can produce random number in real time, or Person, when intelligent terminal asks random number to target device, random number is produced by target device in real time.
Optionally, the facility information of intelligent terminal can be the device identification of the MAC Address and intelligent terminal of intelligent terminal At least one of.
It is specific optional, if random number is produced by target device, when establishing data between intelligent terminal and target device After connection, i.e., predetermined encryption algorithm and random number are asked to target device, target device returns to predetermined encryption to intelligent terminal Algorithm and random number.If random number is produced by intelligent terminal, after data connection is established between intelligent terminal and target device, Predetermined encryption algorithm is asked to target device, target device returns to predetermined encryption algorithm to intelligent terminal.The predetermined encryption is calculated Method is used to encrypt data and the encryption seed of generation.
Generation module 11, for the facility information according to the random number and the intelligent terminal, generate encryption seed;
Optionally, the generation module includes:
First generation unit, for the facility information according to the intelligent terminal, generate the first character string;
Second generation unit, for according to the random number, generating the second character string;
Arrangement units, for according to preset rules, by the element in first character string and second character string Element carry out permutation and combination, obtain the 3rd character string;
Determining unit, for the value of element in the 3rd character string to be defined as into encryption seed.
Optionally, the generation module also includes:
Ciphering unit, for the value of element in the 3rd character string to be encrypted using md5 encryption algorithm, added The 3rd character string after close;
The determining unit is specifically used for the value of element in the 3rd character string after the encryption being defined as encryption seed.
In one embodiment, after intelligent terminal gets the facility information of random number and intelligent terminal, generation module 11 I.e. according to random number and the facility information of intelligent terminal, encryption seed is generated.It should be noted that intelligent terminal is using encryption kind Son produces algorithm, and the facility information of random number and intelligent terminal is handled, and obtains encryption seed.
Optionally, the number of the first character string and element in the second character string can be with identical, for example the first character string includes 16 bytes, the second character string also include 16 bytes, it is necessary to illustrate, if element in the first character string or the second character string Number is not up to 16 bytes, then can by way of filling element polishing.
Optionally, the preset rules can be regularly arranged according to the size of each element value in the first character string, or, The preset rules can be arranged according to the typing rule of each element value in the first character string, such as the element row of same type Be listed in together, same type can be all be belong to letter or be all to belong to numeral etc..
Optionally, the facility information of intelligent terminal is included in the device identification of the MAC Address and intelligent terminal of intelligent terminal At least one.Device identification using the facility information of intelligent terminal as the MAC Address and intelligent terminal of intelligent terminal herein is Example illustrates:As shown in figure 5, intelligent terminal encrypts kind according to acquired MAC Address, device identification and generating random number Son.It is specific optional, MAC Address and device identification are combined, random number individually combines, and is produced finally by encryption seed Raw algorithm is handled MAC Address, device identification and random number, generates encryption seed, is added using encryption seed with default Data are encrypted close algorithm, form encryption data.
Optionally, as shown in fig. 6, using the first character string as A character strings, the second character string is B character strings, is said as an example Bright, A character strings and B character strings are 16 bytes.It is specific optional, using the MAC Address of 6 bytes, the device identification of 8 bytes, And two bytes are filled, produce character string A.Using the random numbers of 16 bytes, (random number of 16 byte is intelligent terminal for reception Server in real time caused by 16 byte random numbers) produce character string B.
Intelligent terminal is using division hashing algorithm (such as hash functions) respectively to each of character string A and character string B Element is handled, and obtains character string A ' and character string B '.It should be noted that using division hashing algorithm respectively to character string The step of A and character string B are handled is optional step.
According to preset rules, all elements in character string A ' and character string B ' are subjected to permutation and combination, obtain character string C, Character string C includes 32 bytes.In embodiments of the present invention can directly using the value of each element in character string C as plus Close seed.
Or using md5 encryption algorithm, the value of each element in character string C is encrypted, corresponding to generation MD5 values, all MD5 values form character string D, 32 bytes are also included in character string D.In embodiments of the present invention can also be by word The value of each element is as encryption seed in symbol string D.
Encrypting module 12, for, to the first data encryption, obtaining first using predetermined encryption algorithm and the encryption seed Encryption data;
In one embodiment, intelligent terminal uses predetermined encryption algorithm and encryption seed to the first data encryption, so that Obtain the first encryption data.Optionally, the first data can be the data that intelligent terminal is sent to target device, for example control Director data.
Optionally, predetermined encryption algorithm can be the algorithm asked from intelligent terminal to target device, predetermined encryption algorithm Including but not limited to Advanced Encryption Standard (Advanced Encryption Standard, AES128), data encryption standards (Data Encryption Standard, DES), DH scheduling algorithms.
Sending module 13, for first encryption data to be sent to the target device.
In one embodiment, intelligent terminal is connected by the data established between target device, by the first encryption Data are sent to target device.Optionally, data connection can be transmission control protocol (Transmission Control Protocol, TCP) connection.
Optionally, MAC address and the intelligence of the facility information including the intelligent terminal are whole At least one of the device identification at end.
Optionally, the random number is produced by the target device;
The sending module 13 is additionally operable to send the facility information of the intelligent terminal to the target device, the intelligence The facility information of energy terminal is used for target device encryption seed according to the generating random number;
The intelligent terminal also includes:
Receiving module, the second encryption data sent for receiving the target device, second encryption data is institute State the encryption data that target device uses the predetermined encryption algorithm and the encryption seed to obtain the second data encryption;
In one embodiment, data connection is established between intelligent terminal and target device, intelligent terminal can be by this Data connection receives the second encryption data that target device is sent.
Deciphering module, for basis decipherment algorithm corresponding with the predetermined encryption algorithm and the encryption seed, to institute The decryption of the second encryption data is stated, obtains second data.
In one embodiment, intelligent terminal can obtain decipherment algorithm corresponding with predetermined encryption algorithm, the i.e. decryption Algorithm is the inverse process of the predetermined encryption algorithm.Intelligent terminal is according to decipherment algorithm and encryption seed, to second encryption data It is decrypted, obtains the second data that target device is sent.If second data are control instruction, intelligent terminal is according to the control System instruction, perform corresponding operation.
Implement the embodiment of the present invention, when detecting that intelligent terminal needs to communicate with target device, obtain caused in real time The facility information of random number and the unique mark intelligent terminal, according to random number and facility information, encryption seed is generated, so may be used The uniqueness of encryption seed during ensureing that intelligent terminal communicates every time, improve the security of communication.
Fig. 8 is refer to, is a kind of structural representation of intelligent terminal provided in an embodiment of the present invention, as shown in fig. 7, described Intelligent terminal 1000 can include:At least one processor 1001, such as CPU, at least one communication interface 1003, memory 1004, at least one communication bus 1002.Wherein, communication bus 1002 is used to realize the connection communication between these components.It is logical Letter interface 1003 can optionally include wireline interface, the wave point (such as WI-FI interfaces) of standard.Memory 1004 can be High-speed RAM memory or non-labile memory (non-volatile memory), for example, at least a disk Memory.Memory 1004 optionally can also be at least one storage device for being located remotely from aforementioned processor 1001.Such as Fig. 8 It is shown, as operating system, network communication module and journey can be included in a kind of memory 1004 of computer-readable storage medium Sequence instructs.
In the intelligent terminal 1000 shown in Fig. 8, processor 1001 can be used in load store device 1004 journey stored Sequence instructs, and specifically performs following operate:
When detecting that the intelligent terminal needs request communicate with target device, obtain in real time caused random number with The facility information of the intelligent terminal, the facility information are used for intelligent terminal described in unique mark;
According to the random number and the facility information of the intelligent terminal, encryption seed is generated;
Using predetermined encryption algorithm and the encryption seed to the first data encryption, the first encryption data is obtained;
First encryption data is sent to the target device by the communication interface 1003.
Optionally, MAC address and the intelligence of the facility information including the intelligent terminal are whole At least one of the device identification at end.
Optionally, the processor 1001 loads described program instruction and performs following operation with according to the random number and institute The facility information of intelligent terminal is stated, generates encryption seed:
According to the facility information of the intelligent terminal, the first character string is generated;
According to the random number, the second character string is generated;
According to preset rules, the element in the element in first character string and second character string is arranged Combination, obtain the 3rd character string;
The value of element in 3rd character string is defined as encryption seed.
Optionally, the processor 1001 loads described program instruction and is additionally operable to perform following operation:
The value of element in the 3rd character string is encrypted using md5 encryption algorithm, the 3rd word after being encrypted Symbol string;
The value of element in the 3rd character string after the encryption is defined as encryption seed.
Optionally, the random number is produced by the target device, and the processor 1001 loads described program instruction also For performing following operation:
The facility information of the intelligent terminal is sent to the target device, so as to the target device according to it is described with The facility information of machine number and the intelligent terminal generates the encryption seed;
The second encryption data that the target device is sent is received, second encryption data is that the target device uses The encryption data that the predetermined encryption algorithm and the encryption seed obtain to the second data encryption;
According to decipherment algorithm corresponding with the predetermined encryption algorithm and the encryption seed, to second encryption data Decryption, obtain second data.
The specific descriptions of each component refer to the description of Fig. 2 and Fig. 3 embodiments in the present embodiment, will not be repeated here.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Above disclosure is only preferred embodiment of present invention, can not limit the right model of the present invention with this certainly Enclose, therefore the equivalent variations made according to the claims in the present invention, still belong to the scope that the present invention is covered.

Claims (10)

  1. A kind of 1. data processing method, it is characterised in that including:
    When detecting that intelligent terminal needs the request to be communicated with target device, caused random number and the intelligence in real time are obtained The facility information of terminal, the facility information are used for intelligent terminal described in unique mark;
    According to the random number and the facility information of the intelligent terminal, encryption seed is generated;
    Using predetermined encryption algorithm and the encryption seed to the first data encryption, the first encryption data is obtained;
    First encryption data is sent to the target device.
  2. 2. the method as described in claim 1, it is characterised in that the facility information includes the media interviews of the intelligent terminal Control at least one of device identification of MAC Address and the intelligent terminal.
  3. 3. method as claimed in claim 1 or 2, it is characterised in that described according to the random number and the intelligent terminal Facility information, encryption seed is generated, including:
    According to the facility information of the intelligent terminal, the first character string is generated;
    According to the random number, the second character string is generated;
    According to preset rules, the element in the element in first character string and second character string is subjected to arrangement group Close, obtain the 3rd character string;
    The value of element in 3rd character string is defined as encryption seed.
  4. 4. method as claimed in claim 3, it is characterised in that after the 3rd character string of the acquisition, in addition to:
    The value of element in the 3rd character string is encrypted using Message Digest Algorithm 5 md5 encryption algorithm, obtained The 3rd character string after encryption;
    The value of element in 3rd character string is defined as encryption seed, including:
    The value of element in the 3rd character string after the encryption is defined as encryption seed.
  5. 5. the method as described in claim 1, it is characterised in that the random number is produced by the target device, methods described Also include:
    The facility information of the intelligent terminal is sent to the target device, so that the target device is according to the random number The encryption seed is generated with the facility information of the intelligent terminal;
    The second encryption data that the target device is sent is received, second encryption data is described in the target device uses The encryption data that predetermined encryption algorithm and the encryption seed obtain to the second data encryption;
    According to decipherment algorithm corresponding with the predetermined encryption algorithm and the encryption seed, to the second encryption data solution It is close, obtain second data.
  6. A kind of 6. intelligent terminal, it is characterised in that including:
    Communication interface, for being communicated with external equipment;
    Storage medium, have program stored therein instruction, and described program instruction is suitable to be loaded by the processor;
    Processor, instruct for loading described program and perform following operation:
    When detecting that the intelligent terminal needs request communicate with target device, real-time caused random number and described is obtained The facility information of intelligent terminal, the facility information are used for intelligent terminal described in unique mark;
    According to the random number and the facility information of the intelligent terminal, encryption seed is generated;
    Using predetermined encryption algorithm and the encryption seed to the first data encryption, the first encryption data is obtained;
    First encryption data is sent to the target device by the communication interface.
  7. 7. intelligent terminal as claimed in claim 6, it is characterised in that the facility information includes the media of the intelligent terminal At least one of device identification of access control MAC addresses and the intelligent terminal.
  8. 8. intelligent terminal as claimed in claims 6 or 7, it is characterised in that the processor loading described program instruction performs Operate below with the facility information according to the random number and the intelligent terminal, generate encryption seed:
    According to the facility information of the intelligent terminal, the first character string is generated;
    According to the random number, the second character string is generated;
    According to preset rules, the element in the element in first character string and second character string is subjected to arrangement group Close, obtain the 3rd character string;
    The value of element in 3rd character string is defined as encryption seed.
  9. 9. intelligent terminal as claimed in claim 8, it is characterised in that the processor loading described program instruction is additionally operable to hold Row is following to be operated:
    The value of element in the 3rd character string is encrypted using Message Digest Algorithm 5 md5 encryption algorithm, obtained The 3rd character string after encryption;
    The value of element in the 3rd character string after the encryption is defined as encryption seed.
  10. 10. intelligent terminal as claimed in claim 6, it is characterised in that the random number is produced by the target device, described Processor loading described program instruction is additionally operable to perform following operation:
    The facility information of the intelligent terminal is sent to the target device, so that the target device is according to the random number The encryption seed is generated with the facility information of the intelligent terminal;
    The second encryption data that the target device is sent is received, second encryption data is described in the target device uses The encryption data that predetermined encryption algorithm and the encryption seed obtain to the second data encryption;
    According to decipherment algorithm corresponding with the predetermined encryption algorithm and the encryption seed, to the second encryption data solution It is close, obtain second data.
CN201710632844.1A 2017-07-28 2017-07-28 Data processing method and intelligent terminal Active CN107872315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710632844.1A CN107872315B (en) 2017-07-28 2017-07-28 Data processing method and intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710632844.1A CN107872315B (en) 2017-07-28 2017-07-28 Data processing method and intelligent terminal

Publications (2)

Publication Number Publication Date
CN107872315A true CN107872315A (en) 2018-04-03
CN107872315B CN107872315B (en) 2020-09-22

Family

ID=61761492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710632844.1A Active CN107872315B (en) 2017-07-28 2017-07-28 Data processing method and intelligent terminal

Country Status (1)

Country Link
CN (1) CN107872315B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769009A (en) * 2018-05-28 2018-11-06 深圳和而泰数据资源与云技术有限公司 Data communications method, smart machine and intelligent gateway
CN109005184A (en) * 2018-08-17 2018-12-14 上海小蚁科技有限公司 File encrypting method and device, storage medium, terminal
CN112163237A (en) * 2020-09-01 2021-01-01 北京字节跳动网络技术有限公司 Data processing method and device and electronic equipment
CN113965340A (en) * 2021-08-30 2022-01-21 广东南方通信建设有限公司 Cross-platform data migration method, system and readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1534931A (en) * 2003-04-02 2004-10-06 华为技术有限公司 Method of forming dynamic key in radio local network
CN102571702A (en) * 2010-12-22 2012-07-11 中兴通讯股份有限公司 Key generation method, system and equipment in Internet of things
CN103581153A (en) * 2012-08-08 2014-02-12 中国移动通信集团公司 Encryption method and device in system of Internet of Things
CN105281909A (en) * 2015-06-26 2016-01-27 浙江巨联科技股份有限公司 Encryption and decryption mechanism and internet of things lock system using encryption and decryption mechanism

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1534931A (en) * 2003-04-02 2004-10-06 华为技术有限公司 Method of forming dynamic key in radio local network
CN102571702A (en) * 2010-12-22 2012-07-11 中兴通讯股份有限公司 Key generation method, system and equipment in Internet of things
CN103581153A (en) * 2012-08-08 2014-02-12 中国移动通信集团公司 Encryption method and device in system of Internet of Things
CN105281909A (en) * 2015-06-26 2016-01-27 浙江巨联科技股份有限公司 Encryption and decryption mechanism and internet of things lock system using encryption and decryption mechanism

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769009A (en) * 2018-05-28 2018-11-06 深圳和而泰数据资源与云技术有限公司 Data communications method, smart machine and intelligent gateway
CN109005184A (en) * 2018-08-17 2018-12-14 上海小蚁科技有限公司 File encrypting method and device, storage medium, terminal
CN112163237A (en) * 2020-09-01 2021-01-01 北京字节跳动网络技术有限公司 Data processing method and device and electronic equipment
CN113965340A (en) * 2021-08-30 2022-01-21 广东南方通信建设有限公司 Cross-platform data migration method, system and readable medium

Also Published As

Publication number Publication date
CN107872315B (en) 2020-09-22

Similar Documents

Publication Publication Date Title
EP3633913B1 (en) Provisioning a secure connection using a pre-shared key
US11615411B2 (en) POS system with white box encryption key sharing
CN105993146A (en) Secure session capability using public-key cryptography without access to the private key
CN105162772A (en) IoT equipment authentication and key agreement method and device
CN112187448B (en) Data encryption method and system
CN110084054A (en) A kind of data privacy device, method, electronic equipment and storage medium
CN107872315A (en) Data processing method and intelligent terminal
CN102420642B (en) Bluetooth device and communication method thereof
CN107315966B (en) Solid state disk data encryption method and system
CN110519052A (en) Data interactive method and device based on Internet of Things operating system
CN115459919A (en) Internet of things universal terminal security authentication system, method and device and Internet of things communication terminal
US20230289424A1 (en) Security Chip-Based Security Authentication Method and System, Security Chip, and Readable Storage Medium
CN107493281A (en) encryption communication method and device
US12069035B2 (en) Device in network
CN109412788A (en) Cloud storage method of controlling security and system are acted on behalf of in anti-quantum calculation based on public keys pond
CN116186722A (en) Household appliance data encryption method and device
KR101428665B1 (en) Security system and method for using aes-otp
JP6720558B2 (en) Information processing system and encryption communication method
CN115955306B (en) Data encryption transmission method and device, electronic equipment and storage medium
JP5792261B2 (en) Transmission / reception system, transmission apparatus, reception apparatus, authentication apparatus, user apparatus, method executed by them, and program
CN111552538B (en) Virtual simulation-based training system construction method and device and computer equipment
CN112187462B (en) Data processing method and device, electronic equipment and computer readable medium
CN118509237A (en) Encryption method and device for wind turbine generator data
CN115801237A (en) Information encryption/decryption device, information encryption method, and information decryption method
CN117978383A (en) Key exchange method, device, system, equipment and storage medium

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