CN118233870A - Bluetooth sound automatic connection method, connection system, electronic device and storage medium - Google Patents

Bluetooth sound automatic connection method, connection system, electronic device and storage medium Download PDF

Info

Publication number
CN118233870A
CN118233870A CN202410634556.XA CN202410634556A CN118233870A CN 118233870 A CN118233870 A CN 118233870A CN 202410634556 A CN202410634556 A CN 202410634556A CN 118233870 A CN118233870 A CN 118233870A
Authority
CN
China
Prior art keywords
connection
bluetooth
current user
equipment
bluetooth sound
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
CN202410634556.XA
Other languages
Chinese (zh)
Other versions
CN118233870B (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.)
Guangzhou Wesdar Electronic Technology Co ltd
Original Assignee
Guangzhou Wesdar Electronic 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 Guangzhou Wesdar Electronic Technology Co ltd filed Critical Guangzhou Wesdar Electronic Technology Co ltd
Priority to CN202410634556.XA priority Critical patent/CN118233870B/en
Publication of CN118233870A publication Critical patent/CN118233870A/en
Application granted granted Critical
Publication of CN118233870B publication Critical patent/CN118233870B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/068Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/50Secure pairing of devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode 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

Landscapes

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

Abstract

The application relates to the technical field of automatic connection of Bluetooth sound equipment, in particular to an automatic connection method and a connection system of Bluetooth sound equipment, comprising the following steps: the method comprises the steps of firstly judging the equipment state of the Bluetooth equipment after the current user opens the Bluetooth function of the mobile equipment, carrying out consistency comparison on the pairing code and the equipment name of the mobile equipment aiming at the Bluetooth sound equipment in a standby state, randomly generating a pairing code for the current user in preparation for connection after the comparison is passed, obtaining a dynamic authentication code for the preparation for connection through the pairing code, carrying out comparison on the dynamic authentication code, and carrying out Bluetooth connection on the current user mobile equipment and the Bluetooth sound equipment after the dynamic authentication code is passed, wherein in the process, the Bluetooth address is transmitted by transmitting the dynamic authentication code instead of the Bluetooth address, the risk of Bluetooth address leakage is reduced, the dynamic authentication code is based on the pairing code generated randomly, one is generated randomly each time when the connection is requested, and the dynamic authentication code generated each time is ensured to have extremely high randomness and unpredictability.

Description

Bluetooth sound automatic connection method, connection system, electronic device and storage medium
Technical Field
The invention relates to the technical field of automatic connection of Bluetooth sound equipment, in particular to an automatic connection method and system of Bluetooth sound equipment.
Background
The Bluetooth sound is a built-in Bluetooth chip, replaces sound equipment connected by traditional wires by Bluetooth connection, and achieves the purpose of convenience and rapidness by being connected with electronic equipment such as a mobile phone, a tablet personal computer or a notebook computer; particularly, the Bluetooth sound box with the built-in storage battery can provide electric quantity for the Bluetooth sound box supported by the electric quantity through the internal battery, so that the limitations of various charging wires, connecting wires and the like are thoroughly eliminated, the applicable scene of the Bluetooth sound box is greatly expanded, the wireless of the sound box is truly realized, and the Bluetooth sound box is favored by users; the bluetooth sound uses in user's daily life, and the user is equipped with bluetooth sound in the family, opens bluetooth function and bluetooth sound through using its cell-phone and establishes the connection, can enjoy the comfortable environment that bluetooth sound brought at home, then bluetooth sound is effective connection distance, when the user's something and a few minutes of going out temporarily is needed to appear, trust the cell-phone of user and taken away along with user's leaving this moment, will make trust the cell-phone of user break away from bluetooth sound's connection scope, this leads to cell-phone and bluetooth sound to be forced the disconnection.
At present, the existing Bluetooth sound equipment can not actively search for equipment capable of carrying out Bluetooth connection, but when other trust user mobile phones except the trust user send Bluetooth connection requests, bluetooth connection is established with other trust user mobile phones, so that the user mobile phones which leave for a short time automatically establish connection with the Bluetooth sound equipment, and the use experience of users who leave for a few minutes is greatly influenced; and in the connection process of the user mobile phone and the Bluetooth sound equipment, the Bluetooth sound equipment needs to acquire the Bluetooth address of the user mobile phone, the Bluetooth sound equipment is encrypted and transmitted through a secret key in the acquisition process to ensure the safety of the Bluetooth address of the user mobile phone, the secret key loss can lead to the leakage of the Bluetooth address of the user mobile phone, a third party can possibly be allowed to acquire the privacy preserved in the user mobile phone, track the position of the mobile phone, and can possibly lead the third party to deceive the modern Bluetooth equipment into pairing with the malicious equipment which is disguised to be trusted through BIAS (Bluetooth impersonation attack), so that the data transmitted through Bluetooth is accessed, and even the function possessed by the paired equipment before control is easy to cause the leakage of safety information.
Therefore, how to safely connect the bluetooth sound device to the automatic connection device is a technical problem that needs to be solved by the skilled person at present.
Disclosure of Invention
In order to overcome the problems existing in the related art, the application provides an automatic connection method and system for Bluetooth sound, which aims to solve the problems that in the prior art, when a user electronic device leaves the Bluetooth sound connection range for a short time, other trusted users actively establish Bluetooth connection through a mobile phone and Bluetooth sound, the user mobile phone which leaves for a short time automatically establishes connection with the Bluetooth sound, and encrypts a Bluetooth address in transmission by aiming at using a secret key, if the secret key is lost, a third party is possibly allowed to acquire privacy stored in the user mobile phone, the position of the mobile phone is tracked, and the third party is possibly deceived into the pairing of a modern Bluetooth device and a malicious device which is deceived into trust through BIAS (Bluetooth impersonation attack), so that data sent through Bluetooth is accessed, and even functions possessed by the previously paired devices are controlled.
The present application provides in a first aspect an automatic connection method for bluetooth sound, including:
Step one: after receiving the transmitted dynamic pre-coding of the current user preparation connection, the user side module uses a split function to cut the Bluetooth address of the current user mobile equipment, and extracts the Bluetooth addresses respectively located in the following parts: "front and rear character strings;
Step two: splicing the extracted character string with the dynamic pre-coding of the current user preparation connection to obtain a standard condition sequence of the current user preparation connection;
step three: extracting the number of 1 and 0 from the dynamic pre-coding of the current user preparation connection after binary conversion, comparing the number of 1 and 0, and selecting to generate a dynamic intermediate code of the current user preparation connection according to a preset first generation rule or a preset second generation rule based on a comparison result;
Step four: performing AND operation on the dynamic intermediate code of the previous and current preliminary connection of the current user to obtain a dynamic authentication temporary storage code of the current preliminary connection of the current user, and transmitting the dynamic authentication temporary storage code to a pre-pairing unit;
Step five: and restoring the authentication contrast code of the current user according to the same mode of the first step, the second step and the third step by the pre-pairing unit based on the pairing code, the Bluetooth address and the dynamic pre-pairing code of the current user mobile device, comparing the authentication contrast code with the received dynamic authentication code of the current user of the current pre-connection, and carrying out Bluetooth connection on the mobile device of the current user and the Bluetooth sound if the authentication contrast code is consistent with the received dynamic authentication code of the current user of the current pre-connection.
In one implementation, before the first step, the method further includes:
After the user terminal module monitors that the current user opens the Bluetooth function of the mobile device, the pairing code and the device name of the current user mobile device stored in the user terminal module are acquired, and a pre-pairing request is generated according to the acquired pairing code of the current user mobile device and is transmitted to a pre-pairing unit;
After the pre-pairing unit receives the transmitted pre-pairing request, acquiring the equipment state of the current indoor Bluetooth sound equipment;
If the current equipment state of the indoor Bluetooth sound equipment is the working state, generating a pairing rejection instruction;
If the current equipment state of the indoor Bluetooth sound equipment is in a power-off state, controlling the Bluetooth sound equipment to be powered on, and adjusting the equipment state to be in a standby state;
If the equipment state of the current indoor Bluetooth sound equipment is in a standby state, acquiring a pairing code and an equipment name of the current user mobile equipment carried in the transmitted pre-pairing request, and carrying out consistency comparison on the pairing code and the equipment names of all the trusted user mobile equipment stored in the pre-pairing unit;
If the comparison is passed, a character string is randomly generated by the pre-pairing unit, and is used as the dynamic pre-modulation code of the current user pre-connection to be transmitted to the user side module, and meanwhile, the dynamic pre-modulation code of the current user pre-connection is temporarily stored.
In one implementation method, after the fourth step, the method further includes:
After the mobile equipment of the current user and the Bluetooth sound equipment are connected through the Bluetooth function, the pre-pairing unit monitors the connection state of the Bluetooth sound equipment and the mobile equipment of the current user in real time;
when the passive disconnection of the front user mobile device and the Bluetooth sound is monitored, determining that the device state of the Bluetooth sound is a standby state;
and when the equipment state is a standby state, a virtual equipment with a Bluetooth function is created through the virtual pairing unit, and Bluetooth connection is established between the virtual equipment and the Bluetooth sound equipment through the Bluetooth function.
In one implementation method, after the virtual device and the bluetooth sound device establish a bluetooth connection through a bluetooth function, the implementation method further includes:
Monitoring the target area for a duration P1 time through a pre-pairing unit;
If the pre-pairing unit monitors the mobile device of the current user with the Bluetooth function being opened in the P1 time, disconnecting the Bluetooth connection between the virtual device and the Bluetooth sound, establishing connection between the Bluetooth sound and the mobile device of the current user through the Bluetooth function again, and destroying the created virtual device after the connection is established;
and if the pre-pairing unit does not monitor the mobile device of the current user with the Bluetooth function turned on in the P1 time, adjusting the device state of the Bluetooth sound equipment to be a standby state.
In one implementation method, after the bluetooth connection is established between the user mobile device and the bluetooth sound device, there are two disconnection modes, one is that the user actively turns off the bluetooth function of the mobile device, and the other is that the user mobile device is passively disconnected from the effective connection distance of the bluetooth sound device.
In a second implementation method, the splicing the extracted character string and the dynamic pre-coding of the current user's current reserved connection includes:
Colon ": "as a parameter of the split function, the bluetooth address of the current user mobile device stored in the user terminal module is cut by using the split () method, and the bluetooth addresses respectively located in the bluetooth addresses are extracted: "front and rear character strings;
Based on the position of each extracted character string at the Bluetooth address of the mobile equipment of the current user, marking a plurality of character strings extracted by cutting as A1, A2, A3, A4, A5 and A6 in sequence according to the sequence from left to right, and marking the dynamic pre-coding of the current user ready connection as a character string A7; wherein the strings A1, A2, & A6 are all 16-ary numbers;
Binary conversion is carried out on the dynamic pre-modulation code of the current user preliminary connection, and the quantity of 1 and 0 is respectively extracted from the converted data, and the quantity is correspondingly marked as B1 and B2;
And splicing the character strings A7, A1 and A6 according to the sequence from left to right to obtain a standard condition sequence of the current user preparation connection.
In one implementation method, in the third step, the generating the dynamic intermediate code of the current user's current reserved connection according to the preset first generation rule includes:
According to the sequence from left to right, extracting a new character string consisting of a1 st character and two immediately following the 1 st character from the standard condition sequence of the current user preparation connection, and taking the new character string as a prefix character string marked as the 1 st character of the standard condition sequence of the current user preparation connection;
Sequentially obtaining prefix character strings of the 1 st, 2 nd and 54 th bits of a standard condition sequence of the current user preparation connection;
performing de-duplication on all prefix character strings, reserving only one character string aiming at the character strings with the same content, and reserving the character strings aiming at the character strings with different contents;
the remaining character strings are re-calibrated into authentication character strings, and all the authentication character strings are marked as C1, C2, C is more than or equal to 1 according to the sequence of the prefix character strings of the 1 st, 2 nd, the 54 th and the 54 th positions of the standard condition sequences of the current user preparation connection;
The method comprises the steps of respectively obtaining the occurrence times of authentication character strings C1, C2, and Cc in prefix character strings of bits 1,2, 54 of a standard condition sequence of the current user preparation connection, and correspondingly calibrating the occurrence times as the frequency D1, D2 and Dc of the authentication character strings C1, C2, and Cc;
comparing the sizes of D1, D2, dc and D in sequence, splicing the frequency of the authentication character strings larger than D according to the sequence of D1, D2, dc, performing binary conversion on the spliced data, and calibrating the converted data as a dynamic intermediate code which is ready for connection by the current user.
In the third step, the generating the dynamic intermediate code of the current user's current reserved connection according to the preset second generation rule includes:
According to the sequence from left to right, extracting a new character string consisting of the 1 st character and three immediately following the 1 st character from the standard condition sequence of the current user preparation connection, and taking the new character string as a prefix character string marked as the 1 st character of the standard condition sequence of the current user preparation connection;
Sequentially obtaining prefix character strings of the 1 st, 2 nd, third and 53 th bits of a standard condition sequence of the current user preparation connection;
performing de-duplication on all prefix character strings, reserving only one character string aiming at the character strings with the same content, and reserving the character strings aiming at the character strings with different contents;
The remaining character strings are re-calibrated into authentication character strings, and all the authentication character strings are marked as C1, C2, C is larger than or equal to 1 according to the sequence of prefix character strings of the 1 st, 2 nd, the third and the 53 th digits of the standard condition sequence of the current user preparation connection;
The method comprises the steps of respectively obtaining the occurrence times of authentication character strings C1, C2, and Cc in prefix character strings of bits 1,2, and 53 of a standard condition sequence of the current user preparation connection, and correspondingly calibrating the occurrence times as the frequency D1, D2, and Dc of the authentication character strings C1, C2, and Cc;
comparing the sizes of D1, D2, dc and D in sequence, splicing the frequency of the authentication character strings larger than D according to the sequence of D1, D2, dc, performing binary conversion on the spliced data, and calibrating the converted data as a dynamic intermediate code which is ready for connection by the current user.
In one implementation method, after the target area is monitored for a duration P1 by the pre-pairing unit, the method further includes:
after the P1 time passes, acquiring the equipment state of the Bluetooth sound equipment after the next P2 time;
if the equipment state of the Bluetooth sound equipment is not changed, the Bluetooth sound equipment is turned off.
The present application provides in a second aspect an automatic connection system for bluetooth sound, comprising:
the central control end module is used for controlling the Bluetooth sound equipment to be safely connected with a user, and comprises a pre-pairing unit and a virtual pairing unit;
The user terminal module is used for ensuring that the mobile equipment of the user is connected with the Bluetooth sound box;
the user terminal module monitors that a current user opens the Bluetooth function of the mobile device, acquires the pairing code and the device name of the current user mobile device stored in the user terminal module, and generates a pre-pairing request according to the pairing code and the device name;
the method comprises the steps that after a transmitted pre-pairing request is received, a pre-pairing unit firstly obtains the equipment state of an indoor Bluetooth sound, if the obtained equipment state of the current indoor Bluetooth sound is a standby state, a pairing code and equipment names of current user mobile equipment carried in the transmitted pre-pairing request are obtained, consistency comparison is carried out between the pairing code and the equipment names of all trusted user mobile equipment stored in the pre-pairing unit, and if the pairing code and the equipment names pass the comparison, a character string is randomly generated by the pre-pairing unit to serve as dynamic pre-modulation for the current user pre-connection;
the user terminal module generates a dynamic authentication code of the current user preparation connection according to a preset generation rule after receiving the transmitted dynamic pre-modulation code of the current user preparation connection;
the pre-pairing unit compares the dynamic authentication code of the current user for the current pre-connection with the authentication contrast code of the current user for the current time, which is generated by restoring the dynamic pre-modulation code of the current user for the current pre-connection, and the mobile equipment of the current user and the Bluetooth sound box are connected in Bluetooth mode if the comparison is passed;
After the mobile equipment of the current user and the Bluetooth sound box are connected through the Bluetooth function, the pre-pairing unit monitors the connection state of the Bluetooth sound box and the mobile equipment of the current user in real time, and if the current mobile equipment of the user and the Bluetooth sound box are monitored to be disconnected passively, the equipment state of the Bluetooth sound box is in a standby state;
Firstly, creating a virtual device with a Bluetooth function by a virtual pairing unit, carrying out Bluetooth connection on the virtual device and a Bluetooth sound box, carrying out continuous P1 time monitoring on a target area after the Bluetooth connection, disconnecting the Bluetooth connection between the virtual device and the Bluetooth sound box if the mobile device of a current user with the Bluetooth function is monitored by the pre-pairing unit in the P1 time, and then establishing connection between the Bluetooth sound box and the mobile device of the current user through the Bluetooth function again, and destroying the created virtual device after the connection is established;
Otherwise, if the pre-pairing unit does not monitor the mobile device of the current user with the Bluetooth function being turned on in the P1 time, the device state of the Bluetooth sound box is adjusted to be in a standby state, the device state of the Bluetooth sound box is acquired and judged after the next P2 time, and if the device state of the Bluetooth sound box is not changed after the next P2 time, the Bluetooth sound box is turned off.
A third aspect of the present application provides an electronic apparatus, comprising:
A processor; and
A memory having executable code stored thereon which, when executed by the processor, causes the processor to perform the method as described above.
A fourth aspect of the application provides a storage medium having stored thereon executable code which, when executed by a processor of an electronic device, causes the processor to perform a method as described above.
The technical scheme provided by the application can comprise the following beneficial effects:
(1) According to the invention, after the Bluetooth function of the mobile device of the current user is opened, the device state of the Bluetooth device is firstly judged, the pairing code of the mobile device and the device name of the Bluetooth sound in a standby state are subjected to consistency comparison, after the pairing code passes, a pairing code is randomly generated for the current preliminary connection of the current user, the dynamic intermediate code of the current preliminary connection is extracted from the Bluetooth address of the current user mobile device through the pairing code, the dynamic intermediate code of the current preliminary connection and the dynamic intermediate code of the last preliminary connection are subjected to operation to obtain the dynamic authentication code of the current preliminary connection, the dynamic authentication code of the current preliminary connection is compared, after the dynamic authentication code passes, the mobile device of the current user and the Bluetooth sound are subjected to Bluetooth connection, in the process, the Bluetooth address is replaced by transmitting the dynamic authentication code, the risk of Bluetooth address leakage is reduced, the dynamic authentication code is based on the randomly generated pairing code of each time, the dynamic authentication code generated each time is ensured to have great randomness and non-speculation, the condition that the transmission data is generated due to key loss is not encrypted in the traditional use;
(2) According to the invention, after the Bluetooth sound and the mobile device are connected, the connection state of the Bluetooth sound and the current user mobile device is monitored in real time, and after the current user mobile device and the Bluetooth sound are monitored to be disconnected passively, a virtual device with a Bluetooth function is created to temporarily replace the mobile device and the Bluetooth sound to establish the Bluetooth connection, in this way, the Bluetooth connection actively occupying the Bluetooth sound is passed, and the situation that the user mobile device and the Bluetooth sound cannot be actively reconnected due to the temporary disconnection caused by the temporary disconnection of other mobile devices actively and the Bluetooth sound is effectively prevented;
(3) After the virtual equipment is established, the method and the device for detecting the passive disconnection in the target area continuously detect the P1 time, actively disconnect the Bluetooth connection between the virtual equipment and the Bluetooth sound if the mobile equipment of the current user which is disconnected passively is monitored in the P1 time, and perform Bluetooth connection between the Bluetooth sound and the mobile equipment, and destroy the established virtual equipment after the Bluetooth sound is connected successfully, so that the mobile equipment which is disconnected passively due to the short-term disconnection can be actively connected with the Bluetooth sound, thereby improving the use experience of the user;
After the P1 time is monitored, if the mobile equipment of the current user which is disconnected passively is not continuously monitored, the device state of the Bluetooth sound equipment after the P2 time is acquired, and the Bluetooth sound equipment which does not change the device state after the P2 time is closed, so that the material resource of the Bluetooth sound equipment is saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The foregoing and other objects, features and advantages of the application will be apparent from the following more particular descriptions of exemplary embodiments of the application as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the application.
Fig. 1 is a schematic flow chart of an automatic bluetooth sound connection method according to an embodiment of the present application;
Fig. 2 is a schematic structural diagram of an automatic bluetooth sound connection system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Preferred embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
The following describes the technical scheme of the embodiment of the present application in detail with reference to the accompanying drawings.
As shown in fig. 1 and fig. 2, an automatic connection method and a connection system for bluetooth sound equipment include a central control end module and a user end module;
The central control end module is used for controlling the Bluetooth sound box to be safely connected with a user, and comprises a pre-pairing unit and a virtual pairing unit;
The pre-pairing unit stores pairing codes, equipment names and Bluetooth addresses of all mobile equipment of the trusted users, and simultaneously stores dynamic pre-pairing codes of all previous pre-connection times of each trusted user;
when the mobile equipment of the trusted user requests for the first time and successfully establishes Bluetooth connection with the Bluetooth sound box, the user terminal module randomly generates a string of 4-8-bit pure digital characters, and the string is used as the pairing code of the mobile equipment of the trusted user to be distributed to the mobile equipment of the trusted user;
The mobile device of the trusted user refers to an electronic device which has a Bluetooth function and can be carried with the user, and is convenient for the trusted user to use in a mobile state;
The bluetooth address of the mobile device is an identification that uniquely identifies the mobile device, shown as 6 bytes, in 16-ary, separated by a colon (example: 00:11:22:33: ff: ee);
The system comprises a user terminal module, a Bluetooth module and a Bluetooth module, wherein the user terminal module is used for ensuring that mobile equipment of a user is connected with a Bluetooth sound box, and a pairing code, an equipment name, a Bluetooth address and dynamic pre-modulation codes of all previous preliminary connections of the mobile equipment of the corresponding user are stored in the user terminal module;
the user terminal module monitors that a current user opens the Bluetooth function of the mobile device, acquires the pairing code and the device name of the current user mobile device stored in the current user terminal module, generates a pre-pairing request according to the acquired pairing code of the current user mobile device and transmits the pre-pairing request to the central control terminal module;
The central control module receives the transmitted pre-pairing request and then transmits the pre-pairing request to the pre-pairing unit, and the pre-pairing unit firstly acquires the equipment state of the indoor Bluetooth sound box after receiving the transmitted pre-pairing request.
For example, in this example, after receiving the transmitted dynamic pre-coding of the current user preparation connection by the user side module, the bluetooth address of the current user mobile device is cut by using a split function, and the bluetooth addresses respectively located in the bluetooth addresses are extracted: "front and rear character strings; splicing the extracted character string with the dynamic pre-coding of the current user preparation connection to obtain a standard condition sequence of the current user preparation connection; extracting the number of 1 and 0 from the dynamic pre-modulation codes of the current user preparation connection after binary conversion, comparing the number of 1 and 0, and selecting to generate the dynamic intermediate codes of the current user preparation connection according to a preset first generation rule or a preset second generation rule based on the comparison result; then, the dynamic intermediate code of the previous and the current preliminary connection of the current user is subjected to AND operation to obtain a dynamic authentication temporary storage code of the current preliminary connection of the current user, and the dynamic authentication temporary storage code is transmitted to a pre-pairing unit; and finally, restoring the authentication contrast code of the current user according to the same mode of the first step, the second step and the third step by the pre-pairing unit based on the pairing code, the Bluetooth address and the dynamic pre-pairing code of the current user mobile device, comparing the authentication contrast code with the received dynamic authentication code of the current user of the current pre-connection, and carrying out Bluetooth connection on the mobile device of the current user and the Bluetooth sound if the authentication contrast code is consistent with the received dynamic authentication code of the current user of the current pre-connection, so that the mobile device and the Bluetooth sound are safely connected, and the safety of data is ensured.
In this embodiment, the device states of the bluetooth speaker are three states, namely, a working state, a standby state and a shutdown state, where the working state refers to that the bluetooth speaker is currently in a working state, that is, the bluetooth speaker has been connected with another mobile device currently;
If the equipment state of the current indoor Bluetooth sound box is the working state, generating a pairing rejection instruction and transmitting the pairing rejection instruction to the user side module, receiving the pairing rejection instruction by the user side module, generating character prompt information of pairing rejection, and displaying the character prompt information to the current user for viewing;
in this embodiment, the text prompt message for rejecting pairing is: the current Bluetooth sound box is occupied;
If the equipment state of the current indoor Bluetooth sound box is a shutdown state, controlling the Bluetooth sound box to be started, and adjusting the equipment state to be a standby state;
If the equipment state of the current indoor Bluetooth sound box is in a standby state, the pairing code and the equipment name of the current user mobile equipment carried in the transmitted pre-pairing request are acquired, the pairing code and the equipment names of all the trusted user mobile equipment stored in the pre-pairing unit are subjected to consistency comparison, if the pairing code and the equipment name of one trusted user mobile equipment are stored to be consistent with the pairing code and the equipment name of the current user mobile equipment, a character string is randomly generated, the character string is used as a dynamic pre-tuning code of the current user pre-connection to be transmitted to a user side module, and meanwhile the dynamic pre-tuning code of the current user pre-connection is temporarily stored;
In this embodiment, the dynamic pre-coding used as the current pre-connection of the current user is a character string formed by two capital english alphabetic characters randomly generated by the pre-pairing unit;
The user terminal module receives the transmitted dynamic pre-modulation code of the current user preparation connection and then generates a dynamic authentication code of the current user preparation connection according to a preset generation rule, and the dynamic authentication code is specifically as follows:
S11: colon ": "as a parameter of the split function, the bluetooth address of the current user mobile device stored in the user terminal module is cut by using the split () method, and the bluetooth addresses respectively located in the bluetooth addresses are extracted: "front and rear character strings;
Based on the location of each extracted character string at the current user's mobile device bluetooth address, in left to right order, the character strings extracted by cutting are marked as A1, A2, A3, A4, A5 and A6 in sequence, and the character strings A1, A2, the number of the first and the second are 16 numbers;
meanwhile, marking the dynamic pre-coding of the current user preparation connection as a character string A7;
Based on step S11, exemplified by bluetooth address 00:11:22:33:ff:ee: the character strings obtained after the cutting by using the split () method are respectively 00, 11, 22, 33, FF and EE in the order from left to right;
S12: binary conversion is carried out on the dynamic pre-modulation code of the current user preliminary connection, the quantity of 1 and 0 is respectively extracted from the converted data, and the quantity is correspondingly marked as B1 and B2;
S13: splicing the character strings A7, A1 and A6 according to the sequence from left to right to obtain a standard condition sequence of the current user preparation connection;
s14: if B1 is more than or equal to B2, generating a dynamic intermediate code of the current user preparation connection according to a preset first generation rule, wherein the dynamic intermediate code is specifically as follows:
s141: according to the sequence from left to right, extracting a new character string consisting of a1 st character and two immediately following the 1 st character from the standard condition sequence of the current user preparation connection, and taking the new character string as a prefix character string marked as the 1 st character of the standard condition sequence of the current user preparation connection;
S142: sequentially acquiring prefix character strings of the 1 st, 2 nd, the 2 nd and 54 th bits of the standard condition sequence of the current user preparation connection according to S141, wherein the prefix character strings of the 1 st, 2 nd, the 54 th bits of the standard condition sequence of the current user preparation connection are obtained by respectively extracting new character strings consisting of the 1 st, 2 nd, the 54 th bits of characters and two immediately following characters from the standard condition sequence of the current user preparation connection according to the sequence from left to right;
S143: performing de-duplication on all prefix character strings, reserving only one character string aiming at the character strings with the same content, and reserving the character strings aiming at the character strings with different contents;
the remaining character strings are re-calibrated into authentication character strings, and all the authentication character strings are marked as C1, C2, C is more than or equal to 1 according to the sequence of the prefix character strings of the 1 st, 2 nd, the 54 th and the 54 th positions of the standard condition sequences of the current user preparation connection;
It should be noted that, when the authentication character strings are marked, the position sequence of each authentication character string when the authentication character strings first appear is based on;
S144: the method comprises the steps of respectively obtaining the occurrence times of authentication character strings C1, C2, and Cc in prefix character strings of bits 1,2, 54 of a standard condition sequence of the current user preparation connection, and correspondingly calibrating the occurrence times as the frequency D1, D2 and Dc of the authentication character strings C1, C2, and Cc;
S145: comparing the sizes of D1, D2, dc and D in sequence, splicing the frequency of the authentication character strings larger than D according to the sequence of D1, D2, dc, performing binary conversion on the spliced data, and calibrating the converted data as a dynamic intermediate code which is ready for connection by a current user;
s15: if B1 is less than B2, generating a dynamic intermediate code of the current user preparation connection according to a preset second generation rule, wherein the dynamic intermediate code is specifically as follows:
S151: according to the sequence from left to right, extracting a new character string consisting of the 1 st character and three immediately following the 1 st character from the standard condition sequence of the current user preparation connection, and taking the new character string as a prefix character string marked as the 1 st character of the standard condition sequence of the current user preparation connection;
S152: sequentially acquiring prefix strings of the 1 st, 2 nd and 53 th bits of the standard condition sequence of the current user preparation connection according to S151, wherein the prefix strings of the 1 st, 2 nd, 53 th bits of the standard condition sequence of the current user preparation connection are obtained by respectively extracting new strings consisting of the 1 st, 2 nd, 53 th bits of characters and two immediately following characters from the standard condition sequence of the current user preparation connection according to the sequence from left to right;
s153: performing de-duplication on all prefix character strings, reserving only one character string aiming at the character strings with the same content, and reserving the character strings aiming at the character strings with different contents;
The remaining character strings are re-calibrated into authentication character strings, and all the authentication character strings are marked as C1, C2, C is larger than or equal to 1 according to the sequence of prefix character strings of the 1 st, 2 nd, the third and the 53 th digits of the standard condition sequence of the current user preparation connection;
It should be noted that, when the authentication character strings are marked, the position sequence of each authentication character string when the authentication character strings first appear is based on;
S154: the method comprises the steps of respectively obtaining the occurrence times of authentication character strings C1, C2, and Cc in prefix character strings of bits 1,2, and 53 of a standard condition sequence of the current user preparation connection, and correspondingly calibrating the occurrence times as the frequency D1, D2, and Dc of the authentication character strings C1, C2, and Cc;
s155: comparing the sizes of D1, D2, dc and D in sequence, splicing the frequency of the authentication character strings larger than D according to the sequence of D1, D2, dc, performing binary conversion on the spliced data, and calibrating the converted data as a dynamic intermediate code which is ready for connection by a current user;
s16: acquiring a dynamic intermediate code of the previous preparation connection of the current user, and performing AND operation on the dynamic intermediate code of the previous preparation connection of the current user and the dynamic intermediate code of the current preparation connection to obtain a dynamic authentication code of the current preparation connection of the current user;
the user terminal module transmits the dynamic authentication code of the current user preliminary connection to the pre-pairing unit;
The pre-pairing unit firstly acquires a Bluetooth address of the trusted user mobile equipment consistent with the pairing code and the equipment name of the current user mobile equipment and temporarily stores the dynamic pre-pairing code of the current user pre-connection after receiving the transmitted dynamic authentication code of the current user pre-connection;
Then generating an authentication comparison code for authentication of the current user according to the steps from S11 to S16, comparing the authentication comparison code with the received dynamic authentication code for the current user preparation connection, and carrying out Bluetooth connection on the mobile equipment of the current user and a Bluetooth sound box if the comparison is passed;
After the connection between the mobile device of the current user and the Bluetooth sound box is established through the Bluetooth function, the pre-pairing unit monitors the connection state of the Bluetooth sound box and the mobile device of the current user in real time, in the embodiment, after the connection between the mobile device of the user and the Bluetooth sound box is established, two disconnection modes exist, namely, the Bluetooth function of the mobile device is actively closed by the user, and the active connection distance from the mobile device of the user to the Bluetooth sound box is passively disconnected;
If the fact that the current user mobile equipment is disconnected with the Bluetooth sound box passively is monitored, the equipment state of the Bluetooth sound box is in a standby state, and the pre-pairing unit generates a virtual pairing request and transmits the virtual pairing request to the virtual pairing unit;
After receiving the transmitted virtual pairing request, the virtual pairing unit firstly creates a virtual device with a Bluetooth function, and connects the virtual device with the Bluetooth sound box in a Bluetooth way, in this way, the Bluetooth sound box is kept in a connection state all the time, and the situation that the Bluetooth sound box is connected by other mobile devices due to short leaving is avoided;
After the Bluetooth connection is established between the virtual equipment and the Bluetooth sound box, the pre-pairing unit monitors the target area for a duration of P1 time, if the pre-pairing unit monitors the mobile equipment of the current user with the Bluetooth function being opened in the P1 time, the Bluetooth connection between the virtual equipment and the Bluetooth sound box is disconnected, the Bluetooth sound box is connected with the mobile equipment of the current user through the Bluetooth function again, and the created virtual equipment is destroyed after the connection is established;
otherwise, if the pre-pairing unit does not monitor the mobile device of the current user with the Bluetooth function being turned on in the time P1, the device state of the Bluetooth sound box is adjusted to be in a standby state, the device state of the Bluetooth sound box is acquired and judged after the time P2 is carried out, and if the device state of the Bluetooth sound box is not changed after the time P2 is carried out, the Bluetooth sound box is turned off;
The target area refers to the effective connection distance between the Bluetooth sound equipment and the mobile equipment, and the P1 and the P2 are respectively a preset first monitoring duration threshold value and a preset second monitoring duration threshold value;
The specific manner in which the respective modules perform the operations in the apparatus of the above embodiments has been described in detail in the embodiments related to the method, and will not be described in detail herein.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Referring to fig. 3, the electronic device 1000 includes a memory 1010 and a processor 1020.
The Processor 1020 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Memory 1010 may include various types of storage units, such as system memory, read Only Memory (ROM), and persistent storage. Where the ROM may store static data or instructions that are required by the processor 1020 or other modules of the computer. The persistent storage may be a readable and writable storage. The persistent storage may be a non-volatile memory device that does not lose stored instructions and data even after the computer is powered down. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the persistent storage may be a removable storage device (e.g., diskette, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as dynamic random access memory. The system memory may store instructions and data that are required by some or all of the processors at runtime. Furthermore, memory 1010 may comprise any combination of computer-readable storage media including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic disks, and/or optical disks may also be employed. In some implementations, memory 1010 may include readable and/or writable removable storage devices such as Compact Discs (CDs), digital versatile discs (e.g., DVD-ROMs, dual-layer DVD-ROMs), blu-ray discs read only, super-density discs, flash memory cards (e.g., SD cards, min SD cards, micro-SD cards, etc.), magnetic floppy disks, and the like. The computer readable storage medium does not contain a carrier wave or an instantaneous electronic signal transmitted by wireless or wired transmission.
The memory 1010 has stored thereon executable code that, when processed by the processor 1020, can cause the processor 1020 to perform some or all of the methods described above.
The aspects of the present application have been described in detail hereinabove with reference to the accompanying drawings. In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments. Those skilled in the art will also appreciate that the acts and modules referred to in the specification are not necessarily required for the present application. In addition, it can be understood that the steps in the method of the embodiment of the present application may be sequentially adjusted, combined and pruned according to actual needs, and the modules in the device of the embodiment of the present application may be combined, divided and pruned according to actual needs.
Furthermore, the method according to the application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing part or all of the steps of the above-described method of the application.
Or the application may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) that, when executed by a processor of an electronic device (or electronic device, server, etc.), causes the processor to perform some or all of the steps of a method according to the application as described above.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the application herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing description of embodiments of the application has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. An automatic connection method for bluetooth sound equipment is characterized by comprising the following steps:
Step one: after receiving the transmitted dynamic pre-coding of the current user preparation connection, the user side module uses a split function to cut the Bluetooth address of the current user mobile equipment, and extracts the Bluetooth addresses respectively located in the following parts: "front and rear character strings;
Step two: splicing the extracted character string with the dynamic pre-coding of the current user preparation connection to obtain a standard condition sequence of the current user preparation connection;
step three: extracting the number of 1 and 0 from the dynamic pre-coding of the current user preparation connection after binary conversion, comparing the number of 1 and 0, and selecting to generate a dynamic intermediate code of the current user preparation connection according to a preset first generation rule or a preset second generation rule based on a comparison result;
Step four: performing AND operation on the dynamic intermediate code of the previous and current preliminary connection of the current user to obtain a dynamic authentication temporary storage code of the current preliminary connection of the current user, and transmitting the dynamic authentication temporary storage code to a pre-pairing unit;
Step five: and restoring the authentication contrast code of the current user according to the same mode of the first step, the second step and the third step by the pre-pairing unit based on the pairing code, the Bluetooth address and the dynamic pre-pairing code of the current user mobile device, comparing the authentication contrast code with the received dynamic authentication code of the current user of the current pre-connection, and carrying out Bluetooth connection on the mobile device of the current user and the Bluetooth sound if the authentication contrast code is consistent with the received dynamic authentication code of the current user of the current pre-connection.
2. The automatic bluetooth sound connection method according to claim 1, further comprising, before the first step:
After the user terminal module monitors that the current user opens the Bluetooth function of the mobile device, the pairing code and the device name of the current user mobile device stored in the user terminal module are acquired, and a pre-pairing request is generated according to the acquired pairing code of the current user mobile device and is transmitted to a pre-pairing unit;
After the pre-pairing unit receives the transmitted pre-pairing request, acquiring the equipment state of the current indoor Bluetooth sound equipment;
If the current equipment state of the indoor Bluetooth sound equipment is the working state, generating a pairing rejection instruction;
If the current equipment state of the indoor Bluetooth sound equipment is in a power-off state, controlling the Bluetooth sound equipment to be powered on, and adjusting the equipment state to be in a standby state;
If the equipment state of the current indoor Bluetooth sound equipment is in a standby state, acquiring a pairing code and an equipment name of the current user mobile equipment carried in the transmitted pre-pairing request, and carrying out consistency comparison on the pairing code and the equipment names of all the trusted user mobile equipment stored in the pre-pairing unit;
If the comparison is passed, a character string is randomly generated by the pre-pairing unit, and is used as the dynamic pre-modulation code of the current user pre-connection to be transmitted to the user side module, and meanwhile, the dynamic pre-modulation code of the current user pre-connection is temporarily stored.
3. The automatic bluetooth sound connection method according to claim 2, further comprising, after the fourth step:
after the mobile equipment of the current user and the Bluetooth sound equipment are connected through the Bluetooth function, the pre-pairing unit monitors the connection state of the Bluetooth sound equipment and the mobile equipment of the current user in real time;
when the passive disconnection of the front user mobile device and the Bluetooth sound is monitored, determining that the device state of the Bluetooth sound is a standby state;
and when the equipment state is a standby state, a virtual equipment with a Bluetooth function is created through the virtual pairing unit, and Bluetooth connection is established between the virtual equipment and the Bluetooth sound equipment through the Bluetooth function.
4. The automatic bluetooth sound connection method according to claim 3, further comprising, after establishing a bluetooth connection between the virtual device and the bluetooth sound through a bluetooth function:
Monitoring the target area for a duration P1 time through a pre-pairing unit;
If the pre-pairing unit monitors the mobile device of the current user with the Bluetooth function being opened in the P1 time, disconnecting the Bluetooth connection between the virtual device and the Bluetooth sound, establishing connection between the Bluetooth sound and the mobile device of the current user through the Bluetooth function again, and destroying the created virtual device after the connection is established;
and if the pre-pairing unit does not monitor the mobile device of the current user with the Bluetooth function turned on in the P1 time, adjusting the device state of the Bluetooth sound equipment to be a standby state.
5. The automatic bluetooth sound connection method according to claim 3, wherein after the bluetooth connection is established between the user mobile device and the bluetooth sound device, there are two disconnection modes, one is that the user actively turns off the bluetooth function of the mobile device, and the other is that the user passively disconnects the mobile device from the effective connection distance of the bluetooth sound device.
6. The automatic connection method of bluetooth sound equipment according to claim 1, wherein in the second step, the extracted character string and the dynamic pre-modulation code of the current user's current preliminary connection are spliced, comprising:
Colon ": "as a parameter of the split function, the bluetooth address of the current user mobile device stored in the user terminal module is cut by using the split () method, and the bluetooth addresses respectively located in the bluetooth addresses are extracted: "front and rear character strings;
Based on the position of each extracted character string at the Bluetooth address of the mobile equipment of the current user, marking a plurality of character strings extracted by cutting as A1, A2, A3, A4, A5 and A6 in sequence according to the sequence from left to right, and marking the dynamic pre-coding of the current user ready connection as a character string A7; wherein the strings A1, A2, & A6 are all 16-ary numbers;
Binary conversion is carried out on the dynamic pre-modulation code of the current user preliminary connection, and the quantity of 1 and 0 is respectively extracted from the converted data, and the quantity is correspondingly marked as B1 and B2;
And splicing the character strings A7, A1 and A6 according to the sequence from left to right to obtain a standard condition sequence of the current user preparation connection.
7. The automatic connection method of bluetooth sound equipment according to claim 1, wherein in the third step, the generating the dynamic intermediate code of the current user's current preliminary connection according to the preset first generation rule includes:
According to the sequence from left to right, extracting a new character string consisting of a1 st character and two immediately following the 1 st character from the standard condition sequence of the current user preparation connection, and taking the new character string as a prefix character string marked as the 1 st character of the standard condition sequence of the current user preparation connection;
Sequentially obtaining prefix character strings of the 1 st, 2 nd and 54 th bits of a standard condition sequence of the current user preparation connection;
performing de-duplication on all prefix character strings, reserving only one character string aiming at the character strings with the same content, and reserving the character strings aiming at the character strings with different contents;
the remaining character strings are re-calibrated into authentication character strings, and all the authentication character strings are marked as C1, C2, C is more than or equal to 1 according to the sequence of the prefix character strings of the 1 st, 2 nd, the 54 th and the 54 th positions of the standard condition sequences of the current user preparation connection;
The method comprises the steps of respectively obtaining the occurrence times of authentication character strings C1, C2, and Cc in prefix character strings of bits 1,2, 54 of a standard condition sequence of the current user preparation connection, and correspondingly calibrating the occurrence times as the frequency D1, D2 and Dc of the authentication character strings C1, C2, and Cc;
comparing the sizes of D1, D2, dc and D in sequence, splicing the frequency of the authentication character strings larger than D according to the sequence of D1, D2, dc, performing binary conversion on the spliced data, and calibrating the converted data as a dynamic intermediate code which is ready for connection by the current user.
8. The automatic connection method of bluetooth sound equipment according to claim 1, wherein in the third step, the generating the dynamic intermediate code of the current user's current preliminary connection according to the preset second generation rule includes:
According to the sequence from left to right, extracting a new character string consisting of the 1 st character and three immediately following the 1 st character from the standard condition sequence of the current user preparation connection, and taking the new character string as a prefix character string marked as the 1 st character of the standard condition sequence of the current user preparation connection;
Sequentially obtaining prefix character strings of the 1 st, 2 nd, third and 53 th bits of a standard condition sequence of the current user preparation connection;
performing de-duplication on all prefix character strings, reserving only one character string aiming at the character strings with the same content, and reserving the character strings aiming at the character strings with different contents;
The remaining character strings are re-calibrated into authentication character strings, and all the authentication character strings are marked as C1, C2, C is larger than or equal to 1 according to the sequence of prefix character strings of the 1 st, 2 nd, the third and the 53 th digits of the standard condition sequence of the current user preparation connection;
The method comprises the steps of respectively obtaining the occurrence times of authentication character strings C1, C2, and Cc in prefix character strings of bits 1,2, and 53 of a standard condition sequence of the current user preparation connection, and correspondingly calibrating the occurrence times as the frequency D1, D2, and Dc of the authentication character strings C1, C2, and Cc;
comparing the sizes of D1, D2, dc and D in sequence, splicing the frequency of the authentication character strings larger than D according to the sequence of D1, D2, dc, performing binary conversion on the spliced data, and calibrating the converted data as a dynamic intermediate code which is ready for connection by the current user.
9. The automatic bluetooth sound connection method according to claim 4, wherein after the target area is monitored for a duration P1 by the pre-pairing unit, further comprising:
after the P1 time passes, acquiring the equipment state of the Bluetooth sound equipment after the next P2 time;
if the equipment state of the Bluetooth sound equipment is not changed, the Bluetooth sound equipment is turned off.
10. An automatic bluetooth sound connection system, comprising:
The central control end module is used for controlling the Bluetooth sound equipment to be safely connected with a user, and comprises a pre-pairing unit and a virtual pairing unit;
The user terminal module is used for ensuring that the mobile equipment of the user is connected with the Bluetooth sound box;
the user terminal module monitors that a current user opens the Bluetooth function of the mobile device, acquires the pairing code and the device name of the current user mobile device stored in the user terminal module, and generates a pre-pairing request according to the pairing code and the device name;
the method comprises the steps that after a transmitted pre-pairing request is received, a pre-pairing unit firstly obtains the equipment state of an indoor Bluetooth sound, if the obtained equipment state of the current indoor Bluetooth sound is a standby state, a pairing code and equipment names of current user mobile equipment carried in the transmitted pre-pairing request are obtained, consistency comparison is carried out between the pairing code and the equipment names of all trusted user mobile equipment stored in the pre-pairing unit, and if the pairing code and the equipment names pass the comparison, a character string is randomly generated by the pre-pairing unit to serve as dynamic pre-modulation for the current user pre-connection;
the user terminal module generates a dynamic authentication code of the current user preparation connection according to a preset generation rule after receiving the transmitted dynamic pre-modulation code of the current user preparation connection;
the pre-pairing unit compares the dynamic authentication code of the current user for the current pre-connection with the authentication contrast code of the current user for the current time, which is generated by restoring the dynamic pre-modulation code of the current user for the current pre-connection, and the mobile equipment of the current user and the Bluetooth sound box are connected in Bluetooth mode if the comparison is passed;
After the mobile equipment of the current user and the Bluetooth sound box are connected through the Bluetooth function, the pre-pairing unit monitors the connection state of the Bluetooth sound box and the mobile equipment of the current user in real time, and if the current mobile equipment of the user and the Bluetooth sound box are monitored to be disconnected passively, the equipment state of the Bluetooth sound box is in a standby state;
Firstly, creating a virtual device with a Bluetooth function by a virtual pairing unit, carrying out Bluetooth connection on the virtual device and a Bluetooth sound box, carrying out continuous P1 time monitoring on a target area after the Bluetooth connection, disconnecting the Bluetooth connection between the virtual device and the Bluetooth sound box if the mobile device of a current user with the Bluetooth function is monitored by the pre-pairing unit in the P1 time, and then establishing connection between the Bluetooth sound box and the mobile device of the current user through the Bluetooth function again, and destroying the created virtual device after the connection is established;
Otherwise, if the pre-pairing unit does not monitor the mobile device of the current user with the Bluetooth function being turned on in the P1 time, the device state of the Bluetooth sound box is adjusted to be in a standby state, the device state of the Bluetooth sound box is acquired and judged after the next P2 time, and if the device state of the Bluetooth sound box is not changed after the next P2 time, the Bluetooth sound box is turned off.
CN202410634556.XA 2024-05-22 2024-05-22 Bluetooth sound automatic connection method, connection system, electronic device and storage medium Active CN118233870B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410634556.XA CN118233870B (en) 2024-05-22 2024-05-22 Bluetooth sound automatic connection method, connection system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410634556.XA CN118233870B (en) 2024-05-22 2024-05-22 Bluetooth sound automatic connection method, connection system, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN118233870A true CN118233870A (en) 2024-06-21
CN118233870B CN118233870B (en) 2024-09-27

Family

ID=91511421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410634556.XA Active CN118233870B (en) 2024-05-22 2024-05-22 Bluetooth sound automatic connection method, connection system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN118233870B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090127676A (en) * 2008-06-09 2009-12-14 (주)엠투랩 System and method for protecting of computer by use of bluetooth
CN105450269A (en) * 2015-12-21 2016-03-30 飞天诚信科技股份有限公司 Method and device for realizing safe interaction and pairing authentication between Bluetooth devices
CN111243133A (en) * 2020-01-07 2020-06-05 杭州涂鸦信息技术有限公司 Bluetooth door lock system based on dynamic password generation and matching and unlocking method
CN117560665A (en) * 2023-12-25 2024-02-13 珠海格力电器股份有限公司 Bluetooth connection authentication method and device, storage medium and Bluetooth connection system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090127676A (en) * 2008-06-09 2009-12-14 (주)엠투랩 System and method for protecting of computer by use of bluetooth
CN105450269A (en) * 2015-12-21 2016-03-30 飞天诚信科技股份有限公司 Method and device for realizing safe interaction and pairing authentication between Bluetooth devices
CN111243133A (en) * 2020-01-07 2020-06-05 杭州涂鸦信息技术有限公司 Bluetooth door lock system based on dynamic password generation and matching and unlocking method
CN117560665A (en) * 2023-12-25 2024-02-13 珠海格力电器股份有限公司 Bluetooth connection authentication method and device, storage medium and Bluetooth connection system

Also Published As

Publication number Publication date
CN118233870B (en) 2024-09-27

Similar Documents

Publication Publication Date Title
US20190280863A1 (en) Recovery of secret data in a distributed system
US8978120B2 (en) Communication control system and method, and communication device and method
CN110912701A (en) Social key recovery method and related device
CN108989263A (en) Short message verification code attack guarding method, server and computer readable storage medium
MX2008011277A (en) Digipass for the web-functional description.
CN111193817B (en) Method and device for automatically registering equipment serial number, computer equipment and storage medium
US11968300B2 (en) Data extraction system, data extraction method, registration apparatus, and program
CN109729000B (en) Instant messaging method and device
CN114339755A (en) Registration verification method and device, electronic equipment and computer readable storage medium
CN116132149A (en) Tamper-resistant communication method and device, server, intelligent home and terminal equipment
CN111566989A (en) Key processing method and device
CN118233870B (en) Bluetooth sound automatic connection method, connection system, electronic device and storage medium
CN113127844A (en) Variable access method, device, system, equipment and medium
EP2911087A1 (en) Method, device and apparatus for storing and reading data
CN114338113B (en) Data encryption and decryption methods and devices, electronic equipment and storage medium
WO2016188079A1 (en) Data storage method for terminal device and terminal device
CN117955968A (en) File transmission method and device, electronic equipment and storage medium
KR20140088967A (en) Identity module management method and apparatus for user equipment
US12028345B2 (en) Information security system and method for identifying trusted machines for machine-to-machine (M2M) security and validation
CN112637106B (en) Method and device for terminal to access website
WO2017000123A1 (en) Information processing method and device
CN108449753B (en) Method for reading data in trusted computing environment by mobile phone device
CN114595465A (en) Data encryption processing method and device and electronic equipment
CN113840273B (en) User hidden identifier generation method, terminal, USIM, equipment and medium
CN113742747B (en) Face image recognition method and device

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