The method and device of the shared bluetooth of multisystem
Technical field
The present invention relates to technical field, specifically, the present invention relates to a kind of method and device of the shared bluetooth of multisystem.
Background technology
With the development of information technology, mobile terminal becomes increasingly popular in the daily life of user, and mobile terminal is by indigo plant
Tooth carries out information exchange with other mobile terminals.In the mobile terminal of single system, the exclusive bluetooth resource of single system, by bluetooth
Resource carries out information exchange with other mobile terminals.
It is due to there are at least two systems in multisystem terminal device and many with the rise of multisystem terminal device
Each system in system terminal equipment is required to carry out information exchange by bluetooth with other-end equipment, and works as multisystem
When each system carries out information exchange with other-end equipment in terminal device, it is required to take bluetooth resource, therefore, multisystem
How terminal device distributes bluetooth resource, is handed over ensureing that multisystem terminal device enters row information by bluetooth and other-end equipment
The problem solved the need for mutually turning into one newly.A kind of method is there has been no at present to solve how multisystem terminal device passes through
Bluetooth carries out the problem of information exchange with other-end.
The content of the invention
To overcome above-mentioned technical problem or solving above-mentioned technical problem at least in part, spy proposes following technical scheme:
Embodiments of the invention are according on one side, there is provided a kind of method of the shared bluetooth of multisystem, including:
When any subsystem detects bluetooth resource request message, sent a notification message respectively to other subsystems, institute
Stating notification message need to take the information of bluetooth resource including any subsystem;
When the feedback in response to the notification message that any subsystem receives other all subsystems returns disappears
During breath, driven to bluetooth and send bluetooth resource request message, the feedback message includes that the subsystem for sending feedback message is not accounted for
With the information of bluetooth resource;
Any subsystem receives the bluetooth and drives the bluetooth resource for sending, to cause by the bluetooth resource and
Other-end equipment carries out information exchange.
Specifically, it is described when any subsystem detects bluetooth resource request message, sent respectively to other subsystems
The step of notification message, including:
When any subsystem detects bluetooth resource request, the notification message is write the file device of master control system
In node;
Described other subsystems read the notification message from the file device node of the master control system respectively.
Alternatively, it is described the step of sent a notification message respectively to other subsystems before, also include:
Any subsystem sends to master control system and creates channel request message, and the establishment channel request message is used for
Request creates itself and the communication port between the master control system;
The master control system creates any subsystem and corresponding communication port between it;
Specifically, it is described to drive the step of sending bluetooth resource request message to bluetooth, including:
By the communication port for having created, driven to the bluetooth in the master control system and send bluetooth resource request message.
Alternatively, methods described also includes:
When the subsystem for receiving the notification message is currently taking bluetooth resource, according to the instruction of user input
Information, discharges the bluetooth resource, and return to the feedback message to any subsystem.
Alternatively, methods described also includes:
When the subsystem for receiving the notification message is currently taking bluetooth resource, carried according to notification message
Application identities, and application takes the priority of bluetooth resource, determines whether to discharge the bluetooth resource;
If the priority of the current application for taking bluetooth resource is less than the application identities carried in the notification message
Corresponding application takes the priority of bluetooth resource, then discharge the bluetooth resource, and is returned to any subsystem described
Feedback message.
Alternatively, methods described also includes:
When the subsystem for receiving the notification message is currently taking bluetooth resource, bluetooth is taken according to subsystem
The precedence information of resource, determines whether to discharge the bluetooth resource;
If the priority that the current subsystem for taking bluetooth resource takes bluetooth resource is less than what is sent a notification message
Subsystem takes the priority of bluetooth resource, then discharge the bluetooth resource, and return to the feedback to any subsystem
Message.
Embodiments of the invention additionally provide a kind of device of the shared bluetooth of multisystem according to other side, including:
Sending module, in any subsystem, for when any subsystem detects bluetooth resource request message, to
Other subsystems send a notification message respectively, and the notification message includes that any subsystem need to take the information of bluetooth resource;
The sending module, be additionally operable to when any subsystem receive that other all subsystems return in response to institute
When stating the feedback message of notification message, driven to bluetooth and send bluetooth resource request message, the feedback message includes sending anti-
The subsystem for presenting message is not take up the information of bluetooth resource;
Receiver module, the bluetooth resource for sending is driven for receiving the bluetooth, to cause by the bluetooth resource and
Other-end equipment carries out information exchange.
Alternatively, described device also includes:Writing module, read module;
Writing module, in any subsystem, for when any subsystem detects bluetooth resource request, inciting somebody to action
In the file device node of the notification message write-in master control system;
Read module, in described other subsystems, for respectively from the file device node of the master control system
Read the notification message.
Alternatively, sending module, is additionally operable to send establishment channel request message, the establishment channel request to master control system
Message is used to ask to create itself and the communication port between the master control system;
Described device also includes:Creation module;
The creation module, in the master control system, for create any subsystem and its between it is corresponding
Communication port;
Specifically, the sending module, specifically for the communication port by having created, to the indigo plant in the master control system
Tooth drives and sends bluetooth resource request message.
Alternatively, described device also includes:Release module, return module;
The release module, in the subsystem for currently taking bluetooth resource, the notice is received for working as
When the subsystem of message is currently taking bluetooth resource, according to the configured information of user input, the bluetooth resource is discharged;
The return module, positioned at it is described it is current taking the subsystem of bluetooth resource, for any son
System returns to the feedback message.
Alternatively, described device also includes:Determining module;
The determining module, positioned at it is described it is current taking the subsystem of bluetooth resource, for described when receive
When the subsystem of notification message is currently taking bluetooth resource, accounted for according to the application identities that notification message is carried, and application
With the priority of bluetooth resource, determine whether to discharge the bluetooth resource;
The release module, the priority of the application for being additionally operable to currently ought to take bluetooth resource disappears less than the notice
When the corresponding application of application identities carried in breath takes the priority of bluetooth resource, the bluetooth resource is discharged;
The return module, is additionally operable to return to the feedback message to any subsystem.
Alternatively, the determining module, is additionally operable to currently take indigo plant when the subsystem for receiving the notification message
During tooth resource, the precedence information of bluetooth resource is taken according to subsystem, determine whether to discharge the bluetooth resource;
The release module, is additionally operable to currently to take the priority of the subsystem occupancy bluetooth resource of bluetooth resource
When taking the priority of bluetooth resource less than the subsystem for sending a notification message, the bluetooth resource is discharged;
The return module, is additionally operable to return to the feedback message to any subsystem.
The invention provides a kind of method and device of the shared bluetooth of multisystem, compared with prior art, the present invention passes through
When any subsystem detects bluetooth resource request message, sent a notification message to other subsystems, and it ought be received
During the feedback message of the vacant bluetooth resource of his subsystem, to bluetooth driving request bluetooth resource, with according to the bluetooth for obtaining
Resource carries out information exchange with other-end equipment, i.e., when any subsystem needs occupancy bluetooth resource to enter with other-end equipment
When row information is interacted, it is only necessary to when other subsystems vacant bluetooth resource, bluetooth resource, therefore multisystem terminal are asked
Subsystems in equipment can in the manner described above distribute bluetooth resource, and information exchange is carried out with other-end equipment, from
And can solve the problems, such as multisystem terminal device carries out information exchange with other-end equipment.
The additional aspect of the present invention and advantage will be set forth in part in the description, and these will become from the following description
Obtain substantially, or recognized by practice of the invention.
Brief description of the drawings
The above-mentioned and/or additional aspect of the present invention and advantage will become from the following description of the accompanying drawings of embodiments
Substantially and be readily appreciated that, wherein:
Fig. 1 is the relation schematic diagram between each system in the multisystem terminal device of the embodiment of the present invention;
Fig. 2 is a kind of method flow schematic diagram of the shared bluetooth resource of multisystem of the embodiment of the present invention;
Fig. 3 is the apparatus structure schematic diagram of a kind of shared bluetooth resource of the embodiment of the present invention;
Fig. 4 is the apparatus structure schematic diagram of another shared bluetooth resource in the embodiment of the present invention.
Specific embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from start to finish
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
It is exemplary to scheme the embodiment of description, is only used for explaining the present invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singulative " " used herein, " one
It is individual ", " described " and " being somebody's turn to do " may also comprise plural form.It is to be further understood that what is used in specification of the invention arranges
Diction " including " refer to the presence of the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition
One or more other features, integer, step, operation, element, component and/or their group.It should be understood that when we claim unit
Part is " connected " or during " coupled " to another element, and it can be directly connected or coupled to other elements, or can also exist
Intermediary element.Additionally, " connection " used herein or " coupling " can include wireless connection or wireless coupling.It is used herein to arrange
Diction "and/or" includes one or more associated wholes or any cell of listing item and all combines.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art
Language and scientific terminology), with art of the present invention in those of ordinary skill general understanding identical meaning.Should also
Understand, those terms defined in such as general dictionary, it should be understood that with the context with prior art
The consistent meaning of meaning, and unless by specific definitions as here, will not otherwise use idealization or excessively formal implication
To explain.
Those skilled in the art of the present technique are appreciated that " terminal " used herein above, " terminal device " both include wireless communication
The equipment of number receiver, the equipment of its wireless signal receiver for only possessing non-emissive ability, and including receiving and transmitting hardware
Equipment, its equipment with reception that two-way communication on bidirectional communication link, can be carried out and transmitting hardware.This equipment
Can include:Honeycomb or other communication equipments, it has single line display or multi-line display or is shown without multi-line
The honeycomb of device or other communication equipments;PCS (Personal Communications Service, PCS Personal Communications System), it can
With combine voice, data processing, fax and/or its communication ability;PDA (Personal Digital Assistant, it is personal
Digital assistants), it can include radio frequency receiver, pager, the Internet/intranet access, web browser, notepad, day
Go through and/or GPS (Global Positioning System, global positioning system) receiver;Conventional laptop and/or palm
Type computer or other equipment, its have and/or conventional laptop and/or palmtop computer including radio frequency receiver or its
His equipment." terminal " used herein above, " terminal device " they can be portable, can transport, installed in the vehicles (aviation,
Sea-freight and/or land) in, or be suitable for and/or be configured in local runtime, and/or with distribution form, operate in the earth
And/or any other position operation in space." terminal " used herein above, " terminal device " can also be communication terminal, on
Network termination, music/video playback terminal, for example, can be PDA, MID (Mobile Internet Device, mobile Internet
Equipment) and/or the equipment such as mobile phone, or intelligent television, Set Top Box with music/video playing function.
The block schematic illustration of the internal structure of the terminal device of the embodiment of the present invention as shown in figure 1, including:Master control system and
At least two subsystems.
Wherein, the subsystem in the embodiment of the present invention, can be provided in being virtualized with Linux container (container)
Operating system in the container that technology is created.Operating system can be that traditional (SuSE) Linux OS or Unix are operated
System, or the android system being derived based on (SuSE) Linux OS, Ubuntu systems or FireFox systems
Deng can also be windows systems based on windows platform etc..In fact, the subsystem in the present invention is not limited to
The foregoing operating system for enumerating, can cover all operating systems that can be run in a reservoir.
Preferably, master control system can be above-mentioned traditional operating system, or traditional kernel is changed
Enter and/or outside kernel after (such as ccf layer and application layer) increase functional module, the operating system for obtaining.
Master control system is mainly used in carrying out AM/BAM management at least two subsystems, is interacted with each subsystem.
Embodiment one
The method that the embodiment of the invention provides a kind of shared bluetooth of multisystem, as shown in Fig. 2 comprising the following steps:
Step 201, when any subsystem detects bluetooth resource request message, send notice respectively to other subsystems
Message.
Wherein, notification message includes that any subsystem need to take the information of bluetooth resource.
For the embodiment of the present invention, when the first subsystem in terminal device needs to enter row information friendship with other-end equipment
When mutually, first subsystem will send a notification message to other subsystems in terminal device, to inform other subsystems, the son
System needs to take bluetooth resource.
Step 202, disappear when any subsystem receives the feedback in response to notification message that other all subsystems return
During breath, driven to bluetooth and send bluetooth resource request message.
Wherein, feedback message includes that the subsystem for sending feedback message is not take up the information of bluetooth resource.
For the embodiment of the present invention, other subsystems are got after the notification message of the first subsystem transmission, it is determined that from
Whether body is currently taking bluetooth resource.In embodiments of the present invention, if current vacant bluetooth resource, to the first subsystem
System returns to feedback message, if currently taking bluetooth resource, it is determined whether release bluetooth resource, wherein if it is determined that release is blue
Tooth resource, and successfully discharge, then return to feedback message to the first subsystem.
For the embodiment of the present invention, when the first subsystem gets the feedback message that other all subsystems are returned, then the
Bluetooth service in one subsystem is sent to indigo plant bluetooth resource request message by the bluetooth agency service in the first subsystem
Tooth drives.Wherein, when the first subsystem receives the feedback message that other all subsystems are returned, other subsystems are characterized current
Vacant bluetooth resource.
Step 203, any subsystem receive bluetooth drive send bluetooth resource, with cause by bluetooth resource and other
Terminal device carries out information exchange.
The method that the embodiment of the invention provides a kind of shared bluetooth of multisystem, compared with prior art, the present invention is implemented
Example ought be connect by when any subsystem detects bluetooth resource request message, being sent a notification message to other subsystems
When receiving the feedback message of the vacant bluetooth resource of other subsystems, to bluetooth driving request bluetooth resource, with according to acquisition
Bluetooth resource and other-end equipment carry out information exchange, i.e., when any subsystem needs to take bluetooth resource and other-end
When equipment carries out information exchange, it is only necessary to when other subsystems vacant bluetooth resource, bluetooth resource, therefore polyphyly are asked
Subsystems in system terminal device can in the manner described above distribute bluetooth resource, enter row information with other-end equipment and hand over
Mutually, information exchange is carried out such that it is able to solve the problems, such as multisystem terminal device and other-end equipment.
Embodiment two
The alternatively possible implementation of the embodiment of the present invention, shown in the embodiment one on the basis of, step 201, when
When any subsystem detects bluetooth resource request message, sent a notification message respectively to other subsystems, including embodiment two
Shown step 301-302, wherein, the operation performed by step 303-304 is similar to the operation performed by step 202-203,
Will not be repeated here.
Step 301, when any subsystem detects bluetooth resource request, by notification message write master control system file
In device node.
For the embodiment of the present invention, bluetooth service and indigo plant are provided with each subsystem in multisystem terminal device
Tooth service broker.
For the embodiment of the present invention, file device node is provided with master control system, all sons in the terminal device
System can access this document device node.In embodiments of the present invention, when the bluetooth service of certain subsystem acts on behalf of detection
During the bluetooth resource request message issued to bluetooth service, notification message is write into the file device node in master control system, with
Enable that the bluetooth agency service in terminal device in other subsystems reads from the file device node in master control system
The notification message.Wherein, the mark of notification message sender system can be carried in the notification message.
For example, operation has three subsystems, respectively the first subsystem, the second subsystem and the 3rd son in terminal device
System, if the bluetooth agency service in the first subsystem detects the bluetooth resource request that the bluetooth service in the system issues and disappears
During breath, the notification message that will carry the system banner of the first subsystem writes the file device node of master control system.
Step 302, other subsystems read notification message from the file device node of master control system respectively.
For example, the second subsystem and the 3rd subsystem can read first from the file device node of master control system
The notification message of subsystem write-in.
For the embodiment of the present invention, any subsystem by the way that notification message to be write the file device node of master control system,
Enable to other subsystems in terminal device to read the notice having been written into from the file device node of the master control system to disappear
Breath, i.e., other subsystems can know be currently needed for take bluetooth resource subsystem, such that it is able to for need take bluetooth money
The subsystem in source obtains bluetooth resource and provides precondition.
Embodiment three
The alternatively possible implementation of the embodiment of the present invention, shown in the embodiment one on the basis of, step 201, when
When any subsystem detects bluetooth resource request message, sent a notification message respectively to other subsystems, also included before real
Apply the step 401-402 shown in example three, step 202, when any subsystem receive that other all subsystems return in response to
During the feedback message of notification message, driven to bluetooth and send bluetooth resource request message, including the step shown in embodiment three
404, wherein step 403, the operation performed by 405 is similar to the operation performed by step 201,203, will not be repeated here.
Step 401, any subsystem send to master control system and create channel request message.
Wherein, creating channel request message is used to ask to create its communication port between master control system.
For the embodiment of the present invention, operation has multiple subsystems in mobile terminal, and is additionally provided with the above-mentioned multiple of management
The master control system of subsystem, when there are certain subsystem needs and master control system carries out information exchange, sends to master control system
Channel request message is created, to cause that subsystem and master control system carry out information exchange.Wherein, in the establishment channel request message
Carry the system banner for creating channel request message sender.
For example, when the first subsystem in terminal device needs to create communication port to master control system request, to master control
System send carry the first subsystem identification establishment channel request message so that the subsystem of master control system creation first and its
Between communication port.
Step 402, master control system create any subsystem and corresponding communication port between it.
For the embodiment of the present invention, master control system creates two socket files descriptions according to channel request message is created
Symbol, to cause that the subsystem is sent to master control system bluetooth resource request message by the socket filec descriptors for creating
During bluetooth drives.
Step 404, disappear when any subsystem receives the feedback in response to notification message that other all subsystems return
During breath, by the communication port for having created, driven to the bluetooth in master control system and send bluetooth resource request message.
For the embodiment of the present invention, when the current vacant bluetooth resource of other subsystems in terminal device, or into
During work(release bluetooth resource, feedback message is write in the file device node in master control system, to cause that notification message sends
Method, system reads above-mentioned feedback message.
Bluetooth service is provided with for the embodiment of the present invention, in master control system and bluetooth drives, when the hair of notification message
Send method, system that the feedback message of other all subsystem write-ins is read from the file device node of master control system, then the notice
Bluetooth agency service in message sender subsystem sends bluetooth resource by socket filec descriptors to master control system please
Message is sought, so as to the bluetooth resource request message that the bluetooth service for obtaining master control system will be received is sent to bluetooth drive.At this
In inventive embodiments, after bluetooth drives receives the BlueTooth request message, by corresponding bluetooth resource by master control system
Bluetooth service send to the first subsystem.
For example, when the first subsystem reads the second subsystem and the 3rd son from the file device node of master control system
During the feedback message of system write-in, the bluetooth agency service in the first subsystem is by socket filec descriptors to master control system
Bluetooth resource request message is sent, after the bluetooth service in master control system receives BlueTooth request message, by BlueTooth request message
Send to bluetooth and drive, corresponding bluetooth resource is sent into the bluetooth service into master control system to cause that bluetooth drives, and lead to
Socket filec descriptors are crossed to send to the first subsystem.
For the embodiment of the present invention, master control system, can by creating the communication port between subsystem and master control system
Enable that communication port of the subsystem by having created sends bluetooth resource request message to master control system, and can be by
The communication port of establishment, drives the bluetooth resource for sending to be sent in the subsystem for needing to take bluetooth resource bluetooth, so that
Possibility is provided for subsystems obtain bluetooth resource.
Example IV
The alternatively possible implementation of the embodiment of the present invention, shown in the embodiment three on the basis of, step 404, when
Any subsystem receive that other all subsystems return in response to notification message feedback message when, it is logical by what is created
Letter passage, is driven to the bluetooth in master control system and sends bluetooth resource request message, and the step shown in example IV is also included before
Rapid 504, the wherein operation performed by step 501-503,505-506 is similar to the operation performed by step 401-405, herein not
Repeat again.
Step 504, when the subsystem for receiving notification message is currently taking bluetooth resource, according to user input
Configured information, discharges bluetooth resource, and return to feedback message to any subsystem.
For the embodiment of the present invention, when the subsystem for receiving notification message is currently taking bluetooth resource, terminal
Equipment can be input into configured information with display reminding message, user according to prompting message.In embodiments of the present invention, if the son
The configured information that system receives user input is subsystem release bluetooth money when agreeing to discharge the bluetooth resource of the subsystem
Source, and feedback message is write into the file device node in master control system, to cause that notification message sends party subsystem from this article
Corresponding feedback message is read in part device node;If the subsystem receives the configured information of user input to disagree release
The bluetooth resource of the subsystem, then the subsystem can always take bluetooth resource, feedback message is not write to master control system
File device node in.
For the embodiment of the present invention, when the subsystem for receiving notification message is currently taking bluetooth resource, pass through
The configured information of user input, it is determined whether release bluetooth resource is only to support that a subsystem takes bluetooth due to terminal device
Resource, by the configured information of user input, can determine that whether currently allowing notification message to send party subsystem takes bluetooth
Resource, such that it is able to avoid agreeing to without user, discharges bluetooth resource, and the important information for causing user transmitting is interrupted, and is entered
And Consumer's Experience can be lifted.
Embodiment five
The alternatively possible implementation of the embodiment of the present invention, shown in the embodiment three on the basis of, step 404, when
Any subsystem receive that other all subsystems return in response to notification message feedback message when, it is logical by what is created
Letter passage, is driven to the bluetooth in master control system and sends bluetooth resource request message, and the step shown in embodiment five is also included before
Rapid 604-605, the wherein operation performed by step 601-603,606-607 is similar to the operation performed by step 401-405,
This is repeated no more.
Step 604, when the subsystem for receiving notification message is currently taking bluetooth resource, taken according to notification message
The application identities of band, and application takes the priority of bluetooth resource, determines whether to discharge bluetooth resource.
For the embodiment of the present invention, terminal device subsystems can set each application in this each subsystem and account for
Need to take bluetooth with that can be carried in the precedence information of bluetooth resource, and the notification message of notification message sender transmission
The mark of the application of resource.In embodiments of the present invention, the system of bluetooth resource is currently being taken according to currently taking
In application, the notification message of bluetooth resource carry the need for take bluetooth resource application identities, and pre-set each
Using the precedence information for taking bluetooth resource, determine whether to take bluetooth resource.
For the embodiment of the present invention, can be set by user equipment using the priority for taking bluetooth resource, it is also possible to by
Terminal device is set.Do not limit in embodiments of the present invention.
If step 605, the priority of the current application for taking bluetooth resource are less than the application carried in notification message
The priority that corresponding application takes bluetooth resource is identified, then discharges bluetooth resource, and feedback message is returned to any subsystem.
For example, the application run in terminal device includes:Video Applications, instant messaging application and photograph album, and take
The priority of bluetooth resource is followed successively by Video Applications, photograph album, instant messaging application from high to low, if currently taking bluetooth resource
The application that bluetooth is taken in system is instant messaging application, and the corresponding application of application identities carried in notification message should for video
With, the then current system release bluetooth resource for taking bluetooth resource, and in file device node in master control system, write-in is anti-
Feedback message.
For the embodiment of the present invention, if the priority of the current application for taking bluetooth resource in notification message higher than taking
The priority of the bluetooth resource that the corresponding application of application identities of band takes, then do not discharge bluetooth resource, feedback is not sent yet and is disappeared
Breath.
For the embodiment of the present invention, the subsystem for currently taking bluetooth resource passes through to be taken in the notification message for reading
Application with the corresponding application of application identities, the current application for taking bluetooth resource, and occupancy bluetooth resource is corresponding preferential
Level, it is determined whether release bluetooth resource, you can with according to just in the significance level of processing information or right according to application in application
In the significance level of user, it is determined whether release bluetooth resource, such that it is able to avoid more important application from passing through bluetooth
The message interrupts being transmitted, and then can further lift Consumer's Experience.
Embodiment six
The alternatively possible implementation of the embodiment of the present invention, shown in the embodiment three on the basis of, step 404, when
Any subsystem receive that other all subsystems return in response to notification message feedback message when, it is logical by what is created
Letter passage, is driven to the bluetooth in master control system and sends bluetooth resource request message, and the step shown in embodiment six is also included before
Rapid 704-705, the wherein operation performed by step 701-703,706-707 is similar to the operation performed by step 401-405,
This is repeated no more.
Step 704, when the subsystem for receiving notification message is currently taking bluetooth resource, according to subsystem take
The precedence information of bluetooth resource, determines whether to discharge bluetooth resource.
For the embodiment of the present invention, subsystems are provided with the subsystems of terminal device and take bluetooth resource
Precedence information.In embodiments of the present invention, the precedence information of subsystems occupancy bluetooth resource can be set by user
Can also be set by terminal device.Do not limit in embodiments of the present invention.
For the embodiment of the present invention, the subsystem for currently taking bluetooth resource determines the system carried in notification message
Whether the priority for identifying the occupancy bluetooth resource of corresponding subsystem takes the priority of bluetooth resource more than itself subsystem,
To determine whether to discharge the bluetooth resource that its own system is taking.
If the priority that step 705, the current subsystem for taking bluetooth resource take bluetooth resource is logical less than sending
Know that the subsystem of message takes the priority of bluetooth resource, then discharge bluetooth resource, and feedback message is returned to any subsystem.
For example, three subsystems can be run in terminal device, respectively the first subsystem, the second subsystem and the 3rd
Subsystem, the first subsystem is work system, the second subsystem is learning system, the 3rd subsystem is personal lifestyle system, then
The priority for taking bluetooth resource is followed successively by the first subsystem, the second subsystem and the 3rd subsystem from high to low, if currently
The subsystem for taking bluetooth resource is the second subsystem, when the second subsystem reads from the file device node of master control system
The notification message of the first subsystem write-in, then discharge the bluetooth resource of itself occupancy, and returns to feedback message.
For the embodiment of the present invention, if the priority that the current subsystem for taking bluetooth resource takes bluetooth resource is high
The priority of bluetooth resource is taken in the subsystem for sending a notification message, does not then discharge bluetooth resource, also do not return to feedback message.
For the embodiment of the present invention, the subsystem that the current subsystem for taking bluetooth resource is sent a notification message by determination
Whether the priority for taking bluetooth resource takes the priority of bluetooth resource more than itself subsystem, to determine whether to discharge itself
The bluetooth resource that subsystem currently takes, you can with significance level or subsystems according to subsystems processing information
For the significance level of user, it is determined whether release bluetooth resource, to avoid more important information from entering using bluetooth resource
Transmission during row transmission, and then the Experience Degree for further lifting user can be lifted.
The method that the embodiment of the invention provides the shared bluetooth resource of another multisystem, any subsystem will be by that will notify
Message writes the file device node of master control system, enables to text of other subsystems in terminal device from the master control system
The notification message having been written into, i.e. other subsystems are read in part device node can know the son for being currently needed for taking bluetooth resource
System, such that it is able to provide precondition to need the subsystem for taking bluetooth resource to obtain bluetooth resource;Master control system is led to
Cross the communication port created between subsystem and master control system, enable to subsystem can by the communication port that has created to
Master control system sends bluetooth resource request message, and bluetooth can be driven the bluetooth for sending by the communication port that has created
Resource is sent in the subsystem for needing to take bluetooth resource, so as to provide possibility for subsystems obtain bluetooth resource;
When the subsystem for receiving notification message is currently taking bluetooth resource, by the configured information of user input, it is determined that being
No release bluetooth resource is only to support that a subsystem takes bluetooth resource due to terminal device, is believed by the instruction of user input
Breath, can determine that whether currently allowing notification message to send party subsystem takes bluetooth resource, such that it is able to avoid without user
Agree to, discharge bluetooth resource, the important information for causing user transmitting is interrupted, and then can lift Consumer's Experience;Currently just
The corresponding application of carrying application identities, current occupancy are blue in the subsystem for taking bluetooth resource passes through the notification message for reading
The application of tooth resource, and take the corresponding priority of application of bluetooth resource, it is determined whether release bluetooth resource, you can with root
According in application just in the significance level of processing information, or the significance level according to application for user, it is determined whether release is blue
Tooth resource, such that it is able to the message interrupts for avoiding more important application from being transmitted by bluetooth, and then can enter one
Step ground lifting Consumer's Experience;The current subsystem for taking bluetooth resource takes bluetooth by the subsystem for determining to send a notification message
Whether the priority of resource takes the priority of bluetooth resource more than itself subsystem, to determine whether that being released from body system works as
The bluetooth resource of preceding occupancy, you can with according to the significance level or subsystems of subsystems processing information for user
Significance level, it is determined whether release bluetooth resource, to avoid more important information from being transmitted using bluetooth resource
During Transmission, and then can be lifted further lifted user Experience Degree.
It should be noted that due to including multiple subsystems in terminal device, but describe for convenience, below in relation to end
The description of end equipment, is only described with terminal device comprising two subsystems.
A kind of device of the shared bluetooth of multisystem is the embodiment of the invention provides, as shown in figure 3, the device includes:Send
Module 31, receiver module 32.
Sending module 31, in the first subsystem, for when the first subsystem detects bluetooth resource request message,
Sent a notification message to the second subsystem.
Wherein, notification message includes that the first subsystem need to take the information of bluetooth resource.
Sending module 31, be additionally operable to when the first subsystem receive the second subsystem return in response to the anti-of notification message
During feedback message, driven to bluetooth and send bluetooth resource request message.
Wherein, feedback message includes that the subsystem for sending feedback message is not take up the information of bluetooth resource.
Receiver module 32, the bluetooth resource for sending is driven for receiving bluetooth, to cause by bluetooth resource and other ends
End equipment carries out information exchange.
Further, as shown in figure 4, device also includes:Writing module 41, read module 42.
Writing module 41, in the first subsystem, for that when any subsystem detects bluetooth resource request, will lead to
Know message write-in master control system file device node in.
Read module 42, in the second subsystem, reads logical for respectively from the file device node of master control system
Know message.
Sending module 31, is additionally operable to send establishment channel request message to master control system.
Wherein, creating channel request message is used to ask to create its communication port between master control system.
Further, as shown in figure 4, the device also includes:Creation module 43.
Creation module 43, in master control system, for creating any subsystem and corresponding communication port between it.
Sending module 31, specifically for the communication port by having created, drives to the bluetooth in master control system and sends blue
Tooth resource request message.
Further, device also includes:Release module 44, return module 45;
Release module 44, in the second subsystem, for currently being taken when the subsystem for receiving notification message
During bluetooth resource, according to the configured information of user input, bluetooth resource is discharged.
Module 45 is returned to, in the second subsystem, for returning to feedback message to any subsystem.
Further, as shown in figure 4, device also includes:Determining module 46.
Determining module 46, in the second subsystem, for currently being taken when the subsystem for receiving notification message
During bluetooth resource, the priority of bluetooth resource is taken according to the application identities that notification message is carried, and application, it is determined that being currently
No release bluetooth resource.
Release module 44, the priority of the application for being additionally operable to currently ought to take bluetooth resource in notification message less than taking
When the corresponding application of application identities of band takes the priority of bluetooth resource, bluetooth resource is discharged.
Module 45 is returned, is additionally operable to return to feedback message to any subsystem.
Determining module 46, is additionally operable to when the subsystem for receiving notification message is currently taking bluetooth resource, according to
Subsystem takes the precedence information of bluetooth resource, determines whether to discharge bluetooth resource.
Release module 44, the priority for being additionally operable to currently to take the subsystem occupancy bluetooth resource of bluetooth resource is low
When the subsystem for sending a notification message takes the priority of bluetooth resource, bluetooth resource is discharged.
Module 45 is returned, is additionally operable to return to feedback message to any subsystem.
A kind of device of the shared bluetooth of multisystem is the embodiment of the invention provides, compared with prior art, the present invention is implemented
Example ought be connect by when any subsystem detects bluetooth resource request message, being sent a notification message to other subsystems
When receiving the feedback message of the vacant bluetooth resource of other subsystems, to bluetooth driving request bluetooth resource, with according to acquisition
Bluetooth resource and other-end equipment carry out information exchange, i.e., when any subsystem needs to take bluetooth resource and other-end
When equipment carries out information exchange, it is only necessary to when other subsystems vacant bluetooth resource, bluetooth resource, therefore polyphyly are asked
Subsystems in system terminal device can in the manner described above distribute bluetooth resource, enter row information with other-end equipment and hand over
Mutually, information exchange is carried out such that it is able to solve the problems, such as multisystem terminal device and other-end equipment.
The device of the shared bluetooth resource of another multisystem is the embodiment of the invention provides, any subsystem will be by that will notify
Message writes the file device node of master control system, enables to text of other subsystems in terminal device from the master control system
The notification message having been written into, i.e. other subsystems are read in part device node can know the son for being currently needed for taking bluetooth resource
System, such that it is able to provide precondition to need the subsystem for taking bluetooth resource to obtain bluetooth resource;Master control system is led to
Cross the communication port created between subsystem and master control system, enable to subsystem can by the communication port that has created to
Master control system sends bluetooth resource request message, and bluetooth can be driven the bluetooth for sending by the communication port that has created
Resource is sent in the subsystem for needing to take bluetooth resource, so as to provide possibility for subsystems obtain bluetooth resource;
When the subsystem for receiving notification message is currently taking bluetooth resource, by the configured information of user input, it is determined that being
No release bluetooth resource is only to support that a subsystem takes bluetooth resource due to terminal device, is believed by the instruction of user input
Breath, can determine that whether currently allowing notification message to send party subsystem takes bluetooth resource, such that it is able to avoid without user
Agree to, discharge bluetooth resource, the important information for causing user transmitting is interrupted, and then can lift Consumer's Experience;Currently just
The corresponding application of carrying application identities, current occupancy are blue in the subsystem for taking bluetooth resource passes through the notification message for reading
The application of tooth resource, and take the corresponding priority of application of bluetooth resource, it is determined whether release bluetooth resource, you can with root
According in application just in the significance level of processing information, or the significance level according to application for user, it is determined whether release is blue
Tooth resource, such that it is able to the message interrupts for avoiding more important application from being transmitted by bluetooth, and then can enter one
Step ground lifting Consumer's Experience;The current subsystem for taking bluetooth resource takes bluetooth by the subsystem for determining to send a notification message
Whether the priority of resource takes the priority of bluetooth resource more than itself subsystem, to determine whether that being released from body system works as
The bluetooth resource of preceding occupancy, you can with according to the significance level or subsystems of subsystems processing information for user
Significance level, it is determined whether release bluetooth resource, to avoid more important information from being transmitted using bluetooth resource
During Transmission, and then can be lifted further lifted user Experience Degree.
The device of the shared bluetooth resource of multisystem provided in an embodiment of the present invention can realize that the method for above-mentioned offer is implemented
Example, concrete function is realized referring to the explanation in embodiment of the method, will not be repeated here.Multisystem provided in an embodiment of the present invention
The method and device of shared bluetooth resource is gone for multisystem terminal device and is entered with other-end equipment using bluetooth resource
Row information is interacted, but is not limited only to this.
During those skilled in the art of the present technique are appreciated that the present invention includes being related to for performing operation described herein
One or more of equipment.These equipment can be for needed for purpose and specially design and manufacture, or can also include general
Known device in computer.These equipment have computer program of the storage in it, and these computer programs are optionally
Activation is reconstructed.Such computer program can be stored in equipment (for example, computer) computer-readable recording medium or store
It is suitable to storage e-command and to be coupled to respectively in any kind of medium of bus, the computer-readable medium is included but not
Be limited to any kind of disk (including floppy disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, only
Read memory), RAM (Random Access Memory, immediately memory), EPROM (Erasable Programmable
Read-Only Memory, Erarable Programmable Read only Memory), EEPROM (Electrically Erasable
Programmable Read-Only Memory, EEPROM), flash memory, magnetic card or light line card
Piece.It is, computer-readable recording medium include being stored in the form of it can read by equipment (for example, computer) or transmission information any Jie
Matter.
Those skilled in the art of the present technique be appreciated that can be realized with computer program instructions these structure charts and/or
The combination of the frame in each frame and these structure charts and/or block diagram and/or flow graph in block diagram and/or flow graph.This technology is led
Field technique personnel be appreciated that can by these computer program instructions be supplied to all-purpose computer, special purpose computer or other
The processor of programmable data processing method is realized, so that by the treatment of computer or other programmable data processing methods
Device is come the scheme specified in the frame or multiple frame that perform structure chart disclosed by the invention and/or block diagram and/or flow graph.
Those skilled in the art of the present technique are appreciated that in various operations, method, the flow discussed in the present invention
Step, measure, scheme can be replaced, changed, combined or deleted.Further, it is each with what is discussed in the present invention
Other steps, measure in kind operation, method, flow, scheme can also be replaced, changed, reset, decomposed, combined or deleted.
Further, it is of the prior art with various operations, method, the flow disclosed in the present invention in step, measure, scheme
Can also be replaced, changed, reset, decomposed, combined or deleted.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
It is considered as protection scope of the present invention.