CN117135600B - Bluetooth broadcast request processing method and device - Google Patents

Bluetooth broadcast request processing method and device Download PDF

Info

Publication number
CN117135600B
CN117135600B CN202310154910.4A CN202310154910A CN117135600B CN 117135600 B CN117135600 B CN 117135600B CN 202310154910 A CN202310154910 A CN 202310154910A CN 117135600 B CN117135600 B CN 117135600B
Authority
CN
China
Prior art keywords
bluetooth
state
broadcast
broadcasting
monitor
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.)
Active
Application number
CN202310154910.4A
Other languages
Chinese (zh)
Other versions
CN117135600A (en
Inventor
徐志鹏
蓝晓俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310154910.4A priority Critical patent/CN117135600B/en
Priority to CN202410662215.3A priority patent/CN118540684A/en
Publication of CN117135600A publication Critical patent/CN117135600A/en
Application granted granted Critical
Publication of CN117135600B publication Critical patent/CN117135600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • 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)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a processing method and processing equipment of a Bluetooth broadcasting request, which relate to the Bluetooth technology and are used for solving the problem that partial Bluetooth messages are lost because the Bluetooth broadcasting request triggered in a Bluetooth first Bluetooth broadcasting state can be discarded. The method is applied to the electronic equipment, and comprises the following steps: responding to a first Bluetooth broadcasting request, and acquiring a current Bluetooth broadcasting state stored in the Bluetooth monitor by the Bluetooth monitor; under the condition that the current Bluetooth broadcasting state is a first Bluetooth broadcasting state, the Bluetooth monitor enters a first waiting state; the first Bluetooth broadcasting state comprises a starting state or a stopping state; in a first waiting state, the Bluetooth monitor monitors call information sent by Bluetooth; after receiving the call success information sent by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state to an idle state or an in-broadcasting state, and the Bluetooth monitor responds to the first Bluetooth broadcasting request to execute Bluetooth broadcasting operation.

Description

Bluetooth broadcast request processing method and device
Technical Field
The present application relates to bluetooth technologies, and in particular, to a method and apparatus for processing a bluetooth broadcast request.
Background
Bluetooth broadcasting is the core of self-discovery and self-networking between terminals, proximity discovery between devices, and various upper layer services all depend on bluetooth broadcasting. Therefore, the high reliability and the high availability of bluetooth broadcast are related to whether a very good interaction experience between near field devices can be brought to users.
Bluetooth provides an application programming interface (Application Programming Interface, API) for start and stop. However, there is still a short period of unavailability between the invocation of the bluetooth broadcast start API to the bluetooth broadcast start success and the invocation of the bluetooth broadcast stop API to the stop success.
In the related art, if a bluetooth broadcast request is received in the unavailable state, the part of the bluetooth broadcast request may be discarded due to the unavailable bluetooth broadcast, resulting in a problem of partial bluetooth message loss.
Disclosure of Invention
The embodiment of the application provides a processing method and processing equipment of a Bluetooth broadcasting request, which are used for solving the problem that partial Bluetooth messages are lost because the Bluetooth broadcasting request triggered in a Bluetooth first Bluetooth broadcasting state can be discarded.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
In a first aspect, a method for processing a bluetooth broadcast request is provided, where the method is applied to an electronic device; the electronic device comprises Bluetooth and a Bluetooth monitor, the electronic device invokes a Bluetooth interface through the Bluetooth monitor, and the method comprises the following steps:
In response to the first bluetooth broadcast request, the bluetooth monitor obtains a current bluetooth broadcast status stored in the bluetooth monitor. In the case that the current Bluetooth broadcasting state is determined to be the first Bluetooth broadcasting state, indicating that the current Bluetooth broadcasting is not available, and thus requesting the Bluetooth monitor to enter a first waiting state for the first Bluetooth broadcasting; the first bluetooth broadcast state includes a start-in state or a stop-in state. In a first waiting state, the Bluetooth monitor monitors call information sent by Bluetooth. And when monitoring the successful calling information of the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state into a second Bluetooth broadcasting state, which indicates that the current Bluetooth broadcasting is updated into an available state. At this time, the bluetooth monitor may perform a bluetooth broadcast operation in response to the first bluetooth broadcast request. Wherein. The call information comprises call success information, and the call success information is used for indicating that the Bluetooth broadcasting starting interface is successfully called or that the Bluetooth broadcasting stopping interface is successfully called; the second bluetooth broadcast state includes an idle state or an in-broadcast state.
In this scheme, a request for the first bluetooth broadcast received in a state where bluetooth broadcast is not available is not directly discarded but is waited for a certain period of time. And after receiving the successful call information of the Bluetooth feedback, updating the Bluetooth broadcasting state into an available state (a second Bluetooth broadcasting state), and executing the Bluetooth broadcasting operation corresponding to the first Bluetooth broadcasting request. Therefore, the Bluetooth broadcasting request can be prevented from being discarded due to the fact that the current Bluetooth broadcasting is unavailable, and the situation that the Bluetooth broadcasting message is lost is reduced.
In some possible embodiments, after the bluetooth monitor enters the first waiting state, the method further includes: in a first waiting state, the Bluetooth monitor acquires a first stay time of Bluetooth in a first Bluetooth broadcasting state; if the first stay time does not exceed the first preset time, the Bluetooth monitor maintains the first waiting state. In this way, it can be ensured that in the first waiting state it can be waited for the current bluetooth broadcast status to be updated to the available status.
In some possible embodiments, after the bluetooth monitor enters the first waiting state, the method further includes: in the first waiting state, if the first stay time exceeds the first preset time, the Bluetooth monitor calls a Bluetooth interface. The first stay time of the bluetooth broadcasting state in the starting state exceeds a first preset time, and may not receive the call feedback information, or bluetooth fails, at this time, the bluetooth monitor may directly call the bluetooth broadcasting stop interface to update the bluetooth broadcasting state into an accurate bluetooth broadcasting state. Similarly, when the first stay of the bluetooth broadcast state in the stop state exceeds the first preset time, the bluetooth monitor can directly call the bluetooth broadcast start interface to update the bluetooth broadcast state into an accurate bluetooth broadcast state. In this way, the problem that the first bluetooth broadcast request cannot be broadcast through bluetooth for a long time can be avoided.
In some possible embodiments, the above method further comprises: the bluetooth monitor may update the current bluetooth broadcast status to an in-broadcast status if it monitors first invocation success information indicating that the bluetooth broadcast initiation interface invocation was successful. If the Bluetooth monitor receives second call success information indicating that the Bluetooth broadcasting stop interface call is successful, the Bluetooth monitor updates the current Bluetooth broadcasting state to an idle state. In this way, in the first waiting state, the bluetooth broadcast status is still continuously updated, so that the corresponding bluetooth broadcast operation can be executed after the current bluetooth broadcast status is updated to the available status for the first bluetooth broadcast request.
In some possible embodiments, after the bluetooth monitor acquires the current bluetooth broadcast status in response to the first bluetooth broadcast request, the method further includes: in the case that the current bluetooth broadcast state is determined to be the idle state, it means that the current bluetooth broadcast can be directly used. At this time, the Bluetooth monitor calls a Bluetooth broadcast start interface of Bluetooth in response to the first Bluetooth broadcast request; and, the bluetooth monitor updates the current bluetooth broadcast state from the idle state to the active state. After receiving the first call success information fed back by the Bluetooth monitor, the Bluetooth monitor updates the current Bluetooth broadcasting state from the starting state to the broadcasting state; the first call success information is used for indicating that the Bluetooth broadcasting start interface is successfully called. The Bluetooth monitor updates a Bluetooth broadcasting message based on the first Bluetooth broadcasting request; the updated broadcast message is used for Bluetooth broadcasting. If a first Bluetooth broadcasting request is received in an idle state, the Bluetooth monitor may call a Bluetooth broadcasting start interface in response to the first Bluetooth broadcasting request to broadcast broadcasting contents corresponding to the first Bluetooth broadcasting request.
In some possible embodiments, after the bluetooth monitor invokes the bluetooth broadcast initiation interface of bluetooth in response to the first bluetooth broadcast request, the method further comprises: the Bluetooth monitor sets a first timer based on the duration to be broadcasted corresponding to the first Bluetooth broadcasting request, and the first timer starts to count. In this way, the bluetooth monitor can then determine the remaining broadcast duration of the current bluetooth broadcast based on the timing time of the first timer. In this embodiment, after the bluetooth monitor updates the broadcast message of bluetooth based on the first bluetooth broadcast request, the method further includes: and when the remaining broadcasting duration of the current Bluetooth is 0 according to the timing time of the first timer, the current Bluetooth broadcasting is finished, and the Bluetooth monitor calls a Bluetooth broadcasting stop interface of the Bluetooth and updates the current Bluetooth broadcasting state into a stop-in state. After receiving the second call success information fed back by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to the idle state; the second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully. In this way, it is possible to determine whether bluetooth broadcasting is completed in combination with the timing time of the first timer in the broadcasting state, and when bluetooth broadcasting is completed, the bluetooth broadcasting stop interface is invoked by the bluetooth monitor. Thus, the problem that unnecessary power consumption is caused by the fact that the Bluetooth broadcasting is still in a broadcasting state after the Bluetooth broadcasting is completed can be avoided.
In some possible embodiments, before the bluetooth monitor invokes the bluetooth broadcast initiation interface of bluetooth in response to the first bluetooth broadcast request, the method further includes: and under the condition that the current Bluetooth broadcasting state is determined to be the idle state, the Bluetooth monitor acquires the second stay time of the Bluetooth in the idle state. In this embodiment, the bluetooth monitor may invoke a bluetooth broadcast initiation interface of bluetooth in response to the first bluetooth broadcast request, and may specifically include: and under the condition that the second stay time exceeds the second preset time, the Bluetooth monitor responds to the first Bluetooth broadcasting request and calls a Bluetooth broadcasting starting interface of Bluetooth. In this scheme, the bluetooth monitor may also wait for a period of time for a short period of time when a portion of the bluetooth broadcast status has just been changed from the inactive status to the idle status. And after the Bluetooth broadcasting state is updated to the idle state for a period of time, calling the Bluetooth broadcasting start interface in response to the first Bluetooth broadcasting request. Thus, the problem that the Bluetooth broadcasting start interface is failed to be called in a period of time when the Bluetooth broadcasting state is just updated to be in an idle state can be avoided.
In some possible embodiments, the bluetooth monitor may invoke a bluetooth broadcast initiation interface of bluetooth in response to the first bluetooth broadcast request, and may specifically include: the bluetooth monitor sends a call request for a bluetooth broadcast initiation interface to bluetooth. The call request includes a third preset time, and the third preset time is used for indicating that bluetooth is turned off at a time point corresponding to the third preset time from the current time. In this scheme, the bluetooth monitor configures a time value for bluetooth when it invokes the bluetooth broadcast initiation interface. When the timer fails or other conditions cause the bluetooth monitor to not call the bluetooth broadcast stopping interface to turn off the bluetooth broadcast in time after the bluetooth broadcast is completed, the bluetooth monitor can be controlled by bluetooth to actively stop the bluetooth broadcast after a period of time. In this way, unnecessary power consumption can be avoided.
In some possible embodiments, after the bluetooth monitor acquires the current bluetooth broadcast status in response to the first bluetooth broadcast request, the method further includes: and under the condition that the current Bluetooth broadcasting state is determined to be the broadcasting state, the Bluetooth monitor updates the Bluetooth broadcasting message based on the first Bluetooth broadcasting request. The updated broadcast message is used for broadcasting by Bluetooth. In this way, the bluetooth broadcast request can be responded to quickly.
In some possible embodiments, before the bluetooth monitor updates the bluetooth broadcast message based on the first bluetooth broadcast request, the method further includes: the Bluetooth monitor judges whether the broadcast content corresponding to the first Bluetooth broadcast request is a preset periodic broadcast or not; the preset periodic broadcast is used for instructing the Bluetooth monitor to restart Bluetooth broadcast. Therefore, if the first bluetooth broadcast request corresponds to a preset periodic broadcast, the bluetooth monitor needs to restart the bluetooth broadcast if the current bluetooth broadcast state is in the in-broadcast state. In this embodiment, the bluetooth monitor updates a bluetooth broadcast message based on the first bluetooth broadcast request, which may specifically include: and under the condition that the broadcast content corresponding to the first Bluetooth broadcast request is not the preset periodic broadcast, the Bluetooth monitor updates the broadcast message of Bluetooth based on the first Bluetooth broadcast request.
In some possible embodiments, before the bluetooth monitor updates the broadcast message of bluetooth, the method further includes: the Bluetooth monitor acquires the timing time of the second timer; the timing time of the second timer is used for indicating the remaining broadcast duration of bluetooth. In this embodiment, the bluetooth monitor updates a bluetooth broadcast message based on the first bluetooth broadcast request, which may specifically include: when the residual broadcasting time of the current Bluetooth exceeds the fourth preset time according to the timing time of the timer, the Bluetooth monitor updates the broadcasting message of the Bluetooth based on the first Bluetooth broadcasting request; the fourth preset time is used for indicating a minimum broadcast duration required for bluetooth broadcasting. And updating the Bluetooth broadcasting message based on the first Bluetooth broadcasting request only when the residual duration of the Bluetooth broadcasting is enough in the broadcasting state. In this way, the problem that the broadcast content corresponding to the first Bluetooth broadcast request cannot be received by other electronic devices because the Bluetooth monitor responds to the previous second Bluetooth broadcast request to turn off Bluetooth broadcast can be reduced. It is ensured that the broadcast content corresponding to the first bluetooth broadcast request can be received by other electronic devices in the current in-broadcast state.
In some possible embodiments, after the bluetooth monitor acquires the timing time of the second timer, the method further includes: when the residual broadcasting time of the current Bluetooth is not longer than the fourth preset time according to the timing time of the second timer, the Bluetooth monitor enters a second waiting state; in a second waiting state, the Bluetooth monitor monitors calling information of the Bluetooth feedback. And after receiving the call success information of the Bluetooth feedback, the Bluetooth monitor updates the current Bluetooth broadcasting state to an idle state, and responds to the first Bluetooth broadcasting request to execute Bluetooth broadcasting operation. If the current bluetooth broadcasting state is in broadcasting state, but the current residual broadcasting time is insufficient to meet the minimum time required by bluetooth broadcasting, then the current bluetooth broadcasting needs to be waited for aiming at the first bluetooth broadcasting request, and after the bluetooth broadcasting state is updated to be in idle state, the bluetooth broadcasting operation corresponding to the first bluetooth broadcasting request is executed. In this way, the broadcast content corresponding to the first bluetooth broadcast request is more likely to be received by other electronic devices, so that the broadcast effect is improved.
In some possible embodiments, after the bluetooth monitor acquires the current bluetooth broadcast status in response to the first bluetooth broadcast request, the method further includes: under the condition that the current Bluetooth broadcasting state is determined to be the broadcasting state, the Bluetooth monitor updates the timing time of a third timer based on the first Bluetooth broadcasting request, and the third timer restarts to time; the timing time of the third timer is used for indicating the current residual broadcasting duration of Bluetooth. Wherein, after the bluetooth monitor updates the bluetooth broadcast message based on the first bluetooth broadcast request, the method further comprises: when the residual broadcasting duration of the current Bluetooth is 0 according to the timing time of the third timer, the Bluetooth monitor calls a Bluetooth broadcasting stop interface of the Bluetooth and updates the current Bluetooth broadcasting state into a stop-in state; after receiving the second call success information fed back by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to the idle state; the second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully. The first bluetooth broadcast request is received in a broadcast state, and after the bluetooth broadcast message is updated based on the first bluetooth broadcast request, the bluetooth broadcast may be rented according to the first bluetooth broadcast request. Therefore, the renting Bluetooth broadcasting can ensure that the broadcasting content corresponding to the first Bluetooth broadcasting request can be completely broadcasted in the current broadcasting state, and the broadcasting effect can be improved.
In some possible embodiments, the third timer is a countdown timer, and the countdown time of the countdown timer is used to indicate the remaining broadcast duration of the current bluetooth. The bluetooth monitor updates the timing time of the third timer based on the first bluetooth broadcast request, including: the Bluetooth monitor acquires the duration to be broadcasted corresponding to the first Bluetooth broadcasting request; the bluetooth monitor compares the count down time to the size of the duration to be broadcast. If the time length to be broadcasted is longer than the countdown time, the Bluetooth monitor updates the countdown time of the current countdown timer to the time length to be broadcasted corresponding to the first Bluetooth broadcast request. This ensures that the broadcast content corresponding to the first bluetooth broadcast request is completely broadcast in the current in-broadcast state. If the countdown time is longer than the duration to be broadcast, the state in the current broadcast is that the broadcast content corresponding to the first Bluetooth broadcast request can be completely broadcast, so that the timing time of the countdown timer can be kept unchanged at the moment.
In some possible embodiments, after the bluetooth monitor updates the bluetooth broadcast message based on the first bluetooth broadcast request, the method further includes: when the third timer is out of order, the Bluetooth monitor calls a Bluetooth broadcasting stop interface of Bluetooth and updates the current Bluetooth broadcasting state to a stop-in state. When receiving second call success information fed back by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to the idle state; the second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully. Therefore, when the third timer is invalid, bluetooth broadcasting can be turned off timely, and unnecessary power consumption caused by the invalid third timer is avoided.
In some possible embodiments, the above method further comprises: and when the broadcast content corresponding to the first Bluetooth broadcast request is determined to be the preset periodic broadcast, the Bluetooth broadcast needs to be restarted. Therefore, the Bluetooth monitor calls the Bluetooth broadcasting stop interface of Bluetooth at the moment and updates the current Bluetooth broadcasting state from the broadcasting state to the stopping state. And when receiving the second call success information of the Bluetooth feedback, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to the idle state. In this scheme, bluetooth broadcasting is restarted at intervals by setting a preset periodic broadcasting. In this way, the problem that bluetooth may occur due to long-time continuous broadcasting of bluetooth broadcasting can be avoided.
In some possible implementations, the preset periodic broadcast is also used to broadcast current device state information of the electronic device. In this embodiment, after the bluetooth monitor updates the current bluetooth broadcast state from the in-stop state to the idle state, the method further includes: and the Bluetooth monitor executes a broadcasting operation corresponding to the preset periodical broadcasting by calling the Bluetooth interface so as to broadcast the current equipment state information of the electronic equipment. In the scheme, the preset periodic broadcast is set to broadcast the latest equipment state information of the mobile phone at preset time intervals, so that the connection between the mobile phone and other electronic equipment can be maintained.
In a second aspect, there is provided an electronic device comprising: a processor and a memory; the memory is configured to store computer-executable instructions that, when executed by the electronic device, cause the electronic device to perform the method of processing bluetooth broadcast requests as described in any one of the first aspects.
In a third aspect, there is provided a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of processing a bluetooth broadcast request according to any one of the first aspects above.
In a fourth aspect, there is provided a computer program product comprising instructions which, when run on an electronic device, enable the electronic device to perform the method of processing a bluetooth broadcast request according to any one of the first aspects above.
In a fifth aspect, there is provided an apparatus (e.g. the apparatus may be a system-on-a-chip) comprising a processor for supporting an electronic device to implement the functions referred to in the first aspect above. In one possible design, the apparatus further includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, the device can be formed by a chip, and can also comprise the chip and other discrete devices.
The technical effects of any one of the design manners of the second aspect to the fifth aspect may be referred to the technical effects of the different design manners of the first aspect, and will not be repeated here.
Drawings
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application;
Fig. 2 is a schematic diagram of a bluetooth broadcast state according to an embodiment of the present application;
Fig. 3 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 4A is a schematic software architecture diagram of an electronic device according to an embodiment of the present application;
fig. 4B is a schematic software architecture of an electronic device according to an embodiment of the present application;
fig. 5A is a processing time sequence diagram of a bluetooth monitor according to an embodiment of the present application after receiving two bluetooth broadcast requests;
Fig. 5B is a schematic flow chart of a bluetooth broadcast operation performed after a bluetooth broadcast request is received in an idle state according to an embodiment of the present application;
fig. 6A is a flow chart of a processing method of a bluetooth broadcast request according to an embodiment of the present application;
fig. 6B is a flowchart illustrating a processing method of a bluetooth broadcast request according to an embodiment of the present application;
fig. 6C is a flowchart illustrating a processing method of a bluetooth broadcast request according to an embodiment of the present application;
Fig. 7 is a flow chart of a processing method of a bluetooth broadcast request according to an embodiment of the present application;
fig. 8 is a flow chart of a processing method of a bluetooth broadcast request according to an embodiment of the present application;
fig. 9 is a flow chart of a processing method of a bluetooth broadcast request according to an embodiment of the present application;
fig. 10A is a flowchart illustrating a processing method of a bluetooth broadcast request according to an embodiment of the present application;
Fig. 10B is a schematic diagram illustrating restarting of bluetooth broadcasting according to a preset periodic broadcasting (heartbeat broadcasting) according to an embodiment of the present application;
fig. 10C is a flowchart illustrating a processing method of a bluetooth broadcast request according to an embodiment of the present application;
fig. 11 is a flow chart of a processing method of a bluetooth broadcast request according to an embodiment of the present application;
Fig. 12 is a flowchart of a processing method of a bluetooth broadcast request according to an embodiment of the present application;
Fig. 13 is a schematic structural diagram of a chip system according to an embodiment of the present application.
Detailed Description
In an electronic device supporting bluetooth functions, the underlying bluetooth hardware provides an API for start and stop. However, there is still a short period of unavailability between the invocation of the bluetooth broadcast start API to the bluetooth broadcast start success and the invocation of the bluetooth broadcast stop API to the stop success.
In the related art, if a bluetooth broadcast request is received in the state where the bluetooth broadcast is unavailable, the part of the bluetooth broadcast request may be discarded due to the unavailable bluetooth broadcast, resulting in a problem of partial bluetooth message loss.
In some embodiments, as shown in fig. 1, the mobile phone 1 and the electronic devices such as the tablet computer 2 and the notebook computer 3 may perform ad hoc network, and after the mobile phone 1 establishes the ad hoc network with the tablet computer 2 and the notebook computer 3, the mobile phone 1 may synchronize data with the tablet computer 2 and the notebook computer 3. In the related art, after the ad hoc network is established, communication between the mobile phone 1 and the tablet computer 2 and the notebook computer 3, such as data synchronization and synchronization of device status information, etc., can be implemented by bluetooth broadcasting. In this scenario, for example, the mobile phone 1 needs to notify other electronic devices in the ad hoc network of the current device status information of the mobile phone 1, and a bluetooth broadcast request will be triggered to the bluetooth monitor of the mobile phone 1. But if the bluetooth monitor determines that the current bluetooth hardware is not available, the bluetooth broadcast request may be discarded by the bluetooth monitor. In this way, the bluetooth broadcast message for broadcasting the current device status information of the mobile phone 1 may be lost, so that other electronic devices in the ad hoc network cannot acquire the latest device status information of the mobile phone 1.
Fig. 2 shows several different bluetooth broadcast states according to an embodiment of the present application. In the embodiment of the present application, the bluetooth broadcast status includes an idle (idle) status 21, a start-up (start) status 22, a broadcast-in (broadcast) status 23, and a stop-in (stop) status 24. As shown in fig. 2, the update sequence of the above four bluetooth broadcast states may be generally updated in the following order: the idle state 21 is updated to the active state 22, the active state 22 is updated to the broadcast state 23, the broadcast state 23 is updated to the stop state 24, and the stop state 24 is updated to the idle state 21. In general, bluetooth broadcasting needs to be updated in the above order, and the state therein cannot be skipped, or the state cannot be updated in the reverse order.
The bluetooth broadcast state being an idle state indicates that bluetooth is not currently executing any bluetooth broadcast operation, and is in an idle state. In an idle state, the bluetooth monitor may invoke a bluetooth broadcast initiation interface in response to a bluetooth broadcast request.
The active state indicates that bluetooth is currently active, i.e., bluetooth broadcast is about to occur. In some embodiments, the bluetooth monitor may update the bluetooth broadcast status from the idle state to the active state after the bluetooth monitor invokes the bluetooth broadcast initiation interface.
The in-broadcast status indicates that bluetooth is currently in bluetooth broadcast. In some embodiments, after receiving feedback that the bluetooth broadcast initiation interface call was successful in the on-the-fly state, the bluetooth monitor may update the bluetooth broadcast state from the on-the-fly state to the on-the-fly state.
The in-stop state indicates that the current bluetooth broadcast is completed and the bluetooth broadcast is being turned off. In some embodiments, the bluetooth monitor may update the bluetooth broadcast status from the in-broadcast status to the in-stop status after the bluetooth monitor invokes the bluetooth broadcast stop interface.
Further, after the bluetooth monitor receives feedback information that the bluetooth broadcast stop interface is successfully invoked in the stopped state, the bluetooth monitor can update the bluetooth broadcast state from the stopped state to the idle state. It should be appreciated that in other embodiments, the several bluetooth broadcast states described above may also be named other names.
As can be seen from the above description, the bluetooth broadcast state corresponds to the active state: the time period from when the Bluetooth monitor calls the Bluetooth broadcast starting interface to when the Bluetooth monitor receives feedback information that the Bluetooth broadcast starting interface is successfully called. The bluetooth broadcast state in the stopped state corresponds to: and starting from the Bluetooth monitor calling the Bluetooth broadcasting stop interface until the Bluetooth monitor receives feedback information that the Bluetooth broadcasting stop interface is successfully called. The time between the invocation of the interface and the receipt of the invocation feedback information is usually relatively short when bluetooth is in a normal state. That is, the above-described start-in state and stop-in state are generally short in duration. If the current Bluetooth broadcasting state is judged to be in the two unavailable states of the starting state and the stopping state when the Bluetooth broadcasting request is received, the Bluetooth broadcasting operation corresponding to the last Bluetooth broadcasting request is executed currently, and Bluetooth broadcasting is unavailable at the current moment. Since bluetooth broadcasts are not available, newly received bluetooth broadcast requests may be discarded, resulting in a problem of bluetooth message loss.
It should be noted that, the above bluetooth broadcast status is stored in the bluetooth monitor and updated by the bluetooth monitor. The bluetooth broadcast unavailability specifically indicates that the bluetooth monitor determines that the current bluetooth broadcast state is unavailable according to the bluetooth broadcast state stored in the bluetooth monitor. In some scenarios, for example, bluetooth feeds back call success information to the bluetooth monitor, but the bluetooth monitor fails to receive the call success information, and the bluetooth monitor fails to update the bluetooth broadcast status stored in the bluetooth monitor in time. At this time, there is a possibility that the bluetooth broadcast state stored in the bluetooth monitor does not coincide with the actual bluetooth broadcast state.
Based on the above, the embodiment of the application provides a processing method of a bluetooth broadcast request, which can be applied to an electronic device supporting a bluetooth function; a cell phone 1, a tablet 2 or a notebook 3 as shown in fig. 1, etc. In the processing method of the bluetooth broadcast request provided by the embodiment of the application, when the bluetooth broadcast request is received, the bluetooth monitor firstly acquires the current bluetooth broadcast state. If the current Bluetooth broadcasting state is the start-up state or the stop-up state, the Bluetooth monitor enters a waiting state. And, in the waiting state, the bluetooth monitor continuously monitors call information from bluetooth feedback. The bluetooth broadcast status saved in the bluetooth monitor may be updated based on the call information of the bluetooth feedback. And then when the Bluetooth monitor receives the successful call information fed back by the Bluetooth, the Bluetooth monitor responds to the Bluetooth broadcasting request to execute corresponding Bluetooth broadcasting operation after updating the current Bluetooth broadcasting state to the idle state or the broadcasting state.
In this way, for the bluetooth broadcast request received when the current bluetooth is in the unavailable state (in-start state or in-stop state), the bluetooth broadcast operation is executed after the bluetooth broadcast state is updated to the available state (idle state or in-broadcast state). The Bluetooth broadcasting request is prevented from being discarded because Bluetooth broadcasting is unavailable, and the situation that Bluetooth broadcasting messages are lost is reduced.
In some embodiments, the electronic device may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), a wearable device, an augmented reality (augmented reality, AR) \virtual reality (VR) device, a media player, a television, and the specific form of the device according to the embodiments of the present application is not limited in particular.
Fig. 3 is a schematic structural diagram of an electronic device 100 according to an embodiment of the application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, keys 190, a motor 191, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, among others. Among other things, the sensor module 180 may include a pressure sensor 180A, a touch sensor 180B, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, a memory, a video codec, a digital signal processor (DIGITAL SIGNAL processor, DSP), a baseband processor, and/or a neural Network Processor (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. For example, the processor 110 is configured to perform a processing method of a bluetooth broadcast request in an embodiment of the present application.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store application programs (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system.
In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (WIRELESS FIDELITY, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation SATELLITE SYSTEM, GNSS), frequency modulation (frequency modulation, FM), near field communication (NEAR FIELD communication, NFC), infrared (IR), etc., applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques.
The electronic device 100 may implement audio functions through the audio module 170, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio signals to analog audio signal outputs and also to convert analog audio inputs to digital audio signals. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A.
The touch sensor 180B, also referred to as a "touch panel". The touch sensor 180B may be disposed on the display 194, and the touch sensor 180B and the display 194 form a touch screen, which is also referred to as a "touch screen". The touch sensor 180B is used to detect a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180B may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The camera 193 is used to capture still images or video. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1.
The processing methods of bluetooth broadcast requests in the following embodiments may be implemented in the electronic device 100 having the above-described hardware configuration.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated. Fig. 4A is a software structural block diagram of the electronic device 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun rows (Android runtime) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 4A, the application package may include applications for cameras, gallery, calendar, talk, map, navigation, WLAN, bluetooth, music, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for the application of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 4A, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
Android run time includes a core library and virtual machines. Android run is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
Fig. 4B is a schematic diagram of a portion of a software architecture according to an embodiment of the present application. Super incoming call, super connection, super notification and multi-screen collaboration represent business modules of upper layer applications. The self-discovery module is used for self-discovery and self-networking between the electronic equipment and other electronic equipment. The account authentication module is used for carrying out account authentication on the electronic equipment which carries out the ad hoc network. The Bluetooth monitor is used for executing the processing method of the Bluetooth broadcasting request provided by the embodiment of the application.
The embodiment of the application provides a processing method of a Bluetooth broadcasting request, which can be applied to a scene with a short interval between two adjacent Bluetooth broadcasting requests. Wherein upon receiving a subsequent first bluetooth broadcast request, the bluetooth monitor is already performing a bluetooth broadcast operation in response to a preceding second bluetooth broadcast request, and the current bluetooth is in a start-up state or a stop-in state. At this time, for the following first bluetooth broadcast request, since the current bluetooth broadcast state is in the on-state or off-state, the bluetooth monitor will be in the waiting state. Normally, the bluetooth monitor will continuously update the bluetooth broadcast status during the bluetooth broadcast operation performed based on the previous second bluetooth broadcast request. When waiting for the Bluetooth broadcasting state to be updated to the broadcasting state or the idle state, the Bluetooth monitor responds to the following first Bluetooth broadcasting request again to execute corresponding Bluetooth broadcasting operation.
Fig. 5A is a processing time sequence diagram of a bluetooth monitor according to an embodiment of the present application after receiving two bluetooth broadcast requests. In the example shown in fig. 5A, when the bluetooth monitor receives a second bluetooth broadcast request while bluetooth is in an idle state, the bluetooth monitor will call the start-up interface of the underlying bluetooth hardware in response to the second bluetooth broadcast request, and update the bluetooth broadcast state from the idle state to the active state. As can be seen from the above description, the bluetooth broadcast status is sequentially updated to the broadcast status, the stop status, and the like in response to the second bluetooth broadcast request. And when the bluetooth broadcast status is updated to the in-start status or the in-stop status in response to the second bluetooth broadcast request, the bluetooth monitor receives the first bluetooth broadcast request, at which time the bluetooth monitor cannot immediately perform a corresponding operation in response to the first bluetooth broadcast request because bluetooth broadcast is not available.
In the method for processing bluetooth broadcast requests provided in the embodiment of the application, if the bluetooth monitor receives a first bluetooth broadcast request in a state that the bluetooth broadcast state is in the starting state or in the stopping state, the bluetooth monitor will enter a waiting state for the first bluetooth broadcast request. And in the waiting state, the Bluetooth monitor monitors calling information from Bluetooth feedback in real time. The bluetooth broadcast status stored in the bluetooth monitor may be updated based on the call information of the bluetooth feedback. And after the bluetooth broadcast state is updated to the in-broadcast state or the idle state, the bluetooth monitor may perform a corresponding bluetooth broadcast operation in response to the first bluetooth broadcast request. In this way, the Bluetooth broadcasting request received in the unavailable state of Bluetooth broadcasting can be prevented from being discarded, and the possibility of Bluetooth message loss is reduced.
Fig. 5B is a flowchart illustrating a bluetooth broadcast operation performed after a bluetooth broadcast request received in an idle state according to an embodiment of the present application.
S501, the Bluetooth monitor receives a Bluetooth broadcasting request.
In some embodiments, the bluetooth broadcast request may be specifically user-triggered; for example, a bluetooth broadcast request may be triggered when a user wishes to transmit data to other electronic devices via bluetooth. In other embodiments, some of the timing tasks may be set in the electronic device to be implemented by bluetooth broadcast, in which the bluetooth monitor will receive a bluetooth broadcast request triggered by the timing task at regular intervals. It should be appreciated that in other embodiments, bluetooth broadcast requests may be triggered in other ways as well.
S502, the Bluetooth monitor acquires the current Bluetooth broadcasting state.
In some embodiments, the bluetooth broadcast status may be stored in a memory space of the bluetooth monitor. The bluetooth monitor will acquire the bluetooth broadcast status at the current time after receiving the bluetooth broadcast request. A response operation to the bluetooth broadcast request is then determined based on the bluetooth broadcast status.
S503, if the current Bluetooth broadcasting state is an idle state, the Bluetooth monitor calls Bluetooth to send a call request of the Bluetooth broadcasting starting interface.
It will be appreciated that the request to invoke the bluetooth broadcast initiation interface is for requesting invocation of the bluetooth provided broadcast initiation interface. After receiving the call request, bluetooth will start bluetooth broadcast. In some embodiments, if the current bluetooth broadcast state is actually in the broadcast state and the bluetooth monitor requests to invoke the bluetooth broadcast enabled interface, bluetooth will feed back feedback information to the bluetooth monitor that invokes the error.
S504, the Bluetooth monitor updates the current Bluetooth broadcasting state into a starting state.
S505, bluetooth responds to a call request of a Bluetooth broadcast starting interface to start Bluetooth broadcast.
The execution sequence of S504 and S505 is not limited.
S506, after the Bluetooth is successfully started, the Bluetooth returns first call success information to the Bluetooth monitor.
The first call success information is used for indicating that the Bluetooth broadcasting starting interface is successfully called.
S507, after receiving the first call success information, the Bluetooth monitor updates the current Bluetooth broadcasting state from the starting state to the broadcasting state.
S508, the Bluetooth monitor responds to the Bluetooth broadcasting request to update the Bluetooth broadcasting message, so that the Bluetooth starts to broadcast the updated broadcasting message.
S509, when the Bluetooth broadcasting corresponding to the Bluetooth broadcasting request is completed, the Bluetooth monitor sends a request for calling the Bluetooth broadcasting stop interface to Bluetooth.
It should be appreciated that the invocation request of the bluetooth broadcast stop interface is for invoking the bluetooth broadcast stop interface. Bluetooth will stop Bluetooth broadcasting in response to the request for invoking the Bluetooth broadcasting stop interface. In some embodiments, if the current bluetooth broadcast state is actually in an off state and the bluetooth monitor requests to invoke the bluetooth broadcast stop interface, bluetooth may feed back feedback information to the bluetooth monitor that invocation was successful.
S510, the Bluetooth monitor updates the current Bluetooth broadcasting state from the broadcasting state to the stopping state.
The execution sequence of S509 and S510 is not limited.
S511, bluetooth responds to a call request of the Bluetooth broadcasting stop interface to stop Bluetooth broadcasting.
S512, after the Bluetooth is successfully stopped, the Bluetooth sends second call success information to the Bluetooth monitor.
The second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully.
S513, after receiving the second call success information, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to the idle state.
It should be understood that after S513, the bluetooth broadcast state returns to the idle state, at which time if the bluetooth monitor receives a new bluetooth broadcast request again, the above-described S501-S513 may be sequentially performed.
The processing method of the bluetooth broadcast request provided by the application will be described in detail with reference to the accompanying drawings and embodiments, in which the electronic device is a mobile phone. Fig. 6A is a schematic flow chart of a processing method of a bluetooth broadcast request according to an embodiment of the present application. The method comprises S601-S607, wherein:
s601, the Bluetooth monitor receives a first Bluetooth broadcasting request.
The first bluetooth broadcast request is for requesting a message to be sent over a bluetooth broadcast.
In some embodiments, the broadcast content corresponding to the bluetooth broadcast request may specifically include a data file (e.g. a picture, a document) sent through bluetooth, and current mobile phone status information (e.g. whether a WiFi switch is turned on, a network name of a WiFi connection, etc.) of the mobile phone is broadcast through bluetooth.
In other embodiments, the bluetooth broadcast request may also be used to instruct the bluetooth monitor to restart the bluetooth broadcast. In this embodiment, when the bluetooth monitor receives this type of bluetooth broadcast request, if the current bluetooth broadcast state is an in-broadcast state, the bluetooth monitor needs to call a bluetooth broadcast stop interface in response to the bluetooth broadcast request, and call a bluetooth broadcast start interface again after the bluetooth broadcast is stopped successfully, to restart the bluetooth broadcast.
S602, the Bluetooth monitor acquires the current Bluetooth broadcasting state stored in the Bluetooth monitor.
As can be seen from the above description, in the embodiment of the present application, the bluetooth broadcast status is stored in the bluetooth monitor, and the bluetooth monitor updates the bluetooth broadcast status.
S603, the Bluetooth monitor judges whether the current Bluetooth broadcasting state is a first Bluetooth broadcasting state.
Wherein the first bluetooth broadcast state includes a start-up state or a stop-in state. As can be seen from the flowchart shown in fig. 5B, the current bluetooth broadcast status is in the active state or the inactive state, which may specifically indicate that the current bluetooth monitor has received other bluetooth broadcast requests (such as the second bluetooth broadcast request) before the first bluetooth broadcast request. And in response to the second bluetooth broadcast request, the bluetooth monitor is performing a corresponding bluetooth broadcast operation.
After S603, if the bluetooth monitor determines that the current bluetooth broadcast status is the first bluetooth broadcast status, it indicates that the current bluetooth broadcast is not available, and a corresponding bluetooth broadcast operation cannot be immediately performed for the first bluetooth broadcast request. Since the bluetooth broadcast status is normally continuously updated during the bluetooth broadcast operation in response to the second bluetooth broadcast request. Thus, for the first bluetooth broadcast request, a period of time may be waited for, and the bluetooth broadcast operation corresponding to the first bluetooth broadcast request is performed after the bluetooth broadcast status is updated to the available status.
For example, in the case that the determination result of S603 is yes, the specific correspondence is shown in the flowchart shown in fig. 5B, where the first bluetooth broadcast request is received between S504-S507, or between S507-S513.
Further, taking the example that the bluetooth monitor determines that the current bluetooth broadcast status is the active status in S603, if bluetooth and communication between the bluetooth monitor and bluetooth are normal, the current moment may specifically be when the bluetooth monitor calls the bluetooth broadcast activation interface in response to the second bluetooth broadcast request (the broadcast request received previously), but does not receive the call success information of the bluetooth feedback yet. The communication between the Bluetooth monitor and the Bluetooth normally indicates that the Bluetooth can normally receive a call request from the Bluetooth monitor, and the Bluetooth monitor can normally receive call feedback information from Bluetooth feedback.
Taking the example that the bluetooth monitor determines that the current bluetooth broadcast state is the in-stop state in S603, if the bluetooth is normal, and the communication between the bluetooth monitor and the bluetooth is normal, the in-stop state corresponds to a period of time when the bluetooth monitor invokes the bluetooth broadcast stop interface after the bluetooth broadcast corresponding to the second bluetooth broadcast request is completed, and no call success information of the bluetooth feedback is received.
In other embodiments, if the determination result in S603 is no, it indicates that the current bluetooth broadcast status is an idle status or an in-broadcast status. Specific embodiments for the current bluetooth broadcast state being an idle state or an in-broadcast state will be described in detail in the following embodiments, which are not described herein.
S604, the Bluetooth monitor enters a first waiting state.
It should be appreciated that S604 above specifically refers to the bluetooth monitor waiting for a period of time for the first bluetooth broadcast request. In the first waiting state, the bluetooth monitor continues to perform the corresponding bluetooth broadcast operation for the bluetooth broadcast request (e.g., the second bluetooth broadcast request) that the bluetooth monitor has previously received.
S605, in a first waiting state, the Bluetooth monitor monitors call information sent by Bluetooth.
As can be seen from the description of the above embodiments, in the first waiting state, the bluetooth broadcast state stored in the current bluetooth monitor is either the active state or the inactive state. Typically, the bluetooth broadcast state being in an active state indicates that the bluetooth monitor has invoked the bluetooth broadcast activation interface in response to a prior bluetooth broadcast request, but has not received invocation success information for bluetooth feedback. Similarly, the Bluetooth broadcasting state being in the stopped state indicates that the Bluetooth monitor has invoked the Bluetooth broadcasting stop interface based on the previous Bluetooth broadcasting request, but has not received the invocation success information of the Bluetooth feedback. And, the time between the bluetooth monitor invoking the bluetooth interface and receiving the invocation success information sent by bluetooth is generally short. That is, for the first bluetooth broadcast request, it is only necessary to wait for a short time to wait for the bluetooth broadcast status to be updated to an available status, such as an in-broadcast status or an idle status.
That is, in the above S605, in general, the bluetooth monitor only needs to wait for a short time in the first waiting state, and can receive the call information sent by bluetooth. If call success information for indicating the Bluetooth broadcasting start interface/Bluetooth broadcasting stop interface is received, the Bluetooth monitor can update the Bluetooth broadcasting state to an available state. If the bluetooth monitor waits for a long time in the first waiting state and does not receive the call information sent by bluetooth, it is possible that bluetooth fails or communication between the bluetooth monitor and bluetooth fails.
To avoid waiting for the bluetooth monitor to continue for a long time for the first bluetooth broadcast request in such a failure situation, the stay time of the bluetooth broadcast state in the first bluetooth broadcast state may be timed. Once the residence time of the Bluetooth broadcasting state in the first Bluetooth broadcasting state exceeds a certain time, judging that a fault problem possibly occurs, and executing corresponding operation is needed.
In some embodiments, after the bluetooth monitor enters the first waiting state, the method further comprises: in a first waiting state, the Bluetooth monitor acquires a first stay time of Bluetooth in a first Bluetooth broadcasting state; if the first stay time does not exceed the first preset time, the Bluetooth monitor maintains the first waiting state.
The residence time of bluetooth in the first bluetooth broadcast state may specifically be represented as: starting from the point in time when the bluetooth broadcast status is updated from the last status to the current status, until the time between the current moments. Illustratively, the current bluetooth broadcast state is an active state, and the dwell time of bluetooth in the active state includes: starting from the bluetooth broadcast state, which is an idle state, to an active state, until the time between the current moments. The current bluetooth broadcast state is a stop-in state, and the stay time of the bluetooth in the stop-in state comprises: the bluetooth broadcast state is started from the broadcast state to the stop state, and the time between the current moments is up to.
In some embodiments, the timing may be started at the point in time when the last bluetooth broadcast state was updated to the current bluetooth broadcast state, with the timing time being used to indicate the residence time of bluetooth in the current bluetooth broadcast state. Illustratively, when the current bluetooth broadcast state is an active state, the timing is started when the bluetooth monitor updates the bluetooth broadcast state from an idle state to an active state. When the current bluetooth broadcast state is the in-stop state, the timing may be started when the bluetooth monitor updates the bluetooth broadcast state from the in-broadcast state to the in-stop state.
In other embodiments, the time point when the last bluetooth broadcast status is updated to the current bluetooth broadcast status may be recorded directly, for example, the time point when the idle status is updated to the active status may be recorded as the start time, and the time point when the broadcast status is updated to the inactive status may be recorded as the stop time. Then, in the on-start state, the stay time of the Bluetooth broadcasting state in the on-start state can be determined according to the time difference between the current time and the on-start time. Similarly, in the in-stop state, the stay time of the bluetooth broadcast state in the in-stop state may be determined according to the time difference between the current time and the stop time.
The first preset time may be set according to actual conditions. Typically, the bluetooth monitor may receive the call success information of the bluetooth feedback within a few milliseconds after calling the bluetooth broadcast start interface or the bluetooth broadcast stop interface. Thus, in some embodiments, the first preset time may be set to be greater than the time required from the calling interface to the receiving of the information to be fed back; the first preset time may be set to 50ms, 100ms, or the like, for example. In the first waiting state, the first waiting state may be maintained if the bluetooth monitor detects that the residence time of bluetooth in the first bluetooth broadcast state does not exceed a first preset time.
It will be appreciated that if the bluetooth monitor detects that the dwell time of bluetooth in the first bluetooth broadcast state exceeds a first preset time in the first waiting state, then a fault may be determined to have occurred. In some embodiments, after the bluetooth monitor invokes the bluetooth broadcast start interface or the bluetooth broadcast stop interface, if no invocation information (invocation success information or invocation error information) of the bluetooth feedback is received, it may be that bluetooth fails, and the bluetooth interface cannot be invoked normally. Or it may be that the call success information of the bluetooth feedback is not transferred to the bluetooth monitor.
In some embodiments, after entering the first waiting state, if the residence time of bluetooth in the first bluetooth broadcast state is detected to exceed the first preset time, the bluetooth broadcast start interface or the bluetooth broadcast stop interface of bluetooth may be directly invoked by the bluetooth monitor to update the bluetooth broadcast state.
In some embodiments, after entering the first wait state, the bluetooth monitor directly invokes the bluetooth broadcast stop interface if the stay time of the current bluetooth in-active state exceeds a first preset time.
As can be seen from the above description, the stay time of bluetooth in the first bluetooth broadcast state exceeding a certain time may be that the successful call information of bluetooth feedback is not transferred to the bluetooth monitor, or that bluetooth fails, and that the bluetooth broadcast start interface cannot be normally invoked. For the first case, if the bluetooth monitor calls the bluetooth broadcast initiation interface, the bluetooth broadcast initiation is successful, except that call success information is not transferred to the bluetooth monitor. Then the bluetooth is actually in the active state at this time, except that the bluetooth monitor does not update the bluetooth broadcast state in time because no call feedback information is received. At this time, the bluetooth monitor invokes the bluetooth broadcast stop interface, and bluetooth can stop bluetooth broadcast according to the invocation request, and after the bluetooth broadcast stop is successful, feedback information indicating that the bluetooth broadcast stop interface is invoked successfully is returned to the bluetooth monitor.
Further, if bluetooth fails, after the stay time of the current bluetooth in-start state exceeds the first preset time, the bluetooth monitor may stop bluetooth broadcasting in response to a call request to the bluetooth broadcasting stop interface, and feedback information indicating that the bluetooth broadcasting stop interface call is successful to the bluetooth monitor. That is, the bluetooth monitor will receive information indicating that the bluetooth broadcast stop interface call was successful. In this embodiment, the bluetooth monitor may update the current bluetooth broadcast status to the in-stop status after invoking the bluetooth broadcast stop interface. Then, if the bluetooth monitor receives the call success information for indicating the bluetooth broadcast stop interface, the current bluetooth broadcast state may be updated to an idle state. Therefore, the problem that the newly received Bluetooth broadcasting request (such as the first Bluetooth broadcasting request) cannot be broadcasted for a long time because the Bluetooth monitor does not receive the call success information of the Bluetooth feedback and the Bluetooth broadcasting state is not updated in time can be avoided.
For the second situation, if the reason that the stay time of the bluetooth in the start-up state exceeds the first preset time is that the bluetooth broadcast start-up interface fails, then the bluetooth is not started successfully actually and is still in the off state. At this time, if the bluetooth monitor invokes the bluetooth broadcast stop interface, the invocation success information of the bluetooth feedback cannot be received.
Further, in this embodiment, after the residence time of the current bluetooth in the on state exceeds the first preset time, if the bluetooth monitor does not receive the call feedback information of the bluetooth broadcast stop interface within a certain time after the bluetooth monitor calls the bluetooth broadcast stop interface, it may be determined that the current bluetooth fails. In some embodiments, after determining that bluetooth is malfunctioning, alert information may be generated for alerting the user that bluetooth is malfunctioning. Thus, the Bluetooth alarm system can remind a user when the Bluetooth possibly fails and take corresponding measures as soon as possible.
Similarly to the first bluetooth broadcast state being the active state, if the first bluetooth broadcast state is the inactive state, after entering the first waiting state, the stay time of the current bluetooth in the inactive state exceeds a first preset time, the bluetooth monitor directly invokes the bluetooth broadcast active interface. Similarly, there are two possible situations that the stay time of the bluetooth in the stopped state exceeds the first preset time, that is, the successful call information of the bluetooth feedback is not transferred to the bluetooth monitor, or the bluetooth fails, and the bluetooth broadcast start interface cannot be normally called.
For the first case, since bluetooth does not fail, bluetooth has actually stopped bluetooth broadcasting in response to a call request of a previous bluetooth broadcasting stop interface, i.e., bluetooth broadcasting is currently in an off state. Except that the bluetooth monitor does not receive feedback information indicating that the bluetooth broadcast stop interface call was successful, so that the bluetooth broadcast status is not updated in time. That is, if the bluetooth monitor calls the bluetooth broadcast initiation interface at this time, bluetooth may initiate bluetooth broadcast in response to the call request, and then information indicating that the bluetooth broadcast initiation interface call is successful may be fed back to the bluetooth monitor. In this embodiment, the bluetooth monitor may update the current bluetooth broadcast status to the active status after invoking the bluetooth broadcast activation interface. Thereafter, if the bluetooth monitor receives call success information for indicating a bluetooth broadcast stop interface, the current bluetooth broadcast state may be updated to an in-broadcast state. Therefore, the problem that the newly received Bluetooth broadcasting request (such as the first Bluetooth broadcasting request) cannot be broadcasted for a long time because the Bluetooth monitor does not receive the call success information of the Bluetooth feedback and the Bluetooth broadcasting state is not updated in time can be avoided.
For the second case, if the reason why the stay time of the current bluetooth in the stopped state exceeds the first preset time is that the bluetooth fails, then the bluetooth is still in the broadcast state. At this time, if the bluetooth monitor requests to call the bluetooth broadcast initiation interface, since bluetooth is actually in a broadcast state, if bluetooth receives a call request corresponding to the bluetooth broadcast initiation interface at this time, a call error message will be generated. In this embodiment, after the bluetooth monitor invokes the bluetooth broadcast initiation interface in the first waiting state, if an invocation error message of bluetooth feedback is received, the bluetooth monitor determines that bluetooth is malfunctioning. At this time, the bluetooth monitor may generate a reminder message for reminding the user that bluetooth may malfunction. Thus, the Bluetooth alarm system can remind a user when the Bluetooth possibly fails and take corresponding measures as soon as possible.
As can be seen from the flowchart shown in fig. 5B, when the current bluetooth broadcast status is in the active status, it indicates that the bluetooth monitor has sent a call request of the bluetooth broadcast activation interface to bluetooth in response to a previous bluetooth broadcast request (e.g., a second bluetooth broadcast request). In this embodiment, the method further comprises: in the first waiting state, the Bluetooth monitor updates the current Bluetooth broadcasting state to the broadcasting state when receiving first call success information of Bluetooth feedback. The first call success information is used for indicating that the Bluetooth broadcasting starting interface is successfully called.
Similarly, when the current bluetooth broadcast state is the in-stop state, the bluetooth monitor sends a request for calling the bluetooth broadcast stop interface to bluetooth. In this embodiment, the method further comprises: in the first waiting state, the Bluetooth monitor updates the current Bluetooth broadcasting state to an idle state when receiving second call success information of Bluetooth feedback. The second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully.
S606, after receiving call success information sent by Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state into a second Bluetooth broadcasting state.
Wherein the second bluetooth broadcast state includes an idle state or an in-broadcast state.
If the Bluetooth monitor receives the call success information of the Bluetooth feedback in the first waiting state, the Bluetooth broadcasting state stored in the Bluetooth monitor can be updated to be the second Bluetooth broadcasting state. At this point, the current bluetooth broadcast update is indicated as available. Thereafter, for the first bluetooth broadcast request, a corresponding bluetooth broadcast operation may be performed.
S607, the Bluetooth monitor responds to the first Bluetooth broadcasting request to execute Bluetooth broadcasting operation.
In normal cases, the bluetooth broadcast status is updated in the order shown in fig. 2. That is, if it is determined that the bluetooth broadcast state is the in-process state in S603, the bluetooth monitor receives call success information of bluetooth feedback in S607, and the bluetooth monitor may update the bluetooth broadcast state stored in the bluetooth monitor to the in-process state. And in S603, it is determined that the bluetooth broadcast status is in a stopped state, and in S607, the bluetooth monitor receives the fed back call success information, and may update the bluetooth broadcast status stored in the bluetooth monitor to an idle state.
As can be seen from the flowchart shown in fig. 5B, when the current bluetooth state is the in-broadcast state, the bluetooth monitor can update the bluetooth broadcast message in response to the bluetooth broadcast request. In some embodiments, as shown in fig. 6B, the step S606 may specifically include:
S606. after receiving the first call success information sent by bluetooth, the bluetooth monitor updates the current bluetooth broadcast status to the in-broadcast status.
Further, in this embodiment, please continue to refer to fig. 6B, the step S607 may specifically include step S607a:
s607a, the Bluetooth monitor responds to the first Bluetooth broadcasting request to update the Bluetooth broadcasting message.
The updated bluetooth broadcast message is used for bluetooth broadcasting. After S607b, bluetooth will broadcast the updated broadcast message, i.e. the broadcast content corresponding to the first bluetooth broadcast request.
In the case where the current bluetooth broadcast state is an idle state, the bluetooth monitor may invoke a bluetooth broadcast initiation interface in response to a bluetooth broadcast request. In some embodiments, as shown in fig. 6C, the S606 may specifically include S606b:
s606b, after receiving the second call success information sent by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state to an idle state.
Further, the step S607 may specifically include step S607b:
s607b, the Bluetooth monitor responds to the first Bluetooth broadcasting request and sends a call request of the Bluetooth broadcasting start interface to Bluetooth.
In the technical solution provided in the embodiment of the present application, if a first bluetooth broadcast request is received in a bluetooth broadcast unavailable state (a first bluetooth broadcast state), a period of time is waited for the first bluetooth broadcast request. And after the Bluetooth broadcasting state is updated to be in the available state (second Bluetooth broadcasting state), executing the Bluetooth broadcasting operation corresponding to the first Bluetooth broadcasting request. Therefore, the Bluetooth broadcasting request can be prevented from being discarded due to the fact that the current Bluetooth broadcasting is unavailable, and the situation that the Bluetooth broadcasting message is lost is reduced.
In the above embodiment, when the bluetooth monitor receives the first bluetooth broadcast request, the acquired bluetooth broadcast state is the first bluetooth broadcast state, i.e., the start-up state or the stop-in state. At this point bluetooth broadcasting is not available and the bluetooth monitor needs to enter a wait state for the first bluetooth broadcasting request. In other embodiments, if the bluetooth monitor acquires that the current bluetooth broadcast state is not in the first bluetooth broadcast state when the first bluetooth broadcast request is received, i.e., after S603 described above, the bluetooth monitor determines that the bluetooth broadcast state is not the first bluetooth broadcast state. Further, if the current bluetooth broadcast status is an idle status or an in-broadcast status, it indicates that the current bluetooth can be directly used.
Taking the current bluetooth broadcast state as an idle state as an example, as shown in fig. 7, if the determination result of S603 is no, the method further includes S701-S707, and it should be noted that, in the flowchart shown in fig. 7, the flow executed when the determination result of S603 is yes (S604-S607) is not shown. Wherein:
S701, the Bluetooth monitor judges whether the Bluetooth broadcasting state is an idle state.
In some embodiments, S702 may be performed upon determining that the current bluetooth broadcast state is an idle state. It should be noted that, in the flow shown in fig. 7, if the current bluetooth broadcast state does not belong to the first bluetooth broadcast state and is not an idle state, the current bluetooth broadcast state may be an in-broadcast state. When the determination result in S701 is no, that is, the current bluetooth broadcast state acquired in S602 is the in-broadcast state, the embodiment will be described in detail in the following embodiments, which will not be described herein.
S702, the Bluetooth monitor responds to the first Bluetooth broadcasting request and sends a call request of a Bluetooth broadcasting start interface to Bluetooth.
As can be seen from the flowchart shown in fig. 5B, if bluetooth is not malfunctioning and communication between bluetooth and bluetooth monitor is normal, bluetooth can start bluetooth broadcast in response to the call request as S703.
S703, the Bluetooth monitor updates the current Bluetooth broadcasting state from the idle state to the starting state.
S704, bluetooth starts Bluetooth broadcasting in response to a call request of a Bluetooth broadcasting starting interface.
It should be understood that the execution sequence of S703 and S704 is not limited in the embodiment of the present application.
S705. after the bluetooth is successfully started, the bluetooth returns a first call success information to the bluetooth monitor.
The first call success information is used for indicating that the Bluetooth broadcasting starting interface is successfully called.
S706, when the Bluetooth monitor receives the first call success information, the current Bluetooth broadcasting state is updated from the starting state to the broadcasting state.
S707, based on the first Bluetooth broadcasting request, the Bluetooth monitor updates a Bluetooth broadcasting message.
The updated broadcast message is used for broadcasting by Bluetooth. The bluetooth monitor updates a bluetooth broadcast message based on the first bluetooth broadcast request, which may specifically include: the Bluetooth monitor acquires a broadcast message corresponding to the first Bluetooth broadcast request, and updates the broadcast message of Bluetooth into the broadcast message corresponding to the first Bluetooth broadcast request. The specific implementation manner of the bluetooth update broadcast message may refer to the description in the related art, which is not repeated in the embodiment of the present application.
In the technical scheme provided by the embodiment of the application, when the first Bluetooth broadcasting request is received, if the current Bluetooth broadcasting state is an idle state, the current Bluetooth is in an available state. At this time, the bluetooth monitor can directly respond to the first bluetooth broadcast request, call the bluetooth broadcast start interface, and quickly respond to the first bluetooth broadcast request.
In the above embodiment, when the bluetooth broadcast status is in the idle status, the current bluetooth is considered to be available. However, in a practical situation, a part of bluetooth may still be in an unusable state for a short period of time when the bluetooth broadcast state has just been updated from the in-stop state to the idle state. Therefore, when the bluetooth broadcasting state is detected to be the idle state when the first bluetooth broadcasting request is received, the bluetooth monitor can obtain the stay time of the bluetooth in the idle state, and when the stay time in the idle state does not reach the second preset time, the bluetooth monitor also needs to wait for a period of time for the first bluetooth broadcasting request.
In some embodiments, after the determining result in S701 is yes, before S702, the method further includes: the bluetooth monitor obtains a second dwell time of bluetooth in the idle state. In this embodiment, the S702 may specifically include: and when the Bluetooth monitor determines that the second stay time exceeds the second preset time, the Bluetooth monitor sends a call request of the Bluetooth broadcast start interface to Bluetooth.
When the bluetooth broadcast status is in the idle status, the time point when the bluetooth broadcast status is updated from the in-stop status to the idle status can be recorded as the stop success time. The timing is started from the stop success time, and the timing time from the stop success time is used for indicating the stay time of the Bluetooth broadcasting state in the idle state.
The second preset time may be set according to actual conditions, and exemplary, the second preset time may be set to 50ms, 60ms, 70ms, 100ms, or the like.
In the technical scheme provided by the embodiment of the application, aiming at the condition that the first Bluetooth broadcasting request is received under the condition that the Bluetooth broadcasting state is just updated from the stopped state to the idle state, the first Bluetooth broadcasting request can be waited for a period of time, and then the Bluetooth broadcasting starting interface is called in response to the first Bluetooth broadcasting request. Therefore, the problem that the Bluetooth broadcasting start interface is failed to be called because Bluetooth cannot be used in a short period of time when the Bluetooth broadcasting state is just updated from the stopped state to the idle state can be avoided.
As can be seen from the flowchart shown in fig. 5B, after S508, the bluetooth monitor updates the bluetooth broadcast message based on the bluetooth broadcast request, so that the bluetooth broadcasts the broadcast content of the bluetooth broadcast request. When the bluetooth broadcast corresponding to the bluetooth broadcast request in S509 is completed, the bluetooth monitor may call the bluetooth broadcast stop interface to stop the bluetooth broadcast. In some embodiments, it may be specifically determined whether the bluetooth broadcast corresponding to the bluetooth broadcast request is completed by setting a timer.
In some embodiments, as shown in fig. 8, after S702, the method further includes S801:
S801, the Bluetooth monitor sets a first timer based on the duration to be broadcasted corresponding to the first Bluetooth broadcasting request, and the first timer starts to count.
The duration to be broadcast corresponding to the first bluetooth broadcast request represents the broadcast duration of the content to be broadcast corresponding to the first bluetooth broadcast request. It will be appreciated that the broadcast duration required for bluetooth broadcast content requested by different bluetooth broadcast requests may not be the same.
In some embodiments, the first timer may be a countdown timer, and in this embodiment, the time counted by the first timer indicates the remaining broadcast duration of bluetooth. It should be understood that a remaining broadcast duration of bluetooth of 0 indicates that the current bluetooth broadcast is complete. The step S801 may specifically include: and after the Bluetooth monitor determines the duration to be broadcasted corresponding to the first Bluetooth broadcasting request according to the first Bluetooth broadcasting request, setting the duration to be broadcasted as the countdown duration of the countdown timer. It will be appreciated that the countdown duration is used to indicate a duration of broadcast that the bluetooth broadcast has remained for the broadcast content corresponding to the first bluetooth broadcast request. When the countdown duration of the countdown timer becomes 0, it indicates that the broadcasting duration for the first bluetooth broadcasting request has reached the duration to be broadcasted corresponding to the first bluetooth broadcasting request. That is, the bluetooth broadcast corresponding to the first bluetooth broadcast request is completed. At this point the bluetooth monitor may invoke the bluetooth broadcast stop interface to turn off the bluetooth broadcast.
In other embodiments, the first timer may be a forward timer, where the time of the first timer indicates the broadcast duration of bluetooth. And combining the duration to be broadcasted corresponding to the first Bluetooth broadcasting request and the timing time of the first timer, and determining the residual broadcasting duration corresponding to the first Bluetooth broadcasting request. The step S801 may specifically include that after the bluetooth monitor determines the duration to be broadcasted corresponding to the first bluetooth broadcast request, the first timer starts to count from 0. And if the detected timing time reaches the duration to be broadcasted, the completion of the Bluetooth broadcasting corresponding to the first Bluetooth broadcasting request is indicated. At this point the bluetooth monitor may be triggered to invoke the bluetooth broadcast stop interface to turn off the bluetooth broadcast. It should be appreciated that in this embodiment, the timing time of the first timer is used to indicate the broadcast duration of the bluetooth broadcast for the broadcast content corresponding to the first bluetooth broadcast request.
In some embodiments, the first timer in S801 may specifically start counting immediately after S702, or may start counting after S707 the bluetooth monitor updates the bluetooth broadcast message based on the first bluetooth broadcast request.
Further, in some embodiments, after S707, the method further includes S802-S806, where:
S802, when the residual broadcasting duration of the current Bluetooth is 0 according to the timing time of the first timer, the Bluetooth monitor sends a call request of a Bluetooth broadcasting stop interface to the Bluetooth.
As can be seen from the description of the above embodiments, the timing of the first timer can be used to determine the remaining broadcast duration of bluetooth.
When the remaining broadcasting duration of bluetooth is determined to be 0, it indicates that bluetooth broadcasting corresponding to the first bluetooth broadcasting request is completed, and at this time, the bluetooth monitor may call a bluetooth broadcasting stop interface to turn off the bluetooth broadcasting, thereby reducing unnecessary power consumption.
S803, the Bluetooth monitor updates the current Bluetooth broadcasting state to a stop-in state.
S804, bluetooth responds to a call request of a Bluetooth broadcasting stop interface to stop Bluetooth broadcasting.
S805. when the bluetooth broadcast is stopped successfully, the bluetooth transmits a second call success message to the bluetooth monitor.
The second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully.
S806, when receiving second call success information fed back by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to the idle state.
In the technical scheme provided by the embodiment of the application, after the Bluetooth broadcasting starts in response to the first Bluetooth broadcasting request, a first timer is set, and whether the current Bluetooth broadcasting is completed or not is judged according to the timing time. In this way, the Bluetooth monitor can conveniently call the Bluetooth broadcasting stop interface in time after the Bluetooth broadcasting corresponding to the first Bluetooth broadcasting request is completed, so as to close the Bluetooth broadcasting. Thus, unnecessary power consumption caused by Bluetooth broadcasting on when no broadcasting is performed can be reduced.
In some embodiments, the first timer used to determine whether bluetooth broadcasting is complete may fail. In this case, after the bluetooth broadcast corresponding to the first bluetooth broadcast request is completed, the bluetooth monitor may not call the bluetooth broadcast stop interface, thereby causing the bluetooth broadcast to remain in the in-broadcast state for a long time, but no content of the bluetooth broadcast is required. To avoid this, a broadcast duration maximum value may be set when a call request for a bluetooth broadcast start interface is sent to bluetooth. If the Bluetooth monitor does not invoke the Bluetooth broadcast stop interface after the Bluetooth broadcast is completed. Bluetooth may actively stop bluetooth broadcasting (i.e., turn off bluetooth broadcasting) by bluetooth when the accumulated time after the start of bluetooth broadcasting reaches the maximum value of the broadcasting duration.
In some embodiments, the third preset time is carried in the call request of the bluetooth broadcast initiation interface sent by the bluetooth monitor to bluetooth in S702. The third preset time is used for indicating Bluetooth to stop Bluetooth broadcasting at a time point corresponding to the third preset time from the current time.
Further, in this embodiment, after the bluetooth broadcast is started in S704, bluetooth starts to count the current accumulated bluetooth broadcast duration. After S704, when the bluetooth detects that the timing duration reaches the third preset time, the bluetooth may actively stop the bluetooth broadcast when the bluetooth still does not receive the request for invoking the bluetooth broadcast stop interface sent by the bluetooth monitor. Thereby avoiding unnecessary power consumption. The third preset time may be set according to actual conditions, for example, the third preset time may be set to 30 seconds(s), 40s, 45s, and so on.
In the technical scheme provided by the embodiment of the application, when the Bluetooth monitor fails or other conditions cause that the Bluetooth monitor does not call the Bluetooth broadcasting stop interface to close the Bluetooth broadcasting in time after the Bluetooth broadcasting is completed, the Bluetooth monitor can actively stop the Bluetooth broadcasting after a period of time under the control of the Bluetooth. In this way, unnecessary power consumption can be avoided.
The above-mentioned processes shown in fig. 7-8 introduce the corresponding execution steps when the determination result in S603 is no and the current bluetooth broadcast state is the idle state. When the determination result at S603 is no, the current bluetooth broadcast state may also be in a broadcast state, that is, the bluetooth monitor has called the bluetooth broadcast initiation interface in response to the previous second bluetooth broadcast request and the bluetooth broadcast initiation is successful. In this embodiment, in the case that the current bluetooth broadcast state is the in-broadcast state, the bluetooth monitor may directly respond to the first bluetooth broadcast request to update the broadcast message of bluetooth, so that bluetooth starts to broadcast the broadcast content corresponding to the first bluetooth broadcast request.
In some embodiments, as shown in fig. 9, if the determination result of S603 is no, the method further includes S900 and S902, and it should be noted that, in the flow shown in fig. 9, the flow (S604-S607) of yes determination result for S603 is not shown, where:
S900, the Bluetooth monitor judges whether the Bluetooth broadcasting state is in a broadcasting state.
If the bluetooth broadcast state does not belong to an active state, an inactive state, or an idle state, the bluetooth broadcast state may be in a broadcast state. After determining that the current bluetooth broadcast state is the in-broadcast state, S902 may be performed:
s902, the Bluetooth monitor updates a Bluetooth broadcast message based on the first Bluetooth broadcast request.
The updated broadcast message is used for broadcasting by Bluetooth. In some embodiments, the bluetooth monitor updates the bluetooth broadcast message based on the first bluetooth broadcast request, and may specifically include: the Bluetooth monitor analyzes the first Bluetooth broadcasting request to obtain a corresponding message to be broadcasted; and the Bluetooth monitor updates the Bluetooth broadcast message into the message to be broadcast. The specific implementation manner of updating the bluetooth broadcast message by the bluetooth monitor may refer to the description in the related art, which is not repeated in the embodiment of the present application.
The technical solutions corresponding to S900 and S902 may be arranged in parallel with the flow of S701 to S707 in fig. 7. In this embodiment, the three judging steps of S603, S701 and S900 may be sequentially judged, and if the judging result of S603 is yes, it indicates that the bluetooth broadcast state when the first bluetooth broadcast request is received is in the start-up state or the stop-in state, and at this time, the steps of S604-S607 may be executed. If the determination result of S603 is no, S701 may be directly executed, and if the determination result of S701 is yes, it indicates that the bluetooth broadcast status when the first bluetooth broadcast request is received is an idle status, and at this time, S702-S707 may be executed. If the determination result of S701 is no, S900 may be executed, and if the determination result of S900 is yes, S902 may be executed at this time.
Or after receiving the first bluetooth broadcast request, the bluetooth monitor may first perform S603 to determine whether the current bluetooth broadcast state is a start-up state or a stop-up state. Then, if the determination result in S603 is no, it is first determined whether the bluetooth broadcast status is in the broadcast status (S900), and if not, it is further determined whether the bluetooth broadcast status is in the idle status (S701). Or after receiving the first bluetooth broadcast request, the bluetooth monitor may further determine whether the current bluetooth broadcast state is an idle state (S701), if not, determine whether the current bluetooth broadcast state is a broadcast state (S900), and finally determine whether the current bluetooth broadcast state is a start-up state or a stop-up state (S603). That is, in the embodiment of the present application, the judging order of the bluetooth broadcast status at the time of the received first bluetooth broadcast request is not limited.
In the technical scheme provided by the embodiment of the application, when the Bluetooth broadcasting state is the broadcasting state in the received first Bluetooth broadcasting request, the current Bluetooth can be directly broadcasted. Therefore, the Bluetooth monitor can directly respond to the first Bluetooth broadcasting request to update the Bluetooth broadcasting message so that Bluetooth starts broadcasting the broadcasting content corresponding to the first Bluetooth broadcasting request. In this way, the bluetooth broadcast request can be responded to quickly.
As can be seen from the description of the above embodiments, the first bluetooth broadcast request may be used to instruct the bluetooth monitor to restart bluetooth broadcast. In this embodiment, if the first bluetooth broadcast request is received while the bluetooth broadcast state is in the in-broadcast state, since the current bluetooth broadcast is available and the bluetooth broadcast is in the in-broadcast state, the bluetooth monitor needs to restart the bluetooth broadcast at this time.
In some embodiments, after S900, before S902, referring to fig. 10A, the method further includes S901:
and S901, the Bluetooth monitor judges whether the broadcast content corresponding to the first Bluetooth broadcast request is a preset periodic broadcast.
In some embodiments, the step S902 may be specifically performed when the determination result of the step S901 is no.
The preset periodic broadcast is used for instructing the Bluetooth monitor to restart Bluetooth broadcast. In some embodiments, the preset periodic broadcast is a bluetooth broadcast request triggered every preset time interval. The bluetooth monitor needs to restart the bluetooth broadcast if it receives a bluetooth broadcast request of a preset periodic broadcast in a state in which the bluetooth broadcast state is in-broadcast. It should be appreciated that in other embodiments, the preset periodic broadcast may also be named other names, such as heartbeat broadcast.
The preset time interval can be set according to actual conditions. For example, the preset time interval may be set to 20s, 30s, 40s, etc. In some embodiments, the preset time interval for the preset periodic broadcast may be set according to the current screen state of the mobile phone. For example, in the case that the screen state of the mobile phone is a bright screen state, which indicates that the current user may be using the mobile phone, the preset time interval may be set to a smaller value, such as 30s. And when the screen state of the mobile phone is the screen-off state, the mobile phone is indicated that the current user may not be using the mobile phone, and the preset time interval can be set to a larger value, such as 5 minutes (min). It should be understood that the foregoing preset time intervals are examples, and in other embodiments, the preset time intervals of the preset periodic broadcast may be set to other values.
As can be seen from the description of the above embodiments, in some embodiments, the bluetooth monitor sets a maximum broadcast duration value when invoking the bluetooth broadcast start interface, and is configured to instruct bluetooth to actively turn off bluetooth broadcast when the bluetooth broadcast duration reaches the maximum broadcast duration value. In some embodiments, the preset time interval of the preset periodic broadcast may be set to be less than the maximum broadcast duration. Fig. 10B is a schematic diagram illustrating restarting of bluetooth broadcasting according to a preset periodic broadcasting (heartbeat broadcasting) according to an embodiment of the present application. In some embodiments, in the broadcasting process of the service broadcast D shown in fig. 10B, when a bluetooth broadcast request of a preset periodic broadcast is received, a part of the service broadcast D that is not broadcast will not continue to be broadcast, but the bluetooth broadcast is restarted directly.
In some embodiments, the bluetooth monitor may set a timer in response to the bluetooth broadcast request, the timing of which may be used to determine the remaining broadcast duration of the bluetooth broadcast. And when the remaining broadcasting time period is determined to be 0 according to the counted time, the Bluetooth monitor invokes a Bluetooth broadcasting stop interface to turn off Bluetooth broadcasting. Therefore, if the first bluetooth broadcast request is received in the in-broadcast state, it is necessary to determine whether it is appropriate to directly broadcast the broadcast content corresponding to the first bluetooth broadcast request in the in-broadcast state in combination with the remaining broadcast duration of the current in-broadcast state.
Specifically, when the current bluetooth broadcast state is in the broadcast state when the first bluetooth broadcast request is received, the bluetooth monitor starts bluetooth broadcast in response to the second bluetooth broadcast request received before. At this time, the bluetooth broadcast may be broadcasting the broadcast content corresponding to the second bluetooth broadcast request, and the remaining broadcast duration of the current bluetooth, that is, the remaining broadcast duration corresponding to the second bluetooth broadcast request, may be determined according to the timer. If the remaining duration corresponding to the second bluetooth broadcast request is less than a certain value, it indicates that the broadcast content corresponding to the second bluetooth broadcast request may not be completely played in the broadcast state. At this time, if the broadcast content corresponding to the first bluetooth broadcast request is to be broadcast in the broadcast in-progress state, there is a possibility that the broadcast content of the first bluetooth broadcast request cannot be received by other electronic devices, resulting in a packet loss.
In order to avoid this situation, a broadcast duration minimum value may be set, when the first bluetooth broadcast request is received in the broadcast in-process state, the bluetooth monitor first determines, according to the timing time of the second timer, whether the remaining broadcast duration of the current bluetooth is greater than the broadcast duration minimum value, and if so, may perform the broadcast operation corresponding to the first bluetooth broadcast request in the in-broadcast state. If not, the broadcasting operation corresponding to the first Bluetooth broadcasting request is not carried out in the broadcasting state.
In some embodiments, please continue with fig. 10A, after the determination result in S901 is no, before S902, the method further includes S1001:
s1001, the Bluetooth monitor acquires the timing time of a second Bluetooth timer.
Wherein the timing time of the second timer is used for indicating the residual broadcast duration of Bluetooth.
Further, in this embodiment, the S902 may specifically include S902a:
and S902a, when the Bluetooth monitor determines that the residual broadcasting duration of the current Bluetooth exceeds the fourth preset time according to the timing time of the second timer, updating the broadcasting message of the Bluetooth based on the first Bluetooth broadcasting request.
The fourth preset time is used for indicating a minimum broadcast duration required by bluetooth broadcasting, and the minimum broadcast duration represents a minimum duration required by one broadcast, and if the minimum broadcast duration is less than the minimum broadcast duration, it is possible that bluetooth broadcasting cannot be received by other electronic devices. It should be noted that, the fourth preset time may be set according to practical situations, for example, may be set to 400ms, 500ms, and so on.
In the technical scheme provided by the embodiment of the application, when the first Bluetooth broadcasting request is received in the broadcasting state, whether the residual broadcasting time length of the current Bluetooth is larger than a certain value is determined according to the timing time of the second timer, and the broadcasting operation corresponding to the first Bluetooth broadcasting request is executed in the broadcasting state only when the residual broadcasting time length is larger than the certain value. In this way, it is ensured that the broadcast content corresponding to the first bluetooth broadcast request can be smoothly broadcast in the current broadcast in-progress state. The method and the device can avoid that after the broadcast content corresponding to the first Bluetooth broadcast request starts to be subjected to Bluetooth broadcast in the current broadcast state, the Bluetooth monitor responds to the prior second Bluetooth broadcast request to shut down the Bluetooth broadcast, so that the broadcast content corresponding to the first Bluetooth broadcast request cannot be received by other electronic equipment.
In other embodiments, if the first bluetooth broadcast request is received in the in-broadcast state, but the remaining broadcast duration of the current bluetooth is less than the minimum broadcast duration, then for the first bluetooth broadcast request, after the current bluetooth broadcast is completed, the bluetooth broadcast state returns to the idle state, and then the broadcast operation corresponding to the first bluetooth broadcast request is executed.
In some embodiments, after S1001, the method further includes: and when the residual broadcasting time of the current Bluetooth is not beyond the fourth preset time according to the timing time of the second timer, the Bluetooth monitor enters a second waiting state. In a second waiting state, the Bluetooth monitor monitors calling information of Bluetooth feedback. After receiving the call success information of the Bluetooth feedback, the Bluetooth monitor updates the current Bluetooth broadcasting state to an idle state, and the Bluetooth monitor responds to the first Bluetooth broadcasting request to execute Bluetooth broadcasting operation.
The bluetooth monitor enters a second waiting state, which specifically means that the bluetooth monitor enters the second waiting state for a second bluetooth broadcast request. In a second waiting state, the Bluetooth monitor monitors calling information of Bluetooth feedback. If the Bluetooth monitor receives the call success information of the Bluetooth feedback, the Bluetooth broadcasting state stored in the Bluetooth monitor can be updated to be an idle state. And, since the current bluetooth broadcast state has been updated to the idle state, the bluetooth monitor may perform a bluetooth broadcast operation corresponding to the first bluetooth broadcast request at this time. It should be understood that, after receiving the call success information of the bluetooth feedback in the second waiting state and updating the bluetooth broadcast state stored in the bluetooth monitor to the idle state by the bluetooth monitor, the bluetooth monitor may respond to the first bluetooth broadcast request to execute the procedure of the bluetooth broadcast operation, which is described above with reference to the procedure shown in fig. 5B, and will not be repeated herein.
The first timer and the second timer may be the same timer or different timers.
In the technical solution provided in the embodiment of the present application, if the current bluetooth broadcast state is a broadcast state, but the current remaining broadcast duration is insufficient to meet the minimum duration (broadcast duration minimum value) required by bluetooth broadcast, then the current bluetooth broadcast needs to be waited for in response to the first bluetooth broadcast request, and after the bluetooth broadcast state is updated to an idle state, the bluetooth broadcast operation corresponding to the first bluetooth broadcast request is executed. In this way, the broadcast content corresponding to the first bluetooth broadcast request is more likely to be received by other electronic devices, so that the broadcast effect is improved.
In other embodiments, if the first bluetooth broadcast request is received in the state that the bluetooth broadcast state is in the broadcast state, in order to avoid the problem that the remaining broadcast duration of the current bluetooth is insufficient to broadcast the broadcast content of the first bluetooth broadcast request, the timer may be updated to increase the remaining broadcast duration of the bluetooth, so as to ensure that the broadcast content corresponding to the first bluetooth broadcast request can be normally broadcast in the broadcast state.
In some embodiments, as shown in fig. 10C, after S902, the method further includes S1002:
S1002. the bluetooth monitor updates the timing time of the third timer based on the first bluetooth broadcast request, and the third timer restarts timing.
The timing time of the third timer is used for indicating the current residual broadcasting duration of Bluetooth.
When the first bluetooth broadcast request is received, if the bluetooth broadcast state is the in-broadcast state, the bluetooth monitor updates the timing time of the third timer based on the first bluetooth broadcast request after updating the bluetooth broadcast message based on the first bluetooth broadcast request.
In some embodiments, the third timer may be a countdown timer, the countdown time of the countdown timer being used to indicate the remaining broadcast duration of the current bluetooth. In this embodiment, the above 1002 may specifically include: the Bluetooth monitor acquires the duration to be broadcasted corresponding to the first Bluetooth broadcasting request; the bluetooth monitor compares the count down time to the size of the duration to be broadcast. When the time length to be broadcasted is longer than the countdown time, the Bluetooth monitor updates the countdown time of the current countdown timer to the time length to be broadcasted corresponding to the first Bluetooth broadcasting request. When the countdown time is longer than the duration to be broadcasted, the timing time of the countdown timer by the Bluetooth monitor is kept unchanged.
The duration to be broadcast corresponding to the first bluetooth broadcast request represents the duration required for broadcasting the broadcast content corresponding to the first bluetooth broadcast request, and if the remaining broadcast duration of the current bluetooth is smaller than the duration to be broadcast corresponding to the first bluetooth broadcast request, the timing time of the countdown timer is updated to the duration to be broadcast. In contrast, if the remaining broadcast time of the current bluetooth is longer than the duration to be broadcast corresponding to the first bluetooth broadcast request, the timing time of the countdown timer is not updated. Therefore, whether the current residual broadcasting time length is larger than the to-be-broadcasted time length corresponding to the first Bluetooth broadcasting request or not can ensure the timing time length of the updated countdown timer, and the broadcasting content corresponding to the first Bluetooth broadcasting request can be completely broadcasted.
Further, after S1002, referring to fig. 10C, the method further includes S1003-S1007, where:
S1003, when the residual broadcasting duration of the current Bluetooth is 0 according to the timing time of the third timer, the Bluetooth monitor sends a call request of the Bluetooth broadcasting stop interface to the Bluetooth.
S1004, the Bluetooth monitor updates the current Bluetooth broadcasting state to a stop-in state.
S1005, bluetooth responds to a call request of a Bluetooth broadcasting stop interface to stop Bluetooth broadcasting.
S1006, after the Bluetooth broadcasting is stopped successfully, the Bluetooth sends second call success information to the Bluetooth monitor.
The second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully.
S1007. when the bluetooth monitor receives the second call success information fed back by bluetooth, the current bluetooth broadcast state is updated from the stopped state to the idle state.
The specific implementation process of S1003-S1007 may refer to the description in the foregoing embodiment, and will not be repeated here.
In the technical scheme provided by the embodiment of the application, when the Bluetooth broadcasting state is the broadcasting state and the first Bluetooth broadcasting request is received, the Bluetooth monitor updates the timing time of the third timer while executing the broadcasting operation corresponding to the first Bluetooth broadcasting request in the broadcasting state. Therefore, the broadcast content corresponding to the first Bluetooth broadcast request can be completely broadcast in the broadcast state, and the possibility that the Bluetooth broadcast message is lost is reduced.
Furthermore, in some embodiments, the third timer may fail. When the third timer expires, the bluetooth monitor will not call the bluetooth broadcast stop interface after the bluetooth broadcast of the currently executed bluetooth broadcast request is completed, resulting in that the bluetooth broadcast is always in a broadcast state. To avoid this, it may be timed after determining that the bluetooth broadcast corresponding to the current bluetooth broadcast request is completed, and if the bluetooth monitor does not call the bluetooth broadcast stop interface according to the time counted by the third timer for a period of time after the bluetooth broadcast corresponding to the bluetooth broadcast request is completed, the bluetooth monitor may forcibly stop the bluetooth broadcast.
In some embodiments, after S902, the method further comprises: when the third timer is out of order, the Bluetooth monitor calls a Bluetooth broadcasting stop interface of Bluetooth and updates the current Bluetooth broadcasting state to a stop-in state. And when receiving second call success information fed back by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to the idle state.
In some embodiments, the third timer failure may specifically include an inaccurate timing of the countdown timer. Illustratively, the inaccuracy of the timing of the timer may include: the timing time of the third timer is stopped unchanged, the timing speed of the timing time of the third timer is inaccurate, and the like. In this embodiment, the bluetooth monitor may immediately invoke the bluetooth broadcast stop interface to turn off the bluetooth broadcast upon detecting that the third timer expires.
In other embodiments, taking the third timer as a countdown timer as an example, the third timer may expire without triggering the bluetooth monitor to call the bluetooth broadcast stop interface after the count time of the countdown timer becomes 0, and so on. In this embodiment, the bluetooth monitor may start counting from the count-down time to 0. If the duration after the count-down time becomes 0 is monitored to reach the fifth preset time, the third timer is determined to be disabled. At this time, the bluetooth monitor may immediately call the bluetooth broadcast stop interface to turn off the bluetooth broadcast.
The third timer may be the same as the first timer and the second timer, or may be different from the first timer and the second timer.
In the technical scheme provided by the embodiment of the application, when the Bluetooth monitor cannot close the Bluetooth broadcast when the Bluetooth broadcast is completed, the Bluetooth monitor can immediately call the Bluetooth broadcast stopping interface to close the Bluetooth broadcast when the third timer is determined to be invalid. Therefore, the problem that unnecessary power consumption is caused by the fact that the Bluetooth broadcasting is still in a broadcasting state for a long time after the current Bluetooth broadcasting is finished can be avoided, and the electric quantity is saved.
In other embodiments, when the determination result in S901 is yes, the bluetooth monitor needs to restart the bluetooth broadcast, as shown in fig. 11, and the method further includes S1101-S1105. In the flow shown in fig. 11, the execution flow when the determination result of S901 is no is not shown, in which:
s1101, the Bluetooth monitor responds to the first Bluetooth broadcasting request and sends a call request of the Bluetooth broadcasting stop interface to Bluetooth.
S1102, the Bluetooth monitor updates the Bluetooth broadcasting state from the broadcasting state to the stopping state.
And S1103, the Bluetooth responds to a call request of the Bluetooth broadcasting stop interface to stop Bluetooth broadcasting.
S1104, after the Bluetooth broadcasting is stopped successfully, bluetooth sends second call success information to the Bluetooth monitor.
The second call success information is used for indicating that the call of the Bluetooth broadcasting stop interface is successful.
S1105. after receiving the second call success information, the bluetooth monitor updates the bluetooth broadcast status from the stopped status to the idle status.
In the technical scheme provided by the embodiment of the application, the preset periodic broadcast is set to indicate to restart the Bluetooth broadcast, namely the Bluetooth broadcast is restarted at intervals, so that the possible problems of Bluetooth caused by long-time continuous broadcast of the Bluetooth broadcast, such as unnecessary power consumption and the like, are avoided.
In addition, the preset periodic broadcast may also correspond to actual broadcast content. In some embodiments, the preset periodic broadcast is also used to broadcast current device state information of the handset. The device state information is used for indicating the current state of the mobile phone; in some embodiments, the device status information of the mobile phone may specifically include whether a WiFi switch of the mobile phone is turned on, a network name to which WiFi is connected, and a WiFi network quality, etc.
In this embodiment, after S1105, the method further includes: and the Bluetooth monitor executes a broadcasting operation corresponding to the preset periodical broadcasting by calling the Bluetooth interface so as to broadcast the current equipment state information of the electronic equipment.
In some embodiments, the bluetooth monitor performs the broadcasting operation corresponding to the preset periodic broadcasting by calling the bluetooth interface to broadcast the current device state information of the electronic device, and the process of performing the broadcasting operation corresponding to the preset periodic broadcasting by the bluetooth monitor may be performed with reference to the flow shown in fig. 5B because the current bluetooth broadcasting state is an idle state. That is, the bluetooth monitor invokes the bluetooth broadcast start interface, and then updates the bluetooth broadcast message to a broadcast message corresponding to a preset periodic broadcast after the bluetooth broadcast is successfully started. Therefore, the Bluetooth broadcasts the corresponding broadcast message content of the preset periodic broadcast, namely the current equipment state information of the mobile phone.
In the technical scheme provided by the embodiment of the application, the preset periodic broadcast is set to broadcast the latest equipment state information of the mobile phone at preset time intervals, so that the connection between the mobile phone and other electronic equipment can be maintained.
In some embodiments, as shown in fig. 12, a complete flow chart of a processing method of a bluetooth broadcast request according to an embodiment of the application is shown. In this example, the first preset time and the second preset time are each set to 100ms, the fourth preset time is set to 500ms, and the fifth preset time is set to 100 ms.
The bluetooth monitor receives a second bluetooth broadcast request in an idle state, and the second bluetooth broadcast request is a broadcast request of a preset periodic broadcast. The bluetooth monitor later receives a first bluetooth broadcast request, which is a broadcast request triggered by the user that the WiFi switch is off (WiFi offline). And the duration to be broadcasted corresponding to the preset periodic broadcast is 5s. The following illustrates a scenario of the processing method of the bluetooth broadcast request.
The bluetooth monitor is performing a broadcasting operation corresponding to a preset periodic broadcasting in response to the second bluetooth broadcasting request. Normally, in response to the second bluetooth broadcast request, the bluetooth broadcast state is sequentially updated from the idle state to the active state, the broadcast state and the inactive state, and then from the inactive state to the idle state.
If the current bluetooth broadcast state is an active state, the bluetooth monitor receives a first bluetooth broadcast request. At this time, since the current bluetooth broadcast status is an unavailable status, a first waiting status is required to be entered for the first bluetooth broadcast request. After the Bluetooth monitor updates the current Bluetooth broadcasting state to the broadcasting state based on the second Bluetooth broadcasting request, the Bluetooth monitor updates the Bluetooth message aiming at the first Bluetooth broadcasting request so as to broadcast the message that the WiFi switch is disconnected.
If the current bluetooth broadcast state is an in-broadcast state, the bluetooth monitor receives a first bluetooth broadcast request. At this time, since the current bluetooth broadcasting state is the broadcasting state, if the remaining broadcasting duration of the preset periodic broadcasting is 3s (broadcasted 2 s), and since 3s is greater than 500ms, it is determined that the current remaining broadcasting duration is sufficient to broadcast the broadcasting content corresponding to the first bluetooth broadcasting request. Therefore, at this time, the bluetooth monitor may update the broadcast message of bluetooth directly based on the first bluetooth broadcast request to broadcast the broadcast content corresponding to the first bluetooth broadcast request.
If the current bluetooth broadcast state is a stop-in state, the bluetooth monitor receives a first bluetooth broadcast request. At this time, since the current bluetooth broadcast status is an unavailable status, a first waiting status is required to be entered for the first bluetooth broadcast request. And after the Bluetooth monitor updates the current Bluetooth broadcasting state to the idle state based on the second Bluetooth broadcasting request, the Bluetooth monitor calls a Bluetooth broadcasting starting interface for starting Bluetooth aiming at the first Bluetooth broadcasting request, and broadcasts broadcasting content corresponding to the first Bluetooth broadcasting request through the Bluetooth.
Other embodiments of the present application provide a computer device, which may be an electronic device (e.g., a cell phone) as described above. The computer device may include: a memory and one or more processors. The memory is coupled to the processor. The memory is also used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the computer device may perform the functions or steps performed by the handset in the method embodiments described above. When the computer device is an electronic device, the structure thereof may refer to the structure of the electronic device 100 shown in fig. 3.
The present application also provides a chip system, as shown in fig. 13, where the chip system 130 includes at least one processor 1301 and at least one interface circuit 1302. The processor 1301 and the interface circuit 1302 may be interconnected by wires. For example, interface circuit 1302 may be used to receive signals from other devices (e.g., a memory of a computer apparatus). For another example, interface circuit 1302 may be used to send signals to other devices (e.g., processor 1301). Illustratively, the interface circuit 1302 may read instructions stored in the memory and send the instructions to the processor 1301. The instructions, when executed by processor 1301, may cause a computer device to perform the various steps of the embodiments described above. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
Embodiments of the present application also provide a computer-readable storage medium including computer instructions that, when executed on an electronic device (e.g., a mobile phone) described above, cause the electronic device to perform the functions or steps performed by the mobile phone in the method embodiments described above.
The embodiment of the application also provides a computer program product, which when run on a computer, causes the computer to execute the functions or steps executed by the mobile phone in the method embodiment. The computer may be an electronic device, such as a cell phone.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (19)

1. A processing method of a bluetooth broadcast request, which is characterized in that the method is applied to electronic equipment; the electronic equipment comprises Bluetooth and a Bluetooth monitor, the electronic equipment calls an interface of the Bluetooth through the Bluetooth monitor, and the method comprises the following steps:
Responding to a first Bluetooth broadcasting request, and acquiring a current Bluetooth broadcasting state stored in the Bluetooth monitor by the Bluetooth monitor;
Under the condition that the current Bluetooth broadcasting state is determined to be a first Bluetooth broadcasting state, the Bluetooth monitor enters a first waiting state; the first Bluetooth broadcasting state comprises a starting state or a stopping state;
In the first waiting state, the Bluetooth monitor monitors call information sent by the Bluetooth;
After receiving the call success information sent by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state to a second Bluetooth broadcasting state and responds to the first Bluetooth broadcasting request to execute Bluetooth broadcasting operation; the call information comprises the call success information; the call success information is used for indicating that the Bluetooth broadcasting start interface is successfully called or that the Bluetooth broadcasting stop interface is successfully called; the second bluetooth broadcast state includes an idle state or an in-broadcast state.
2. The method of claim 1, wherein after the bluetooth monitor enters a first wait state, the method further comprises:
in the first waiting state, the Bluetooth monitor acquires a first stay time of the Bluetooth in the first Bluetooth broadcasting state;
And if the first stay time does not exceed a first preset time, the Bluetooth monitor maintains the first waiting state.
3. The method of claim 1, wherein after the bluetooth monitor enters a first wait state, the method further comprises:
in the first waiting state, the Bluetooth monitor acquires a first stay time of the Bluetooth in the first Bluetooth broadcasting state;
If the first residence time exceeds a first preset time, the Bluetooth monitor calls an interface of the Bluetooth;
Wherein, the interface of the bluetooth comprises a bluetooth broadcast stop interface under the condition that the first bluetooth broadcast state is a start-in state; and under the condition that the first Bluetooth broadcasting state is in a stop state, the Bluetooth interface comprises a Bluetooth broadcasting starting interface.
4. A method according to any one of claims 1-3, wherein said bluetooth monitor updating the current bluetooth broadcast state to a second bluetooth broadcast state after receiving call success information for said bluetooth transmission, comprising:
After receiving the first call success information sent by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state into a broadcasting state; the first call success information is used for indicating that the Bluetooth broadcast starting interface is successfully called;
after receiving the second call success information sent by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state to an idle state; the second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully.
5. A method according to any of claims 1-3, wherein after the bluetooth monitor obtains the current bluetooth broadcast status in response to the first bluetooth broadcast request, the method further comprises:
under the condition that the current Bluetooth broadcasting state is determined to be the idle state, the Bluetooth monitor responds to the first Bluetooth broadcasting request and calls a Bluetooth broadcasting starting interface of the Bluetooth;
the Bluetooth monitor updates the current Bluetooth broadcasting state from the idle state to an in-starting state;
After receiving the first call success information fed back by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state from the starting state to the broadcasting state; the first call success information is used for indicating that the Bluetooth broadcast starting interface is successfully called;
The Bluetooth monitor updates the broadcast message of the Bluetooth based on the first Bluetooth broadcast request; the updated broadcast message is used for broadcasting by the Bluetooth.
6. The method of claim 5, wherein after the bluetooth monitor invokes the bluetooth broadcast initiation interface of bluetooth in response to the first bluetooth broadcast request, the method further comprises:
The Bluetooth monitor sets a first timer based on the duration to be broadcasted corresponding to the first Bluetooth broadcasting request, and the first timer starts to count;
wherein after the bluetooth monitor updates the broadcast message of the bluetooth based on the first bluetooth broadcast request, the method further comprises:
when the residual broadcasting duration of the Bluetooth is 0 according to the timing time of the first timer, the Bluetooth monitor calls a Bluetooth broadcasting stopping interface of the Bluetooth and updates the current Bluetooth broadcasting state into a stopping state;
After receiving the second call success information fed back by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to an idle state; the second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully.
7. The method of claim 5, wherein before the bluetooth monitor invokes the bluetooth broadcast initiation interface of bluetooth in response to the first bluetooth broadcast request, the method further comprises:
Under the condition that the current Bluetooth broadcasting state is determined to be the idle state, the Bluetooth monitor acquires the second stay time of the Bluetooth in the idle state;
Wherein, the bluetooth monitor responds to the first bluetooth broadcast request and calls a bluetooth broadcast starting interface of the bluetooth, and the bluetooth broadcast starting interface comprises:
and under the condition that the second stay time exceeds a second preset time, the Bluetooth monitor responds to the first Bluetooth broadcasting request and calls a Bluetooth broadcasting starting interface of the Bluetooth.
8. The method according to claim 6 or 7, wherein the bluetooth monitor, in response to the first bluetooth broadcast request, invokes a bluetooth broadcast initiation interface of the bluetooth, comprising:
The Bluetooth monitor sends a call request of a Bluetooth broadcast starting interface to the Bluetooth; the call request comprises a third preset time, and the third preset time is used for indicating the Bluetooth to turn off Bluetooth broadcasting at a time point corresponding to the third preset time from the current time.
9. The method of any of claims 1-3, 6 or 7, wherein after the bluetooth monitor obtains the current bluetooth broadcast status in response to the first bluetooth broadcast request, the method further comprises:
under the condition that the current Bluetooth broadcasting state is determined to be the broadcasting state, the Bluetooth monitor updates the Bluetooth broadcasting message based on the first Bluetooth broadcasting request; the updated broadcast message is used for broadcasting by the Bluetooth.
10. The method of claim 9, wherein prior to the bluetooth monitor updating the bluetooth broadcast message based on the first bluetooth broadcast request, the method further comprises:
the Bluetooth monitor judges whether the broadcast content corresponding to the first Bluetooth broadcast request is a preset periodic broadcast or not; the preset periodic broadcast is used for indicating the Bluetooth monitor to restart the Bluetooth broadcast;
The bluetooth monitor updates the bluetooth broadcast message based on the first bluetooth broadcast request, including:
And the Bluetooth monitor updates the Bluetooth broadcasting message based on the first Bluetooth broadcasting request under the condition that the broadcasting content corresponding to the first Bluetooth broadcasting request is not the preset periodical broadcasting.
11. The method of claim 9, wherein prior to the bluetooth monitor updating the bluetooth broadcast message based on the first bluetooth broadcast request, the method further comprises:
the Bluetooth monitor acquires the timing time of the second timer; the timing time of the second timer is used for indicating the residual broadcast duration of the Bluetooth;
The bluetooth monitor updates the bluetooth broadcast message based on the first bluetooth broadcast request, including:
When the current residual broadcast duration of the Bluetooth exceeds a fourth preset time according to the timing time of the second timer, the Bluetooth monitor updates the broadcast message of the Bluetooth based on the first Bluetooth broadcast request; the fourth preset time is used for indicating a minimum broadcast duration required by bluetooth broadcasting.
12. The method of claim 11, wherein after the bluetooth monitor obtains the timing time of the second timer, the method further comprises:
when the current residual broadcasting time of the Bluetooth does not exceed the fourth preset time according to the timing time of the second timer, the Bluetooth monitor enters a second waiting state;
in the second waiting state, the Bluetooth monitor monitors calling information fed back by the Bluetooth;
after receiving the second call success information of the Bluetooth feedback, the Bluetooth monitor updates the current Bluetooth broadcasting state to an idle state, and the Bluetooth monitor responds to the first Bluetooth broadcasting request to execute Bluetooth broadcasting operation; the second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully.
13. The method of claim 9, wherein after the bluetooth monitor obtains the current bluetooth broadcast status in response to the first bluetooth broadcast request, the method further comprises:
In the case that the current Bluetooth broadcasting state is determined to be the broadcasting state, the Bluetooth monitor updates the timing time of a third timer based on the first Bluetooth broadcasting request, and the third timer restarts timing; the timing time of the third timer is used for indicating the current residual broadcasting duration of the Bluetooth;
wherein after the bluetooth monitor updates the broadcast message of the bluetooth based on the first bluetooth broadcast request, the method further comprises:
When the residual broadcasting duration of the Bluetooth is 0 according to the timing time of the third timer, the Bluetooth monitor calls a Bluetooth broadcasting stop interface of the Bluetooth and updates the current Bluetooth broadcasting state into a stopped state;
After receiving the second call success information fed back by the Bluetooth, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to an idle state; the second call success information is used for indicating that the Bluetooth broadcasting stops calling the interface successfully.
14. The method of claim 13, wherein the third timer is a countdown timer, the countdown time of the countdown timer being used to indicate a current remaining broadcast duration of the bluetooth;
The bluetooth monitor updates a timing time of a third timer based on the first bluetooth broadcast request, comprising:
The Bluetooth monitor acquires the duration to be broadcasted corresponding to the first Bluetooth broadcasting request;
the Bluetooth monitor compares the countdown time with the duration to be broadcasted;
if the time length to be broadcasted is longer than the countdown time, the Bluetooth monitor updates the countdown time of the countdown timer to the time length to be broadcasted corresponding to the first Bluetooth broadcast request;
and if the countdown time is longer than the duration to be broadcasted, the Bluetooth monitor keeps the timing time of the countdown timer unchanged.
15. The method of claim 13, wherein after the bluetooth monitor updates the bluetooth broadcast message based on the first bluetooth broadcast request, the method further comprises:
When the third timer is invalid, the Bluetooth monitor calls a Bluetooth broadcasting stop interface of the Bluetooth and updates the current Bluetooth broadcasting state into a stop-in state;
After receiving the second call success information of the Bluetooth feedback, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to an idle state.
16. The method according to any one of claims 10-15, further comprising:
when the Bluetooth monitor determines that the broadcasting content corresponding to the first Bluetooth broadcasting request is the preset periodic broadcasting, the Bluetooth broadcasting stopping interface of the Bluetooth is called, and the current Bluetooth broadcasting state is updated from the broadcasting state to the stopping state;
After receiving the second call success information of the Bluetooth feedback, the Bluetooth monitor updates the current Bluetooth broadcasting state from the stopped state to an idle state.
17. The method of claim 16, wherein the preset periodic broadcast is further for broadcasting current device state information of the electronic device;
after the bluetooth monitor updates the current bluetooth broadcast state from the inactive state to an idle state, the method further comprises:
and the Bluetooth monitor executes the broadcasting operation corresponding to the preset periodical broadcasting by calling the Bluetooth interface so as to broadcast the current equipment state information of the electronic equipment.
18. An electronic device, the electronic device comprising: a processor and a memory; the memory has stored therein computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform the method of any of claims 1-17.
19. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-17.
CN202310154910.4A 2023-02-10 2023-02-10 Bluetooth broadcast request processing method and device Active CN117135600B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310154910.4A CN117135600B (en) 2023-02-10 2023-02-10 Bluetooth broadcast request processing method and device
CN202410662215.3A CN118540684A (en) 2023-02-10 2023-02-10 Bluetooth broadcast request processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310154910.4A CN117135600B (en) 2023-02-10 2023-02-10 Bluetooth broadcast request processing method and device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202410662215.3A Division CN118540684A (en) 2023-02-10 2023-02-10 Bluetooth broadcast request processing method and device

Publications (2)

Publication Number Publication Date
CN117135600A CN117135600A (en) 2023-11-28
CN117135600B true CN117135600B (en) 2024-06-07

Family

ID=88858879

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202310154910.4A Active CN117135600B (en) 2023-02-10 2023-02-10 Bluetooth broadcast request processing method and device
CN202410662215.3A Pending CN118540684A (en) 2023-02-10 2023-02-10 Bluetooth broadcast request processing method and device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202410662215.3A Pending CN118540684A (en) 2023-02-10 2023-02-10 Bluetooth broadcast request processing method and device

Country Status (1)

Country Link
CN (2) CN117135600B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104936211A (en) * 2015-04-27 2015-09-23 深圳市金立通信设备有限公司 Wireless resource distribution method
CN104967971A (en) * 2015-06-26 2015-10-07 飞天诚信科技股份有限公司 Method achieving bluetooth automatic return connection in Android system
CN107493563A (en) * 2017-08-31 2017-12-19 大唐终端技术有限公司 A kind of bluetooth realizes the method and system of group's intercommunication
CN110300392A (en) * 2018-03-21 2019-10-01 福神科技有限公司 Blue tooth transmission system and teaching method based on blue tooth transmission system
CN111050199A (en) * 2019-11-19 2020-04-21 青岛海信电器股份有限公司 Display device and scheduling method of Bluetooth communication resources of display device
CN111263339A (en) * 2020-01-14 2020-06-09 华为技术有限公司 Wireless communication method and device with wireless communication function
CN112068741A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Display device and display method for Bluetooth switch state of display device
CN112866926A (en) * 2021-01-07 2021-05-28 凯联医疗科技(上海)有限公司 Method for improving reliability of Bluetooth connection in Bluetooth time-sharing broadcast
CN114585062A (en) * 2022-04-13 2022-06-03 哈工大机器人(合肥)国际创新研究院 Bluetooth-based energy-saving connection method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018076604A1 (en) * 2016-10-25 2018-05-03 华为技术有限公司 Bluetooth pairing method and terminal device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104936211A (en) * 2015-04-27 2015-09-23 深圳市金立通信设备有限公司 Wireless resource distribution method
CN104967971A (en) * 2015-06-26 2015-10-07 飞天诚信科技股份有限公司 Method achieving bluetooth automatic return connection in Android system
CN107493563A (en) * 2017-08-31 2017-12-19 大唐终端技术有限公司 A kind of bluetooth realizes the method and system of group's intercommunication
CN110300392A (en) * 2018-03-21 2019-10-01 福神科技有限公司 Blue tooth transmission system and teaching method based on blue tooth transmission system
CN112068741A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Display device and display method for Bluetooth switch state of display device
CN111050199A (en) * 2019-11-19 2020-04-21 青岛海信电器股份有限公司 Display device and scheduling method of Bluetooth communication resources of display device
CN111263339A (en) * 2020-01-14 2020-06-09 华为技术有限公司 Wireless communication method and device with wireless communication function
CN112866926A (en) * 2021-01-07 2021-05-28 凯联医疗科技(上海)有限公司 Method for improving reliability of Bluetooth connection in Bluetooth time-sharing broadcast
CN114585062A (en) * 2022-04-13 2022-06-03 哈工大机器人(合肥)国际创新研究院 Bluetooth-based energy-saving connection method and system

Also Published As

Publication number Publication date
CN118540684A (en) 2024-08-23
CN117135600A (en) 2023-11-28

Similar Documents

Publication Publication Date Title
WO2023284415A1 (en) Power key mistouch detection method and electronic device
CN114461240A (en) Software upgrading method, software upgrading system and electronic equipment
WO2023000777A9 (en) Method for performing restarting during upgrade process of recovery mode, and terminal
CN115328563A (en) System starting method and electronic equipment
CN117135600B (en) Bluetooth broadcast request processing method and device
CN111158735B (en) Hot patch file processing method and communication terminal
CN112764812B (en) Electronic device and control method thereof
CN113642010A (en) Method for acquiring data of extended storage device and mobile terminal
CN116719556B (en) System upgrading method and electronic equipment
CN117135263B (en) Log information acquisition method, electronic device and computer readable storage medium
EP4436265A1 (en) Control method for cellular network, and electronic device
CN115297467B (en) Data domain switching method, device, terminal equipment and medium
CN117119097B (en) Method, equipment and storage medium for incoming call resonance
CN117130809B (en) Method and device for detecting running state of application
CN117729561B (en) System upgrading method, terminal and storage medium
CN117909070B (en) Information transmission method, electronic device, storage medium and chip system
CN116708647B (en) Notification message reply method and electronic equipment
CN115514840B (en) Method, system, equipment and readable storage medium for notifying message prompt
CN111385416B (en) Electronic equipment and alarm clock processing method
CN114615649A (en) Intercom terminal and speaking right request method thereof
CN113254052A (en) Firmware upgrading method for ink screen hard decoding chip and terminal equipment
CN115150265A (en) Method, equipment and device for processing dual-system data
CN115659367A (en) Data processing method, device, terminal equipment and medium
CN117729425A (en) Camera distribution method and electronic equipment
CN118368321A (en) Link processing method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant