CN-121985317-A - Multi-Bluetooth extension method, system, storage medium and electronic equipment
Abstract
The application relates to a multi-Bluetooth extension method, a system, a storage medium and electronic equipment, which relate to the technical field of wireless communication, wherein the method comprises the steps of constructing a plurality of extension Bluetooth based on a primary Bluetooth interface, and distributing a corresponding Bluetooth service process for each extension Bluetooth, wherein each Bluetooth service process is distributed with a unique index; and responding to the received Bluetooth connection request of at least one user, extracting the index from the Bluetooth connection request, and distributing a corresponding Bluetooth service process for the user based on the index. Compared with the prior art, the application can effectively improve development efficiency and reduce maintenance cost, and the codes can be adapted with little modification no matter how many Bluetooth are added, the scheme is characterized in that the expansion function and the native function are separated, android native function can be quickly upgraded, customers have new Bluetooth functions, and the number of Bluetooth functions is increased in the expansion module, so that the modification on the native codes is very small.
Inventors
- ZHONG WEIMIN
- XIE ZHENHUA
- CAO XIANCAO
Assignees
- 惠州市德赛西威汽车电子股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251212
Claims (10)
- 1. A multiple bluetooth extension method, comprising: Constructing a plurality of extended Bluetooth based on a primary Bluetooth interface, and distributing a corresponding Bluetooth service process for each extended Bluetooth, wherein each Bluetooth service process is distributed with a unique index; And responding to the received Bluetooth connection request of at least one user, extracting the index from the Bluetooth connection request, and distributing a corresponding Bluetooth service process for the user based on the index.
- 2. The multiple bluetooth extension method according to claim 1, wherein extracting the index from the bluetooth connection request specifically comprises: Extracting a user identity from the Bluetooth connection request, and determining the index based on the user identity and a predefined index mapping relation; or extracting application identification information of a user from the Bluetooth connection request, and extracting digital features from the application identification information of the user as the index.
- 3. The multiple bluetooth extension method according to claim 2, wherein 4 bluetooth extensions are constructed based on the native bluetooth interface, and the index is allocated to each bluetooth service process of the bluetooth extensions, and the indexes are a first index, a second index, a third index, and a fourth index in sequence.
- 4. A multiple bluetooth extension method according to claim 3, wherein said user identities comprise at least one or more of a primary driving user, a secondary driving user, a rear-row user and a rear-row user; The predefined index mapping relationship includes: The Bluetooth service processes with the indexes of the first index, the second index, the third index and the fourth index respectively correspond to a main driving user, a co-driving user, one user of the rear row and the other user of the rear row.
- 5. The multiple bluetooth extension method according to claim 2, wherein extracting a digital feature from application identification information of the user as the index comprises: And intercepting the last digital character of the application identification information of the user by using a regular expression as the digital feature, and taking the digital feature as the index.
- 6. A multiple bluetooth extension method according to any of claims 1-5, wherein the extension function of each extended bluetooth is developed in a repository independent of the native bluetooth code; And each Bluetooth service process is mutually independent and carries out respective data interaction.
- 7. The multiple bluetooth extension method according to claim 1, wherein the native bluetooth interface is an Android native bluetooth API interface.
- 8. A multiple bluetooth extension system using a multiple bluetooth extension method according to any of the preceding claims 1-7, comprising: The Bluetooth construction module is used for constructing a plurality of extended Bluetooth based on the original Bluetooth interface and distributing corresponding Bluetooth service processes for each extended Bluetooth, wherein each Bluetooth service process is distributed with a unique index; And the Bluetooth matching module is used for responding to the received Bluetooth connection request of at least one user, extracting the index from the Bluetooth connection request, and distributing a corresponding Bluetooth service process for the user based on the index.
- 9. A computer readable storage medium having stored thereon at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set being loaded and executed by a processor to implement the method of any of claims 1-7.
- 10. An electronic device comprising a processor and a memory storing computer readable instructions which, when executed by the processor, perform the steps of the method of any of claims 1-7.
Description
Multi-Bluetooth extension method, system, storage medium and electronic equipment Technical Field The present application relates to the field of wireless communications technologies, and in particular, to a multiple bluetooth extension method, a multiple bluetooth extension system, a storage medium, and an electronic device. Background The existing multi-Bluetooth technical scheme is that an extended Bluetooth apk is added on the basis of an Android native Bluetooth apk to realize main and auxiliary driving multi-Bluetooth. When a customer has a Bluetooth function for a main screen and a secondary screen, and also has a Bluetooth function for a plurality of screens at the back row, the Bluetooth function can be realized only by adding a plurality of Bluetooth apks, so that the Bluetooth codes are multiplied and are difficult to maintain. And this solution also fails to fulfill the multi-user needs of the customer. When the vehicle has more than 3 or more Bluetooth, the code quantity can be multiplied, and the android multi-user system cannot be well supported. And the following function changes, the code of each Bluetooth apk is modified, and the maintenance is difficult. Disclosure of Invention Based on this, it is necessary to provide a multi-bluetooth extension method, system, storage medium and electronic device capable of improving development efficiency and reducing maintenance cost and supporting multiple users, aiming at the technical problems of large code increment in bluetooth extension, large code modification difficulty in subsequent function change, difficult maintenance and inability to meet the requirement of multiple users. In order to solve the technical problems, the technical scheme of the invention is as follows: in a first aspect, a multiple bluetooth extension method includes: Constructing a plurality of extended Bluetooth based on a primary Bluetooth interface, and distributing a corresponding Bluetooth service process for each extended Bluetooth, wherein each Bluetooth service process is distributed with a unique index; And responding to the received Bluetooth connection request of at least one user, extracting the index from the Bluetooth connection request, and distributing a corresponding Bluetooth service process for the user based on the index. In a second aspect, a multiple bluetooth extension system, using a multiple bluetooth extension method as described above, includes: The Bluetooth construction module is used for constructing a plurality of extended Bluetooth based on the original Bluetooth interface and distributing corresponding Bluetooth service processes for each extended Bluetooth, wherein each Bluetooth service process is distributed with a unique index; And the Bluetooth matching module is used for responding to the received Bluetooth connection request of at least one user, extracting the index from the Bluetooth connection request, and distributing a corresponding Bluetooth service process for the user based on the index. In a third aspect, a computer readable storage medium has stored thereon at least one instruction, at least one program, code set, or instruction set, loaded and executed by a processor, to implement a multiple bluetooth extension method as described above. In a fourth aspect, an electronic device comprises a processor and a memory storing computer readable instructions that, when executed by the processor, perform the steps of a multiple bluetooth extension method as described above. Compared with the prior art, the technical scheme of the invention has the beneficial effects that: The invention can support development of 4 or more Bluetooth functions through one set of codes, can effectively improve development efficiency and reduce maintenance cost, can adapt to the development of the Bluetooth functions through a small amount of modification no matter how many Bluetooth functions are added, can quickly upgrade android native functions by distinguishing the scheme extension function from the native function, and has new Bluetooth functions by customers, and can only be added in the extension module, thereby having very small change on the native code. The invention can be adapted to the multi-user system of android and the single-user system of android, and completely meets various possible Bluetooth development conditions. Drawings Fig. 1 is a flow chart of a multiple bluetooth extension method according to some embodiments of the present application; fig. 2 is a flow chart illustrating a process for implementing a multiple bluetooth extension method according to some embodiments of the present application; fig. 3 is a flow chart of a multiple bluetooth extension system according to some embodiments of the present application. Detailed Description The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describi