Linux-based Bluetooth User Isolation Method and System

By establishing a user database on the Linux platform and implementing user permission control, the problem of poor user isolation in a multi-user environment is solved, the effect of user boundary division and permission management is improved, and the privacy and security of device connections is ensured.

CN114205797BActive Publication Date: 2025-05-30KYLIN CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111445250.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-05-30
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

In PCs or other Linux platforms used by multiple users, the user isolation of Bluetooth devices is poor, resulting in unclear user boundaries and confusing permission management.

Method used

By establishing a user database on the PC side, user permission control of Bluetooth peripheral devices is realized. When connecting for the first time, ask the current user whether it is available to all users. Otherwise, enter the connection key to connect to the device and add the user to the database. Find the user database when the user is not connected for the first time. If the user exists, connect directly. Otherwise, enter the secret key to connect and join the database. When removing the device, determine whether multiple users are connected. If so, remove and delete the database.

Benefits of technology

It realizes effective user isolation of Bluetooth devices, enhances the division of user boundaries and permission management, and ensures the privacy and security of device connections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114205797B_ABST
    Figure CN114205797B_ABST
Patent Text Reader

Abstract

The present invention provides a Bluetooth user isolation method based on Linux, including: when the PC side first connects to a Bluetooth peripheral device, asking the current user of the PC side whether the Bluetooth peripheral device is available for all users. If so, connecting the current user to the Bluetooth peripheral device. Otherwise, inputting a connection secret key to connect the current user to the Bluetooth peripheral device and adding the current user to the user database that records user information; when the PC side connects to the Bluetooth peripheral device non-first time, comparing and searching the current user of the PC side with the user database. If the current user belongs, directly connect. If the current user does not belong, inputting a connection secret key to connect the current user to the Bluetooth peripheral device and adding the current user to the user database; when the PC side removes the Bluetooth peripheral device, judging whether the Bluetooth peripheral device is connected by multiple users of the PC side. If so, remove it and delete the user database. If not, directly remove it. This method enables effective user isolation for Bluetooth users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer science and technology, and particularly to a Bluetooth user isolation method and system based on Linux. Background Art

[0002] Under the existing Linux operating system usage environment, the usage requirements of Bluetooth devices are increasing, and the usage frequency of Bluetooth adapters is also getting higher and higher. As a system-level device, the Bluetooth adapter has advantages such as low power consumption, fast transmission rate, and stable transmission, but there are still deficiencies in user isolation. For example, Bluetooth devices connected to the Bluetooth adapter will be unconditionally shared with all users. In this way, for some devices with certain permission requirements, such as mobile phones, Bluetooth headsets, Bluetooth speakers, etc., there will be problems of unclear user boundaries and chaotic permission management.

[0003] The existing Bluetooth-related security attributes include aspects such as the usage habit security of a single user, the privacy security of the protocol stack, and the location permission security. However, for PC scenarios, especially PC devices in public scenarios such as offices, when the Bluetooth devices connected to the PC are not removed before the user logs off and another user logs in, if the Bluetooth devices connected by the previous user are in a connectable state, they will be actively connected by the PC.

[0004] Therefore, in view of the problems existing in the prior art, in a PC or other Linux platforms used by multiple users, it is necessary to provide a method to enable effective user isolation for Bluetooth users. Summary of the Invention

[0005] The present invention provides a Bluetooth user isolation method based on Linux, which enables effective user isolation for devices connected to the Bluetooth adapter in a PC or other Linux platforms used by multiple users, and realizes the privacy security of Bluetooth device connections.

[0006] To achieve the above object and other related objects, the present invention provides a Bluetooth user isolation method based on Linux, which is used for the interaction among a PC, multiple Bluetooth users of the PC, and Bluetooth peripheral devices, and includes:

[0007] When the PC first connects the Bluetooth peripheral device, it asks the current user of the PC whether the Bluetooth peripheral device is available for all users. If so, the current user connects to the Bluetooth peripheral device. If not, the user inputs a connection secret key to connect the current user to the Bluetooth peripheral device, and adds the current user to the user database that records user information;

[0008] When the PC connects to the Bluetooth peripheral device for the non-first time, it compares and searches the current user of the PC with the user database. If the current user belongs to the user database, it directly connects. If the current user does not belong to the user database, it inputs the connection secret key, connects the current user to the Bluetooth peripheral device, and adds the current user to the user database;

[0009] When the PC removes the Bluetooth peripheral device, it determines whether the Bluetooth peripheral device is connected by multiple users of the PC. If so, it removes it and deletes the user database. If not, it directly removes it.

[0010] Further, the PC connects to the Bluetooth peripheral device through a Bluetooth adapter.

[0011] Further, the connection secret key is a PIN code.

[0012] Further, the Bluetooth peripheral device is an audio device.

[0013] Based on the same inventive concept, the present invention also provides a Bluetooth user isolation system based on Linux, including:

[0014] An authentication module, when the PC connects to the Bluetooth peripheral device for the first time, is used to ask the current user of the PC whether the Bluetooth peripheral device is available for all users. If so, it connects the current user to the Bluetooth peripheral device and does not perform user isolation. If not, it inputs the connection secret key, connects the current user to the Bluetooth peripheral device, and adds the current user to the user database that records user information;

[0015] When the PC connects to the Bluetooth peripheral device for the non-first time, it is used to compare and search the current user of the PC with the user database. If the current user belongs to the user database, it directly connects. If the current user does not belong to the user database, it inputs the connection secret key, connects the current user to the Bluetooth peripheral device, and adds the current user to the user database;

[0016] When the PC removes the Bluetooth peripheral device, it is used to determine whether the Bluetooth peripheral device is connected by multiple users of the PC. If so, it removes it and deletes the user database. If not, it directly removes it;

[0017] A device connection module, used to connect the PC to the Bluetooth peripheral device;

[0018] A user attribute storage module, used to store the user database.

[0019] Further, it further includes an input module, and the input module is used to input the connection secret key.

[0020] Further, it further includes a display module, and the display module is configured to display the connection secret key input by the input module.

[0021] In summary, by establishing a user database, on the basis of the original Bluetooth connection function, the present invention adds user permission control for connected and connectable devices, enhances the division of user boundaries, and the overall user permission division system of the present invention depends on the system level and is not affected by user creation and deletion. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic diagram of the steps of a Bluetooth user isolation method based on Linux provided by an embodiment of the present invention;

[0023] Figure 2 It is a flowchart of the first connection of a Bluetooth user to a Bluetooth peripheral device in a Bluetooth user isolation method based on Linux provided by an embodiment of the invention;

[0024] Figure 3 It is a flowchart of the second connection of a Bluetooth user to a Bluetooth peripheral device in a Bluetooth user isolation method based on Linux provided by an embodiment of the invention;

[0025] Figure 4 It is a flowchart of a Bluetooth user removing a Bluetooth peripheral device in a Bluetooth user isolation method based on Linux provided by an embodiment of the invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] The following further describes in detail the Bluetooth user isolation method and system based on Linux proposed by the present invention in conjunction with the attached Figures 1-4 and the specific embodiments. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the attached drawings are in a very simplified form and all use non-precise scales, only for the purpose of facilitating and clearly assisting in explaining the embodiments of the present invention. In order to make the purpose, features and advantages of the present invention more obvious and understandable, please refer to the attached drawings. It should be noted that the structures, scales, sizes, etc. shown in the drawings of this specification are only used to cooperate with the content disclosed in the specification for those familiar with this technology to understand and read, and are not used to limit the limited conditions for the implementation of the present invention. Therefore, they do not have technical substance. Any modification of the structure, change of the proportional relationship or adjustment of the size should still fall within the scope covered by the technical content disclosed in the present invention without affecting the effects that the present invention can produce and the purposes that can be achieved.

[0027] Refer to Figures 1-4, an embodiment of the present invention provides a Linux-based Bluetooth user isolation method for the interaction among a PC, multiple Bluetooth users of the PC, and Bluetooth peripheral devices, including the following steps:

[0028] S100. The PC first connects to the Bluetooth peripheral device and asks the current user of the PC whether the Bluetooth peripheral device is available for all users. If so, connect the current user to the Bluetooth peripheral device. If not, input the connection secret key to connect the current user to the Bluetooth peripheral device and add the current user to the user database that records user information.

[0029] S200. When the PC is not connecting to the Bluetooth peripheral device for the first time, compare and search the current user of the PC with the user database. If the current user belongs to the user database, connect directly. If the current user does not belong to the user database, input the connection secret key to connect the current user to the Bluetooth peripheral device and add the current user to the user database.

[0030] S300. When the PC removes the Bluetooth peripheral device, determine whether the Bluetooth peripheral device is connected by multiple users of the PC. If so, remove it and delete the user database. If not, remove it directly.

[0031] In this embodiment, the PC generally connects to the Bluetooth peripheral device through a Bluetooth adapter; the connection secret key is generally a PIN code; the Bluetooth peripheral device can be an audio device.

[0032] Based on the same inventive concept, the present invention also provides a Linux-based Bluetooth user isolation system, including:

[0033] An authentication module, when the PC first connects to the Bluetooth peripheral device, is used to ask the current user of the PC whether the Bluetooth peripheral device is available for all users. If so, connect the current user to the Bluetooth peripheral device and do not perform user isolation. If not, input the connection secret key to connect the current user to the Bluetooth peripheral device and add the current user to the user database that records user information.

[0034] When the PC is not connecting to the Bluetooth peripheral device for the first time, it is used to compare and search the current user of the PC with the user database. If the current user belongs to the user database, connect directly. If the current user does not belong to the user database, input the connection secret key to connect the current user to the Bluetooth peripheral device and add the current user to the user database.

[0035] When the PC removes the Bluetooth peripheral device, it is used to determine whether the Bluetooth peripheral device is connected by multiple users of the PC. If so, remove it and delete the user database. If not, directly remove it;

[0036] A device connection module for connecting the PC to the Bluetooth peripheral device;

[0037] A user attribute storage module for storing the user database.

[0038] In this embodiment, the Linux-based Bluetooth user isolation system further includes an input module for inputting the connection key. Technologically, the input module further includes a display module for displaying the connection key input by the input module.

[0039] The present invention will be introduced below with a connection example.

[0040] Taking audio device A as the Bluetooth peripheral device (including PIN code input) and a PC device as the Bluetooth adapter carrier, i.e., the terminal; the system includes users a and b.

[0041] Step 1: When user a requests the PC to connect to device A and is confirmed to be used by a single user, enter the PIN code. At this time, in the user permission database, it will be recorded that a is associated with A;

[0042] Step 2: When user b requests the PC to connect to device A, query the database and find that user b currently has no permission to connect to A. At this time, the PIN code is updated. After the PIN code is updated, in the user permission database, it will be recorded that b is associated with A;

[0043] Step 3: When user b requests to remove the connection record with device A, the record of the association between b and A will be removed from the user permission database. At this time, it only affects user b's connection to A on the PC and does not affect user a's connection to A on the PC;

[0044] Step 4: When user a requests the PC to connect to device A, the connection operation is directly completed;

[0045] Step 5: When user b requests the PC to connect to device A, repeat the content of Step 2;

[0046] Step 6: When users a and b request to remove the record with device A, the connection record of the device is removed through the protocol stack. If connection is required later, Step 1 needs to be repeated.

[0047] Based on the same inventive concept, the present invention also provides an electronic device, including a processor and a memory. A computer program is stored on the memory. When the computer program is executed by the processor, the Bluetooth user isolation method based on Linux is implemented.

[0048] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor (such as a GPU (Graphics Processing Unit - graphics processor)), or other data processing chips. The processor is generally used to control the overall operation of the electronic device. In this embodiment, the processor is used to run the program code stored in the memory or process data, such as running the program code of the Bluetooth user isolation method based on Linux.

[0049] The memory includes at least one type of readable storage medium. The readable storage medium includes flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory may be an internal storage unit of the electronic device, such as the hard disk or memory of the electronic device. In other embodiments, the memory may also be an external storage device of the electronic device, such as a plug-in hard disk equipped on the electronic device, a SmartMedia Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Of course, the memory may also include both the internal storage unit and the external storage device of the electronic device. In this embodiment, the memory is generally used to store the operation methods and various application software installed on the electronic device, such as the program code of the Bluetooth user isolation method based on Linux. In addition, the memory may also be used to temporarily store various data that have been output or will be output.

[0050] Based on the same inventive concept, the present invention also provides a readable storage medium. A computer program is stored in the readable storage medium. When the computer program is executed by a processor, the Bluetooth user isolation method based on Linux is implemented.

[0051] The advantages of the present invention are as follows:

[0052] 1) The present invention relies on the system process and has stronger stability compared to relying on a single user process.

[0053] 2) The present invention creates an independent high-privilege user through the system database usage rights, and other users have no right to tamper with it except for the root user.

[0054] 3) The present invention has good user usability for both PIN and non-PIN device types.

[0055] 4) The present invention does not affect the original system protocol stack and the calling scheme.

[0056] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be recognized that the above description should not be considered as a limitation of the present invention. After those skilled in the art have read the above content, various modifications and substitutions to the present invention will be obvious. Therefore, the protection scope of the present invention should be defined by the appended claims.

Claims

1. A Linux-based Bluetooth user isolation method for the interaction among a PC, multiple Bluetooth users of the PC, and Bluetooth peripheral devices. Characterized in that, It includes: When the PC first connects to the Bluetooth peripheral device, it asks the current user of the PC whether the Bluetooth peripheral device is available for all users. If so, it connects the current user to the Bluetooth peripheral device. If not, it inputs a connection secret key to connect the current user to the Bluetooth peripheral device and adds the current user to the user database that records user information. When the PC is not connecting to the Bluetooth peripheral device for the first time, it compares and searches the current user of the PC with the user database. If the current user belongs to the user database, it directly connects. If the current user does not belong to the user database, it inputs a connection secret key to connect the current user to the Bluetooth peripheral device and adds the current user to the user database. When the PC removes the Bluetooth peripheral device, it determines whether the Bluetooth peripheral device is connected by multiple users of the PC. If so, it removes it and deletes the user database. If not, it directly removes it. The PC connects to the Bluetooth peripheral device through a Bluetooth adapter. The connection secret key is a PIN code. The Bluetooth peripheral device is an audio device.

2. A Linux-based Bluetooth user isolation system, Characterized in that, It includes: An authentication module, when the PC first connects to the Bluetooth peripheral device, it is used to ask the current user of the PC whether the Bluetooth peripheral device is available for all users. If so, it connects the current user to the Bluetooth peripheral device and does not perform user isolation. If not, it inputs a connection secret key to connect the current user to the Bluetooth peripheral device and adds the current user to the user database that records user information. When the PC is not connecting to the Bluetooth peripheral device for the first time, it is used to compare and search the current user of the PC with the user database. If the current user belongs to the user database, it directly connects. If the current user does not belong to the user database, it inputs a connection secret key to connect the current user to the Bluetooth peripheral device and adds the current user to the user database. When the PC removes the Bluetooth peripheral device, it is used to determine whether the Bluetooth peripheral device is connected by multiple users of the PC. If so, it removes it and deletes the user database. If not, it directly removes it. A device connection module, used to connect the PC to the Bluetooth peripheral device. A user attribute storage module, used to store the user database.

3. The Linux-based Bluetooth user isolation system according to claim 2, Characterized in that, It further includes an input module, and the input module is used to input the connection secret key.

4. The Linux-based Bluetooth user isolation system according to claim 3, Characterized in that, It further includes a display module, and the display module is used to display the connection secret key input by the input module.

5. An electronic device, Characterized in that, Comprising a processor and a memory, a computer program is stored on the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 is implemented.

6. A readable storage medium, characterized in that a computer program is stored in the readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 is implemented.

Citation Information

Patent Citations

  • Device for coupling a wearable device and a smart device

    DE202015102253U1