Nothing Special   »   [go: up one dir, main page]

CN112866995A - Connection method, connection device, electronic equipment and storage medium - Google Patents

Connection method, connection device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112866995A
CN112866995A CN202011581530.1A CN202011581530A CN112866995A CN 112866995 A CN112866995 A CN 112866995A CN 202011581530 A CN202011581530 A CN 202011581530A CN 112866995 A CN112866995 A CN 112866995A
Authority
CN
China
Prior art keywords
equipment
electronic device
electronic
electronic equipment
connection
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
CN202011581530.1A
Other languages
Chinese (zh)
Other versions
CN112866995B (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 Coolpad Technology Co ltd
Original Assignee
Shenzhen Coolpad 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 Shenzhen Coolpad Technology Co ltd filed Critical Shenzhen Coolpad Technology Co ltd
Priority to CN202011581530.1A priority Critical patent/CN112866995B/en
Publication of CN112866995A publication Critical patent/CN112866995A/en
Application granted granted Critical
Publication of CN112866995B publication Critical patent/CN112866995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

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

Abstract

The application provides a connection method, a connection device, an electronic device and a storage medium, wherein the method comprises the following steps: sending a connection request to a second electronic device; the connection request carries the equipment identifier of the first electronic equipment; under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier in the equipment identifier library of the second electronic equipment, connection is established with the second electronic equipment; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext. The connection method solves the problems of low efficiency and poor user experience of the existing Bluetooth pairing connection.

Description

Connection method, connection device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a connection method, an apparatus, an electronic device, and a storage medium.
Background
With the rapid development of the internet of things era, bluetooth communication, which is one of wireless communication technologies, has been increasingly and widely applied to different scenes by means of data communication and voice communication which are convenient, flexible, safe, low in cost and low in power consumption. In the existing Bluetooth pairing connection process, the initiating connecting party needs to wait for the receiving party to agree to connect and then can establish connection with the receiving party, so that the connection efficiency is low and the user experience is poor.
Disclosure of Invention
The embodiment of the application provides a connection method, a connection device, an electronic device and a storage medium, and solves the problems of low efficiency and poor user experience of the existing Bluetooth pairing connection.
In order to solve the technical problems, the application comprises the following technical scheme:
in a first aspect, an embodiment of the present application provides a connection method, where the method includes:
sending a connection request to a second electronic device; the connection request carries the equipment identifier of the first electronic equipment;
under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier in the equipment identifier library of the second electronic equipment, connection is established with the second electronic equipment; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext.
In a second aspect, an embodiment of the present application provides another connection method, where the method includes:
receiving a connection request sent by the first electronic equipment; the connection request carries the equipment identifier of the first electronic equipment;
under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier of the equipment identifier library of the second electronic equipment, connection is established with the first electronic equipment; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext.
In a third aspect, an embodiment of the present application provides a connection device, where the connection device includes:
the first sending module is used for sending a connection request to the second electronic equipment; the connection request carries the equipment identifier of the first electronic equipment;
the connection module is used for establishing connection with the second electronic equipment under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier in the equipment identifier library of the second electronic equipment; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext.
In a fourth aspect, an embodiment of the present application provides another connecting device, where the device includes:
the acquisition module is used for acquiring the equipment identifier of at least one piece of electronic equipment and storing the equipment identifier into an equipment identifier library; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to an MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry a ciphertext and successfully analyzing the ciphertext;
the receiving module is used for receiving a connection request sent by the first electronic equipment; the connection request carries the equipment identifier of the first electronic equipment;
and the connection module is used for establishing connection with the first electronic equipment under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier of the equipment identifier library of the second electronic equipment.
In a fifth aspect, an embodiment of the present application provides a first electronic device, including a processor, a memory, and a communication interface:
the processor is connected with the memory and the communication interface;
the memory for storing executable program code;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the connection method as described in the first aspect above.
In a sixth aspect, an embodiment of the present application provides a second electronic device, including a processor, a memory, and a communication interface:
the processor is connected with the memory and the communication interface;
the memory for storing executable program code;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the connection method as described in the second aspect above.
In a seventh aspect, this application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is configured to, when executed by a processor, implement the connection method according to the first aspect or any possible implementation manner of the first aspect, the second aspect, or any possible implementation manner of the second aspect.
The connection method provided by the application uses the same encryption and decryption mode for the electronic equipment produced by the same manufacturer, and when the two electronic equipment establish Bluetooth communication, the second electronic equipment broadcasts data carrying ciphertext. When the first electronic equipment receives data carrying the ciphertext and broadcasted by the second electronic equipment and successfully decrypts the ciphertext, the second electronic equipment obtains the equipment identifier of the first electronic equipment and stores the equipment identifier into the equipment identifier library, and under the condition that the first electronic equipment sends a connection request to the second electronic equipment, the second electronic equipment does not need to wait for user response, and the first electronic equipment and the second electronic equipment are directly connected in a communication mode. The connection method effectively improves the connection efficiency and improves the user experience.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic structural diagram of a connection system provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of a connection method provided in an embodiment of the present application;
fig. 3 is a schematic diagram of a process of establishing a connection between a first electronic device and a second electronic device according to an embodiment of the present application;
fig. 4 is a schematic flow chart of another connection method provided in the embodiments of the present application;
FIG. 5 is a schematic structural diagram of a connecting device according to an embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of another connecting device provided in the embodiments of the present application;
fig. 7 is a schematic structural diagram of a first electronic device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a second electronic device according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the present application are described in detail below.
The terms "first," "second," "third," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a connection system according to an embodiment of the present disclosure. The connection system structure includes a first electronic device 10 and a second electronic device 20.
The first electronic device 10 may include, but is not limited to, a smartphone, a personal computer, a laptop, a smart tablet, and a portable wearable device. The first electronic device 10 has a flexible Access mode and a high bandwidth communication performance, and has a plurality of communication modes, which may include but are not limited to communication through various wireless operation networks such as GSM, Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (W-CDMA), and may also communicate through wireless lan, bluetooth, and infrared. In an embodiment of the application, the first electronic device 10 may acquire and decrypt encrypted data broadcast by the second electronic device 20. If the decryption is successful, the first electronic device 10 may initiate a connection to the second electronic device 20, and the connection is directly established without waiting for a response from the second electronic device 20.
The second electronic device 20 may include, but is not limited to, a smartphone, a personal computer, a laptop, a smart tablet, and a portable wearable device. The second electronic device 20 has a flexible Access mode and a high bandwidth communication performance, and has a plurality of communication modes, which may include but are not limited to communication through various wireless operation networks such as GSM, Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (W-CDMA), and may also communicate through wireless lan, bluetooth, and infrared. In this embodiment of the application, the broadcast sent by the second electronic device 20 carries the ciphertext, and may receive the data sent by the first electronic device 10 and carrying the device identifier of the first electronic device 10. After the first electronic device successfully decrypts the ciphertext, the request for establishing the connection of the first electronic device 10 may be received, and the communication connection may be directly established with the first electronic device 10 without waiting for a response from the user.
The connection method provided by the embodiments of the present application will be described below in conjunction with the connection system shown in fig. 1.
Referring to fig. 2, fig. 2 is a schematic flow chart of a connection method in an embodiment of the present application, where the method includes:
s201, sending a connection request to second electronic equipment; the connection request carries the device identifier of the first electronic device.
Specifically, a user uses a first electronic device to send a connection request to a second electronic device, where the connection request carries a device identifier of the first electronic device.
Further, before sending the connection request to the second electronic device, the first electronic device obtains, in real time, encrypted data broadcast by the second electronic device, where the encrypted data broadcast by different devices is different. Wherein the encrypted data carries a ciphertext. After the Bluetooth function is started by the first electronic device, data broadcasted by the external device are continuously scanned, and after the first electronic device acquires encrypted data broadcasted by the second electronic device, ciphertext in the encrypted data is decrypted. And if the ciphertext analysis is successful, the first electronic equipment sends data carrying the equipment identifier of the first electronic equipment to the second electronic equipment, and if the ciphertext analysis is failed, the first electronic equipment and the second electronic equipment do not establish connection and do not perform subsequent data communication. The data type broadcasted by the second electronic device may be self-defined, that is, the broadcasted message type may be self-defined, and the fields of the message type may include, but are not limited to: 0xFF, 0x3D, 0x27, and the like. And the second electronic equipment combines the plaintext with the message type field to generate a ciphertext through an encryption algorithm, and then broadcasts the encrypted data carrying the ciphertext outwards. The plaintext content and the message type field are not limited by the application.
Specifically, the first electronic device and the second electronic device may use the same Encryption and decryption method, such as Advanced Encryption Standard (AES). The AES encryption and decryption mode adopts a symmetric encryption algorithm, namely an encryption party and a decryption party agree a unified key in advance, the encryption party uses the encryption algorithm to encrypt a plaintext by combining the key and the plaintext to generate a ciphertext, then the ciphertext is sent to the decryption party, the decryption party uses the decryption algorithm to decrypt the ciphertext by combining the key to generate the plaintext, and therefore communication is achieved.
As shown in fig. 3, the first electronic device is a smart phone, the second electronic device is a bluetooth headset, and the smart phone and the bluetooth headset are manufactured by the same manufacturer, and the conversion between the plaintext a and the ciphertext P is implemented based on the same secret key K by using an AES encryption and decryption method. The user starts the Bluetooth function of the smart phone and the Bluetooth headset. The bluetooth headset combines the plaintext a with the broadcast message type field through an encryption algorithm and a key K to generate a ciphertext P, and broadcasts the encrypted data carrying the ciphertext P to the outside, as shown in fig. 3. The smart phone continuously scans data information sent by external equipment, receives encrypted data carrying a ciphertext P broadcast by the Bluetooth headset, acquires the ciphertext P and decrypts the ciphertext P through a decryption algorithm, and the decryption algorithm is decrypted based on the secret key K. If the decryption algorithm can decrypt the ciphertext P to obtain the plaintext A, the decryption algorithm is indicated to be successful in decryption. The smartphone may send data carrying the smartphone's device identification to the bluetooth headset.
S202, under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier in the equipment identifier library of the second electronic equipment, connection is established with the second electronic equipment; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext.
Specifically, the second electronic device obtains a connection request sent by the first electronic device, where the connection request carries a device identifier of the first electronic device, and each device identifier corresponds to one MAC address. And the second electronic equipment compares the equipment identifier and the corresponding MAC address of the first electronic equipment with the equipment identifiers and the respective corresponding MAC addresses in the equipment identifier library, and if the MAC address corresponding to the equipment identifier of the first electronic equipment is consistent with the MAC address corresponding to any one equipment identifier in the equipment identifier library, the second electronic equipment directly establishes connection with the first electronic equipment without waiting for the response of the user, such as clicking to agree with the connection and the like.
Further, before the second electronic device establishes a connection with the first electronic device, device identifiers and respective corresponding MAC addresses of the plurality of electronic devices are first acquired, and the acquired device identifiers and respective corresponding MAC addresses are stored in a device identifier library. After the ciphertext is successfully analyzed by the first electronic device, sending data carrying the device identifier of the first electronic device to the second electronic device, so that the device identifier of the first electronic device is stored in the device identifier library by the second electronic device. The device identification library comprises device identifications of at least one electronic device, and each device identification corresponds to one MAC address. The electronic device corresponding to the device identifier in the device identifier library is the electronic device which returns response data to the second electronic device after receiving and successfully analyzing the encrypted data carrying the ciphertext broadcasted by the second electronic device.
The connection method provided by the application uses the same encryption and decryption mode for the electronic equipment produced by the same manufacturer, and when the two electronic equipment establish Bluetooth communication, the second electronic equipment broadcasts data carrying ciphertext. When the first electronic equipment receives data carrying the ciphertext and broadcasted by the second electronic equipment and successfully decrypts the ciphertext, the second electronic equipment obtains the equipment identifier of the first electronic equipment and the MAC address corresponding to the equipment identifier and stores the equipment identifier into the equipment identifier library, and under the condition that the first electronic equipment sends a connection request to the second electronic equipment, the second electronic equipment does not need to wait for user response, and the first electronic equipment and the second electronic equipment directly establish communication connection. The connection method effectively improves the connection efficiency and improves the user experience.
Referring to fig. 4, fig. 4 is a schematic flow chart of another connection method provided in the embodiment of the present application, where the method includes:
s401, broadcasting the encrypted data by the second electronic equipment; the encrypted data carries a ciphertext.
Specifically, the second electronic device combines a plaintext preset by the relevant person with a message type field, generates a ciphertext through an encryption algorithm, forms encrypted data, and broadcasts the encrypted data to the outside. The plaintext content and the message type are not limited by the application. The encryption and decryption mode may be an AES encryption and decryption mode, and the specific encryption and decryption process is described in detail in the above embodiment, which is not described in detail in this embodiment.
S402, the first electronic device obtains encrypted data of the ciphertext carried by the second electronic device.
Specifically, the first electronic device starts the bluetooth, scans data broadcasted by the peripheral device, and acquires encrypted data carrying a ciphertext broadcasted by the second electronic device.
And S403, the first electronic equipment analyzes the ciphertext.
Specifically, after acquiring the encrypted data, the first electronic device decrypts the ciphertext by using the same key as the encryption algorithm based on the decryption algorithm.
And S404, sending data carrying the equipment identifier of the first electronic equipment and the MAC address corresponding to the equipment identifier to the second electronic equipment under the condition that the ciphertext is successfully analyzed.
Specifically, if the first electronic device successfully analyzes the ciphertext, the data carrying the device identifier of the first electronic device and the MAC address corresponding to the device identifier is sent to the second electronic device, so that the device identifier and the corresponding MAC address are stored in the device identifier library of the second electronic device by the second electronic device. And if the first electronic equipment fails to analyze the ciphertext, not performing subsequent communication with the second electronic equipment.
S405, the second electronic device receives data which is sent by the first electronic device and carries the device identification of the first electronic device and the MAC address corresponding to the device identification, and the MAC address is stored in a device identification library.
Specifically, the second electronic device receives the device identifier and the MAC address of the first electronic device, and stores the MAC address corresponding to the device identifier in the device identifier library. The device identification library comprises device identifications of at least one electronic device, and each device identification corresponds to one MAC address. The electronic device corresponding to the device identifier in the device identifier library is the electronic device which returns response data to the second electronic device after receiving and successfully analyzing the encrypted data carrying the ciphertext broadcasted by the second electronic device.
S406, the first electronic device sends a connection request to the second electronic device.
Specifically, under the condition that the ciphertext is successfully analyzed, the first electronic device sends a connection request to the second electronic device, where the connection request carries an MAC address corresponding to the device identifier of the first electronic device.
S407, under the condition that the MAC address corresponding to the device identifier of the first electronic device is consistent with the MAC address corresponding to any one device identifier in the device identifier library of the second electronic device, connection is established with the first electronic device.
Specifically, after the second electronic device obtains the device identifier of the first electronic device, the MAC address corresponding to the device identifier of the first electronic device is compared with the MAC addresses corresponding to all the device identifiers in the device identifier library of the second electronic device, and if the MAC address corresponding to the device identifier of the first electronic device is consistent with the MAC address corresponding to any one device identifier in the device identifier library of the second electronic device, the second electronic device directly establishes connection with the first electronic device without waiting for a response of the user.
According to the connection method provided by the embodiment of the application, the first electronic device and the second electronic device realize conversion between the plaintext and the ciphertext based on the same secret key, after the ciphertext in the encrypted data broadcast by the second electronic device is successfully analyzed by the first electronic device, the second electronic device stores the MAC address corresponding to the device identifier of the first electronic device into the device identifier library, after the first electronic device sends the connection request to the second electronic device, the second electronic device directly establishes connection with the first electronic device by judging whether the MAC address carried in the connection request of the first electronic device is consistent with any MAC address in the device identifier library or not, and if the MAC address carried in the connection request of the first electronic device is consistent with any MAC address in the device identifier library, so that user response does not need to be waited, the efficiency of establishing Bluetooth connection between the electronic devices is improved, and the user experience is improved.
Referring to fig. 5, based on the connection method, fig. 5 is a schematic structural diagram of a connection device provided in an embodiment of the present application, including:
a first sending module 501, configured to send a connection request to a second electronic device; the connection request carries the equipment identifier of the first electronic equipment;
a connection module 502, configured to establish a connection with the second electronic device when the device identifier of the first electronic device is consistent with any one device identifier in the device identifier library of the second electronic device; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext.
In some embodiments, the apparatus further comprises:
an obtaining module, configured to obtain encrypted data broadcast by a second electronic device before a first sending module 501 sends a connection request to the second electronic device; the encrypted data carries a ciphertext;
the analysis module is used for analyzing the ciphertext;
and the second sending module is used for sending data carrying the equipment identifier of the first electronic equipment to the second electronic equipment under the condition that the ciphertext is successfully analyzed, so that the second electronic equipment stores the equipment identifier of the first electronic equipment into an equipment identifier library.
Referring to fig. 6, based on the connection method, fig. 6 is a schematic structural diagram of another connection device provided in the embodiment of the present application, including:
an obtaining module 601, configured to obtain a device identifier of at least one electronic device, and store the device identifier in a device identifier library; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to an MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry a ciphertext and successfully analyzing the ciphertext;
a receiving module 602, configured to receive a connection request sent by the first electronic device; the connection request carries the equipment identifier of the first electronic equipment;
a connection module 603, configured to establish a connection with the first electronic device when the device identifier of the first electronic device is consistent with any one device identifier of the device identifier library of the second electronic device.
In some embodiments, the apparatus further comprises:
a first storage module, configured to obtain a device identifier of at least one electronic device before the receiving module 602 receives the connection request sent by the first electronic device, and store the device identifier in a device identifier library.
In some embodiments, the apparatus further comprises:
a broadcasting module, configured to broadcast the encrypted data before the obtaining module 601 obtains the device identifier of the at least one electronic device; the encrypted data carries a ciphertext and is used for being acquired by the first electronic equipment and analyzing the ciphertext;
and the second storage module is used for receiving the data which is sent by the first electronic equipment and carries the equipment identifier of the first electronic equipment and storing the data into the equipment identifier library under the condition that the ciphertext is successfully analyzed.
Referring to fig. 7, a schematic structural diagram of a connecting device 700 provided in the embodiment of the present application is shown. The connection device 700 may include at least: at least one processor 701, e.g., a CPU, at least one network interface 704, a user interface 703, a memory 705, at least one communication bus 702. Wherein a communication bus 702 is used to enable connective communication between these components. The user interface 703 may include, but is not limited to, a camera, a display, a touch screen, a keyboard, a mouse, a joystick, and the like. The network interface 704 may optionally include a standard wired interface, a wireless interface (e.g., WIFI interface), and a communication connection may be established with the server through the network interface 704. The memory 702 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). As shown in fig. 7, the memory 705, which is a type of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and program instructions.
It should be noted that the network interface 704 may be connected to an acquirer, a transmitter or other communication module, and the other communication module may include, but is not limited to, a WiFi module, an operator network communication module, and the like.
The processor 701 may be used to call program instructions stored in the memory 705, which may perform the following methods:
sending a connection request to a second electronic device; the connection request carries the equipment identifier of the first electronic equipment;
under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier in the equipment identifier library of the second electronic equipment, connection is established with the second electronic equipment; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext.
Possibly, before the processor 701 sends the connection request to the second electronic device, it is further configured to:
acquiring encrypted data broadcast by the second electronic equipment; the encrypted data carries a ciphertext;
analyzing the ciphertext;
and under the condition that the ciphertext is successfully analyzed, sending data carrying the equipment identifier of the first electronic equipment to the second electronic equipment, so that the second electronic equipment stores the equipment identifier of the first electronic equipment into an equipment identifier library.
Referring to fig. 8, a schematic structural diagram of another connecting device 800 provided in the embodiment of the present application is shown. The connection device 800 may include at least: at least one processor 801, e.g., a CPU, at least one network interface 804, a user interface 803, a memory 805, at least one communication bus 802. Wherein a communication bus 802 is used to enable connective communication between these components. The user interface 803 may include, but is not limited to, a camera, a display, a touch screen, a keyboard, a mouse, a joystick, and the like. The network interface 804 may optionally include a standard wired interface, a wireless interface (e.g., a WIFI interface), and a communication connection may be established with the server through the network interface 804. The memory 802 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). As shown in fig. 8, memory 805, which is a type of computer storage media, may include an operating system, a network communication module, a user interface module, and program instructions.
It should be noted that the network interface 804 may be connected to an acquirer, a transmitter or other communication module, and the other communication module may include, but is not limited to, a WiFi module, an operator network communication module, and the like.
The processor 801 may be used to call program instructions stored in the memory 805, which may perform the following methods:
receiving a connection request sent by the first electronic equipment; the connection request carries the equipment identifier of the first electronic equipment;
under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier of the equipment identifier library of the second electronic equipment, connection is established with the first electronic equipment; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext.
Possibly, before the processor 801 receives the connection request sent by the first electronic device, the processor is further configured to:
and acquiring the equipment identifier of at least one electronic equipment, and storing the equipment identifier into an equipment identifier library.
Possibly, before the processor 801 obtains the device identifier of at least one electronic device, the processor 801 is further configured to:
broadcasting the encrypted data; the encrypted data carries a ciphertext and is used for being acquired by the first electronic equipment and analyzing the ciphertext;
and receiving data which is sent by the first electronic equipment and carries the equipment identifier of the first electronic equipment and storing the data into the equipment identifier library under the condition that the ciphertext is successfully analyzed.
Embodiments of the present application also provide a computer-readable storage medium having stored therein instructions, which when executed on a computer or processor, cause the computer or processor to perform one or more steps of any one of the methods described above. The respective constituent modules of the above-described connection device may be stored in the computer-readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), etc.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. And the aforementioned storage medium includes: various media capable of storing program codes, such as Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk, and optical disk. The technical features in the present examples and embodiments may be arbitrarily combined without conflict.
The above-described embodiments are merely preferred embodiments of the present application, and are not intended to limit the scope of the present application, and various modifications and improvements made to the technical solutions of the present application by those skilled in the art without departing from the design spirit of the present application should fall within the protection scope defined by the claims of the present application.

Claims (10)

1. A connection method is applied to a first electronic device, and is characterized by comprising the following steps:
sending a connection request to a second electronic device; the connection request carries the equipment identifier of the first electronic equipment;
under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier in the equipment identifier library of the second electronic equipment, connection is established with the second electronic equipment; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext.
2. The method of claim 1, wherein prior to sending the connection request to the second electronic device, further comprising:
acquiring encrypted data broadcast by the second electronic equipment; the encrypted data carries a ciphertext;
analyzing the ciphertext;
and under the condition that the ciphertext is successfully analyzed, sending data carrying the equipment identifier of the first electronic equipment to the second electronic equipment, so that the second electronic equipment stores the equipment identifier of the first electronic equipment into an equipment identifier library.
3. A connection method is applied to a second electronic device, and is characterized by comprising the following steps:
receiving a connection request sent by the first electronic equipment; the connection request carries the equipment identifier of the first electronic equipment;
under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier of the equipment identifier library of the second electronic equipment, connection is established with the first electronic equipment; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext.
4. The method of claim 3, wherein prior to receiving the connection request sent by the first electronic device, further comprising:
and acquiring the equipment identifier of at least one electronic equipment, and storing the equipment identifier into an equipment identifier library.
5. The method of claim 5, wherein prior to obtaining the device identification of the at least one electronic device, further comprising:
broadcasting the encrypted data; the encrypted data carries a ciphertext and is used for being acquired by the first electronic equipment and analyzing the ciphertext;
and receiving data which is sent by the first electronic equipment and carries the equipment identifier of the first electronic equipment and storing the data into the equipment identifier library under the condition that the ciphertext is successfully analyzed.
6. A connection device, characterized in that the device comprises:
the first sending module is used for sending a connection request to the second electronic equipment; the connection request carries the equipment identifier of the first electronic equipment;
the connection module is used for establishing connection with the second electronic equipment under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier in the equipment identifier library of the second electronic equipment; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to one MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry ciphertext and successfully analyzing the ciphertext.
7. A connection device, characterized in that the device comprises:
the acquisition module is used for acquiring the equipment identifier of at least one piece of electronic equipment and storing the equipment identifier into an equipment identifier library; the device identification library comprises device identifications of at least one electronic device, each device identification corresponds to an MAC address, and the at least one electronic device returns response data to the second electronic device after receiving encrypted data which are broadcasted by the second electronic device and carry a ciphertext and successfully analyzing the ciphertext;
the receiving module is used for receiving a connection request sent by the first electronic equipment; the connection request carries the equipment identifier of the first electronic equipment;
and the connection module is used for establishing connection with the first electronic equipment under the condition that the equipment identifier of the first electronic equipment is consistent with any one equipment identifier of the equipment identifier library of the second electronic equipment.
8. A first electronic device comprising a processor, a memory, and a communication interface:
the processor is connected with the memory and the communication interface;
the memory for storing executable program code;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory for executing the connection method according to any one of claims 1 or 2.
9. A second electronic device, comprising a processor, a memory, and a communication interface:
the processor is connected with the memory and the communication interface;
the memory for storing executable program code;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory for executing the connection method according to any one of claims 3 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the connecting method according to any one of claims 1 to 5.
CN202011581530.1A 2020-12-28 2020-12-28 Connection method, device, electronic equipment and storage medium Active CN112866995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011581530.1A CN112866995B (en) 2020-12-28 2020-12-28 Connection method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011581530.1A CN112866995B (en) 2020-12-28 2020-12-28 Connection method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112866995A true CN112866995A (en) 2021-05-28
CN112866995B CN112866995B (en) 2023-06-30

Family

ID=75997742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011581530.1A Active CN112866995B (en) 2020-12-28 2020-12-28 Connection method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112866995B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104507034A (en) * 2014-11-24 2015-04-08 小米科技有限责任公司 Equipment connecting method, device and terminal equipment
CN104617991A (en) * 2015-01-26 2015-05-13 北京深思数盾科技有限公司 Bluetooth pairing method and Bluetooth communication system
US20190215157A1 (en) * 2017-03-03 2019-07-11 Tencent Technology (Shenzhen) Company Limited Information storage method, device, and computer-readable storage medium
CN111629366A (en) * 2020-04-27 2020-09-04 Oppo(重庆)智能科技有限公司 Interaction method and device between Bluetooth devices, storage medium and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104507034A (en) * 2014-11-24 2015-04-08 小米科技有限责任公司 Equipment connecting method, device and terminal equipment
CN104617991A (en) * 2015-01-26 2015-05-13 北京深思数盾科技有限公司 Bluetooth pairing method and Bluetooth communication system
US20190215157A1 (en) * 2017-03-03 2019-07-11 Tencent Technology (Shenzhen) Company Limited Information storage method, device, and computer-readable storage medium
CN111629366A (en) * 2020-04-27 2020-09-04 Oppo(重庆)智能科技有限公司 Interaction method and device between Bluetooth devices, storage medium and electronic device

Also Published As

Publication number Publication date
CN112866995B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN106535288B (en) Method for sending and acquiring wifi networking information and corresponding device
CN104144049B (en) A kind of encryption communication method, system and device
CN105704837B (en) Method and equipment for establishing wireless connection
CN111787517A (en) Method and device for binding activation of intelligent equipment
CN106921963A (en) A kind of smart machine accesses the method and device of WLAN
CN107786331B (en) Data processing method, device, system and computer readable storage medium
CN103458399A (en) Intelligent WIFI module and method for configuring device supporting WIFI connection into WIFI network
CN104333643B (en) Add the method for contact person, system and terminal
US10863559B2 (en) Method and apparatus for communicating in a wireless communication network
CN114697879B (en) Bluetooth pairing method, electronic device, chip and storage medium
WO2018049892A1 (en) Data transmission method and apparatus, and terminal
CN113301563B (en) Network configuration method, device, equipment and storage medium
CN113099440A (en) Network configuration method, device, equipment and system
JP2024525140A (en) Method and apparatus for data interaction - Patents.com
CN106095132B (en) Playback equipment keypress function setting method and device
CN111479263A (en) Communication connection method, terminal and computer storage medium
KR20140128764A (en) Method for connectivity information control and an electronic device thereof
CN107548058B (en) Equipment access method and intelligent terminal
CN112866995B (en) Connection method, device, electronic equipment and storage medium
CN116847319A (en) Device authentication networking method, communication device and readable storage medium
CN113596827B (en) Key generation method, device, electronic equipment and storage medium
CN103929798A (en) Wireless communication hot spot creation and connection method, hot spot creation end and hot spot connection end
CN112398718A (en) Network transmission method and device, electronic equipment and storage medium
CN115174388B (en) Network updating method, device, equipment and storage medium for networking intelligent equipment
US12074848B2 (en) Efficient and secure universal/app links

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