CN111405082A - Device connection method, electronic device, terminal and storage medium - Google Patents

Device connection method, electronic device, terminal and storage medium Download PDF

Info

Publication number
CN111405082A
CN111405082A CN202010206795.7A CN202010206795A CN111405082A CN 111405082 A CN111405082 A CN 111405082A CN 202010206795 A CN202010206795 A CN 202010206795A CN 111405082 A CN111405082 A CN 111405082A
Authority
CN
China
Prior art keywords
identity
address information
electronic device
terminal
information
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
CN202010206795.7A
Other languages
Chinese (zh)
Other versions
CN111405082B (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010206795.7A priority Critical patent/CN111405082B/en
Publication of CN111405082A publication Critical patent/CN111405082A/en
Application granted granted Critical
Publication of CN111405082B publication Critical patent/CN111405082B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the invention discloses a device connection method, electronic equipment, a terminal and a storage medium, wherein the method comprises the steps of searching random address information broadcasted by the electronic equipment; analyzing the random address information by using the identity analysis secret key to obtain identity address information of the electronic equipment, wherein the identity analysis secret key is information received when the electronic equipment is paired; and when the identity address information is matched with the identity information base, establishing connection with the electronic equipment.

Description

Device connection method, electronic device, terminal and storage medium
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to an apparatus connection method, an electronic apparatus, a terminal, and a storage medium.
Background
With the continuous development of electronic technology, the functions of electronic equipment are more and more, and a terminal can acquire target information of a target object through the electronic equipment and process the target information.
In the prior art, when a terminal is connected with an electronic device for the first time, the terminal searches address information of the electronic device first, after the terminal is connected with the electronic device, the terminal stores the address information of the electronic device, when the terminal is connected with the electronic device again, the terminal searches the address information of the electronic device, when the terminal determines that the address information is the address information stored in the terminal, the terminal is connected with the electronic device, when other electronic devices are connected with the terminal by using the address information of the electronic device, information in the terminal is easy to steal, and the safety of the terminal when the terminal is connected with the electronic device is reduced.
Disclosure of Invention
In order to solve the above technical problem, embodiments of the present invention desirably provide an apparatus connection method, an electronic apparatus, a terminal, and a storage medium, which can improve security when the terminal is connected to the electronic apparatus.
The technical scheme of the invention is realized as follows:
the embodiment of the application provides a device connection method, which is applied to a terminal and comprises the following steps:
searching random address information broadcasted by the electronic equipment;
analyzing the random address information by using an identity analysis key to obtain identity address information of the electronic equipment, wherein the identity analysis key is information received when the electronic equipment is paired;
and when the identity address information is matched with the identity information base, establishing connection with the electronic equipment.
In the above scheme, after the analyzing the random address information by using the identity analysis key to obtain the identity address information of the electronic device, the method further includes:
when the identity address information is not matched with the identity information base, sending a pairing request instruction to the electronic equipment;
when the identity address identification information and the first secret key sent by the electronic equipment are received, the identity address identification information and the first secret key are stored in the identity information base, and the identity address identification information comprises the identity analysis secret key.
In the above scheme, the analyzing the random address information by using an identity analysis key to obtain the identity address information of the electronic device includes:
decrypting the random address information by using a first secret key to obtain a random number and a hash value;
determining a first hash value corresponding to the random address information according to the random number and the identity resolution secret key;
and when the first hash value is matched with the hash value, determining the identity address information of the electronic equipment as the identity address identification information.
An embodiment of the present application further provides an apparatus connection method, which is applied to an electronic apparatus, and the method includes:
when a broadcast instruction of a random address is received, a random number and an identity analysis secret key are obtained;
encrypting the random number by using the identity analysis secret key to obtain random address information of the electronic equipment;
and broadcasting the random address information so as to connect with a terminal by using the random address information.
In the foregoing solution, the analyzing the random address information includes:
before the obtaining of the random number and the identity resolution key, the method further includes:
receiving a pairing request instruction sent by the terminal;
when the electronic equipment is paired with the terminal according to the pairing instruction, acquiring a first secret key;
encrypting the identification address identification information of the electronic equipment by using the first secret key;
and sending the encrypted identity address identification information and the first secret key to the terminal, wherein the identity address identification information comprises an identity analysis secret key so that the terminal can verify the identity address information of the electronic equipment by using the identity analysis secret key.
The embodiment of the application provides a terminal, the terminal includes:
a search unit for searching for random address information broadcast by the electronic device;
the analysis unit is used for analyzing the random address information by using an identity analysis secret key to obtain identity address information of the electronic equipment, wherein the identity analysis secret key is information received when the electronic equipment is paired;
and the connection unit is used for establishing connection with the electronic equipment when the identity address information is matched with the identity information base.
An embodiment of the present application provides an electronic device, which includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a random number and an identity analysis secret key when a broadcast instruction of a random address is received; encrypting the random number by using the identity analysis secret key to obtain random address information of the electronic equipment;
and the broadcasting unit is used for broadcasting the random address information so as to connect with a terminal by using the random address information.
An embodiment of the present application further provides a terminal, where the terminal includes:
the terminal comprises a first memory, a first processor and a first communication bus, wherein the first memory is communicated with the first processor through the first communication bus, the first memory stores a connection program of the electronic device executable by the first processor, and when the connection program of the electronic device is executed, the electronic device connection method applied to the terminal is executed through the first processor.
An embodiment of the present application further provides an electronic device, where the electronic device includes:
the electronic device comprises a second memory, a second processor and a second communication bus, wherein the second memory is communicated with the second processor through the second communication bus, the second memory stores a connection program of the electronic device executable by the second processor, and when the connection program of the electronic device is executed, the electronic device connection method applied to the electronic device is executed through the second processor.
The embodiment of the application provides a storage medium, which stores a computer program and is applied to a terminal, wherein the computer program is executed by a first processor to implement the above-mentioned electronic device connection method applied to the terminal.
The embodiment of the present application further provides a storage medium, which stores a computer program thereon, and is applied to an electronic device, wherein the computer program is executed by a second processor to implement the above-mentioned electronic device connection method applied to the electronic device.
The embodiment of the invention provides a device connection method, electronic equipment, a terminal and a storage medium, wherein the device connection method comprises the following steps: searching random address information broadcasted by the electronic equipment; analyzing the random address information by using the identity analysis secret key to obtain identity address information of the electronic equipment, wherein the identity analysis secret key is information received when the electronic equipment is paired; and when the identity address information is matched with the identity information base, establishing connection with the electronic equipment. By adopting the method, the terminal searches the random address information broadcasted by the electronic equipment and analyzes the random address information to determine the identity information of the electronic equipment, but not determine the identity information of the electronic equipment according to the address information broadcasted by the electronic equipment, so that other electronic equipment cannot be connected with the terminal by using the address information of the electronic equipment, and the safety of the connection between the terminal and the electronic equipment is improved.
Drawings
Fig. 1(a) is a flowchart of an exemplary device connection method provided in an embodiment of the present application;
fig. 1(b) is a flowchart of an exemplary device connection method provided in the embodiment of the present application;
fig. 2 is a first flowchart of a device connection method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of exemplary random address information provided in an embodiment of the present application;
fig. 4 is a flowchart of a device connection method according to an embodiment of the present application;
fig. 5 is a flowchart of an exemplary device connection method provided in the embodiment of the present application;
fig. 6(a) is a flowchart of a fourth exemplary device connection method provided in the embodiment of the present application;
fig. 6(b) is a flowchart of an exemplary device connection method provided in an embodiment of the present application;
fig. 7 is a first schematic structural diagram of a terminal according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 9 is a first schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In the prior art, when a terminal is connected to an electronic device for the first time, as shown in fig. 1(a), the terminal searches for the identity address information of the electronic device first, when the terminal searches the identity address information of the electronic equipment, the terminal is connected with the electronic equipment, at the same time, the terminal stores the identity address information of the electronic device, and when the terminal is connected with the electronic device again, as shown in fig. 1(b), when the terminal scans the identity address information of the electronic equipment, the terminal acquires the identity address information of the electronic equipment, when the terminal determines that the identity address information is stored, that is, the electronic device has been connected to the terminal, the terminal is directly connected to the electronic device, and thus, when other electronic equipment is connected with the terminal by using the identity address information of the electronic equipment, the information in the terminal is easy to steal, and the safety of the terminal in connection with the electronic equipment is reduced.
The problems in the prior art can be solved by the methods in the first embodiment and the second embodiment.
Example one
An embodiment of the present application provides an apparatus connection method, which is applied to a terminal, and fig. 2 is a first flowchart of the apparatus connection method provided in the embodiment of the present application, and as shown in fig. 2, the apparatus connection method may include:
s101, searching random address information broadcasted by the electronic equipment.
The device connection method provided by the embodiment of the application is suitable for a scene that the electronic device is in wireless connection with the terminal.
In the embodiment of the present application, the electronic device includes, but is not limited to, a smart phone, a smart band, a tablet computer, a notebook computer, an industrial computer, a Mobile Internet Device (MID), and the like.
In the embodiment of the application, the terminal can search the random address information broadcast by the electronic equipment when the wireless connection operation is triggered.
It should be noted that a wireless connection switch is provided in the terminal, and when the wireless connection switch is activated, the wireless connection operation is triggered. The wireless connection switch comprises an encryption connection switch and an address resolution function switch, and when the wireless connection operation is triggered, the encryption connection operation and the address resolution operation in the terminal are triggered.
In the embodiment of the application, the random address information is address information broadcast when the electronic device desires to connect with the terminal.
In this embodiment, the random address information includes a random number part and a hash value part, the random number part is a random number generated by the electronic device using the random number generator, and the hash value part is a hash value obtained by the electronic device according to the random number.
For example, the random address information may be 48 bits of data information, where 24 bits of the more significant bits may be a random number, 24 bits of the less significant bits may be a hash value, or 24 bits of the more significant bits may be a hash value, and 24 bits of the less significant bits may be a random number, which may be determined according to practical situations, and this is not limited in this embodiment of the application.
For example, if the random address information is 48 bits of data information, as shown in fig. 3, 24 bits of the more significant bits may be a random number, and 24 bits of the less significant bits may be a hash value.
S102, the random address information is analyzed by using the identity analysis secret key to obtain the identity address information of the electronic equipment, and the identity analysis secret key is information received when the electronic equipment is paired.
In the embodiment of the application, after the terminal searches the random address information broadcast by the electronic device, the terminal analyzes the random address information by using the identity analysis key, so that the identity address information of the electronic device is obtained.
It should be noted that the identity resolution key is information received when the terminal is paired with the electronic device.
In this embodiment of the application, the process of the terminal analyzing the random address information by using the identity analysis key to obtain the identity address information of the electronic device is specifically that the terminal decrypts the random address information by using the first key to obtain the random number and the hash value.
It should be noted that the first secret key is a secret key used when the electronic device transmits the encrypted information to the terminal, and when the terminal receives the encrypted information sent by the electronic device, the terminal may decrypt the encrypted information with the first secret key, so as to obtain the decrypted information sent by the electronic device.
It should be further noted that the first secret key may be binary digits, may also be english letters, and may also be other secret key information, which may be determined specifically according to practical situations, and this is not limited in this embodiment of the present application.
In this embodiment of the application, the random address information of the random address information includes a random number part and a hash value part, the random number part is a random number generated by the electronic device by using the random number generator, the hash value part is a hash value obtained by the electronic device according to the random number, and after the terminal decrypts the random address information by using the first secret key, the terminal can obtain the random number and the hash value.
In this embodiment, after the terminal decrypts the random address information by using the first secret key to obtain the random number and the hash value, the terminal determines the first hash value corresponding to the random address information according to the random number and the identity resolution secret key.
It should be noted that, the terminal determines the first hash value corresponding to the random address information according to the random number and the identity resolution key, and may calculate the random number and the identity resolution key in the random address information by using a preset calculation rule for the terminal to determine the first hash value corresponding to the random address information.
It should be further noted that the preset calculation rule may be a calculation rule of a hash function, a calculation rule of a gaussian function, or a calculation rule of other functions, which may be specifically determined according to an actual situation, and is not limited in this embodiment of the present application.
In the embodiment of the application, after the terminal determines the first hash value corresponding to the random address information according to the random number and the identity resolution key, the terminal matches the first hash value with the hash value in the random address information, and when the terminal determines that the first hash value is matched with the hash value in the random address information, the terminal determines the identity address information of the electronic device as the identity address identification information.
It should be noted that, when the first hash value matches the hash value in the random address information, the first hash value may be equal to the hash value in the random address information.
In the embodiment of the application, when the terminal determines that the first hash value matches the hash value in the random address information, the terminal determines that the identity address information of the electronic device is identity address identification information.
It should be noted that the identification information of the identity address is information identifying the electronic device received when the terminal is paired with the electronic device.
And S103, when the identity address information is matched with the identity information base, connection is established with the electronic equipment.
In the embodiment of the application, after the terminal analyzes the random address information by using the identity analysis key to obtain the identity address information of the electronic equipment, the terminal compares the identity address information with the identity information base, and when the terminal determines that the identity address information is matched with the identity information base, the terminal establishes connection with the electronic equipment.
It should be noted that the connection mode between the terminal and the electronic device may be bluetooth connection, Near Field Communication (NFC), or other connection modes, which may be determined according to actual situations, and this is not limited in this embodiment of the application.
In the embodiment of the application, after the terminal analyzes the random address information by using the identity analysis key to obtain the identity address information of the electronic equipment, the terminal compares the identity address information with the identity information base, and when the terminal determines that the identity address information is not matched with the identity information base, the terminal sends a pairing request instruction to the electronic equipment.
It should be noted that the pairing request instruction may be an instruction for requesting the electronic device to pair with the terminal, specifically, when the terminal is connected with the electronic device through bluetooth, the terminal analyzes the searched random address information of the electronic device by using the identity analysis key, and after obtaining the identity address information of the electronic device, the terminal compares the identity address information with the identity information base, and when the terminal determines that the identity address information is not matched with the identity information base, that is, when the terminal determines that the terminal is connected with the electronic device for the first time, the terminal sends the pairing request instruction to the electronic device, so as to achieve the purpose of connecting with the electronic device for the first time.
In this embodiment of the application, after the terminal sends the pairing request instruction to the electronic device, the terminal starts to wait for receiving response information of the pairing request instruction, and when the terminal receives the identity address identification information and the first secret key sent by the electronic device, the terminal stores the identity address identification information and the first secret key in the identity information base.
It should be noted that the identity address identification information includes an identity resolution key, and the identity resolution key is information received when the terminal is paired with the electronic device.
In this embodiment of the present application, the identity analysis key is a key preset in the electronic device, and the identity analysis key may be 16-bit key parameter information, may also be 18-bit key parameter information, and may also be 24-bit key parameter information, which may be specifically determined according to an actual situation, which is not limited in this embodiment of the present application.
The first key is a key used when the electronic device transmits the encrypted information to the terminal, and when the terminal receives the encrypted information sent by the electronic device, the terminal can decrypt the encrypted information by using the first key, so as to obtain the decrypted information sent by the electronic device.
It should be further noted that the first secret key may be binary digits, may also be english letters, and may also be other secret key information, which may be determined specifically according to practical situations, and this is not limited in this embodiment of the present application.
In this embodiment, the identity information base is an information base storing identity address identification information and a first key.
It can be understood that the terminal determines the identity information of the electronic device by searching the random address information broadcasted by the electronic device and analyzing the random address information, and the identity information of the electronic device is not determined according to the address information broadcasted by the electronic device, so that other electronic devices cannot be connected with the terminal by using the address information of the electronic device, and the security of the connection between the terminal and the electronic device is improved.
Example two
An embodiment of the present application further provides an apparatus connection method, which is applied to an electronic apparatus, and fig. 4 is a flowchart of an apparatus connection method provided in the embodiment of the present application, and as shown in fig. 4, the apparatus connection method may include:
s201, when a broadcast instruction of a random address is received, a random number and an identity analysis secret key are obtained.
In the embodiment of the present application, the electronic device includes, but is not limited to, a smart phone, a smart band, a tablet computer, a notebook computer, an industrial computer, a Mobile Internet Device (MID), and the like.
It should be noted that, a switch for broadcasting a random address is provided on the electronic device, and when the switch for broadcasting the random address is triggered, the electronic device receives a broadcast instruction of the random address.
In the embodiment of the application, the electronic device is provided with a random number generator, and when the electronic device receives a broadcast instruction of a random address, the random number generator is triggered to generate a random number.
The random number may be a 24-bit random number or a 48-bit random number, which may be determined according to actual conditions, and is not limited in this embodiment of the present application.
It should be further noted that, when the random number may be a 24-bit random number, the electronic device may directly generate a 24-bit random number by using the random number generator, or the electronic device may also generate a plurality of intermediate random numbers by using the random number generator, and obtain a 24-bit random number according to the plurality of intermediate random numbers, which may be determined specifically according to an actual situation, and this is not limited in this embodiment of the application.
It should be noted that the identity analysis key is a key preset in the electronic device, and the identity analysis key may be 16-bit key parameter information, may also be 18-bit key parameter information, and may also be 24-bit key parameter information, which may be specifically determined according to an actual situation, and the embodiment of the present application is not limited thereto.
In this embodiment, before the electronic device obtains the random number and the identity resolution key, the electronic device further receives a pairing request instruction sent by the terminal.
It should be noted that the pairing request instruction may be an instruction for requesting the electronic device to pair with the terminal.
In the embodiment of the application, after the electronic device receives a pairing request instruction sent by a terminal, the electronic device is paired with the terminal according to the pairing request instruction, and after the electronic device is paired with the terminal, the electronic device acquires a first secret key.
It should be noted that the first secret key is a secret key used when the electronic device transmits the encrypted information to the terminal, and when the terminal receives the encrypted information sent by the electronic device, the terminal may decrypt the encrypted information with the first secret key, so as to obtain the decrypted information sent by the electronic device.
It should be further noted that the first secret key may be binary digits, may also be english letters, and may also be other secret key information, which may be determined specifically according to practical situations, and this is not limited in this embodiment of the present application.
In this embodiment of the application, after the electronic device obtains the first secret key, the electronic device encrypts the id address identification information of the electronic device by using the first secret key.
In this embodiment, after the electronic device encrypts the id address identification information of the electronic device by using the first key, the electronic device sends the encrypted id address identification information and the first key to the terminal.
It should be noted that the identity address identification information includes an identity resolution key, so that the terminal can verify the identity address information of the electronic device by using the identity resolution key.
S202, encrypting the random number by using the identity analysis secret key to obtain the random address information of the electronic equipment.
In this embodiment of the application, after the electronic device obtains the random number and the identity resolution key, the electronic device encrypts the random number by using the identity resolution key to obtain the random address information of the electronic device.
In this embodiment of the present application, the electronic device encrypts the random number by using the identity resolution key to obtain the process of the random address information of the electronic device, which may be a process of calculating the random number and the identity resolution key in the random address information by using a preset calculation rule for the electronic device to obtain a hash value, and after the electronic device obtains the hash value, the electronic device combines the hash value and the random number to obtain the random address of the electronic device.
It should be further noted that the preset calculation rule may be a calculation rule of a hash function, a calculation rule of a gaussian function, or a calculation rule of other functions, which may be specifically determined according to an actual situation, and is not limited in this embodiment of the present application.
And S203, broadcasting the random address information so as to connect with the terminal by using the random address information.
In this embodiment, after the electronic device encrypts the random number by using the identity resolution key to obtain the random address information of the electronic device, the electronic device broadcasts the random address information to connect with the terminal by using the random address information.
For example, as shown in fig. 5, when the terminal receives random address information sent by the electronic device, the terminal determines a random number and a hash value from the random address information, and parses a key according to the random number and an identity to determine a first hash value, after the terminal determines the first hash value, the terminal compares the first hash value with the hash value in the random address information, when the terminal determines that the first hash value matches the hash value in the random address information, the terminal determines that the identity address information of the electronic device is identity address identification information and connects with the electronic device, and when the terminal determines that the first hash value does not match the hash value in the random address information, the terminal does not connect with the electronic device.
Illustratively, as shown in fig. 6(a), when the terminal is connected to the electronic device for the first time, i.e. when the terminal is connected to the electronic device for the first time after being configured with the electronic device, the terminal searches for random address information broadcast by the electronic device and establishes connection with the electronic device through the random address information, after the terminal is connected to the electronic device, the electronic device sends identity address identification information to the terminal, the terminal stores the identity address identification information in an identity information base, the identity information base comprises a resolvable list and a white list, the resolvable list is used for storing the identity address identification information, the white list is used for storing the identity address information in the identity address identification information, when the terminal is connected to the electronic device again, as shown in fig. 6(b), the terminal triggers the wireless connection operation first, after triggering the wireless connection operation, the terminal searches for the random address information broadcast by the electronic device, when the terminal searches the random address information, the terminal analyzes the random address information to obtain the identity address information of the electronic equipment, and when the terminal determines that the identity address information is matched with the identity information base, the terminal is connected with the electronic equipment.
It can be understood that, the electronic device encrypts the identity resolution key by using the random number to obtain the random address information of the electronic device, and broadcasts the random address information, so that the identity address information broadcasted by the electronic device each time is different, other electronic devices cannot determine the identity address information of the electronic device, cannot forge the identity address information and are connected with the pre-connected electronic device, and the security of the pre-connected electronic device when being connected with the electronic device is improved.
EXAMPLE III
Based on the same inventive concept of the embodiments, the embodiments of the present application provide a terminal 1, corresponding to a device connection method applied in the terminal; fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application, where the terminal 1 may include:
a search unit 11 for searching for random address information broadcast by the electronic device;
the analyzing unit 12 is configured to analyze the random address information by using an identity analysis key to obtain identity address information of the electronic device, where the identity analysis key is information received when the electronic device is paired with the electronic device;
and the connection unit 13 is configured to establish connection with the electronic device when the identity address information matches the identity information base.
In some embodiments of the present application, the terminal further comprises a first sending unit 14 and a storage unit 15,
the first sending unit 14 is configured to send a pairing request instruction to the electronic device when the identity address information does not match the identity information base;
the storage unit 15 is configured to store, when receiving the identity address identification information and the first secret key sent by the electronic device, the identity address identification information and the first secret key in the identity information base, where the identity address identification information includes the identity resolution secret key.
In some embodiments of the present application, the terminal further comprises a determining unit 16,
the determining unit 16 is configured to decrypt the random address information by using a first secret key to obtain a random number and a hash value; determining a first hash value corresponding to the random address information according to the random number and the identity resolution secret key; and when the first hash value is matched with the hash value, determining the identity address information of the electronic equipment as the identity address identification information.
In practical applications, the search Unit 11, the analysis Unit 12, the connection Unit 13, the first transmission Unit 14, the storage Unit 15, and the determination Unit 16 may be implemented by a first processor 17 on the terminal 1, specifically, implemented by a CPU (Central Processing Unit), an MPU (Microprocessor Unit), a DSP (Digital Signal Processing), a Field Programmable Gate Array (FPGA), or the like; the above-mentioned data storage may be implemented by the first memory 18 on the terminal 1.
An embodiment of the present invention further provides a terminal 1, and as shown in fig. 8, the terminal 1 includes: a first processor 17, a first memory 18, and a first communication bus 19, the first memory 18 communicating with the first processor 17 through the first communication bus 19, the first memory 18 storing a program executable by the first processor 17, the program, when executed, executing the device connection method applied to the terminal as described above through the first processor 17.
In practical applications, the first Memory 18 may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory) such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD) or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to the first processor 17.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by the first processor 17 to implement the device connection method applied to the terminal as described above.
It can be understood that the terminal determines the identity information of the electronic device by searching the random address information broadcasted by the electronic device and analyzing the random address information, and the identity information of the electronic device is not determined according to the address information broadcasted by the electronic device, so that other electronic devices cannot be connected with the terminal by using the address information of the electronic device, and the security of the connection between the terminal and the electronic device is improved.
Example four
Based on the same inventive concept of the second embodiment, the embodiment of the present application provides an electronic device 2, corresponding to a device connection method in the electronic device; fig. 9 is a schematic structural diagram of a first electronic device according to an embodiment of the present disclosure, where the electronic device 2 may include:
an obtaining unit 21, configured to obtain a random number and an identity resolution key when a broadcast instruction of a random address is received; encrypting the random number by using the identity analysis secret key to obtain random address information of the electronic equipment;
a broadcasting unit 22 for broadcasting the random address information to connect with a terminal using the random address information.
In some embodiments of the present application, the electronic device further comprises a receiving unit 23, an encryption unit 24, and a second transmitting unit 25;
the receiving unit 23 is configured to receive a pairing request instruction sent by the terminal;
the obtaining unit 21 is configured to obtain a first secret key when the electronic device is paired with the terminal according to the pairing instruction;
the encryption unit 24 is configured to encrypt the id address identification information of the electronic device with the first key;
the second sending unit 25 is configured to send the encrypted identity address identification information and the first secret key to the terminal, where the identity address identification information includes an identity resolution secret key, so that the terminal can verify the identity address information of the electronic device by using the identity resolution secret key.
In practical applications, the obtaining Unit 21, the broadcasting Unit 22, the receiving Unit 23, the encrypting Unit 24, and the second sending Unit 25 may be implemented by a second processor 26 on the electronic device 2, specifically, implemented by a CPU (central Processing Unit), an MPU (micro processor Unit), a DSP (digital signal processor), a Field Programmable Gate Array (FPGA), or the like; the above data storage may be implemented by the second memory 27 on the electronic device 2.
An embodiment of the present invention further provides an electronic device 2, and as shown in fig. 10, the electronic device 2 includes: a second processor 26, a second memory 27 and a second communication bus 28, wherein the second memory 27 communicates with the second processor 26 through the second communication bus 28, the second memory 27 stores a program executable by the second processor 26, and when the program is executed, the device connection method applied to the electronic device as described above is performed through the second processor 26.
In practical applications, the second Memory 27 may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory) such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD) or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to the second processor 26.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by the second processor 26 to implement the device connection method applied to the electronic device as described above.
It can be understood that, the electronic device encrypts the identity resolution key by using the random number to obtain the random address information of the electronic device, and broadcasts the random address information, so that the identity address information broadcasted by the electronic device each time is different, other electronic devices cannot determine the identity address information of the electronic device, cannot forge the identity address information and are connected with the pre-connected electronic device, and the security of the pre-connected electronic device when being connected with the electronic device is improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (11)

1. A device connection method is applied to a terminal, and the method comprises the following steps:
searching random address information broadcasted by the electronic equipment;
analyzing the random address information by using an identity analysis key to obtain identity address information of the electronic equipment, wherein the identity analysis key is information received when the electronic equipment is paired;
and when the identity address information is matched with the identity information base, establishing connection with the electronic equipment.
2. The method according to claim 1, wherein after the analyzing the random address information by using the identity analysis key to obtain the identity address information of the electronic device, further comprises:
when the identity address information is not matched with the identity information base, sending a pairing request instruction to the electronic equipment;
when the identity address identification information and the first secret key sent by the electronic equipment are received, the identity address identification information and the first secret key are stored in the identity information base, and the identity address identification information comprises the identity analysis secret key.
3. The method of claim 1, wherein the analyzing the random address information by using an identity analysis key to obtain the identity address information of the electronic device comprises:
decrypting the random address information by using a first secret key to obtain a random number and a hash value;
determining a first hash value corresponding to the random address information according to the random number and the identity resolution secret key;
and when the first hash value is matched with the hash value, determining the identity address information of the electronic equipment as the identity address identification information.
4. A device connection method is applied to an electronic device, and the method comprises the following steps:
when a broadcast instruction of a random address is received, a random number and an identity analysis secret key are obtained;
encrypting the random number by using the identity analysis secret key to obtain random address information of the electronic equipment;
and broadcasting the random address information so as to connect with a terminal by using the random address information.
5. The method of claim 4, wherein prior to obtaining the random number and the identity resolution key, the method further comprises:
receiving a pairing request instruction sent by the terminal;
when the electronic equipment is paired with the terminal according to the pairing instruction, acquiring a first secret key;
encrypting the identification address identification information of the electronic equipment by using the first secret key;
and sending the encrypted identity address identification information and the first secret key to the terminal, wherein the identity address identification information comprises an identity analysis secret key so that the terminal can verify the identity address information of the electronic equipment by using the identity analysis secret key.
6. A terminal, characterized in that the terminal comprises:
a search unit for searching for random address information broadcast by the electronic device;
the analysis unit is used for analyzing the random address information by using an identity analysis secret key to obtain identity address information of the electronic equipment, wherein the identity analysis secret key is information received when the electronic equipment is paired;
and the connection unit is used for establishing connection with the electronic equipment when the identity address information is matched with the identity information base.
7. An electronic device, characterized in that the electronic device comprises:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a random number and an identity analysis secret key when a broadcast instruction of a random address is received; encrypting the random number by using the identity analysis secret key to obtain random address information of the electronic equipment;
and the broadcasting unit is used for broadcasting the random address information so as to connect with a terminal by using the random address information.
8. A terminal, characterized in that the terminal comprises:
a first memory, a first processor and a first communication bus, the first memory communicating with the first processor through the first communication bus, the first memory storing a connection program of an electronic device executable by the first processor, the method of any one of claims 1 to 3 being performed by the first processor when the connection program of the electronic device is executed.
9. An electronic device, characterized in that the electronic device comprises:
a second memory, a second processor and a second communication bus, the second memory communicating with the second processor through the second communication bus, the second memory storing a connection program of an electronic device executable by the second processor, the method of any one of claims 4 to 5 being performed by the second processor when the connection program of the electronic device is executed.
10. A storage medium having stored thereon a computer program for application to a terminal, characterized in that the computer program, when executed by a first processor, implements the method of any one of claims 1 to 3.
11. A storage medium having stored thereon a computer program for application in an electronic device, wherein the computer program, when executed by a second processor, implements the method of any of claims 4 to 5.
CN202010206795.7A 2020-03-23 2020-03-23 Device connection method, electronic device, terminal and storage medium Active CN111405082B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010206795.7A CN111405082B (en) 2020-03-23 2020-03-23 Device connection method, electronic device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010206795.7A CN111405082B (en) 2020-03-23 2020-03-23 Device connection method, electronic device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN111405082A true CN111405082A (en) 2020-07-10
CN111405082B CN111405082B (en) 2022-08-16

Family

ID=71432839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010206795.7A Active CN111405082B (en) 2020-03-23 2020-03-23 Device connection method, electronic device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111405082B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112636901A (en) * 2020-12-17 2021-04-09 拉扎斯网络科技(上海)有限公司 Identity recognition method and device, storage medium and electronic equipment
WO2023051229A1 (en) * 2021-09-30 2023-04-06 华为技术有限公司 Method and apparatus for identifying device, and electronic device and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107317606A (en) * 2017-07-03 2017-11-03 飞天诚信科技股份有限公司 A kind of method and apparatus of bluetooth anti-tracking
WO2018076365A1 (en) * 2016-10-31 2018-05-03 美的智慧家居科技有限公司 Key negotiation method and device
US20180227279A1 (en) * 2015-07-29 2018-08-09 Samsung Electronics Co., Ltd. Method for communication between devices and devices thereof
CN109040142A (en) * 2018-10-17 2018-12-18 杭州复杂美科技有限公司 Private communication method, address configuration method, equipment and storage medium
CN109361669A (en) * 2018-10-19 2019-02-19 铂有限公司 Identity identifying method, device and the equipment of communication equipment
WO2019129346A1 (en) * 2017-12-28 2019-07-04 Nokia Technologies Oy Wireless authentication apparatus, system and method
CN110431803A (en) * 2019-03-29 2019-11-08 阿里巴巴集团控股有限公司 Identity-based information management encryption key
US20190349202A1 (en) * 2016-11-21 2019-11-14 Huizhou Tcl Mobile Communication Co., Ltd. Protection method and protection system of system partition key data and terminal
CN110489958A (en) * 2019-08-27 2019-11-22 上海银基信息安全技术股份有限公司 A kind of identity identifying method, positioning device and lock end to be solved

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180227279A1 (en) * 2015-07-29 2018-08-09 Samsung Electronics Co., Ltd. Method for communication between devices and devices thereof
WO2018076365A1 (en) * 2016-10-31 2018-05-03 美的智慧家居科技有限公司 Key negotiation method and device
US20190349202A1 (en) * 2016-11-21 2019-11-14 Huizhou Tcl Mobile Communication Co., Ltd. Protection method and protection system of system partition key data and terminal
CN107317606A (en) * 2017-07-03 2017-11-03 飞天诚信科技股份有限公司 A kind of method and apparatus of bluetooth anti-tracking
WO2019129346A1 (en) * 2017-12-28 2019-07-04 Nokia Technologies Oy Wireless authentication apparatus, system and method
CN109040142A (en) * 2018-10-17 2018-12-18 杭州复杂美科技有限公司 Private communication method, address configuration method, equipment and storage medium
CN109361669A (en) * 2018-10-19 2019-02-19 铂有限公司 Identity identifying method, device and the equipment of communication equipment
CN110431803A (en) * 2019-03-29 2019-11-08 阿里巴巴集团控股有限公司 Identity-based information management encryption key
CN110489958A (en) * 2019-08-27 2019-11-22 上海银基信息安全技术股份有限公司 A kind of identity identifying method, positioning device and lock end to be solved

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112636901A (en) * 2020-12-17 2021-04-09 拉扎斯网络科技(上海)有限公司 Identity recognition method and device, storage medium and electronic equipment
CN112636901B (en) * 2020-12-17 2023-09-29 拉扎斯网络科技(上海)有限公司 Identity recognition method, device, storage medium and electronic equipment
WO2023051229A1 (en) * 2021-09-30 2023-04-06 华为技术有限公司 Method and apparatus for identifying device, and electronic device and medium

Also Published As

Publication number Publication date
CN111405082B (en) 2022-08-16

Similar Documents

Publication Publication Date Title
CN107801165B (en) Business short message pushing method and device, computer equipment and storage medium
CN107645725B (en) Network configuration method and system, routing equipment and network access equipment
CN105577379B (en) Information processing method and device
CN109146481B (en) Method, medium and device for automatically importing account private key of blockchain wallet and blockchain system
CN104144049B (en) A kind of encryption communication method, system and device
CN109194473B (en) Data transmission method, system, device, terminal and storage medium
CN111405082B (en) Device connection method, electronic device, terminal and storage medium
CN106685644B (en) Communication encryption method and device, gateway, server, intelligent terminal and system
CN108449357B (en) Authorized login method and device, intelligent device and storage medium
CN110708164B (en) Control method and device for Internet of things equipment, storage medium and electronic device
WO2017031849A1 (en) Fingerprint authentication method, connection device, and terminal device
CN111080857B (en) Vehicle digital key management and use method and device, mobile terminal and storage medium
CN110621016B (en) User identity protection method, user terminal and base station
CN114637987A (en) Security chip firmware downloading method and system based on platform verification
CN110191467B (en) Authentication method, equipment, device and storage medium for Internet of things equipment
CN108306793B (en) Intelligent device, intelligent home gateway, and method and system for establishing connection
EP3113528B1 (en) Wifi hotspot connection and selection method, communications terminal and system
CN115868189A (en) Method, vehicle, terminal and system for establishing vehicle safety communication
US8948389B2 (en) Wireless network connection method, wireless network apparatus and wireless network access point (AP) applying the method
CN112202768A (en) Data encryption method, device and system and readable storage medium
CN111107550A (en) Dual-channel access registration method and device for 5G terminal equipment and storage medium
CN107707611B (en) Electric power data cloud processing method, device and system
CN112995896B (en) Vehicle parking control method, device, vehicle, server, parking pile and system
CN113434837B (en) Method and device for equipment identity authentication and smart home system
CN110381505B (en) Method and device for accessing network hard disk video recorder

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