CN115038193A - Bluetooth connection method, device, computing equipment and storage medium - Google Patents

Bluetooth connection method, device, computing equipment and storage medium Download PDF

Info

Publication number
CN115038193A
CN115038193A CN202210580015.4A CN202210580015A CN115038193A CN 115038193 A CN115038193 A CN 115038193A CN 202210580015 A CN202210580015 A CN 202210580015A CN 115038193 A CN115038193 A CN 115038193A
Authority
CN
China
Prior art keywords
information
bluetooth
user
connection
equipment
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.)
Pending
Application number
CN202210580015.4A
Other languages
Chinese (zh)
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.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software 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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202210580015.4A priority Critical patent/CN115038193A/en
Publication of CN115038193A publication Critical patent/CN115038193A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • 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
    • 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
    • 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 embodiment of the invention discloses a Bluetooth connection method, a device, a computing device and a storage medium, belonging to the technical field of computers and aiming at solving the technical problem that the existing Bluetooth connection method is easy to cause misuse of Bluetooth equipment or information leakage, the method comprises the following steps: responding to the operation of logging in the operating system again, and determining a current login user; acquiring the equipment information of the Bluetooth equipment which is connected by the current login user for the last time, and taking the equipment corresponding to the acquired equipment information as target equipment; acquiring connection information and pairing information corresponding to target equipment from a configuration file of a current login user; and establishing Bluetooth connection with the target equipment through the acquired Bluetooth connection information and the pairing information. Therefore, each user stores own Bluetooth authentication information without mutual interference, and the conditions of Bluetooth equipment misuse or information leakage caused by different login users can be effectively prevented.

Description

Bluetooth connection method, device, computing equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a Bluetooth connection method, a Bluetooth connection device, a Bluetooth connection computing device and a readable storage medium.
Background
An operating system, such as the Linux operating system, is a multi-user multitasking operating system. Multiple users can be created in the operating system, and the system assigns resources and sets permissions, such as bluetooth connection setting permissions, to each user by default when creating the users. When the user needs to log in the operating system, the user can log in by using any user, and the resources and the setting authority of the operating system can be normally used.
When multiple users are created for the operating system of the computer device, different users can be supported to log in the user interface of the operating system at different times, so that the currently logged-in user can use the computing device. For example, users UserA and UserB of two operating systems are created and provided for the user a and the user B, respectively, so that the user a can use the user interface of the UserA login operating system when the user a needs to use the computing device independently, and the user B can use the user interface of the UserB login operating system when the user B needs to use the computing device independently. When the Bluetooth connection is used for setting the right, if the user A uses the computing device, the user A logs in the operating system by using the UserA and is connected with the Bluetooth device, for example, the Bluetooth headset and the Bluetooth watch are connected, at the moment, if the user B needs to use the computing device, the user B logs in the operating system by using the UserB, the user B easily finds that the Bluetooth device connected with the user A is automatically connected, and therefore misuse or information leakage of the Bluetooth device is easily caused.
Therefore, it is desirable to provide a bluetooth connection method to solve the problem that the existing bluetooth connection method is prone to cause misuse of bluetooth devices or information leakage.
Disclosure of Invention
To this end, embodiments of the present invention provide a bluetooth connection method and apparatus, in an effort to solve or at least alleviate the above-mentioned problems.
According to an aspect of an embodiment of the present invention, there is provided a bluetooth connection method, executed in a computing device, the method being applied to a bluetooth connection scenario for re-logging in an operating system of the computing device, where a configuration file corresponding to a currently logged-in user and device information of a bluetooth device that is recently connected to the currently logged-in user are stored in the computing device, the device information being used to identify the bluetooth device, and historical connection information of bluetooth connection of the currently logged-in user is recorded in the configuration file, the method including: responding to the operation of logging in the operating system again, and determining a current login user; acquiring the equipment information of the Bluetooth equipment which is connected by the current login user for the last time, and taking the equipment corresponding to the acquired equipment information as target equipment; acquiring connection information and pairing information corresponding to target equipment from a configuration file of a current login user; and establishing Bluetooth connection with the target equipment through the acquired Bluetooth connection information and the pairing information.
Optionally, the bluetooth connection method provided by the present invention further includes the steps of: acquiring user information of a logged-in user as first user information; wherein, the step of determining the current login user in response to the operation of re-logging in the operating system comprises: and responding to the operation of the login operating system, and acquiring the user information of the current login user as second user information.
Optionally, the step of acquiring device information of the bluetooth device to which the currently logged-in user has recently connected includes: judging whether to switch login users according to the first user information and the second user information; if the login user is switched, judging whether Bluetooth connection exists, and if so, disconnecting the Bluetooth connection; if the Bluetooth connection does not exist or the login user is not switched, logging in a user interface of the computing equipment; and acquiring the equipment information of the Bluetooth equipment which is connected with the current login user last time.
Optionally, the configuration file further includes pairing information that the historical pairing is successful, and the connection information is stored in the following manner: determining successfully paired equipment according to the historical successfully paired pairing information in the configuration file; creating a Bluetooth connection request, the Bluetooth connection request being initiated to any Bluetooth device that has successfully paired with the computing device; judging whether the Bluetooth connection request is initiated by the current user, if so, sending the Bluetooth connection request to any Bluetooth equipment which is successfully matched; and judging whether the Bluetooth connection is successful, if so, acquiring connection information, and storing the acquired connection information into a configuration file of the current login user.
Optionally, the bluetooth pairing information is stored as follows: searching for a Bluetooth device; sending a pairing request to the searched Bluetooth device so that the Bluetooth device is paired with the computing device; and judging whether the pairing with the Bluetooth equipment is successful or not, if so, acquiring pairing information and storing the pairing information into a configuration file of the current login user.
Optionally, the step of storing the obtained pairing information in a configuration file of the current login user includes: and judging whether the configuration file has the same pairing information with the acquired pairing information, if not, storing the acquired pairing information into the configuration file of the current login user, and if so, not repeatedly storing the acquired pairing information.
Optionally, the connection information includes a shared key and connection parameters required for bluetooth connection, the connection parameters include timeout for maintaining connection, and the pairing information includes a name, a type, and an attribute of the bluetooth device, and a shared key type required for bluetooth connection.
According to another aspect of the embodiments of the present invention, there is provided a bluetooth connection apparatus, executed in a computing device, the method applied to a bluetooth connection scenario for re-logging in an operating system of the computing device, where a configuration file corresponding to a current login user and device information of a bluetooth device that is connected by the current login user last time are stored in the computing device, the device information is used to identify the bluetooth device, and historical connection information and pairing information that historical pairing is successful of the bluetooth connection of the current login user are recorded in the configuration file, the apparatus including: the user login management module is suitable for responding to the operation of logging in the operating system again and determining the current login user; the service processing module is suitable for acquiring the equipment information of the Bluetooth equipment which is connected with the current login user at the latest time and taking the equipment corresponding to the acquired equipment information as target equipment; the Bluetooth connection module is suitable for acquiring connection information and pairing information corresponding to the target equipment from a configuration file of a current login user and establishing Bluetooth connection with the target equipment through the acquired Bluetooth connection information and pairing information; and the user configuration module is suitable for acquiring the connection information after the Bluetooth connection is successful and storing the acquired connection information into the configuration file of the current login user.
According to yet another aspect of the invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method as described above.
According to another aspect of the present invention, there is provided a readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the method as described above.
According to the method provided by the embodiment of the invention, when the operating system is logged in again, whether the Bluetooth connection is the same as that of the user logged in last time can be judged in advance, the current Bluetooth connection can be automatically disconnected under different conditions, the device connected with the last Bluetooth of the user logged in the operating system last time is taken as the target device, and the Bluetooth connection with the target device is carried out according to the own configuration file of the user logged in at present. Therefore, after the users switch to log in under the operating system, the authentication information of Bluetooth pairing and Bluetooth connection is avoided being shared by the users during Bluetooth connection, each user stores the own Bluetooth authentication information without mutual interference, and the conditions of Bluetooth equipment misuse or information leakage caused by different login users can be effectively prevented.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the embodiments of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a block diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 shows a flow diagram of a Bluetooth connection method 200 according to one embodiment of the invention;
fig. 3 shows a schematic diagram of a bluetooth connection apparatus 300 according to one embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by 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 disclosure to those skilled in the art.
In order to solve the problem that the existing bluetooth connection method is easy to cause misuse of bluetooth equipment or information leakage, the invention provides a bluetooth connection method, which can be implemented as an application program and installed in a computing device 100. The method may also be implemented as a plug-in, integrated into the operating system of the computing device 100.
The computing device 100 described above may be implemented as a server, such as an application server, a Web server, or the like; but may also be implemented as a desktop computer, a notebook computer, a processor chip, a tablet computer, etc., but is not limited thereto. Fig. 1 illustrates a block diagram of the physical components (i.e., hardware) of a computing device 100. In a basic configuration, computing device 100 includes at least one processing unit 102 and system memory 104. According to one aspect, depending on the configuration and type of computing device, system memory 104 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories.
According to one aspect, the system memory 104 includes an operating system 105, and when the bluetooth connection method provided by the present invention is implemented as a plug-in, the operating system 105 integrates the plug-in of the bluetooth connection function provided by the present invention. When the bluetooth connection method provided by the present invention is implemented as the application 150, the system memory 104 further includes the application 150.
According to one aspect, the operating system 105, for example, is adapted to control the operation of the computing device 100. Further, the examples are practiced in conjunction with a graphics library, other operating systems, or any other application program, and are not limited to any particular application or system. This basic configuration is illustrated in fig. 1 by those components within dashed line 108. According to one aspect, the computing device 100 has additional features or functionality. For example, according to one aspect, computing device 100 includes additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in FIG. 1 by removable storage device 109 and non-removable storage device 110.
As stated hereinabove, in accordance with one aspect, a number of program modules and data files are stored in system memory 104. When executed on processing unit 102, application 150 performs processes that include, but are not limited to, one or more of the stages of method 200 shown in FIG. 2. According to one aspect, the type of application is not limited, e.g., the application further comprises: email and contacts applications, word processing applications, spreadsheet applications, database applications, slide show applications, drawing or computer-aided applications, web browser applications, and the like.
According to one aspect, examples may be practiced in a circuit comprising discrete electronic elements, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic elements or microprocessors. For example, an example may be practiced via a system on a chip (SOC) in which each or many of the components shown in fig. 1 may be integrated on a single integrated circuit. According to one aspect, such SOC devices may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or "burned") onto a chip substrate as a single integrated circuit. When operating via an SOC, the functions described herein may be operated via application-specific logic integrated with other components of the computing device 100 on a single integrated circuit (chip). Embodiments of the invention may also be practiced using other technologies capable of performing logical operations (e.g., AND, OR, AND NOT), including but NOT limited to mechanical, optical, fluidic, AND quantum technologies. In addition, embodiments of the invention may be practiced within a general purpose computer or in any other circuits or systems.
According to one aspect, computing device 100 may also have one or more input devices 112, such as a keyboard, mouse, pen, voice input device, touch input device, or the like. Output device(s) 114 such as a display, speakers, printer, etc. may also be included. The foregoing devices are examples and other devices may also be used. Computing device 100 may include one or more communication connections 116 that allow communication with other computing devices 118, and other computing devices 118 may be bluetooth devices 118-1, which may include wireless headsets, tianmao fairies, car speakers, and so forth. Examples of suitable communication connections 116 include, but are not limited to: RF transmitter, receiver and/or transceiver circuitry; universal Serial Bus (USB), parallel, and/or serial ports.
The term computer readable media as used herein includes computer storage media. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, or program modules. System memory 104, removable storage 109, and non-removable storage 110 are all examples of computer storage media (i.e., memory storage). Computer storage media may include Random Access Memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other article of manufacture that can be used to store information and that can be accessed by the computer device 100. According to one aspect, any such computer storage media may be part of computing device 100. Computer storage media does not include a carrier wave or other propagated data signal.
According to one aspect, communication media is embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transport mechanism) and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, Radio Frequency (RF), infrared, and other wireless media.
The above-mentioned computing device 100 stores the configuration file corresponding to the current login user and the device information of the bluetooth device to which the current login user has recently connected. The configuration file comprises connection information for recording historical Bluetooth connection of the current login user and pairing information for successful historical pairing. That is, each user maintains its own bluetooth connection information and bluetooth pairing information.
The pairing information of the history pairing success includes the name, type and attribute of the bluetooth device. In some embodiments, the pairing information of the successful historical pairing is stored by: the computing device searches nearby Bluetooth devices, sends a pairing request to any searched Bluetooth device, so that the Bluetooth device is paired with the computing device, and continuously judges whether the Bluetooth device is successfully paired with the Bluetooth device or not, if so, acquires pairing information and stores the pairing information in a configuration file of a current login user, if the pairing is unsuccessful, does not need to store matching information, and continuously sends the pairing request to any next searched Bluetooth device until the pairing with any searched Bluetooth device is successful or the pairing with any searched Bluetooth device is failed, and then execution of a program is finished.
The connection information recording the historical Bluetooth connection of the current login user comprises a shared key and a shared key type required during Bluetooth connection, and under a few Bluetooth Low Energy (BLE) connection modes, the Bluetooth connection needs to use connection parameters negotiated by both connection parties, so that under the Low-power Bluetooth connection mode, the connection information recording the historical Bluetooth connection of the current login user also comprises the connection parameters. And the connection parameters further include a timeout for maintaining the connection.
In some embodiments, the connection information recording the historical bluetooth connections of the current logged-in user is stored by: firstly, the device which is successfully paired is determined according to the pairing information in the configuration file, and a Bluetooth connection request is created, wherein the Bluetooth connection request comprises user information, and the Bluetooth connection request is initiated to any Bluetooth device which is successfully paired with the computing device. After the bluetooth connection request is created, the bluetooth connection request is sent to a bluetooth process, and whether the bluetooth connection request is initiated by the current user is judged through the bluetooth process, specifically, according to comparison between user information in the bluetooth connection request and user information of the current login user, if the user information is the same as the user information, the bluetooth connection request is initiated by the current user, and if the user information is different from the user information, the bluetooth connection request is not initiated by the current user. If the Bluetooth connection request initiated by the current user is the Bluetooth connection request initiated by the current user, the Bluetooth connection request is sent to any one piece of Bluetooth equipment which is successfully matched, and if the Bluetooth connection request is not initiated by the current user, the Bluetooth connection request is abandoned. And under the condition of sending the Bluetooth connection request, continuously judging whether the Bluetooth connection is successful, and if so, acquiring connection information. And judging whether the configuration file has the same connection information as the acquired connection information or not, if so, storing the connection information repeatedly without need, and if not, storing the acquired connection information into the configuration file of the current login user.
The device information of the Bluetooth device is used for identifying the Bluetooth device, and the specific form of the device information of the Bluetooth device is not limited by the invention as long as the unique identification of the Bluetooth device is met. For example, the device information of the bluetooth device may be a bluetooth device name.
It should be noted here that the device information of the bluetooth device that the current login user has connected to last time is the device information of the bluetooth device that the current user has connected to last time and is stored in the computing device and associated with the current user after the user logs in the operating system, and the device information corresponds to a bluetooth device. When the user logs in the operating system again, the device information of the bluetooth device connected last time during the period that the current user logs in the operating system is redetermined, and the device information stored before is updated to the currently determined device information.
In some embodiments, the partial contents of the configuration file are exemplified as follows:
[General]
Name=Bluetooth DEvice
Trusted=true
[LinkKey]
Key=8C73B2C18C6A32B00037D929EE9DEDBC
---------------
[ConnectionParameters]
Timeout=300
where [ General ] is the configuration information in the configuration file, and Name is the Name of the device, and the device Name is Bluetooth Speaker in this case. Trusted is the attribute of the device, the device attribute includes two different values, and the invention does not limit this, as long as they are different. For example, the device attribute includes two different values, true and false, and when the device attribute is true, it indicates that the successfully paired device is trusted, and when the device attribute is false, it indicates that the successfully paired device is untrusted. [ LinkKey ] is the connection information in the configuration file, the key is the shared key, and the key in this example is 8C73B2C18C6A32B00037D929EE9 DEDBC. Since the device in the present example is a bluetooth sound, and the bluetooth sound is in the bluetooth low energy connection mode, the connection information further includes a connection parameter, [ ConnectionParameters ] is a connection parameter, Timeout is a connection maintaining Timeout, and the connection parameter at this time maintains the connection Timeout for 300 ms.
Fig. 2 shows a flow diagram of a bluetooth connection method 200 according to one embodiment of the invention. The method 200 is suitable for execution in the computing device 100, and the method 200 includes steps S210 to S250.
The method 200 is applied to a bluetooth connection scenario when the operating system of the computing device is logged in again, where the operating system corresponds to a plurality of users and only one user logs in each time. The invention does not limit the type of the operating system, as long as the requirement of corresponding multiple users is met. For example, the operating system may be a Li nux operating system.
When the same user or different users log in the operating system again, whether the user is the same as the user logged in last time or not can be judged in advance, the current Bluetooth connection can be automatically disconnected under different conditions, the user can be connected with the target device Bluetooth according to the own configuration file of the current login user, the user stores own Bluetooth authentication information, the user does not interfere with the target device, and the situation that the Bluetooth device is misused or information is leaked due to the fact that the login users do not simultaneously can be effectively prevented. In the same case as the last logged-on user, there is no need to disconnect the current bluetooth connection.
When the user has logged in the operating system, step S210 is executed to acquire user information of the logged-in user as first user information. When any user of multiple users logs in the operating system again, a login interface is popped up, the user inputs a user name and a password on the login interface and triggers the login interface, the computing device responds to the operation of the user logging in the operating system, step S220 is executed, the current login user is determined, and specifically, the user information of the current login user is obtained and used as the second user information. The user information may include a user name and a password of the current login user.
The logged-on user is substantially the next previous logged-on user compared to the current logged-on user. Then, after the user information of the last login user and the user information of the current login user are obtained, step S230 is continuously performed to obtain the device information of the bluetooth device to which the current login user has recently connected, and the device corresponding to the obtained device information is taken as the target device.
In some embodiments, step S230 specifically includes: whether the login user is switched is judged, specifically, whether the first user information and the second user information acquired in the steps S210 and S220 are the same or not is compared, if yes, it is indicated that the login user is not switched, and if not, it is indicated that the user currently logging in the operating system is the same as the previous login user, and if not, it is indicated that the login user is switched. If the login user is switched, whether Bluetooth connection exists or not is continuously judged, and if the Bluetooth connection exists, the Bluetooth connection is disconnected, so that the situation that the Bluetooth equipment is misused or information is leaked when the login user does not exist simultaneously is prevented. If the Bluetooth connection does not exist or the login user is not switched, the login user interface is equivalent to the user interface of the operating system, namely, the current user successfully logs in the operating system, and the device information of the Bluetooth device which is connected with the current login user last time is obtained.
After the target device is determined, step S240 is executed to obtain connection information and pairing information corresponding to the target device from the configuration file of the current login user.
After acquiring the connection information and the pairing information corresponding to the target device, step S250 is executed to establish a bluetooth connection with the target device through the acquired bluetooth connection information and pairing information. The bluetooth connection method is the prior art and will not be described herein, but the existing bluetooth connection method is within the scope of the present invention.
Therefore, Bluetooth connection is achieved when the operating system is logged in again. The steps S210 to S250 are executed whenever the user logs in the operating system again and needs bluetooth connection.
Fig. 3 shows a block diagram of a bluetooth connection apparatus 300 according to an embodiment of the present invention. The apparatus 300 includes a user login management module 310, a service processing module 320, a bluetooth connection module 330, and a user configuration module 340, wherein the bluetooth connection module 330 is coupled to the user login management module 310, the service processing module 320, and the user configuration module 340, respectively.
The user login management module 310 is adapted to determine a current login user in response to an operation of re-logging in the operating system.
The service processing module 320 is adapted to acquire device information of a bluetooth device to which the currently logged-in user has recently connected, and take a device corresponding to the acquired device information as a target device.
The bluetooth connection module 330 is adapted to obtain connection information and pairing information corresponding to the target device from a configuration file of a current login user, and is further adapted to establish bluetooth connection with the target device through the obtained bluetooth connection information and pairing information.
And the user configuration module 340 is adapted to acquire the connection information after the bluetooth connection is successful, and store the acquired connection information into the configuration file of the current login user.
It should be noted that the operation principle of the bluetooth connection apparatus 300 is similar to that of the bluetooth connection method 200, and reference may be made to the description of the bluetooth connection method 200 for relevant points, which is not described herein again.
It can be seen from the above contents that, in the bluetooth connection method provided by the present invention, when the operating system is logged in again, it is determined in advance whether the current bluetooth connection is the same as the user logged in last time, and in different cases, the current bluetooth connection is automatically disconnected, and the device that the user connected to the last bluetooth when the user logged in the operating system last time is used as the target device, and connected to the target device bluetooth according to the own configuration file of the current logged-in user. Therefore, after the multi-user switching login is performed under the operating system, the situation that a plurality of users share the Bluetooth pairing and Bluetooth connection authentication information during Bluetooth connection is avoided, each user stores the own Bluetooth authentication information without mutual interference, and the situation that the Bluetooth equipment is misused or information is leaked when the login users do not simultaneously occur can be effectively prevented.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the bluetooth connection method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as disclosed herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed with respect to the scope of the invention, which is to be considered as illustrative and not restrictive, and the scope of the invention is defined by the appended claims.

Claims (10)

1. A Bluetooth connection method is executed in a computing device, and is applied to a Bluetooth connection scene when an operating system of the computing device is logged in again, a configuration file corresponding to a current login user and device information of a Bluetooth device which is connected by the current login user most recently are stored in the computing device, the device information is used for identifying the Bluetooth device, and historical connection information of the Bluetooth connection of the current login user is recorded in the configuration file, and the method comprises the following steps:
responding to the operation of logging in the operating system again, and determining a current login user;
acquiring the equipment information of the Bluetooth equipment which is connected with the current login user at the latest time, and taking the equipment corresponding to the acquired equipment information as target equipment;
acquiring connection information and pairing information corresponding to the target equipment from a configuration file of a current login user;
and establishing Bluetooth connection with the target equipment through the acquired Bluetooth connection information and the pairing information.
2. The method of claim 1, further comprising the steps of:
acquiring user information of a logged-in user as first user information;
wherein, the step of determining the current login user in response to the operation of logging in the operating system again comprises:
and responding to the operation of the login operating system, and acquiring the user information of the current login user as second user information.
3. The method as claimed in claim 2, wherein the step of acquiring device information of the bluetooth device to which the currently logged-in user has recently connected comprises:
judging whether to switch login users according to the first user information and the second user information;
if the login user is switched, judging whether Bluetooth connection exists, and if so, disconnecting the Bluetooth connection;
if the Bluetooth connection does not exist or the login user is not switched, logging in a user interface of the operating system;
and acquiring the equipment information of the Bluetooth equipment which is connected with the current login user last time.
4. The method according to any one of claims 1 to 3, wherein the configuration file further comprises pairing information of historical successful pairing, and the connection information is stored by:
determining successfully paired equipment according to the pairing information of the successful historical pairing in the configuration file;
creating a Bluetooth connection request, the Bluetooth connection request initiated to any Bluetooth device that has successfully paired with the computing device;
judging whether the Bluetooth connection request is initiated by the current user, if so, sending the Bluetooth connection request to any Bluetooth equipment which is successfully matched;
and judging whether the Bluetooth connection is successful, if so, acquiring connection information, and storing the acquired connection information into a configuration file of the current login user.
5. The method of any of claims 1 to 4, wherein the Bluetooth pairing information is stored by:
searching for a Bluetooth device;
sending a pairing request to the searched Bluetooth device so that the Bluetooth device is paired with the computing device;
and judging whether the Bluetooth equipment is successfully paired, if so, acquiring pairing information and storing the pairing information in a configuration file of the current login user.
6. The method of claim 5, wherein storing the obtained pairing information in a profile of the current logged-in user comprises:
and judging whether the configuration file has the same pairing information as the acquired pairing information, if not, storing the acquired pairing information into the configuration file of the current login user, and if so, not repeatedly storing the acquired pairing information.
7. The method of any one of claims 1 to 6, wherein the connection information comprises a shared key and connection parameters required for a Bluetooth connection, the connection parameters comprise a timeout for maintaining the connection, and the pairing information comprises a name, type and attribute of the Bluetooth device, a shared key and a shared key type required for the Bluetooth connection.
8. A Bluetooth connection device, executed in a computing device, the method being applied to a Bluetooth connection scenario when an operating system of the computing device is logged in again, a configuration file corresponding to a current login user and device information of a Bluetooth device which is connected by the current login user most recently are stored in the computing device, the device information is used for identifying the Bluetooth device, and historical connection information of the Bluetooth connection of the current login user is recorded in the configuration file, the device comprising:
the user login management module is suitable for responding to the operation of logging in the operating system again and determining the current login user;
the service processing module is suitable for acquiring the equipment information of the Bluetooth equipment which is connected with the current login user for the last time, and taking the equipment corresponding to the acquired equipment information as target equipment;
the Bluetooth connection module is suitable for acquiring connection information and pairing information corresponding to the target equipment from a configuration file of a current login user and establishing Bluetooth connection with the target equipment through the acquired Bluetooth connection information and pairing information;
and the user configuration module is suitable for acquiring the connection information after the Bluetooth connection is successful and storing the acquired connection information into the configuration file of the current login user.
9. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-7.
10. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1 to 7.
CN202210580015.4A 2022-05-25 2022-05-25 Bluetooth connection method, device, computing equipment and storage medium Pending CN115038193A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210580015.4A CN115038193A (en) 2022-05-25 2022-05-25 Bluetooth connection method, device, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210580015.4A CN115038193A (en) 2022-05-25 2022-05-25 Bluetooth connection method, device, computing equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115038193A true CN115038193A (en) 2022-09-09

Family

ID=83120850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210580015.4A Pending CN115038193A (en) 2022-05-25 2022-05-25 Bluetooth connection method, device, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115038193A (en)

Similar Documents

Publication Publication Date Title
US10853511B2 (en) Securely accessing and processing data in a multi-tenant data store
US11470092B2 (en) Expendable network access
US20190236300A1 (en) Service processing method and apparatus, data sharing system, and storage medium
US11539701B2 (en) Network access point
US11489693B2 (en) Home network access
US9418219B2 (en) Inter-process message security
CN113438219B (en) Playback transaction identification method and device based on blockchain all-in-one machine
US20220382872A1 (en) Transfer of ownership of a computing device via a security processor
WO2019237542A1 (en) Application login method and apparatus for electronic device, and electronic device and medium
CN104937904A (en) Copy offload for disparate offload providers
WO2018171171A1 (en) Methods and apparatus for containerized secure computing resources
JP2023533597A (en) How to identify charging stations for electric vehicles
EP3586234B1 (en) Methods and apparatus for controlling access to secure computing resources
US20090172376A1 (en) Methods, apparatuses, and computer program products for providing a secure predefined boot sequence
CN115038193A (en) Bluetooth connection method, device, computing equipment and storage medium
US11853428B2 (en) Firmware policy enforcement via a security processor
CN118176698A (en) Software situation for zero trust access
US11423160B2 (en) System for analysis and authorization for use of executable environment data in a computing system using hash outputs
US11356255B1 (en) System and method for securely connecting applications to middleware services in a cloud platform
CN115510429B (en) Sandbox application access right control method, computing device and readable storage medium
US20240211601A1 (en) Firmware policy enforcement via a security processor
CN113726875B (en) Transaction processing method and device based on blockchain all-in-one machine
US11874752B1 (en) Methods and systems for facilitating cyber inspection of connected and autonomous electrical vehicles using smart charging stations
US11336438B2 (en) Remote approval and execution of restricted operations
US20220292506A1 (en) Authorization 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