WO2023030071A1 - Broadcast message transmitting method and apparatus, and electronic device and storage medium - Google Patents
Broadcast message transmitting method and apparatus, and electronic device and storage medium Download PDFInfo
- Publication number
- WO2023030071A1 WO2023030071A1 PCT/CN2022/113981 CN2022113981W WO2023030071A1 WO 2023030071 A1 WO2023030071 A1 WO 2023030071A1 CN 2022113981 W CN2022113981 W CN 2022113981W WO 2023030071 A1 WO2023030071 A1 WO 2023030071A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- electronic device
- state
- preset
- signal strength
- broadcast message
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 86
- 230000005540 biological transmission Effects 0.000 claims description 123
- 238000010586 diagram Methods 0.000 description 13
- 238000012545 processing Methods 0.000 description 11
- 230000000875 corresponding effect Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 5
- 230000004044 response Effects 0.000 description 5
- 238000013507 mapping Methods 0.000 description 4
- 238000013459 approach Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B17/00—Monitoring; Testing
- H04B17/30—Monitoring; Testing of propagation channels
- H04B17/309—Measuring or estimating channel quality parameters
- H04B17/318—Received signal strength
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/12—Messaging; Mailboxes; Announcements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/04—TPC
- H04W52/18—TPC being performed according to specific parameters
- H04W52/26—TPC being performed according to specific parameters using transmission rate or quality of service QoS [Quality of Service]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Definitions
- the present application relates to the technical field of electronic equipment, and more specifically, to a method and device for transmitting a broadcast message, an electronic equipment, and a storage medium.
- the present application proposes a broadcast message transmitting method, device, electronic equipment and storage medium to solve the above problems.
- the embodiment of the present application provides a method for transmitting a broadcast message, which is applied to a first electronic device.
- the method includes: according to the state of the first electronic device, from at least two preset transmission power Determine the target transmission power, wherein the at least two preset transmission powers are different in magnitude; transmit a broadcast message based on the target transmission power to indicate that the second electronic device that has received the broadcast message is determining the broadcast message When the received signal strength of the target is greater than the received signal strength threshold, the target information is displayed.
- the embodiment of the present application provides a method for transmitting a broadcast message, which is applied to a second electronic device, and the method includes: acquiring the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the The broadcast message is transmitted by the first electronic device based on a target transmission power, and the target transmission power is determined from at least two preset transmission powers by the first electronic device according to its state, and the at least two The preset transmit power is different; when the received signal strength is greater than the received signal strength threshold, target information is displayed.
- the embodiment of the present application provides a device for transmitting a broadcast message, which is applied to a first electronic device, and the device includes: a transmit power determination module, configured to, according to the state of the first electronic device, from Determine the target transmission power among at least two preset transmission powers, wherein the at least two preset transmission powers are different in size; the broadcast message transmission module is configured to transmit a broadcast message based on the target transmission power to indicate that the received When the second electronic device that broadcasts the message determines that the received signal strength of the broadcast message is greater than the received signal strength threshold, display the target information.
- a transmit power determination module configured to, according to the state of the first electronic device, from Determine the target transmission power among at least two preset transmission powers, wherein the at least two preset transmission powers are different in size
- the broadcast message transmission module is configured to transmit a broadcast message based on the target transmission power to indicate that the received
- the second electronic device that broadcasts the message determines that the received signal strength of the broadcast message is greater than the received signal strength threshold, display the target
- the embodiment of the present application provides a device for transmitting a broadcast message, which is applied to a second electronic device, and the device includes: a received signal strength acquisition module, configured to obtain the received broadcast message transmitted by the first electronic device The received signal strength of , wherein, the broadcast message is transmitted by the first electronic device based on a target transmission power, and the target transmission power is selected from at least two preset transmission powers by the first electronic device according to its state It is determined that the at least two preset transmit powers are different in size; the prompt information display module is configured to display target information when the received signal strength is greater than a received signal strength threshold.
- the embodiment of the present application provides an electronic device, including a memory and a processor, the memory is coupled to the processor, and the memory stores instructions, which are executed when the instructions are executed by the processor.
- the processor executes the above method.
- the embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the above method.
- Figure 1 shows a schematic diagram of the first application environment that can be used in the embodiment of the present application
- Figure 2 shows a schematic diagram of a second application environment that can be used in the embodiment of the present application
- FIG. 3 shows a schematic diagram of a third application environment that can be used in the embodiment of the present application
- FIG. 4 shows a schematic diagram of a fourth application environment that can be used in the embodiment of the present application
- Fig. 5 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application
- FIG. 6 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application
- FIG. 7 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application
- FIG. 8 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application
- FIG. 9 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application.
- FIG. 10 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application
- FIG. 11 shows an exemplary flow chart that can be used in the embodiment of the present application.
- FIG. 12 shows a block diagram of a device for transmitting a broadcast message according to an embodiment of the present application
- Fig. 13 shows a block diagram of a device for transmitting a broadcast message provided by an embodiment of the present application.
- FIG. 14 shows a block diagram of an electronic device for performing a method for transmitting a broadcast message according to an embodiment of the present application in an embodiment of the present application;
- Fig. 15 shows a storage unit for storing or carrying program codes for implementing the broadcast message transmitting method according to the embodiment of the present application according to the embodiment of the present application.
- the Internet of Things is a network concept based on the "Internet concept" that extends and expands its client terminal to any item and item for information exchange and communication.
- IOT Internet of Things
- the configuration scenario multiple electronic devices may be involved, and the multiple electronic devices have a certain linkage relationship and can work together.
- the configured scenario may include that when one electronic device is close to another electronic device, at least one of the two electronic devices will perform a specified operation, for example, one of the electronic devices outputs connection prompt information, and the connection prompt information uses For prompting connection with another electronic device.
- the second electronic device 100 may be a user terminal (for example, may be a smart phone), and the first electronic device 200 may be a smart home device, which may include electronic devices such as smart TVs, air conditioners, and curtains.
- the control interface of the first electronic device 200 is displayed on the second electronic device 100, and the user can control the first electronic device 200 through the second electronic device 100
- the interface controls the first electronic device 200 to perform corresponding actions.
- the second electronic device 100 displays the connection prompt information of the first electronic device 200 , and the user can establish a connection between the second electronic device 100 and the first electronic device 200 through the connection prompt information displayed by the second electronic device 100 .
- the second electronic device 100 may be a user terminal (for example, may be a smart phone), and the first electronic device 200 may be a true wireless Bluetooth headset (true wireless stereo, TWS) device.
- the second electronic device 100 displays pop-up information 110, in which the power of the TWS Bluetooth headset can be displayed, and connection prompt information can be displayed.
- the TWS Bluetooth earphone device may include an earphone 220 and an earphone box (charging device) 210.
- the earphone box 210 can accommodate the earphone 220.
- the inner wall of the earphone box 210 forms an accommodating cavity, and the earphone 220 can be accommodated in Inside the accommodating chamber of the earphone box 210 .
- the earphone box 210 can not only provide a cavity for accommodating the earphone 220, but also can communicate with the earphone 220, so as to obtain information such as the power and name of the earphone 220, or the network parameters of the earphone 220, so that the user terminal can pass through the earphone box 210.
- the pairing with the earphone 220 is successful and the communication connection is realized.
- the earphone box 210 is also used for charging the earphone 220 .
- the earphone 220 when the earphone box 210 is opened, the earphone 220 can be triggered to transmit a Bluetooth low energy (bluetooh low energy, BLE) broadcast, and the second electronic device 100, such as a smart phone, after receiving the BLE broadcast , a pop-up box can pop up, and the pop-up box can provide the user with an operation interface for quickly connecting the earphone 220, or can simultaneously display the power of the earphone 220 and the power of the earphone box 210 in the pop-up box information.
- BLE Bluetooth low energy
- the distance between two electronic devices can be determined by the received signal strength of another electronic device received by one electronic device.
- the ranging formula is as follows:
- d represents the distance between two electronic devices
- RSSI represents the received signal strength of another electronic device received by one electronic device
- A is a reference distance, usually a constant
- B is a path loss factor.
- the two electronic devices are the second electronic device 100 and the first electronic device 200 respectively
- the first electronic device 200 when the first electronic device 200 activates the wireless communication module, the first electronic device 200 transmits a broadcast message to the surrounding .
- the second electronic device 100 is a user terminal
- the first electronic device 200 is a TWS Bluetooth earphone device
- the cover of the earphone box 210 is closed state, then at this time, the earphone box 210 will not transmit broadcast messages to the surroundings, that is, as shown in FIG.
- the box cover of the second electronic device 100 is in an open state.
- the earphone 220 transmits a broadcast message, which can be received by the second electronic device 100, and the received signal strength of the received broadcast message is greater than the signal strength.
- the threshold is reached, pop-up message 110 is displayed.
- the wireless communication module can be a Wi-Fi module or a Bluetooth module.
- the wireless communication module can be a Bluetooth module.
- the second electronic device 100 and the first electronic device 200 If they can be connected via Bluetooth, the broadcast message can be a Bluetooth broadcast message, for example, a BLE broadcast.
- the second electronic device 100 can detect the broadcast message of the first electronic device 200, and then can determine the broadcast message received by the first electronic device 200 The signal strength of the message, that is, the received signal strength.
- the received signal strength of the second electronic device 100 gradually increases.
- the second electronic device 100 displays pop-up information, and then the first electronic device 00 and the first electronic device 200 can establish a wireless connection (for example, a Bluetooth connection).
- connection button is displayed in the bullet box information 110 displayed by the second electronic device 100, such as the connection control 111 shown in FIG. connection between.
- Electronic devices can support the function of quickly discovering other electronic devices and displaying prompts.
- the judgment of whether to display prompt information by electronic devices is mainly based on the received signal strength of broadcast messages transmitted by other electronic devices and the set signal strength threshold. for a direct comparison. That is to say, other electronic devices will directly transmit the broadcast message according to the preset transmission power, and will not perform different processing for different scenarios, so that the prompt information of the electronic device that receives the broadcast message will be displayed incorrectly, resulting in Disturb the user and affect the user experience.
- the inventor found after a long period of research, and proposed the transmission method, device, electronic equipment and storage medium of the broadcast message provided by the embodiment of the present application, by dynamically determining the target transmission power according to the state of the electronic equipment.
- the transmission of the broadcast message is used for other electronic devices to determine the display of the prompt information, so as to better control the display of the prompt information, avoid disturbing the user and improve the user experience.
- the method for transmitting the broadcast message will be described in detail in the following embodiments.
- FIG. 5 shows a schematic flowchart of a method for transmitting a broadcast message according to an embodiment of the present application.
- the method is used to dynamically determine the target transmission power according to the state of the electronic device to transmit the broadcast message, so that other electronic devices can determine the display of the prompt information, so as to better control the display of the prompt information and avoid the inconvenience to the user. Disturb to improve user experience.
- the broadcast message transmitting method is applied to the broadcast message transmitting device 300 shown in Figure 12 and the electronic device (first electronic device) 500 configured with the broadcast message transmitting device 300 ( Figure 14) .
- the first electronic device applied in this embodiment may be a smart phone, a tablet computer, a wearable electronic device, a bluetooth earphone, etc., which is not limited here.
- the process shown in Figure 5 will be described in detail below, and the method for transmitting a broadcast message may specifically include the following steps:
- Step S110 According to the state of the first electronic device, determine a target transmission power from at least two preset transmission powers, wherein the at least two preset transmission powers are different in magnitude.
- the first electronic device can acquire its current state.
- the state of the first electronic device may include a pairing state and a reconnection state.
- the first electronic device may acquire its current state before the broadcast message is about to be transmitted.
- the first electronic device is a TWS Bluetooth earphone and the second electronic device is a smart phone as an example for illustration.
- the earphone box (charging device) accommodated by the TWS Bluetooth headset is turned on, the TWS Bluetooth headset can automatically turn on and try to transmit a broadcast message to try to establish a Bluetooth connection with the smartphone, then the TWS Bluetooth headset can obtain its the state you are in.
- the headphone box of the TWS Bluetooth headset is closed, the TWS Bluetooth headset can automatically turn off and stop transmitting broadcast messages, and at this time, the TWS Bluetooth headset may not obtain its state.
- the first electronic device may acquire the status of the first electronic device in response to the instruction information.
- the first electronic device may acquire the state of the first electronic device in response to the target touch operation when detecting the target touch operation performed by the user on the first electronic device.
- the first electronic device may acquire the state of the first electronic device in response to the target voice information.
- the first electronic device detects the preset time, it may acquire the status of the first electronic device in response to the preset time.
- a preset environmental state preset temperature, preset humidity, preset light intensity, preset brightness, etc.
- Zhu Hangtian acquires the first electronic device in response to the preset environment. the state you are in.
- the first electronic device may determine the state of the first electronic device based on its connection record. Wherein, when the first electronic device has a connection record, it can be determined that the state of the first electronic device is the reconnection state after pairing. When there is no connection record for the first electronic device, it may be determined that the state of the first electronic device is a pairing state.
- the first electronic device may determine the state of the first electronic device based on its storage record. Wherein, when the first electronic device stores address information of other electronic devices, it can be determined that the state of the first electronic device is the reconnection state after pairing. When the first electronic device does not store address information of other electronic devices, it may be determined that the state of the first electronic device is a pairing state.
- the state of the first electronic device can also be obtained through other more ways, which will not be repeated here.
- the first electronic device may preset and store at least two preset transmit powers with different magnitudes.
- the first electronic device may preset and store a first preset transmit power and a second preset transmit power, and the first preset transmit power and the second preset transmit power are different in magnitude.
- the first electronic device may be preset and stored with the first preset transmit power, the second preset transmit power, the third preset transmit power...the Nth preset transmit power, and the first preset transmit power, The second preset transmit power, the third preset transmit power...the Nth preset transmit power have different sizes.
- the first electronic device after the first electronic device obtains its state, it can determine a preset transmission power from at least two preset transmission powers according to the state of the first electronic device as the target transmission power. power.
- the first electronic device may pre-establish and store a mapping table, which may include at least two states, at least two preset transmission powers, at least two states, and at least two Correspondence between preset transmit powers, where each state in at least two states may correspond to one or more preset transmit powers, is not limited here.
- a mapping table which may include at least two states, at least two preset transmission powers, at least two states, and at least two Correspondence between preset transmit powers, where each state in at least two states may correspond to one or more preset transmit powers, is not limited here.
- Table 1 at least two states in the mapping table may include a first state, a second state, and a third state
- at least two preset transmit powers in the mapping table may include a first preset transmit power .
- the second preset transmit power and the third preset transmit power wherein there is a corresponding relationship between the first state and the first preset transmit power, a corresponding relationship between the second state and the second preset transmit power, and a corresponding relationship between the third state and the first preset transmit power. There is a corresponding relationship among the three preset transmission powers.
- the first preset transmission power can be determined as the target transmission power; when it is determined that the state of the first electronic device is the second state, the second preset transmit power can be determined as the target transmit power; when the state of the first electronic device is determined to be the third state, the third preset transmit power can be determined as the target transmit power, and so on.
- the first electronic device may preset and store a fixed amount of preset transmit power as the default preset transmit power, and correspond the default preset transmit power to one of the states of the electronic device .
- the default preset transmit power can be used as the target transmit power; when the state of the first electronic device is obtained If it is inconsistent with one of the states, a certain value may be increased or decreased on the basis of the default preset transmit power to obtain a new preset transmit power as the target transmit power.
- the preset transmit power may be Bluetooth low energy transmit power.
- Step S120 Transmitting a broadcast message based on the target transmission power to instruct the second electronic device that has received the broadcast message to display target information when the received signal strength of the broadcast message is determined to be greater than a received signal strength threshold.
- the first electronic device may transmit the broadcast message based on the target transmission power. It can be understood that the larger the target transmit power, the wider (farther) the coverage of the broadcast message transmitted based on the target transmit power, and the greater the received signal strength of the broadcast message received at the same location; If is smaller, the coverage of the broadcast message transmitted based on the target transmit power is narrower (closer), and the received signal strength of the broadcast message received at the same location is smaller.
- the preset transmit power includes a first preset transmit power and a second preset transmit power
- the first preset transmit power is greater than the second preset transmit power
- the coverage of the broadcast message transmitted based on the target transmit power can be S1
- the received signal strength of the broadcast message received at the same location is RSSI1
- the second preset transmit power is determined as the target transmit power
- the coverage of the broadcast message transmitted based on the target transmission power may be S2, and the received signal strength of the broadcast message received at the same location is RSSI2, then the coverage of S1 is greater than the coverage of S2, and RSSI1 is greater than RSSI2.
- the second electronic device may receive the broadcast message transmitted by the first electronic device.
- the second electronic device may obtain the received signal strength of the received broadcast message, and compare the received signal strength with a preset received signal strength threshold.
- the target information may be displayed on the second electronic device; when the size comparison result indicates that the received signal strength is not greater than the preset received signal strength threshold , the target information is not displayed on the second electronic device.
- the second electronic device may calculate the received signal strength of the broadcast message according to the received broadcast message transmitted by the first electronic device.
- received signal strength RxPower-SystemGain, wherein, RxPower is to perform analog/digital conversion on the received wireless signal, and then perform digital front end (digital front end, DFE) filtering and other processing, and then calculate and obtain The in-band received power of the signal;
- SystemGain indicates the system gain, which can be estimated according to the RF front-end.
- the first electronic device is a TWS Bluetooth earphone device
- the second electronic device is a smart phone as an example for illustration.
- the earphone box (charging device) accommodated by the earphone is opened, the earphone can automatically turn on and try to transmit broadcast messages with the determined target transmission power in order to try to establish a Bluetooth connection with the smartphone.
- the earphone of the TWS Bluetooth earphone device When the lid is closed, the headset may automatically switch off and stop transmitting broadcast messages at the determined target transmit power.
- the smart phone when the smart phone is within the broadcasting range of the earphone, it can receive the broadcast message transmitted by the earphone at the determined target transmit power, and obtain the information of the received broadcast message transmitted by the earphone at the determined target transmit power. Received signal strength.
- the first electronic device transmits a broadcast message
- the number of second electronic devices within the broadcast coverage of the first electronic device is one
- only the second electronic device can receive the first electronic device.
- a broadcast message transmitted by an electronic device and obtain the received signal strength of the broadcast message; if there are multiple second electronic devices within the broadcast coverage of the first electronic device, all of the multiple second electronic devices
- the broadcast message transmitted by the first device can be received, and the received signal strength of the broadcast message can be obtained.
- the second electronic device may compare the received signal strength with a received signal strength threshold to determine whether the received signal strength is greater than Received signal strength threshold. Wherein, when it is determined that the received signal strength is not greater than the received signal strength threshold, it can be determined that the received signal strength does not meet the signal strength requirement for displaying prompts, then the target information can be intercepted, that is, the target information can not be displayed. Wherein, when it is determined that the received signal strength is greater than the received signal strength threshold, it can be determined that the received signal strength meets the signal strength requirement for displaying prompts, and then the target information is displayed, that is, the target information can be displayed.
- the way the second electronic device displays the target information may include: displaying the target information on a display interface, displaying the target information in a pop-up window on the display interface, displaying the target information in a status bar, etc., which is not limited here.
- the state of the second electronic device may include a pairing state and a reconnecting state.
- the target information when the state of the second electronic device is the configuration state, the target information may be connection prompt information, that is, the target information may be used to prompt to perform a pairing and connection operation with the second electronic device.
- the target information when the state of the second electronic device is the connection back state, the target information may be connection success prompt information, that is, the target information may be used to prompt that the connection back with the second electronic device has been successfully performed.
- the target transmission power is determined from at least two preset transmission powers with different sizes, and the broadcast message is transmitted based on the target transmission power to indicate
- the second electronic device that receives the broadcast message displays the target information when it determines that the received signal strength of the broadcast message is greater than the received signal strength threshold, so as to transmit the broadcast message by dynamically determining the target transmission power according to the state of the electronic device, It is used for other electronic devices to determine the display of the prompt information, so as to better control the display of the prompt information, avoid disturbing the user and improve the user experience.
- FIG. 6 shows a schematic flowchart of a method for transmitting a broadcast message according to an embodiment of the present application.
- the method is applied to the above-mentioned first electronic device, and the following will elaborate on the process shown in FIG. 6 .
- the at least two preset transmit powers include the first preset transmit power and the second preset Transmission power, wherein the first preset transmission power is greater than the second preset transmission power
- the method for transmitting a broadcast message may specifically include the following steps:
- Step S210 When the state of the first electronic device is a pairing state, determine a first preset transmission power from the at least two preset transmission powers as the target transmission power, wherein the pairing state It is used to represent the pairing operation to be performed between the first electronic device and the second electronic device.
- the at least two preset transmit powers include a first preset transmit power and a second preset transmit power, wherein the first preset transmit power is greater than the second preset transmit power.
- the first preset transmit power can be the default value of the pre-test
- the second preset transmit power can be obtained by subtracting a certain value from the first preset transmit power, as another
- the second preset transmit power may be a default value after pre-testing
- the first preset transmit power may be obtained by adding a certain value to the second preset transmit power.
- the state of the first electronic device may include a pairing state.
- the first electronic device is in the pairing state, which means that other electronic devices within the broadcast coverage of the first electronic device can scan the first electronic device at any time, and can pair and connect with the first electronic device.
- the pairing status can be used to represent the pending pairing operation between the first electronic device and the second electronic device.
- the second electronic device may be any electronic device that can scan to the first electronic device and has not been paired with the first electronic device.
- the second electronic device when it is determined that the state of the second electronic device is the pairing state, it can be considered that the first electronic device is not targeted to transmit broadcast messages at this time, and the second electronic device can be made to The target information is displayed to prompt the user corresponding to the second electronic device to establish a connection with the first electronic device.
- a larger preset transmit power can be selected from the first preset transmit power and the second preset transmit power as the target preset transmit power, so that the second electronic device receives The received signal strength of the broadcast message of the first electronic device is more likely to be greater than the preset received signal strength threshold, thereby increasing the probability of displaying the target information.
- the first preset transmission power when it is determined that the state of the first electronic device is the pairing state, the first preset transmission power can be determined as the target from the first preset transmission power and the second preset transmission power Preset transmit power.
- Step S220 When the state of the first electronic device is the connection back state, determine the second preset transmit power from the at least two preset transmit powers as the target transmit power, wherein the The connection back status is used to represent the connection back operation between the first electronic device and the third electronic device after pairing is to be performed.
- the state of the first electronic device may include a reconnection state after pairing.
- the first electronic device is in the connection back state, which means that the first electronic device is performing a connection back operation with the previously paired and connected electronic device through paging.
- the connection back status can be used to represent the connection back operation after the first electronic device and the third electronic device are to be paired, wherein the third electronic device can be a pairing connection on the first electronic device old electronic equipment.
- the second electronic device when it is determined that the state of the first electronic device is the connection back state, it can be considered that the first electronic device is more likely to be connected to an electronic device that has been paired and connected before. If the electronic device is connecting back to the third electronic device that has been paired and connected before, the second electronic device may not display the target information as much as possible to reduce disturbance to the user corresponding to the second electronic device. Based on this, in this embodiment, a smaller preset transmit power can be selected as the target transmit power from the first preset transmit power and the second preset transmit power, so that the first preset transmit power received by the second electronic device The received signal strength of the broadcast message of the electronic device is more likely to be smaller than the preset received signal strength threshold, thereby reducing the probability of displaying the target information. In an embodiment of the present application, when it is determined that the state of the first electronic device is the connection back state, the second preset transmit power may be determined from the first preset transmit power and the second preset transmit power as Target preset transmit power.
- Step S230 Transmitting a broadcast message based on the target transmission power to instruct the second electronic device that has received the broadcast message to display target information when it is determined that the received signal strength of the broadcast message is greater than a received signal strength threshold.
- step S230 please refer to step S120, which will not be repeated here.
- the broadcast message transmission method obtained by an embodiment of the present application obtains the state of the first electronic device, and when the state of the first electronic device is the configuration state, determines the first transmission from at least two preset transmission powers. The power is used as the target transmission power.
- the second transmission power is determined from at least two preset transmission powers as the target transmission power, and a broadcast message is transmitted based on the target transmission power to indicate
- the second electronic device that has received the broadcast message displays the target information when it determines that the received signal strength of the broadcast message is greater than the received signal strength threshold.
- this embodiment also selects a higher transmit power to transmit the broadcast message when the electronic device is in the pairing state than when it is in the reconnection state, so as to achieve better Control the display of prompt information to avoid disturbing users and improve user experience.
- FIG. 7 shows a schematic flowchart of a method for transmitting a broadcast message according to an embodiment of the present application. The method is applied to the above-mentioned first electronic device, and the flow shown in FIG. 7 will be described in detail below.
- the method for transmitting a broadcast message may specifically include the following steps:
- Step S310 When there is no connection record for the first electronic device, determine that the state of the first electronic device is a pairing state, wherein the pairing state is used to represent the relationship between the first electronic device and the second electronic device. A pairing operation is to be performed between the two electronic devices.
- the first electronic device may obtain its connection information, and based on the connection information, determine whether the first electronic device has a connection record. Wherein, when it is determined based on the connection information of the first electronic device that there is no connection record for the first electronic device, it may be determined that the state of the first electronic device is a pairing state.
- the first electronic device when it is determined that there is no connection record for the first electronic device, it means that the first electronic device has not been paired and connected with other electronic devices before, that is, the first electronic device
- the message when the message is broadcast, it is for pairing and connecting with other electronic devices, that is, it can be determined that the state of the first electronic device is the pairing state.
- the broadcast message transmitted by the first electronic device will be received by the second electronic device, and the pairing status indicates that a pairing operation is to be performed between the first electronic device and the second electronic device.
- the first electronic device may determine whether it stores address information of the third electronic device, for example, the first electronic device may determine whether it stores the MAC address of the third electronic device. Wherein, when it is determined that the first electronic device does not store the address information of the third electronic device, it may be determined that there is no connection record for the first electronic device. That is, when it is determined that the first electronic device does not store the address information of the third electronic device, it means that the first electronic device has not been paired and connected with the third electronic device before, that is, the first electronic device is in When transmitting the broadcast message this time, it is for pairing and connecting with the second electronic device, that is, it can be determined that the state of the first electronic device is the pairing state.
- Step S320 When the first electronic device has a connection record, determine that the state of the first electronic device is the reconnection state, wherein the reconnection state is used to represent the connection between the first electronic device and the third electronic device. The electronic device is to be connected back after pairing.
- the first electronic device may obtain its connection information, and based on the connection information, determine whether the first electronic device has a connection record. Wherein, when it is determined based on the connection information of the first electronic device that the first electronic device has a connection record, it may be determined that the state of the first electronic device is the connection back state. That is, it may be determined that the state of the first electronic device is a reconnection state after a pairing connection and a disconnection.
- the first electronic device when it is determined that the first electronic device has a connection record, it means that the first electronic device has been paired and connected with other electronic devices before, that is, the first electronic device transmits a broadcast message this time , it is for connecting back with the electronic device that has been paired and connected before, that is, it can be determined that the state of the first electronic device is the connecting back state.
- the second electronic device since the second electronic device can receive the broadcast message transmitted by the first electronic device, and based on the broadcast message, it is determined that the state of the first electronic device is the connection back state, it can be considered that the connection back The state is used to represent the connection back operation to be performed between the first electronic device and other electronic devices. Connect back to the operation.
- the first electronic device may determine whether it stores address information of the third electronic device, for example, the first electronic device may determine whether it stores the MAC address of the third electronic device. Wherein, when it is determined that the first electronic device stores the address information of the third electronic device, it may be determined that the first electronic device has a connection record. That is, when it is determined that the first electronic device stores the address information of the third electronic device, it means that the first electronic device has been paired and connected with the third electronic device before, that is to say, the first electronic device has When transmitting the broadcast message, it is not for pairing and connection with the second electronic device (for connection back with the third electronic device), that is, it can be determined that the state of the first electronic device is the connection back state.
- the first electronic device when the first electronic device has a connection record, it can be detected whether the first electronic device has performed the connection back operation and failed to perform the connection back operation when the first electronic device transmits the broadcast message this time, wherein, when the first electronic device has performed When the connection-back operation is performed and the connection-back fails, it can be considered that the first electronic device switches from the connection-back state to the pairing state, that is, it is determined that the state of the first electronic device is the pairing state, not the connection-back state.
- the first electronic device when the first electronic device has a connection record, it can be detected whether the first electronic device has received an instruction to switch to the pairing state when the first electronic device transmits the broadcast message this time, such as the user long presses the button on the earphone box to perform State switching, when it is detected that the first electronic device receives an instruction to switch to the pairing state, it can be considered that the first electronic device switches from the reconnection state to the pairing state, that is, it is determined that the state of the first electronic device is the pairing state, and Not connected state.
- the state of the first electronic device is a connection back state.
- Step S330 According to the state of the first electronic device, determine a target transmission power from at least two preset transmission powers, wherein the at least two preset transmission powers are different in magnitude.
- Step S340 Transmitting a broadcast message based on the target transmission power to instruct the second electronic device that has received the broadcast message to display target information when it is determined that the received signal strength of the broadcast message is greater than a received signal strength threshold.
- step S330-step S340 please refer to step S110-step S120, which will not be repeated here.
- the target transmission power is determined from at least two preset transmission powers, and the broadcast message is transmitted based on the target transmission power.
- this embodiment also determines the state of the electronic device according to the connection record of the electronic device, thereby improving the accuracy of the determined state of the electronic device.
- FIG. 8 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application. The method is applied to the above-mentioned first electronic device, and the flow shown in FIG. 8 will be described in detail below.
- the method for transmitting a broadcast message may specifically include the following steps:
- Step S410 When it is detected that the charging device is turned on, according to the state of the Bluetooth headset, determine the target transmission power from at least two preset transmission powers, wherein the size of the at least two preset transmission powers is different.
- the first electronic device is a bluetooth earphone
- the bluetooth earphone is accommodated in the charging device.
- the Bluetooth headset when the charging device is closed, since the Bluetooth headset is accommodated in the charging device, the Bluetooth headset will not transmit a broadcast message at this time, so the status of the Bluetooth headset may not be obtained.
- the charging device is turned on, since the Bluetooth headset is only partially accommodated in the charging device, the Bluetooth headset will transmit a broadcast message at this time. Therefore, according to the state of the Bluetooth headset, at least two preset transmission powers Determine the target transmit power.
- Step S420 Transmit a broadcast message based on the target transmit power to instruct the second electronic device that has received the broadcast message to display target information when it is determined that the received signal strength of the broadcast message is greater than the received signal strength threshold, wherein the The target information is used to prompt to connect with the Bluetooth headset.
- step S420 please refer to step S120, which will not be repeated here.
- the target transmission power is determined from at least two preset transmission powers. Power, transmitting the broadcast message based on the target transmission power to instruct the second electronic device that has received the broadcast message to display the target information when it is determined that the received signal strength of the broadcast message is greater than the received signal strength threshold.
- this embodiment also triggers the acquisition of the state of the Bluetooth headset when the charging device accommodated in the Bluetooth headset is turned on, and improves the timing of acquiring the state of the Bluetooth headset. accuracy.
- FIG. 9 shows a schematic flowchart of a method for transmitting a broadcast message according to an embodiment of the present application.
- the method is used to dynamically determine the target transmission power according to the state of the electronic device to transmit the broadcast message, so that other electronic devices can determine the display of the prompt information, so as to better control the display of the prompt information and avoid the inconvenience to the user. Disturb to improve user experience.
- the broadcast message transmitting method is applied to the broadcast message transmitting device 400 shown in FIG. 13 and the electronic device (second electronic device) configured with the broadcast message transmitting device 400 500 ( Figure 14).
- the second electronic device applied in this embodiment may be a smart phone, a tablet computer, a wearable electronic device, etc., which is not limited herein.
- the process shown in Figure 9 will be described in detail below, and the method for transmitting a broadcast message may specifically include the following steps:
- Step S510 Obtain the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on a target transmit power, and the target transmit power is determined by the first electronic device
- the device is determined from at least two preset transmission powers according to its state, and the at least two preset transmission powers have different magnitudes.
- Step S520 Display target information when the received signal strength is greater than the received signal strength threshold.
- step S510-step S520 please refer to step S110-step S130, which will not be repeated here.
- the second electronic device obtains the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on the target transmission power,
- the target transmission power is determined by the first electronic device from at least two preset transmission powers according to its state, and when the received signal strength is greater than the received signal strength threshold, the target information is displayed, so that according to the state of the electronic device, Dynamically determine the target transmission power to transmit broadcast messages for other electronic devices to determine the display of prompt information, so as to better control the display of prompt information, avoid disturbing users and improve user experience.
- FIG. 10 shows a schematic flowchart of a method for transmitting a broadcast message according to an embodiment of the present application. This method is applied to the above-mentioned second electronic device, and the flow shown in FIG. 10 will be described in detail below.
- the method for transmitting a broadcast message may specifically include the following steps:
- Step S610 Obtain the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on a target transmit power, and the target transmit power is determined by the first electronic device
- the device is determined from at least two preset transmission powers according to its state, and the at least two preset transmission powers have different magnitudes.
- step S610 please refer to step S110-step S120, which will not be repeated here.
- Step S620 When the received signal strength is greater than a received signal strength threshold and the first electronic device satisfies a preset device condition, display the target information.
- the second electronic device may be preset and stored with a preset device condition, and the preset device condition is used as a judgment basis for the first electronic device. Therefore, in this embodiment, when the second electronic device receives the broadcast message transmitted by the first electronic device, it may judge whether the first electronic device satisfies the preset device condition based on the broadcast message. Wherein, when it is determined that the first electronic device satisfies the preset device condition, the target information may be displayed on the basis of determining that the received signal strength of the broadcast message is greater than the received signal strength threshold. Wherein, when it is determined that the first electronic device does not satisfy the preset device condition, the target information may not be displayed even if it is determined that the received signal strength of the broadcast message is greater than the received signal strength.
- the second electronic device may analyze the broadcast message.
- the protocol representing the broadcast message transmitted by the first electronic device meets the protocol set by the second electronic device, it can be determined that the first electronic device meets the preset device condition.
- the parsing fails, and the protocol representing the broadcast message transmitted by the first electronic device does not meet the protocol set by the second electronic device, it may be determined that the first electronic device does not meet the preset device condition.
- the second electronic device when the second electronic device receives the broadcast message from the first electronic device, it may obtain the identity information of the first electronic device based on the broadcast message. As an implementable manner, the second electronic device may acquire the identity information of the first electronic device based on the protocol of the broadcast message. As yet another implementable manner, the second electronic device may acquire the identity information of the first electronic device based on the information obtained by parsing the target flag of the broadcast message.
- the second electronic device may be preset and stored with a preset identity condition, and the preset identity condition is used as a judgment basis for the first electronic device. Therefore, in this embodiment, when the second electronic device acquires the identity information of the first electronic device, it may determine whether the identity information satisfies a preset identity condition. Wherein, when it is determined that the identity information of the first electronic device satisfies the preset identity condition, it indicates that the first electronic device is an electronic device that satisfies the condition set by the second electronic device, then it may be determined that the received signal strength of the broadcast message is greater than Based on the received signal strength threshold, target information is displayed.
- the first electronic device when it is determined that the identity information of the first electronic device does not meet the preset identity conditions, it is characterized that the first electronic device is an electronic device that does not meet the conditions set by the second electronic device, then it may be determined that the broadcast message is received If the signal strength is greater than the received signal strength, the target information will not be displayed.
- the preset identity condition may be a preset manufacturer, then when the first electronic device is produced by the preset manufacturer, it may be considered that the identity information of the first electronic device satisfies the preset identity condition;
- the preset identity condition may be a preset terminal vendor, and when the first electronic device is a preset brand of a terminal vendor, it may be considered that the identity information of the first electronic device satisfies the preset identity condition;
- the preset identity condition may be The manufacturer of the second electronic device, when the manufacturer of the first electronic device is consistent with the manufacturer of the second electronic device, it can be considered that the identity information of the first electronic device satisfies the preset identity condition;
- the preset identity condition can be is the terminal provider of the second electronic device, when the brand of the terminal provider of the first electronic device is consistent with the brand of the terminal provider of the second electronic device, it can be considered that the identity information of the first electronic device satisfies the preset identity conditions, etc., here No limit.
- Step S630 When the received signal strength is not greater than the received signal strength threshold, intercept the target information.
- the second electronic device after the second electronic device acquires the received signal strength of the broadcast message transmitted by the first electronic device, it can compare the received signal strength with a received signal strength threshold to determine the received signal strength Whether it is greater than the received signal strength threshold. Wherein, when it is determined that the received signal strength is not greater than the target received signal strength threshold, it can be determined that the received signal strength does not meet the signal strength requirement for displaying prompts, then the target information can be intercepted, that is, the target information can not be displayed. Wherein, the manner of intercepting the target information may include hiding the target information, deleting the target information, minimizing the target information, etc., which is not limited here.
- the second electronic device obtains the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on the target transmission power,
- the target transmission power is determined by the first electronic device from at least two preset transmission powers according to its state, and when the received signal strength is greater than the received signal strength threshold and the first electronic device meets the preset device condition, display the target information, When the received signal strength is not greater than the received signal strength threshold, intercept the target information used to prompt the connection with the first electronic device.
- this embodiment also intercepts the prompt information when the received signal strength is not greater than the target received signal strength threshold, so as to avoid disturbing the user and improve user experience.
- the target information is displayed when the first electronic device satisfies the preset device condition, so as to avoid disturbing the user by other electronic devices and improve user experience.
- the first electronic device may be a Bluetooth headset device
- the second electronic device may be a smart device (such as a smart phone, a tablet computer, etc.).
- the earphone box of the bluetooth earphone device when the earphone box of the bluetooth earphone device is opened, it can be judged whether the bluetooth earphone is in a pairing state. If it is determined that the Bluetooth headset is in the pairing state, then transmit the BLE broadcast with a larger transmission power, and if it is determined that the Bluetooth headset is not in the pairing state (such as in the reconnection state), then transmit the BLE broadcast with a smaller transmission power.
- the BLE broadcast may carry information about the Bluetooth headset, for example, connection records and the like.
- the smart device within the broadcast range of the Bluetooth headset can receive the BLE broadcast, and analyze the BLE broadcast to obtain the analysis result. Based on the parsing result, it is judged whether the Bluetooth headset is a target device, for example, whether the identity information of the Bluetooth headset satisfies a preset identity condition. Among them, when it is determined that the Bluetooth headset is the target device, the received signal strength is compared with the threshold of the pop-up window, if the received signal strength is greater than the threshold of the pop-up window, the window will pop up, and if the strength of the received signal is not greater than the threshold of the pop-up window, the window will not pop up window. Please refer to FIG. 12 . FIG.
- FIG. 12 shows a module block diagram of a device for transmitting a broadcast message provided by an embodiment of the present application.
- the apparatus 300 for transmitting a broadcast message is applied to the above-mentioned first electronic device, and will be described below with respect to the block diagram shown in FIG. :
- the transmit power determining module 310 is configured to determine a target transmit power from at least two preset transmit powers according to the state of the first electronic device, wherein the at least two preset transmit powers are different in magnitude.
- the at least two preset transmit powers include a first preset transmit power and a second preset transmit power, wherein the first preset transmit power is greater than the second preset transmit power, and the transmit
- the power determination module 310 includes: a first transmit power determination submodule, wherein:
- a first transmit power determining submodule configured to determine a first preset transmit power from the at least two preset transmit powers as the target transmit power when the state of the first electronic device is a pairing state , wherein the pairing status is used to indicate that a pairing operation is to be performed between the first electronic device and the second electronic device.
- the transmit power determining module 310 includes: a second transmit power determining submodule, wherein:
- the second transmit power determining submodule is configured to determine the second preset transmit power from the at least two preset transmit powers as the The target transmit power, wherein the connection back state is used to represent a connection back operation between the first electronic device and the third electronic device to be performed after pairing.
- the first electronic device is a Bluetooth headset
- the Bluetooth headset is accommodated in a charging device
- the transmission power determination module 310 includes: a third transmission power determination submodule, wherein:
- the third transmit power determining submodule is configured to determine a target transmit power from at least two preset transmit powers according to the state of the first electronic device when it is detected that the charging device is turned on.
- a broadcast message transmitting module 320 configured to transmit a broadcast message based on the target transmission power, to instruct the second electronic device that has received the broadcast message to display the target when determining that the received signal strength of the broadcast message is greater than the received signal strength threshold information.
- the broadcast message transmitting device 300 also includes: a pairing state acquisition module and a connection back state acquisition module, wherein:
- a pairing state acquisition module configured to determine that the state of the first electronic device is a pairing state when there is no connection record for the first electronic device, wherein the pairing state is used to characterize the first electronic device A pairing operation is to be performed with the second electronic device.
- a connection back state acquisition module configured to determine that the state of the first electronic device is a connection back state when there is a connection record for the first electronic device, wherein the connection back state is used to represent the first The electronic device and the third electronic device are to be connected back after being paired.
- FIG. 13 shows a block diagram of a device for transmitting a broadcast message according to an embodiment of the present application.
- the apparatus 400 for transmitting a broadcast message is applied to the above-mentioned second electronic device, and will be described below with respect to the block diagram shown in FIG. in:
- the received signal strength acquiring module 410 is configured to acquire the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on a target transmit power, and the target transmit power
- the first electronic device is determined from at least two preset transmit powers according to its state, and the at least two preset transmit powers are different in magnitude.
- the prompt information display module 420 is configured to display target information when the received signal strength is greater than the received signal strength threshold.
- the prompt information display module 420 includes: a prompt information display submodule, wherein:
- the prompt information display submodule is configured to display the target information when the received signal strength is greater than a received signal strength threshold and the first electronic device satisfies a preset device condition.
- the prompt information display submodule includes: a prompt information display unit, wherein:
- the prompt information display unit is configured to display the target information when the received signal strength is greater than a received signal strength threshold and the identity information of the first electronic device satisfies a preset identity condition.
- the broadcast message transmitting device 400 also includes: a prompt information interception module, wherein:
- the prompt information interception module is configured to intercept the target information when the received signal strength is not greater than the received signal strength threshold.
- the coupling between the modules may be electrical, mechanical or other forms of coupling.
- each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.
- the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
- FIG. 14 shows a structural block diagram of an electronic device 500 provided by an embodiment of the present application, wherein the electronic device 500 may be the first electronic device 200 or the second electronic device 100 , which is not shown here.
- the electronic device 500 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, and an e-book.
- the electronic device 500 in this application may include one or more of the following components: a processor 510, a memory 520, and one or more application programs, wherein one or more application programs may be stored in the memory 520 and configured to be executed by a or a plurality of processors 510, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
- the processor 510 may include one or more processing cores.
- the processor 510 uses various interfaces and lines to connect various parts of the entire electronic device 500, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 520, and calling data stored in the memory 520.
- the processor 510 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
- DSP Digital Signal Processing
- FPGA Field-Programmable Gate Array
- PLA Programmable Logic Array
- the processor 510 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like.
- CPU Central Processing Unit
- GPU Graphics Processing Unit
- the CPU mainly handles the operating system, user interface and application programs, etc.
- the GPU is used to render and draw the content to be displayed
- the modem is used to handle wireless communication. It can be understood that the above modem may also not be integrated into the processor 510, but implemented by a communication chip alone.
- the memory 520 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory). Memory 520 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
- the memory 520 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like.
- the storage data area can also store data created by the electronic device 500 during use (such as phonebook, audio and video data, chat record data) and the like.
- FIG. 15 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
- Program codes are stored in the computer-readable medium 600, and the program codes can be invoked by a processor to execute the methods described in the foregoing method embodiments.
- the computer readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
- the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium).
- the computer-readable storage medium 600 has a storage space for program code 610 to execute any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
- Program code 610 may, for example, be compressed in a suitable form.
- the broadcast message transmission method, device, electronic device, and storage medium determine the target transmission from at least two preset transmission powers of different sizes according to the state of the first electronic device. power, transmitting the broadcast message based on the target transmit power, to instruct the second electronic device that has received the broadcast message to display the target information when it is determined that the received signal strength of the broadcast message is greater than the received signal strength threshold, thereby and dynamically determine the target transmission power to transmit the broadcast message for other electronic devices to determine the display of the prompt information, so as to better control the display of the prompt information, avoid disturbing the user and improve user experience.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Multimedia (AREA)
- Telephone Function (AREA)
Abstract
The present application relates to the technical field of electronic devices. Disclosed are a broadcast message transmitting method and apparatus, and an electronic device and a storage medium. The method comprises: determining, according to the state of a first electronic device, a target transmit power from among at least two preset transmit powers, wherein the at least two preset transmit powers have different magnitudes; and transmitting a broadcast message on the basis of the target transmit power, so as to instruct a second electronic device, which receives the broadcast message, to display a target message when it is determined that the received signal strength of the broadcast message is greater than a received signal strength threshold value. In the present application, a target transmit power is dynamically determined according to the state of an electronic device, so as to transmit a broadcast message, such that other electronic devices determine the display of prompt information, thereby better controlling the display of the prompt information, avoiding disturbance to a user and improving the user experience.
Description
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年09月06日提交的申请号为CN202111038917.7的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。This application claims the priority of the Chinese application with application number CN202111038917.7 filed on September 06, 2021, which is hereby incorporated by reference in its entirety for all purposes.
本申请涉及电子设备技术领域,更具体地,涉及一种广播消息的发射方法、装置、电子设备以及存储介质。The present application relates to the technical field of electronic equipment, and more specifically, to a method and device for transmitting a broadcast message, an electronic equipment, and a storage medium.
随着科学技术的发展,电子设备的使用越来越广泛,功能越来越多,已经成为人们日常生活中的必备之一。目前,越来越多的电子设备开始支持其他电子设备的快速发现并显示提示的功能。With the development of science and technology, the use of electronic equipment is becoming more and more extensive, with more and more functions, and has become one of the must-haves in people's daily life. At present, more and more electronic devices begin to support the function of quickly discovering other electronic devices and displaying prompts.
发明内容Contents of the invention
鉴于上述问题,本申请提出了一种广播消息的发射方法、装置、电子设备以及存储介质,以解决上述问题。In view of the above problems, the present application proposes a broadcast message transmitting method, device, electronic equipment and storage medium to solve the above problems.
第一方面,本申请实施例提供了一种广播消息的发射方法,应用于第一电子设备,所述方法包括:根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率,其中,所述至少两个预设发射功率的大小不同;基于所述目标发射功率发射广播消息,以指示接收到所述广播消息的第二电子设备在确定所述广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息。In the first aspect, the embodiment of the present application provides a method for transmitting a broadcast message, which is applied to a first electronic device. The method includes: according to the state of the first electronic device, from at least two preset transmission power Determine the target transmission power, wherein the at least two preset transmission powers are different in magnitude; transmit a broadcast message based on the target transmission power to indicate that the second electronic device that has received the broadcast message is determining the broadcast message When the received signal strength of the target is greater than the received signal strength threshold, the target information is displayed.
第二方面,本申请实施例提供了一种广播消息的发射方法,应用于第二电子设备,所述方法包括:获取接收到的第一电子设备发射的广播消息的接收信号强度,其中,所述广播消息由所述第一电子设备基于目标发射功率发射,所述目标发射功率由所述第一电子设备根据其所处的状态从至少两个预设发射功率中确定,所述至少两个预设发射功率的大小不同;当所述接收信号强度大于接收信号强度阈值时,显示目标信息。In a second aspect, the embodiment of the present application provides a method for transmitting a broadcast message, which is applied to a second electronic device, and the method includes: acquiring the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the The broadcast message is transmitted by the first electronic device based on a target transmission power, and the target transmission power is determined from at least two preset transmission powers by the first electronic device according to its state, and the at least two The preset transmit power is different; when the received signal strength is greater than the received signal strength threshold, target information is displayed.
第三方面,本申请实施例提供了一种广播消息的发射装置,应用于第一电子设备,所述装置包括:发射功率确定模块,用于根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率,其中,所述至少两个预设发射功率的大小不同;广播消息发射模块,用于基于所述目标发射功率发射广播消息,以指示接收到所述广播消息的第二电子设备在确定所述广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息。In a third aspect, the embodiment of the present application provides a device for transmitting a broadcast message, which is applied to a first electronic device, and the device includes: a transmit power determination module, configured to, according to the state of the first electronic device, from Determine the target transmission power among at least two preset transmission powers, wherein the at least two preset transmission powers are different in size; the broadcast message transmission module is configured to transmit a broadcast message based on the target transmission power to indicate that the received When the second electronic device that broadcasts the message determines that the received signal strength of the broadcast message is greater than the received signal strength threshold, display the target information.
第四方面,本申请实施例提供了一种广播消息的发射装置,应用于第二电子设备,所述装置包括:接收信号强度获取模块,用于获取接收到的第一电子设备发射的广播消息的接收信号强度,其中,所述广播消息由所述第一电子设备基于目标发射功率发射,所述目标发射功率由所述第一电子设备根据其所处的状态从至少两个预设发射功率中确定,所述至少两个预设发射功率的大小不同;提示信息显示模块,用于当所述接收信号强度大于接收信号强度阈值时,显示目标信息。In a fourth aspect, the embodiment of the present application provides a device for transmitting a broadcast message, which is applied to a second electronic device, and the device includes: a received signal strength acquisition module, configured to obtain the received broadcast message transmitted by the first electronic device The received signal strength of , wherein, the broadcast message is transmitted by the first electronic device based on a target transmission power, and the target transmission power is selected from at least two preset transmission powers by the first electronic device according to its state It is determined that the at least two preset transmit powers are different in size; the prompt information display module is configured to display target information when the received signal strength is greater than a received signal strength threshold.
第五方面,本申请实施例提供了一种电子设备,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行上述方法。In the fifth aspect, the embodiment of the present application provides an electronic device, including a memory and a processor, the memory is coupled to the processor, and the memory stores instructions, which are executed when the instructions are executed by the processor. The processor executes the above method.
第六方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述方法。In a sixth aspect, the embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the above method.
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1示出了可用于本申请实施例提供的第一种应用环境示意图;Figure 1 shows a schematic diagram of the first application environment that can be used in the embodiment of the present application;
图2示出了可用于本申请实施例提供的第二种应用环境示意图;Figure 2 shows a schematic diagram of a second application environment that can be used in the embodiment of the present application;
图3示出了可用于本申请实施例提供的第三种应用环境示意图;FIG. 3 shows a schematic diagram of a third application environment that can be used in the embodiment of the present application;
图4示出了可用于本申请实施例提供的第四种应用环境示意图;FIG. 4 shows a schematic diagram of a fourth application environment that can be used in the embodiment of the present application;
图5示出了本申请一实施例提供的广播消息的发射方法的流程示意图;Fig. 5 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application;
图6示出了本申请一实施例提供的广播消息的发射方法的流程示意图;FIG. 6 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application;
图7示出了本申请一实施例提供的广播消息的发射方法的流程示意图;FIG. 7 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application;
图8示出了本申请一实施例提供的广播消息的发射方法的流程示意图;FIG. 8 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application;
图9示出了本申请一实施例提供的广播消息的发射方法的流程示意图;FIG. 9 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application;
图10示出了本申请一实施例提供的广播消息的发射方法的流程示意图;FIG. 10 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application;
图11示出了可用于本申请实施例的流程示例图;FIG. 11 shows an exemplary flow chart that can be used in the embodiment of the present application;
图12示出了本申请一实施例提供的广播消息的发射装置的模块框图;FIG. 12 shows a block diagram of a device for transmitting a broadcast message according to an embodiment of the present application;
图13示出了本申请一实施例提供的广播消息的发射装置的模块框图。Fig. 13 shows a block diagram of a device for transmitting a broadcast message provided by an embodiment of the present application.
图14示出了本申请实施例用于执行根据本申请实施例的广播消息的发射方法的电子设备的框图;FIG. 14 shows a block diagram of an electronic device for performing a method for transmitting a broadcast message according to an embodiment of the present application in an embodiment of the present application;
图15示出了本申请实施例的用于保存或者携带实现根据本申请实施例的广播消息的发射方法的程序代码的存储单元。Fig. 15 shows a storage unit for storing or carrying program codes for implementing the broadcast message transmitting method according to the embodiment of the present application according to the embodiment of the present application.
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
物联网(Internet Of Things,IOT)是在“互联网概念”的基础上,将其用户端延伸和扩展到任何物品与物品之间,进行信息交换和通信的一种网络概念。随着物联网技术的发展,在物联网系统中可以配置一些场景。对于配置的场景,可以涉及到多个电子设备,而且多个电子设备之间具有一定的联动关系,能够协同工作。例如,所配置的场景可以包括,当一个电子设备靠近另一个电子设备的时候,两个电子设备中的至少一个会执行指定操作,例如,其中一个电子设备输出连接提示信息,该连接提示信息用于提示与另一个电子设备连接。The Internet of Things (IOT) is a network concept based on the "Internet concept" that extends and expands its client terminal to any item and item for information exchange and communication. With the development of IoT technology, some scenarios can be configured in the IoT system. For the configuration scenario, multiple electronic devices may be involved, and the multiple electronic devices have a certain linkage relationship and can work together. For example, the configured scenario may include that when one electronic device is close to another electronic device, at least one of the two electronic devices will perform a specified operation, for example, one of the electronic devices outputs connection prompt information, and the connection prompt information uses For prompting connection with another electronic device.
如图1所示,第二电子设备100可以是用户终端(例如,可以是智能手机),第一电子设备200可以是智能家居设备,该智能家居设备可以包括智能电视、空调、窗帘等电子设备,在第二电子设备100靠近第一电子设备200的时候,在第二电子设备100上显示第一电子设备200的控制界面,用户可以通过第二电子设备100显示的第一电子设备200的控制界面控制所述第一电子设备200执行对应的动作。或者,第二电子设备100显示第一电子设备200的连接提示信息,用户可以通过第二电子设备100显示的连接提示信息建立第二电子设备100和第一电子设备200之间的连接。As shown in FIG. 1, the second electronic device 100 may be a user terminal (for example, may be a smart phone), and the first electronic device 200 may be a smart home device, which may include electronic devices such as smart TVs, air conditioners, and curtains. , when the second electronic device 100 is close to the first electronic device 200, the control interface of the first electronic device 200 is displayed on the second electronic device 100, and the user can control the first electronic device 200 through the second electronic device 100 The interface controls the first electronic device 200 to perform corresponding actions. Alternatively, the second electronic device 100 displays the connection prompt information of the first electronic device 200 , and the user can establish a connection between the second electronic device 100 and the first electronic device 200 through the connection prompt information displayed by the second electronic device 100 .
如图2所示,第二电子设备100可以是用户终端(例如,可以是智能手机),第一电子设备200可以是真无线蓝牙耳机(true wireless stereo,TWS)装置,在第一电子设备200靠近第二电子设备100的时候,第二电子设备100显示弹框信息110,在该弹框信息110内可以显示TWS蓝牙耳机的电量,可以显示连接提示信息等,在本申请一实施例中,该TWS蓝牙耳机装置可以包括耳机220和耳机盒(充电装置)210,耳机盒210可以容纳耳机220,在本申请一实施例中,耳机盒210的壳体内壁形成容纳腔,耳机220可以容纳在该耳机盒210的容纳腔内。另外,耳机盒210不仅可以提供用于容纳耳机220的容纳腔,还可以与耳机220通信,从而能获取耳机220的电量、名称或者耳机220的网络参数等信息,以便用户终端能通过耳机盒210与耳机220配对成功并实现通信连接。作为一种实施方式,该耳机盒210还用于为耳机220充电。在本申请一实施例中,在耳机盒210开盖时可以触发耳机220发射蓝牙低功耗(bluetooh low energy,BLE)广播,第二电子设备100,例如智能手机,在接收到该BLE广播后,可以弹出弹框,该弹框可以为用户提供快速连接耳机220的操作界面,或可以在该弹框信息内同时显示耳机220的电量和耳机盒210的电量。As shown in FIG. 2, the second electronic device 100 may be a user terminal (for example, may be a smart phone), and the first electronic device 200 may be a true wireless Bluetooth headset (true wireless stereo, TWS) device. In the first electronic device 200 When approaching the second electronic device 100, the second electronic device 100 displays pop-up information 110, in which the power of the TWS Bluetooth headset can be displayed, and connection prompt information can be displayed. In an embodiment of the present application, The TWS Bluetooth earphone device may include an earphone 220 and an earphone box (charging device) 210. The earphone box 210 can accommodate the earphone 220. In an embodiment of the application, the inner wall of the earphone box 210 forms an accommodating cavity, and the earphone 220 can be accommodated in Inside the accommodating chamber of the earphone box 210 . In addition, the earphone box 210 can not only provide a cavity for accommodating the earphone 220, but also can communicate with the earphone 220, so as to obtain information such as the power and name of the earphone 220, or the network parameters of the earphone 220, so that the user terminal can pass through the earphone box 210. The pairing with the earphone 220 is successful and the communication connection is realized. As an implementation manner, the earphone box 210 is also used for charging the earphone 220 . In an embodiment of the present application, when the earphone box 210 is opened, the earphone 220 can be triggered to transmit a Bluetooth low energy (bluetooh low energy, BLE) broadcast, and the second electronic device 100, such as a smart phone, after receiving the BLE broadcast , a pop-up box can pop up, and the pop-up box can provide the user with an operation interface for quickly connecting the earphone 220, or can simultaneously display the power of the earphone 220 and the power of the earphone box 210 in the pop-up box information.
目前,两个电子设备之间可以通过一个电子设备接收的另一个电子设备的接收信号强度来确定两个电子设备之间的距离,在本申请一实施例中,测距公式如下:At present, the distance between two electronic devices can be determined by the received signal strength of another electronic device received by one electronic device. In an embodiment of the present application, the ranging formula is as follows:
公式(1)中,d表示两个电子设备之间的距离,RSSI表示一个电子设备接收的另一个电子设备的接收信号强度,A为参考距离,通常是常量,B为路径损耗因子。由公式(1)可以看出,距离d与RSSI是一一对应的关系。因此,通常判断一个电子设备与另一电子设备之间的距离是否小于预设距离,或者一个电子设备是否进入另一个电子设备的预设范围内,通常可以通过获取一个电子设备接收的另一个电子设备的接收信号强度,然后,通过判断该接收信号强度是否大于信号强度阈值的方式,判断一个电子设备是否进入另一个电子设备的预设范围内。In formula (1), d represents the distance between two electronic devices, RSSI represents the received signal strength of another electronic device received by one electronic device, A is a reference distance, usually a constant, and B is a path loss factor. It can be seen from the formula (1) that there is a one-to-one correspondence between the distance d and the RSSI. Therefore, it is usually judged whether the distance between one electronic device and another electronic device is less than a preset distance, or whether an electronic device enters the preset range of another electronic device, usually by obtaining another electronic device received by one electronic device. The received signal strength of the device, and then, by judging whether the received signal strength is greater than the signal strength threshold, it is judged whether one electronic device enters the preset range of another electronic device.
在本申请一实施例中,假设两个电子设备分别为第二电子设备100和第一电子设备200,在第一电子设备200启动无线通信模块的时候,第一电子设备200向周围发射广播消息。如图3所示,假设第二电子设备100为用户终端,第一电子设备200是TWS蓝牙耳机装置,在第一电子设备200靠近第二电子设备100的时候,耳机盒210的盒盖处于闭合状态,则此时,耳机盒210并不会向周围发射广播消息,即图3所示,第二电子设备100并未接收到耳机盒210发射的广播消息,也未显示弹框信息110,当第二电子设备100的盒盖处于打开状态,如图4所示,耳机220发射广播消息,能够被第二电子设备100接收到该广播消息,并且在接收的广播消息的接收信号强度大于信号强度阈值的时候,显示弹框信息110。通过设置信号强度阈值可以控制第二电子设备100与第一电子设备200在一定距离内才触发弹窗,一定程度上避免误触发其他人的手机弹窗。In an embodiment of the present application, assuming that the two electronic devices are the second electronic device 100 and the first electronic device 200 respectively, when the first electronic device 200 activates the wireless communication module, the first electronic device 200 transmits a broadcast message to the surrounding . As shown in FIG. 3 , assuming that the second electronic device 100 is a user terminal, and the first electronic device 200 is a TWS Bluetooth earphone device, when the first electronic device 200 is close to the second electronic device 100, the cover of the earphone box 210 is closed state, then at this time, the earphone box 210 will not transmit broadcast messages to the surroundings, that is, as shown in FIG. The box cover of the second electronic device 100 is in an open state. As shown in FIG. 4 , the earphone 220 transmits a broadcast message, which can be received by the second electronic device 100, and the received signal strength of the received broadcast message is greater than the signal strength. When the threshold is reached, pop-up message 110 is displayed. By setting the signal strength threshold, it is possible to control the second electronic device 100 and the first electronic device 200 to trigger the pop-up window only within a certain distance, so as to avoid falsely triggering the pop-up window on other people's mobile phones to a certain extent.
在一些实施例中,该无线通信模块可以是Wi-Fi模块,也可以是蓝牙模块,于本申请实施例中,该无线通信模块可以是蓝牙模块,第二电子设备100和第一电子设备200之间可以通过蓝牙连接,则该广播消息可以是蓝牙广播消息,例如,BLE广播。随着第一电子设备200与第二电子设备100之间的距离的靠近,第二电子设备100能够检测到第一电子设备200的广播消息,进而能够确定该第一电子设备200接收到的广播消息的信号强度,即接收信号强度,随着第二电子设备100和第一电子设备200之间的距离的靠近,第二电子设备100的接收信号强度逐渐增大,当检测到的接收信号强度大于信号强度阈值时,第二电子设备100显示弹框信息,然后,第一电子设备00和第一电子设备200可以建立无线连接(例如,蓝牙连接)。In some embodiments, the wireless communication module can be a Wi-Fi module or a Bluetooth module. In the embodiment of the present application, the wireless communication module can be a Bluetooth module. The second electronic device 100 and the first electronic device 200 If they can be connected via Bluetooth, the broadcast message can be a Bluetooth broadcast message, for example, a BLE broadcast. As the distance between the first electronic device 200 and the second electronic device 100 approaches, the second electronic device 100 can detect the broadcast message of the first electronic device 200, and then can determine the broadcast message received by the first electronic device 200 The signal strength of the message, that is, the received signal strength. As the distance between the second electronic device 100 and the first electronic device 200 approaches, the received signal strength of the second electronic device 100 gradually increases. When the detected received signal strength When the signal strength is greater than the threshold, the second electronic device 100 displays pop-up information, and then the first electronic device 00 and the first electronic device 200 can establish a wireless connection (for example, a Bluetooth connection).
例如,第二电子设备100显示的弹框信息110内显示有连接按钮,如图4所示的连接控件111,用户点击该连接控件111,能够实现第二电子设备100和第一电子设备200之间的连接。For example, a connection button is displayed in the bullet box information 110 displayed by the second electronic device 100, such as the connection control 111 shown in FIG. connection between.
电子设备可以支持快速发现其他电子设备并显示提示的功能,电子设备在是否显示提示信息的判断上,主要是根据接收到的其他电子设备发射的广播消息的接收信号强度与设定的信号强度阈值进行直接比较。也就是说,其他电子设备会直接根据预先设置的发射功率进行广播消息的发射,而不会针对不同的场景进行不同的处理,从而出现接收到广播消息的电子设备的提示信息的误显示,造成对用户的打扰以及影响用户体验。Electronic devices can support the function of quickly discovering other electronic devices and displaying prompts. The judgment of whether to display prompt information by electronic devices is mainly based on the received signal strength of broadcast messages transmitted by other electronic devices and the set signal strength threshold. for a direct comparison. That is to say, other electronic devices will directly transmit the broadcast message according to the preset transmission power, and will not perform different processing for different scenarios, so that the prompt information of the electronic device that receives the broadcast message will be displayed incorrectly, resulting in Disturb the user and affect the user experience.
针对上述问题,发明人经过长期的研究发现,并提出了本申请实施例提供的广播消息的发射方法、装置、电子设备以及存储介质,通过根据电子设备所处的状态,动态确定目标发射功率进行广播消息的发射,以供其他电子设备确定对提示信息的显示,实现更好地控制提示信息的显示,避免对用户的打扰以改善用户体验。其中,广播消息的发射方法在后续的实施例中进行详细的说明。In view of the above problems, the inventor found after a long period of research, and proposed the transmission method, device, electronic equipment and storage medium of the broadcast message provided by the embodiment of the present application, by dynamically determining the target transmission power according to the state of the electronic equipment. The transmission of the broadcast message is used for other electronic devices to determine the display of the prompt information, so as to better control the display of the prompt information, avoid disturbing the user and improve the user experience. Wherein, the method for transmitting the broadcast message will be described in detail in the following embodiments.
请参阅图5,图5示出了本申请一实施例提供的广播消息的发射方法的流程示意图。该方法用于通过根据电子设备所处的状态,动态确定目标发射功率进行广播消息的发射,以供其他电子设备确定对提示信息的显示,实现更好地控制提示信息的显示,避免对用户的打扰以改善用户体验。在具体的实施例中,该广播消息的发射方法应用于如图12所示的广播消息的发射装置300以及配置有广播消息的发射装置300的电子设备(第一电子设备)500(图14)。可以理解的,本实施例所应用的第一电子设备可以为智能手机、平板电脑、穿戴式电子设备、蓝牙耳机等,在此不做限定。下面将针对图5所示的流程进行详细的阐述,所述广播消息的发射方法具体可以包括以下步骤:Referring to FIG. 5 , FIG. 5 shows a schematic flowchart of a method for transmitting a broadcast message according to an embodiment of the present application. The method is used to dynamically determine the target transmission power according to the state of the electronic device to transmit the broadcast message, so that other electronic devices can determine the display of the prompt information, so as to better control the display of the prompt information and avoid the inconvenience to the user. Disturb to improve user experience. In a specific embodiment, the broadcast message transmitting method is applied to the broadcast message transmitting device 300 shown in Figure 12 and the electronic device (first electronic device) 500 configured with the broadcast message transmitting device 300 (Figure 14) . It can be understood that the first electronic device applied in this embodiment may be a smart phone, a tablet computer, a wearable electronic device, a bluetooth earphone, etc., which is not limited here. The process shown in Figure 5 will be described in detail below, and the method for transmitting a broadcast message may specifically include the following steps:
步骤S110:根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率,其中,所述至少两个预设发射功率的大小不同。Step S110: According to the state of the first electronic device, determine a target transmission power from at least two preset transmission powers, wherein the at least two preset transmission powers are different in magnitude.
在本实施例中,第一电子设备可以获取其所处的状态。其中,第一电子设备所处的状态可以包括配对状态和回连状态。In this embodiment, the first electronic device can acquire its current state. Wherein, the state of the first electronic device may include a pairing state and a reconnection state.
在一些实施方式中,第一电子设备可以在将要发射广播消息之前,获取其所处的状态。其中,以第一电子设备为TWS蓝牙耳机,第二电子设备为智能手机为例进行说明。当TWS蓝牙耳机所容置的耳机盒(充电装置)打开时,则TWS蓝牙耳机可以自动开机并尝试发射广播消息,以尝试建立与智能手机的蓝牙连接,则此时该TWS蓝牙耳机可以获取其所处的状态。当TWS蓝牙耳机的耳机盒盖合时,则TWS蓝牙耳机可以自动关闭并停止发射广播消息,则此时该TWS蓝牙耳机可以不获取其所处的状态。In some implementation manners, the first electronic device may acquire its current state before the broadcast message is about to be transmitted. Wherein, the first electronic device is a TWS Bluetooth earphone and the second electronic device is a smart phone as an example for illustration. When the earphone box (charging device) accommodated by the TWS Bluetooth headset is turned on, the TWS Bluetooth headset can automatically turn on and try to transmit a broadcast message to try to establish a Bluetooth connection with the smartphone, then the TWS Bluetooth headset can obtain its the state you are in. When the headphone box of the TWS Bluetooth headset is closed, the TWS Bluetooth headset can automatically turn off and stop transmitting broadcast messages, and at this time, the TWS Bluetooth headset may not obtain its state.
在一些实施方式中,第一电子设备可以响应于指令信息,获取第一电子设备所处的状态。例如,第一电子设备可以在检测到用户作用于该第一电子设备的目标触控操作时,响应于该目标触控操作获取该第一电子设备所处的状态。又例如,第一电子设备可以在接收到用户输入的目标语音信息时,响应于该目标语音信息获取该第一电子设备所处的状态。再例如,第一电子设备可以在检测到预设时间时,响应于该预设时间获取该第一电子设备所处的状态。另例如,第一电子设备可以在检测到预设环境状态(预设温度、预设湿度、预设光照强度、预设亮度等)时,响应于该预设环境朱航天获取该第一电子设备所处的状态。In some implementation manners, the first electronic device may acquire the status of the first electronic device in response to the instruction information. For example, the first electronic device may acquire the state of the first electronic device in response to the target touch operation when detecting the target touch operation performed by the user on the first electronic device. For another example, when receiving the target voice information input by the user, the first electronic device may acquire the state of the first electronic device in response to the target voice information. For another example, when the first electronic device detects the preset time, it may acquire the status of the first electronic device in response to the preset time. For another example, when the first electronic device detects a preset environmental state (preset temperature, preset humidity, preset light intensity, preset brightness, etc.), Zhu Hangtian acquires the first electronic device in response to the preset environment. the state you are in.
作为一种可实施的方式,第一电子设备可以基于其连接记录,确定该第一电子设备所处的状态。其中,当第一电子设备存在连接记录时,则可以确定该第一电子设备所处的状态为配对后的回连状态。当第一电子设备不存在连接记录时,则可以确定该第一电子设备所处的状态为配对状态。As an implementable manner, the first electronic device may determine the state of the first electronic device based on its connection record. Wherein, when the first electronic device has a connection record, it can be determined that the state of the first electronic device is the reconnection state after pairing. When there is no connection record for the first electronic device, it may be determined that the state of the first electronic device is a pairing state.
作为又一种可实施的方式,第一电子设备可以基于其存储记录,确定该第一电子设备所处的状态。其中,当第一电子设备存储有其他电子设备的地址信息时,则可以确定该第一电子设备所处的状态为配对后的回连状态。当第一电子设备未存储有其他电子设备的地址信息时,则可以确定该第一电子设备所处的状态为配对状态。As yet another implementable manner, the first electronic device may determine the state of the first electronic device based on its storage record. Wherein, when the first electronic device stores address information of other electronic devices, it can be determined that the state of the first electronic device is the reconnection state after pairing. When the first electronic device does not store address information of other electronic devices, it may be determined that the state of the first electronic device is a pairing state.
当然,在本实施例中,还可以通过其他更多的方式获取第一电子设备所处的状态,在此不再赘述。Of course, in this embodiment, the state of the first electronic device can also be obtained through other more ways, which will not be repeated here.
在一些实施方式中,该第一电子设备可以预先设置并存储有至少两个大小不同的预设发射功 率。例如,第一电子设备可以预先设置并存储有第一预设发射功率和第二预设发射功率,且第一预设发射功率和第二预设发射功率的大小不同。又例如,第一电子设备可以预先设置并存储有第一预设发射功率、第二预设发射功率、第三预设发射功率……第N预设发射功率,且第一预设发射功率、第二预设发射功率、第三预设发射功率……第N预设发射功率的大小各不相同。In some implementation manners, the first electronic device may preset and store at least two preset transmit powers with different magnitudes. For example, the first electronic device may preset and store a first preset transmit power and a second preset transmit power, and the first preset transmit power and the second preset transmit power are different in magnitude. For another example, the first electronic device may be preset and stored with the first preset transmit power, the second preset transmit power, the third preset transmit power...the Nth preset transmit power, and the first preset transmit power, The second preset transmit power, the third preset transmit power...the Nth preset transmit power have different sizes.
在本实施例中,第一电子设备在获取其所处的状态后,可以根据该第一电子设备所处的状态,从至少两个预设发射功率中确定一个预设发射功率,作为目标发射功率。In this embodiment, after the first electronic device obtains its state, it can determine a preset transmission power from at least two preset transmission powers according to the state of the first electronic device as the target transmission power. power.
作为一种可实施的方式,第一电子设备可以预先建立并存储有映射关系表,该映射关系表中可以包括至少两个状态,至少两个预设发射功率以及至少两个状态和至少两个预设发射功率之间的对应关系,其中,至少两个状态中的每个状态可以对应一个或者多个预设发射功率,在此不做限定。请参阅表1,该映射关系表中的至少两个状态可以包括第一状态、第二状态以及第三状态,该映射关系表中的至少两个预设发射功率可以包括第一预设发射功率、第二预设发射功率以及第三预设发射功率,其中,第一状态和第一预设发射功率存在对应关系,第二状态和第二预设发射功率存在对应关系,第三状态和第三预设发射功率存在对应关系。As an implementable manner, the first electronic device may pre-establish and store a mapping table, which may include at least two states, at least two preset transmission powers, at least two states, and at least two Correspondence between preset transmit powers, where each state in at least two states may correspond to one or more preset transmit powers, is not limited here. Please refer to Table 1, at least two states in the mapping table may include a first state, a second state, and a third state, and at least two preset transmit powers in the mapping table may include a first preset transmit power . The second preset transmit power and the third preset transmit power, wherein there is a corresponding relationship between the first state and the first preset transmit power, a corresponding relationship between the second state and the second preset transmit power, and a corresponding relationship between the third state and the first preset transmit power. There is a corresponding relationship among the three preset transmission powers.
表1Table 1
状态state | 预设发射功率Default transmit power |
第一状态first state | 第一预设发射功率The first preset transmit power |
第二状态second state | 第二预设发射功率The second preset transmit power |
第三状态third state | 第三预设发射功率The third preset transmit power |
……... | ……... |
基于上述映射关系表,当确定该第一电子设备所处的状态为第一状态时,可以确定第一预设发射功率作为目标发射功率;当确定该第一电子设备所处的状态为第二状态时,可以确定第二预设发射功率作为目标发射功率;当确定该第一电子设备所处的状态为第三状态时,可以确定第三预设发射功率作为目标发射功率,以此类推。Based on the above mapping table, when it is determined that the state of the first electronic device is the first state, the first preset transmission power can be determined as the target transmission power; when it is determined that the state of the first electronic device is the second state, the second preset transmit power can be determined as the target transmit power; when the state of the first electronic device is determined to be the third state, the third preset transmit power can be determined as the target transmit power, and so on.
在一些实施方式中,第一电子设备可以预先设置并存储固定大小的预设发射功率,作为默认的预设发射功率,以及将该默认的预设发射功率与电子设备所处的其中一个状态对应。在具体实现时,当获取到第一电子设备所处的状态与该其中一个状态一致时,则可以将该默认的预设发射功率作为目标发射功率;当获取到第一电子设备所处的状态与该其中一个状态不一致时,则可以在默认的预设发射功率的基础上增大某个数值或者减小某个数值,获得新的预设发射功率作为目标发射功率。In some implementations, the first electronic device may preset and store a fixed amount of preset transmit power as the default preset transmit power, and correspond the default preset transmit power to one of the states of the electronic device . In specific implementation, when the obtained state of the first electronic device is consistent with one of the states, the default preset transmit power can be used as the target transmit power; when the state of the first electronic device is obtained If it is inconsistent with one of the states, a certain value may be increased or decreased on the basis of the default preset transmit power to obtain a new preset transmit power as the target transmit power.
在本实施例中,预设发射功率可以为蓝牙低功耗发射功率。In this embodiment, the preset transmit power may be Bluetooth low energy transmit power.
步骤S120:基于所述目标发射功率发射广播消息,以指示接收到所述广播消息的第二电子设备在确定所述广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息。Step S120: Transmitting a broadcast message based on the target transmission power to instruct the second electronic device that has received the broadcast message to display target information when the received signal strength of the broadcast message is determined to be greater than a received signal strength threshold.
在本实施例中,第一电子设备在确定目标发射功率后,则可以基于该目标发射功率发射广播消息。可以理解的,目标发射功率越大,则基于该目标发射功率发射的广播消息的覆盖范围越广(越远),且在同一位置接收到该广播消息的接收信号强度越大;目标发射功率越小,则基于该目标发射功率发射的广播消息的覆盖范围越窄(越近),且在同一位置接收到该广播消息的接收信号强度越小。例如,假设预设发射功率包括第一预设发射功率和第二预设发射功率,且第一预设发射功率大于第二预设发射功率,那么,当确定第一预设发射功率作为目标发射功率时,则基于该目标发射功率发射的广播消息的覆盖范围可以为S1,在同一位置接收到该广播消息的接收信号强度为RSSI1,当确定第二预设发射功率作为目标发射功率时,则基于该目标发射功率发射的广播消息的覆盖范围可以为S2,在同一位置接收到该广播消息的接收信号强度为RSSI2,则S1的覆盖范围大于S2的覆盖范围,且RSSI1大于RSSI2。In this embodiment, after determining the target transmission power, the first electronic device may transmit the broadcast message based on the target transmission power. It can be understood that the larger the target transmit power, the wider (farther) the coverage of the broadcast message transmitted based on the target transmit power, and the greater the received signal strength of the broadcast message received at the same location; If is smaller, the coverage of the broadcast message transmitted based on the target transmit power is narrower (closer), and the received signal strength of the broadcast message received at the same location is smaller. For example, assuming that the preset transmit power includes a first preset transmit power and a second preset transmit power, and the first preset transmit power is greater than the second preset transmit power, then, when the first preset transmit power is determined as the target transmit power, the coverage of the broadcast message transmitted based on the target transmit power can be S1, and the received signal strength of the broadcast message received at the same location is RSSI1, when the second preset transmit power is determined as the target transmit power, then The coverage of the broadcast message transmitted based on the target transmission power may be S2, and the received signal strength of the broadcast message received at the same location is RSSI2, then the coverage of S1 is greater than the coverage of S2, and RSSI1 is greater than RSSI2.
其中,当第二电子设备位于第一电子设备的广播覆盖范围内时,则第二电子设备可以接收到第一电子设备发射的广播消息。相应地,第二电子设备接收到第一电子设备发射的广播消息时,可以获取接收到的广播消息的接收信号强度,并将该接收信号强度与预先设置的接收信号强度阈值进行大小比较。其中,当大小比较结果表征该接收信号强度大于预先设置的接收信号强度阈值时,则可以在第二电子设备显示目标信息;当大小比较结果表征该接收信号强度不大于预先设置的接收信号强度阈值时,则不在第二电子设备显示目标信息。Wherein, when the second electronic device is within the broadcast coverage of the first electronic device, the second electronic device may receive the broadcast message transmitted by the first electronic device. Correspondingly, when the second electronic device receives the broadcast message transmitted by the first electronic device, it may obtain the received signal strength of the received broadcast message, and compare the received signal strength with a preset received signal strength threshold. Wherein, when the size comparison result indicates that the received signal strength is greater than the preset received signal strength threshold, the target information may be displayed on the second electronic device; when the size comparison result indicates that the received signal strength is not greater than the preset received signal strength threshold , the target information is not displayed on the second electronic device.
在一些实施方式中,第二电子设备可以根据接收到的第一电子设备发射的广播消息,计算该广播消息的接收信号强度。在一种计算方式中,接收信号强度=RxPower-SystemGain,其中,RxPower为对接收到的无线信号进行模/数转换,再进行数字前端(digital front end,DFE)的滤波等处理后,计算获得的信号带内接收功率;SystemGain表示系统增益,可以根据射频前端预估得到。In some implementation manners, the second electronic device may calculate the received signal strength of the broadcast message according to the received broadcast message transmitted by the first electronic device. In one calculation method, received signal strength = RxPower-SystemGain, wherein, RxPower is to perform analog/digital conversion on the received wireless signal, and then perform digital front end (digital front end, DFE) filtering and other processing, and then calculate and obtain The in-band received power of the signal; SystemGain indicates the system gain, which can be estimated according to the RF front-end.
在一些实施方式中,以第一电子设备为TWS蓝牙耳机装置,第二电子设备为智能手机为例进行说明。当耳机所容置的耳机盒(充电装置)打开时,则耳机可以自动开机并尝试以所确定的目标 发射功率发射广播消息,以尝试建立与智能手机的蓝牙连接,当TWS蓝牙耳机装置的耳机盒盖合时,则耳机可以自动关闭并停止以所确定的目标发射功率发射广播消息。相应地,当智能手机位于耳机的广播范围内时,则可以接收到该耳机以所确定的目标发射功率发射的广播消息,以及获取接收到的耳机以所确定的目标发射功率发射的广播消息的接收信号强度。In some embodiments, the first electronic device is a TWS Bluetooth earphone device, and the second electronic device is a smart phone as an example for illustration. When the earphone box (charging device) accommodated by the earphone is opened, the earphone can automatically turn on and try to transmit broadcast messages with the determined target transmission power in order to try to establish a Bluetooth connection with the smartphone. When the earphone of the TWS Bluetooth earphone device When the lid is closed, the headset may automatically switch off and stop transmitting broadcast messages at the determined target transmit power. Correspondingly, when the smart phone is within the broadcasting range of the earphone, it can receive the broadcast message transmitted by the earphone at the determined target transmit power, and obtain the information of the received broadcast message transmitted by the earphone at the determined target transmit power. Received signal strength.
可以理解的是,第一电子设备在发射广播消息时,若位于该第一电子设备的广播覆盖范围内的第二电子设备的数量为一个,则仅该一个第二电子设备可以接收到该第一电子设备发射的广播消息,并获取该广播消息的接收信号强度;若位于该第一电子设备的广播覆盖范围内的第二电子设备的数量为多个,则该多个第二电子设备均可以接收到该第一点设备发射的广播消息,并获取该广播消息的接收信号强度。It can be understood that when the first electronic device transmits a broadcast message, if the number of second electronic devices within the broadcast coverage of the first electronic device is one, only the second electronic device can receive the first electronic device. A broadcast message transmitted by an electronic device, and obtain the received signal strength of the broadcast message; if there are multiple second electronic devices within the broadcast coverage of the first electronic device, all of the multiple second electronic devices The broadcast message transmitted by the first device can be received, and the received signal strength of the broadcast message can be obtained.
在一些实施方式中,该第二电子设备在获取该第一电子设备发射的广播消息的接收信号强度后,可以将该接收信号强度与接收信号强度阈值进行比较,以判断该接收信号强度是否大于接收信号强度阈值。其中,当判定该接收信号强度不大于接收信号强度阈值时,可以确定该接收信号强度未达到显示提示的信号强度要求,则可以拦截目标信息,即,可以不显示目标信息。其中,当判定该接收信号强度等大于接收信号强度阈值时,可以确定该接收信号强度达到显示提示的信号强度要求,则显示目标信息,即,可以显示目标信息。In some embodiments, after obtaining the received signal strength of the broadcast message transmitted by the first electronic device, the second electronic device may compare the received signal strength with a received signal strength threshold to determine whether the received signal strength is greater than Received signal strength threshold. Wherein, when it is determined that the received signal strength is not greater than the received signal strength threshold, it can be determined that the received signal strength does not meet the signal strength requirement for displaying prompts, then the target information can be intercepted, that is, the target information can not be displayed. Wherein, when it is determined that the received signal strength is greater than the received signal strength threshold, it can be determined that the received signal strength meets the signal strength requirement for displaying prompts, and then the target information is displayed, that is, the target information can be displayed.
在一些实施方式中,第二电子设备显示目标信息的方式可以包括:在显示界面显示目标信息,在显示界面上弹窗显示目标信息,在状态栏显示目标信息等,在此不做限定。In some implementations, the way the second electronic device displays the target information may include: displaying the target information on a display interface, displaying the target information in a pop-up window on the display interface, displaying the target information in a status bar, etc., which is not limited here.
在一些实施方式中,第二电子设备所处的状态可以包括配对状态和回连状态。其中,当第二电子设备所处的状态为配置状态时,则该目标信息可以为连接提示信息,即,该目标信息可以用于提示与第二电子设备进行配对连接操作。其中,当第二电子设备所处的状态为回连状态时,则该目标信息可以为连接成功提示信息,即,该目标信息可以用于提示已与第二电子设备执行回连成功。In some embodiments, the state of the second electronic device may include a pairing state and a reconnecting state. Wherein, when the state of the second electronic device is the configuration state, the target information may be connection prompt information, that is, the target information may be used to prompt to perform a pairing and connection operation with the second electronic device. Wherein, when the state of the second electronic device is the connection back state, the target information may be connection success prompt information, that is, the target information may be used to prompt that the connection back with the second electronic device has been successfully performed.
本申请一实施例提供的广播消息的发射方法,根据第一电子设备所处的状态,从至少两个大小不同的预设发射功率中确定目标发射功率,基于目标发射功率发射广播消息,以指示接收到该广播消息的第二电子设备在确定广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息,从而通过根据电子设备所处的状态,动态确定目标发射功率进行广播消息的发射,以供其他电子设备确定对提示信息的显示,实现更好地控制提示信息的显示,避免对用户的打扰以改善用户体验。According to the broadcast message transmission method provided by an embodiment of the present application, according to the state of the first electronic device, the target transmission power is determined from at least two preset transmission powers with different sizes, and the broadcast message is transmitted based on the target transmission power to indicate The second electronic device that receives the broadcast message displays the target information when it determines that the received signal strength of the broadcast message is greater than the received signal strength threshold, so as to transmit the broadcast message by dynamically determining the target transmission power according to the state of the electronic device, It is used for other electronic devices to determine the display of the prompt information, so as to better control the display of the prompt information, avoid disturbing the user and improve the user experience.
请参阅图6,图6示出了本申请一实施例提供的广播消息的发射方法的流程示意图。该方法应用于上述第一电子设备,下面将针对图6所示的流程进行详细的阐述,在本实施例中,该至少两个预设发射功率包括第一预设发射功率和第二预设发射功率,其中,第一预设发射功率大于第二预设发射功率,所述广播消息的发射方法具体可以包括以下步骤:Referring to FIG. 6 , FIG. 6 shows a schematic flowchart of a method for transmitting a broadcast message according to an embodiment of the present application. The method is applied to the above-mentioned first electronic device, and the following will elaborate on the process shown in FIG. 6 . In this embodiment, the at least two preset transmit powers include the first preset transmit power and the second preset Transmission power, wherein the first preset transmission power is greater than the second preset transmission power, and the method for transmitting a broadcast message may specifically include the following steps:
步骤S210:当所述第一电子设备所处的状态为配对状态时,从所述至少两个预设发射功率中确定第一预设发射功率作为所述目标发射功率,其中,所述配对状态用于表征所述第一电子设备与第二电子设备之间待执行配对操作。Step S210: When the state of the first electronic device is a pairing state, determine a first preset transmission power from the at least two preset transmission powers as the target transmission power, wherein the pairing state It is used to represent the pairing operation to be performed between the first electronic device and the second electronic device.
在本实施例中,该至少两个预设发射功率包括第一预设发射功率和第二预设发射功率,其中,该第一预设发射功率大于第二预设发射功率。作为一种方式,该第一预设发射功率可以为预先测试完成的默认值,则第二预设发射功率可以在第一预设发射功率的基础上减去某个值获得,作为另一种方式,该第二预设发射功率可以为预先测试完成的默认值,则第一预设发射功率可以在第二预设发射功率的基础上加上某个值获得。In this embodiment, the at least two preset transmit powers include a first preset transmit power and a second preset transmit power, wherein the first preset transmit power is greater than the second preset transmit power. As a method, the first preset transmit power can be the default value of the pre-test, then the second preset transmit power can be obtained by subtracting a certain value from the first preset transmit power, as another In this way, the second preset transmit power may be a default value after pre-testing, and then the first preset transmit power may be obtained by adding a certain value to the second preset transmit power.
作为一种方式,第一电子设备所处的状态可以包括配对状态。其中,第一电子设备处于配对状态,代表着在第一电子设备的广播覆盖范围内的其他电子设备可以随时扫描到该第一电子设备,并且可以与该第一电子设备进行配对和连接。于本实施例中,该配对状态可以用于表征该第一电子设备与该第二电子设备之间待执行配对操作。作为一种可实施的方式,该第二电子设备可以为能够扫描到该第一电子设备,且未与该第一电子设备进行过配对连接的任意电子设备。As a manner, the state of the first electronic device may include a pairing state. Wherein, the first electronic device is in the pairing state, which means that other electronic devices within the broadcast coverage of the first electronic device can scan the first electronic device at any time, and can pair and connect with the first electronic device. In this embodiment, the pairing status can be used to represent the pending pairing operation between the first electronic device and the second electronic device. As an implementable manner, the second electronic device may be any electronic device that can scan to the first electronic device and has not been paired with the first electronic device.
在一些实施方式中,当确定该第二电子设备所处的状态为配对状态时,可以认为此时第一电子设备是没有针对性的进行广播消息的发射,则可以尽量的使第二电子设备显示目标信息以提示第二电子设备对应的用户建立与第一电子设备的连接。基于此,在本实施例中,可以从第一预设发射功率和第二预设发射功率中,选择更大的预设发射功率作为目标预设发射功率,以使得第二电子设备接收到的第一电子设备的广播消息的接收信号强度更容易大于预先设置的接收信号强度阈值,从而提升目标信息的显示几率。在本申请一实施例中,当确定第一电子设备所处的状态为配对状态时,则可以从第一预设发射功率和第二预设发射功率中,确定第一预设发射功率作为目标预设发射功率。In some implementations, when it is determined that the state of the second electronic device is the pairing state, it can be considered that the first electronic device is not targeted to transmit broadcast messages at this time, and the second electronic device can be made to The target information is displayed to prompt the user corresponding to the second electronic device to establish a connection with the first electronic device. Based on this, in this embodiment, a larger preset transmit power can be selected from the first preset transmit power and the second preset transmit power as the target preset transmit power, so that the second electronic device receives The received signal strength of the broadcast message of the first electronic device is more likely to be greater than the preset received signal strength threshold, thereby increasing the probability of displaying the target information. In an embodiment of the present application, when it is determined that the state of the first electronic device is the pairing state, the first preset transmission power can be determined as the target from the first preset transmission power and the second preset transmission power Preset transmit power.
步骤S220:当所述第一电子设备所处的状态为回连状态时,从所述至少两个预设发射功率中确定所述第二预设发射功率作为所述目标发射功率,其中,所述回连状态用于表征所述第一电子设备与第三电子设备之间待执行配对后的回连操作。Step S220: When the state of the first electronic device is the connection back state, determine the second preset transmit power from the at least two preset transmit powers as the target transmit power, wherein the The connection back status is used to represent the connection back operation between the first electronic device and the third electronic device after pairing is to be performed.
作为一种方式,第一电子设备所处的状态可以包括配对后的回连状态。其中,第一电子设备处于回连状态,代表着在第一电子设备正通过寻呼的方式与之前配对且连接过的电子设备进行回连操作。于本实施例中,该回连状态可以用于表征该第一电子设备与第三电子设备待执行配对后的回连操作,其中,该第三电子设备可以为第一电子设备上一个配对连接过的电子设备。As a manner, the state of the first electronic device may include a reconnection state after pairing. Wherein, the first electronic device is in the connection back state, which means that the first electronic device is performing a connection back operation with the previously paired and connected electronic device through paging. In this embodiment, the connection back status can be used to represent the connection back operation after the first electronic device and the third electronic device are to be paired, wherein the third electronic device can be a pairing connection on the first electronic device old electronic equipment.
在一些实施方式中,当确定该第一电子设备所处的状态为回连状态时,可以认为第一电子设备更大概率是为了回连之前配对连接过的电子设备,例如,可以认为第一电子设备正在与之前配对连接过的第三电子设备进行回连,则可以尽量的使第二电子设备不显示目标信息以降低对第二电子设备对应的用户的打扰。基于此,在本实施例中,可以从第一预设发射功率和第二预设发射功率中,选择更小的预设发射功率作为目标发射功率,以使得第二电子设备接收到的第一电子设备的广播消息的接收信号强度更容易小于预先设置的接收信号强度阈值,从而降低目标信息的显示几率。在本申请一实施例中,当确定第一电子设备所处的状态为回连状态时,则可以从第一预设发射功率和第二预设发射功率中,确定第二预设发射功率作为目标预设发射功率。In some implementations, when it is determined that the state of the first electronic device is the connection back state, it can be considered that the first electronic device is more likely to be connected to an electronic device that has been paired and connected before. If the electronic device is connecting back to the third electronic device that has been paired and connected before, the second electronic device may not display the target information as much as possible to reduce disturbance to the user corresponding to the second electronic device. Based on this, in this embodiment, a smaller preset transmit power can be selected as the target transmit power from the first preset transmit power and the second preset transmit power, so that the first preset transmit power received by the second electronic device The received signal strength of the broadcast message of the electronic device is more likely to be smaller than the preset received signal strength threshold, thereby reducing the probability of displaying the target information. In an embodiment of the present application, when it is determined that the state of the first electronic device is the connection back state, the second preset transmit power may be determined from the first preset transmit power and the second preset transmit power as Target preset transmit power.
步骤S230:基于所述目标发射功率发射广播消息,以指示接收到所述广播消息的第二电子设备在确定所述广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息。Step S230: Transmitting a broadcast message based on the target transmission power to instruct the second electronic device that has received the broadcast message to display target information when it is determined that the received signal strength of the broadcast message is greater than a received signal strength threshold.
其中,步骤S230的具体描述请参阅步骤S120,在此不再赘述。Wherein, for the specific description of step S230, please refer to step S120, which will not be repeated here.
本申请一实施例提供的广播消息的发射方法,获取第一电子设备所处的状态,当第一电子设备所处的状态为配置状态时,从至少两个预设发射功率中确定第一发射功率作为目标发射功率,当第一电子设备所处的状态为回连状态时,从至少两个预设发射功率中确定第二发射功率作为目标发射功率,基于目标发射功率发射广播消息,以指示接收到该广播消息的第二电子设备在确定该广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息。相较于图5所示的广播消息的发送方法,本实施例还通过在电子设备处于配对状态时相较于处于回连状态时选择更大的发射功率进行广播消息的发射,实现更好地控制提示信息的显示,避免对用户的打扰以改善用户体验。The broadcast message transmission method provided by an embodiment of the present application obtains the state of the first electronic device, and when the state of the first electronic device is the configuration state, determines the first transmission from at least two preset transmission powers. The power is used as the target transmission power. When the state of the first electronic device is the connection back state, the second transmission power is determined from at least two preset transmission powers as the target transmission power, and a broadcast message is transmitted based on the target transmission power to indicate The second electronic device that has received the broadcast message displays the target information when it determines that the received signal strength of the broadcast message is greater than the received signal strength threshold. Compared with the broadcast message sending method shown in FIG. 5 , this embodiment also selects a higher transmit power to transmit the broadcast message when the electronic device is in the pairing state than when it is in the reconnection state, so as to achieve better Control the display of prompt information to avoid disturbing users and improve user experience.
请参阅图7,图7示出了本申请一实施例提供的广播消息的发射方法的流程示意图。该方法应用于上述第一电子设备,下面将针对图7所示的流程进行详细的阐述,所述广播消息的发射方法具体可以包括以下步骤:Referring to FIG. 7 , FIG. 7 shows a schematic flowchart of a method for transmitting a broadcast message according to an embodiment of the present application. The method is applied to the above-mentioned first electronic device, and the flow shown in FIG. 7 will be described in detail below. The method for transmitting a broadcast message may specifically include the following steps:
步骤S310:当所述第一电子设备不存在连接记录时,确定所述第一电子设备所处的状态为配对状态,其中,所述配对状态用于表征所述第一电子设备与所述第二电子设备之间待执行配对操作。Step S310: When there is no connection record for the first electronic device, determine that the state of the first electronic device is a pairing state, wherein the pairing state is used to represent the relationship between the first electronic device and the second electronic device. A pairing operation is to be performed between the two electronic devices.
作为一种可实施的方式,第一电子设备在发射广播消息之前,可以获取其连接信息,并基于其连接信息,确定第一电子设备是否存在连接记录。其中,当基于第一电子设备的连接信息确定该第一电子设备不存在连接记录时,则可以确定该第一电子设备所处的状态为配对状态。As an implementable manner, before transmitting the broadcast message, the first electronic device may obtain its connection information, and based on the connection information, determine whether the first electronic device has a connection record. Wherein, when it is determined based on the connection information of the first electronic device that there is no connection record for the first electronic device, it may be determined that the state of the first electronic device is a pairing state.
在一些实施方式中,当确定该第一电子设备不存在连接记录时,则表征第一电子设备在之前未与其他电子设备进行过配对和连接,也就是说,第一电子设备在本次发射广播消息时,是为了与其他电子设备进行配对并连接,即,可以确定第一电子设备所处的状态为配对状态。于本实施例中,该第一电子设备所发射的广播消息会被第二电子设备接收到,则该配对状态表征第一电子设备与第二电子设备之间待执行配对操作。In some implementations, when it is determined that there is no connection record for the first electronic device, it means that the first electronic device has not been paired and connected with other electronic devices before, that is, the first electronic device When the message is broadcast, it is for pairing and connecting with other electronic devices, that is, it can be determined that the state of the first electronic device is the pairing state. In this embodiment, the broadcast message transmitted by the first electronic device will be received by the second electronic device, and the pairing status indicates that a pairing operation is to be performed between the first electronic device and the second electronic device.
在一些实施方式中,第一电子设备可以判断其是否存储有第三电子设备的地址信息,例如,第一电子设备可以判断其是否存储有第三电子设备的MAC地址。其中,当确定该第一电子设备未存储有第三电子设备的地址信息时,则可以确定该第一电子设备不存在连接记录。即,当确定该第一电子设备未存储有第三电子设备的地址信息时,则表征第一电子设备在之前未与第三电子设备进行过配对和连接,也就是说,第一电子设备在本次发射广播消息时,是为了与第二电子设备进行配对并连接,即,可以确定第一电子设备所处的状态为配对状态。In some implementation manners, the first electronic device may determine whether it stores address information of the third electronic device, for example, the first electronic device may determine whether it stores the MAC address of the third electronic device. Wherein, when it is determined that the first electronic device does not store the address information of the third electronic device, it may be determined that there is no connection record for the first electronic device. That is, when it is determined that the first electronic device does not store the address information of the third electronic device, it means that the first electronic device has not been paired and connected with the third electronic device before, that is, the first electronic device is in When transmitting the broadcast message this time, it is for pairing and connecting with the second electronic device, that is, it can be determined that the state of the first electronic device is the pairing state.
步骤S320:当所述第一电子设备存在连接记录时,确定所述第一电子设备所处的状态为回连状态,其中,所述回连状态用于表征所述第一电子设备与第三电子设备待执行配对后的回连操作。Step S320: When the first electronic device has a connection record, determine that the state of the first electronic device is the reconnection state, wherein the reconnection state is used to represent the connection between the first electronic device and the third electronic device. The electronic device is to be connected back after pairing.
作为一种可实施的方式,第一电子设备在发射广播消息之前,可以获取其连接信息,并基于其连接信息,确定第一电子设备是否存在连接记录。其中,当基于第一电子设备的连接信息确定该第一电子设备存在连接记录时,则可以确定该第一电子设备所处的状态为回连状态。即,可以确定第一电子设备所处的状态为配对连接到断开连接后的回连状态。As an implementable manner, before transmitting the broadcast message, the first electronic device may obtain its connection information, and based on the connection information, determine whether the first electronic device has a connection record. Wherein, when it is determined based on the connection information of the first electronic device that the first electronic device has a connection record, it may be determined that the state of the first electronic device is the connection back state. That is, it may be determined that the state of the first electronic device is a reconnection state after a pairing connection and a disconnection.
在一些实施方式中,当确定该第一电子设备存在连接记录时,则表征第一电子设备在之前与其他电子设备进行过配对和连接,也就是说,第一电子设备在本次发射广播消息时,是为了与之前进行过配对和连接的电子设备进行回连,即,可以确定第一电子设备所处的状态为回连状态。于本实施例中,由于第二电子设备可以接收到该第一电子设备发射的广播消息,且基于该广播消息确定该第一电子设备所处的状态为回连状态,则可以认为该回连状态用于表征该第一电子设备与其他电子设备之间待执行回连操作,在本申请一实施例中,该回连状态用于表征该第一电子设备与第三电子设备之间待执行回连操作。In some implementations, when it is determined that the first electronic device has a connection record, it means that the first electronic device has been paired and connected with other electronic devices before, that is, the first electronic device transmits a broadcast message this time , it is for connecting back with the electronic device that has been paired and connected before, that is, it can be determined that the state of the first electronic device is the connecting back state. In this embodiment, since the second electronic device can receive the broadcast message transmitted by the first electronic device, and based on the broadcast message, it is determined that the state of the first electronic device is the connection back state, it can be considered that the connection back The state is used to represent the connection back operation to be performed between the first electronic device and other electronic devices. Connect back to the operation.
在一些实施方式中,第一电子设备可以判断其是否存储有第三电子设的地址信息,例如,第一电子设备可以判断其是否存储有第三电子设备的MAC地址。其中,当确定该第一电子设备存储有第三电子设备的地址信息时,则可以确定该第一电子设备存在连接记录。即,当确定该第一电子设备存储有第三电子设备的地址信息时,则表征第一电子设备在之前与第三电子设备进行过配对和连接,也就是说,第一电子设备在本次发射广播消息时,不是为了与第二电子设备进行配对并连接(是为了与第三电子设备进行回连),即,可以确定第一电子设备所处的状态为回连状态。In some implementation manners, the first electronic device may determine whether it stores address information of the third electronic device, for example, the first electronic device may determine whether it stores the MAC address of the third electronic device. Wherein, when it is determined that the first electronic device stores the address information of the third electronic device, it may be determined that the first electronic device has a connection record. That is, when it is determined that the first electronic device stores the address information of the third electronic device, it means that the first electronic device has been paired and connected with the third electronic device before, that is to say, the first electronic device has When transmitting the broadcast message, it is not for pairing and connection with the second electronic device (for connection back with the third electronic device), that is, it can be determined that the state of the first electronic device is the connection back state.
作为一种方式,当第一电子设备存在连接记录时,可以检测第一电子设备在此次发射广播消息时,是否已执行过回连操作并回连失败,其中,当第一电子设备已执行过回连操作并回连失败时,则可以认为第一电子设备从回连状态切换为配对状态,即确定第一电子设备所处的状态为配对状态,而不是回连状态。As a way, when the first electronic device has a connection record, it can be detected whether the first electronic device has performed the connection back operation and failed to perform the connection back operation when the first electronic device transmits the broadcast message this time, wherein, when the first electronic device has performed When the connection-back operation is performed and the connection-back fails, it can be considered that the first electronic device switches from the connection-back state to the pairing state, that is, it is determined that the state of the first electronic device is the pairing state, not the connection-back state.
作为又一种方式,当第一电子设备存在连接记录时,可以检测第一电子设备在此次发射广播消息时,是否已接收到切换至配对状态指令,比如用户长按耳机盒上的按键进行状态切换,当检测到第一电子设备接收到切换至配对状态指令时,则可以认为第一电子设备从回连状态切换为配对状态,即确定第一电子设备所处的状态为配对状态,而不是回连状态。As yet another way, when the first electronic device has a connection record, it can be detected whether the first electronic device has received an instruction to switch to the pairing state when the first electronic device transmits the broadcast message this time, such as the user long presses the button on the earphone box to perform State switching, when it is detected that the first electronic device receives an instruction to switch to the pairing state, it can be considered that the first electronic device switches from the reconnection state to the pairing state, that is, it is determined that the state of the first electronic device is the pairing state, and Not connected state.
其中,当第一电子设备存在连接记录,且第一电子设备未执行过回连操作以及第一电子设备未接收到切换至配对状态指令时,可以确定第一电子设备所处的状态为回连状态。Among them, when the first electronic device has a connection record, and the first electronic device has not performed a connection back operation and the first electronic device has not received an instruction to switch to the pairing state, it can be determined that the state of the first electronic device is a connection back state.
步骤S330:根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率,其中,所述至少两个预设发射功率的大小不同。Step S330: According to the state of the first electronic device, determine a target transmission power from at least two preset transmission powers, wherein the at least two preset transmission powers are different in magnitude.
步骤S340:基于所述目标发射功率发射广播消息,以指示接收到所述广播消息的第二电子设备在确定所述广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息。Step S340: Transmitting a broadcast message based on the target transmission power to instruct the second electronic device that has received the broadcast message to display target information when it is determined that the received signal strength of the broadcast message is greater than a received signal strength threshold.
其中,步骤S330-步骤S340的具体描述请参阅步骤S110-步骤S120,在此不再赘述。Wherein, for the specific description of step S330-step S340, please refer to step S110-step S120, which will not be repeated here.
本申请一实施例提供的广播消息的发射方法,当第一电子设备不存在连接记录时,确定第一电子设备所处的状态为配对状态,或者,当第一电子设备存在连接记录时,确定第一电子设备所处的状态为回连状态,根据第一电子设备所处的配对状态或者回连状态,从至少两个预设发射功率中确定目标发射功率,基于目标发射功率发射广播消息,以指示接收到该广播消息的第二电子设备在确定广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息。相较于图5所示的广播消息的发射方法,本实施例还根据电子设备的连接记录确定电子设备所处的状态,从而提升所确定的电子设备所处的状态的准确性。In the method for transmitting a broadcast message provided by an embodiment of the present application, when the first electronic device does not have a connection record, determine that the state of the first electronic device is a pairing state, or, when the first electronic device has a connection record, determine The state of the first electronic device is the connection back state. According to the pairing state or the connection back state of the first electronic device, the target transmission power is determined from at least two preset transmission powers, and the broadcast message is transmitted based on the target transmission power. To indicate that the second electronic device that has received the broadcast message displays the target information when it determines that the received signal strength of the broadcast message is greater than the received signal strength threshold. Compared with the broadcast message transmission method shown in FIG. 5 , this embodiment also determines the state of the electronic device according to the connection record of the electronic device, thereby improving the accuracy of the determined state of the electronic device.
请参阅图8,图8示出了本申请一实施例提供的广播消息的发射方法的流程示意图。该方法应用于上述第一电子设备,下面将针对图8所示的流程进行详细的阐述,所述广播消息的发射方法具体可以包括以下步骤:Referring to FIG. 8 , FIG. 8 shows a schematic flowchart of a method for transmitting a broadcast message provided by an embodiment of the present application. The method is applied to the above-mentioned first electronic device, and the flow shown in FIG. 8 will be described in detail below. The method for transmitting a broadcast message may specifically include the following steps:
步骤S410:当检测到所述充电装置打开时,根据所述蓝牙耳机所处的状态,从至少两个预设发射功率中确定目标发射功率,其中,所述至少两个预设发射功率的大小不同。Step S410: When it is detected that the charging device is turned on, according to the state of the Bluetooth headset, determine the target transmission power from at least two preset transmission powers, wherein the size of the at least two preset transmission powers is different.
在本实施例中,第一电子设备为蓝牙耳机,该蓝牙耳机容置于充电装置内。In this embodiment, the first electronic device is a bluetooth earphone, and the bluetooth earphone is accommodated in the charging device.
在一些实施方式中,当充电装置盖合时,由于蓝牙耳机容置于该充电装置内,则此时蓝牙耳机不会发射广播消息,因此,可以不获取蓝牙耳机所处的状态。当充电装置打开时,由于蓝牙耳机仅部分容置于该充电装置内,则此时蓝牙耳机会发射广播消息,因此,根据所述蓝牙耳机所处的状态,从至少两个预设发射功率中确定目标发射功率。In some implementations, when the charging device is closed, since the Bluetooth headset is accommodated in the charging device, the Bluetooth headset will not transmit a broadcast message at this time, so the status of the Bluetooth headset may not be obtained. When the charging device is turned on, since the Bluetooth headset is only partially accommodated in the charging device, the Bluetooth headset will transmit a broadcast message at this time. Therefore, according to the state of the Bluetooth headset, at least two preset transmission powers Determine the target transmit power.
步骤S420:基于所述目标发射功率发射广播消息,以指示接收到所述广播消息的第二电子设备在确定所述广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息,其中,所述目标信息用于提示与所述蓝牙耳机进行连接。Step S420: Transmit a broadcast message based on the target transmit power to instruct the second electronic device that has received the broadcast message to display target information when it is determined that the received signal strength of the broadcast message is greater than the received signal strength threshold, wherein the The target information is used to prompt to connect with the Bluetooth headset.
其中,步骤S420具体描述请参阅步骤S120,在此不再赘述。Wherein, for the specific description of step S420, please refer to step S120, which will not be repeated here.
本申请一实施例提供的广播消息的发射方法,当第一电子设备检测到其所容置的充电装置打开时,根据蓝牙耳机所处的状态,从至少两个预设发射功率中确定目标发射功率,基于目标发射功率发射广播消息,以指示接收到广播消息的第二电子设备在确定广播消息的接收信号强度大于接收信号强度阈值时显示目标信息。相较于图5所示的广播消息的发射方法,本实施例还在蓝牙耳机所容置的充电装置打开时,触发蓝牙耳机所处的状态的获取,提升蓝牙耳机所处的状态的获取时机的准确性。In the method for transmitting a broadcast message provided by an embodiment of the present application, when the first electronic device detects that the charging device accommodated in it is turned on, according to the state of the Bluetooth headset, the target transmission power is determined from at least two preset transmission powers. Power, transmitting the broadcast message based on the target transmission power to instruct the second electronic device that has received the broadcast message to display the target information when it is determined that the received signal strength of the broadcast message is greater than the received signal strength threshold. Compared with the broadcast message transmission method shown in FIG. 5 , this embodiment also triggers the acquisition of the state of the Bluetooth headset when the charging device accommodated in the Bluetooth headset is turned on, and improves the timing of acquiring the state of the Bluetooth headset. accuracy.
请参阅图9,图9示出了本申一实施例提供的广播消息的发射方法的流程示意图。该方法用于通过根据电子设备所处的状态,动态确定目标发射功率进行广播消息的发射,以供其他电子设备确定对提示信息的显示,实现更好地控制提示信息的显示,避免对用户的打扰以改善用户体验。在在本申请一实施例中实施例中,该广播消息的发射方法应用于如图13所示的广播消息的发射装置400以及配置有广播消息的发射装置400的电子设备(第二电子设备)500(图14)。可以理解的,本实施例所应用的第二电子设备可以为智能手机、平板电脑、穿戴式电子设备等,在此不做限定。下面 将针对图9所示的流程进行详细的阐述,所述广播消息的发射方法具体可以包括以下步骤:Referring to FIG. 9 , FIG. 9 shows a schematic flowchart of a method for transmitting a broadcast message according to an embodiment of the present application. The method is used to dynamically determine the target transmission power according to the state of the electronic device to transmit the broadcast message, so that other electronic devices can determine the display of the prompt information, so as to better control the display of the prompt information and avoid the inconvenience to the user. Disturb to improve user experience. In an embodiment of the present application, the broadcast message transmitting method is applied to the broadcast message transmitting device 400 shown in FIG. 13 and the electronic device (second electronic device) configured with the broadcast message transmitting device 400 500 (Figure 14). It can be understood that the second electronic device applied in this embodiment may be a smart phone, a tablet computer, a wearable electronic device, etc., which is not limited herein. The process shown in Figure 9 will be described in detail below, and the method for transmitting a broadcast message may specifically include the following steps:
步骤S510:获取接收到的第一电子设备发射的广播消息的接收信号强度,其中,所述广播消息由所述第一电子设备基于目标发射功率发射,所述目标发射功率由所述第一电子设备根据其所处的状态从至少两个预设发射功率中确定,所述至少两个预设发射功率的大小不同。Step S510: Obtain the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on a target transmit power, and the target transmit power is determined by the first electronic device The device is determined from at least two preset transmission powers according to its state, and the at least two preset transmission powers have different magnitudes.
步骤S520:当所述接收信号强度大于接收信号强度阈值时,显示目标信息。Step S520: Display target information when the received signal strength is greater than the received signal strength threshold.
其中,步骤S510-步骤S520的具体描述请参阅步骤S110-步骤S130,在此不再赘述。Wherein, for the specific description of step S510-step S520, please refer to step S110-step S130, which will not be repeated here.
本申请一实施例提供的广播消息的发射方法,第二电子设备获取接收到的第一电子设备发射的广播消息的接收信号强度,其中,该广播消息由第一电子设备基于目标发射功率发射,目标发射功率由第一电子设备根据其所处的状态从至少两个预设发射功率中确定,当接收信号强度大于接收信号强度阈值时,显示目标信息,从而通过根据电子设备所处的状态,动态确定目标发射功率进行广播消息的发射,以供其他电子设备确定对提示信息的显示,实现更好地控制提示信息的显示,避免对用户的打扰以改善用户体验。In the method for transmitting a broadcast message provided by an embodiment of the present application, the second electronic device obtains the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on the target transmission power, The target transmission power is determined by the first electronic device from at least two preset transmission powers according to its state, and when the received signal strength is greater than the received signal strength threshold, the target information is displayed, so that according to the state of the electronic device, Dynamically determine the target transmission power to transmit broadcast messages for other electronic devices to determine the display of prompt information, so as to better control the display of prompt information, avoid disturbing users and improve user experience.
请参阅图10,图10示出了本申请一实施例提供的广播消息的发射方法的流程示意图。该方法应用于上述第二电子设备,下面将针对图10所示的流程进行详细的阐述,所述广播消息的发射方法具体可以包括以下步骤:Referring to FIG. 10 , FIG. 10 shows a schematic flowchart of a method for transmitting a broadcast message according to an embodiment of the present application. This method is applied to the above-mentioned second electronic device, and the flow shown in FIG. 10 will be described in detail below. The method for transmitting a broadcast message may specifically include the following steps:
步骤S610:获取接收到的第一电子设备发射的广播消息的接收信号强度,其中,所述广播消息由所述第一电子设备基于目标发射功率发射,所述目标发射功率由所述第一电子设备根据其所处的状态从至少两个预设发射功率中确定,所述至少两个预设发射功率的大小不同。Step S610: Obtain the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on a target transmit power, and the target transmit power is determined by the first electronic device The device is determined from at least two preset transmission powers according to its state, and the at least two preset transmission powers have different magnitudes.
其中,步骤S610的具体描述请参阅步骤S110-步骤S120,在此不再赘述。Wherein, for the specific description of step S610, please refer to step S110-step S120, which will not be repeated here.
步骤S620:当所述接收信号强度大于接收信号强度阈值且所述第一电子设备满足预设设备条件时,显示所述目标信息。Step S620: When the received signal strength is greater than a received signal strength threshold and the first electronic device satisfies a preset device condition, display the target information.
在一些实施方式中,该第二电子设备可以预先设置并存储有预设设备条件,该预设设备条件用于作为该第一电子设备的判断依据。因此,在本实施例中,第二电子设备在接收到第一电子设备发射的广播消息时,可以基于该广播消息判断该第一电子设备是否满足预设设备条件。其中,当确定该第一电子设备满足预设设备条件时,则可以在确定广播消息的接收信号强度大于接收信号强度阈值的基础上,显示目标信息。其中,当确定该第一电子设备不满足预设设备条件时,则可以即使在确定广播消息的接收信号强度大于接收信号强度的基础上,也不显示目标信息。In some implementation manners, the second electronic device may be preset and stored with a preset device condition, and the preset device condition is used as a judgment basis for the first electronic device. Therefore, in this embodiment, when the second electronic device receives the broadcast message transmitted by the first electronic device, it may judge whether the first electronic device satisfies the preset device condition based on the broadcast message. Wherein, when it is determined that the first electronic device satisfies the preset device condition, the target information may be displayed on the basis of determining that the received signal strength of the broadcast message is greater than the received signal strength threshold. Wherein, when it is determined that the first electronic device does not satisfy the preset device condition, the target information may not be displayed even if it is determined that the received signal strength of the broadcast message is greater than the received signal strength.
作为一种可实施的方式,第二电子设备在接收到第一电子设备发射的广播消息时,可以对该广播消息进行解析。当解析成功时,表征该第一电子设备所发射的广播消息的协议满足第二电子设备所设置的协议,则可以确定该第一电子设备满足预设设备条件。当解析失败时,表征该第一电子设备所发射的广播消息的协议不满足第二电子设备所设置的协议,则可以确定该第一电子设备不满足预设设备条件。As an implementable manner, when receiving the broadcast message transmitted by the first electronic device, the second electronic device may analyze the broadcast message. When the parsing is successful, and the protocol representing the broadcast message transmitted by the first electronic device meets the protocol set by the second electronic device, it can be determined that the first electronic device meets the preset device condition. When the parsing fails, and the protocol representing the broadcast message transmitted by the first electronic device does not meet the protocol set by the second electronic device, it may be determined that the first electronic device does not meet the preset device condition.
在一些实施方式中,第二电子设备在接收到第一电子设备的广播消息时,可以基于该广播消息,获取该第一电子设备的身份信息。作为一种可实施的方式,第二电子设备可以基于该广播消息的协议,获取该第一电子设备的身份信息。作为又一种可实施的方式,第二电子设备可以基于解析获得的该广播消息的目标标志位的信息,获取该第一电子设备的身份信息。In some implementations, when the second electronic device receives the broadcast message from the first electronic device, it may obtain the identity information of the first electronic device based on the broadcast message. As an implementable manner, the second electronic device may acquire the identity information of the first electronic device based on the protocol of the broadcast message. As yet another implementable manner, the second electronic device may acquire the identity information of the first electronic device based on the information obtained by parsing the target flag of the broadcast message.
在一些实施方式中,该第二电子设备可以预先设置并存储有预设身份条件,该预设身份条件用于作为该第一电子设备的判断依据。因此,在本实施例中,第二电子设备在获取该第一电子设备的身份信息时,可以判断该身份信息是否满足预设身份条件。其中,当确定该第一电子设备的身份信息满足预设身份条件时,表征该第一电子设备为满足该第二电子设备设定条件的电子设备,则可以在确定广播消息的接收信号强度大于接收信号强度阈值的基础上,显示目标信息。其中,当确定该第一电子设备的身份信息不满足预设身份条件时,表征该第一电子设备为不满足该第二电子设备设定条件的电子设备,则可以即使在确定广播消息的接收信号强度大于接收信号强度的基础上,也不显示目标信息。In some implementation manners, the second electronic device may be preset and stored with a preset identity condition, and the preset identity condition is used as a judgment basis for the first electronic device. Therefore, in this embodiment, when the second electronic device acquires the identity information of the first electronic device, it may determine whether the identity information satisfies a preset identity condition. Wherein, when it is determined that the identity information of the first electronic device satisfies the preset identity condition, it indicates that the first electronic device is an electronic device that satisfies the condition set by the second electronic device, then it may be determined that the received signal strength of the broadcast message is greater than Based on the received signal strength threshold, target information is displayed. Wherein, when it is determined that the identity information of the first electronic device does not meet the preset identity conditions, it is characterized that the first electronic device is an electronic device that does not meet the conditions set by the second electronic device, then it may be determined that the broadcast message is received If the signal strength is greater than the received signal strength, the target information will not be displayed.
作为一种方式,该预设身份条件可以为预设的生产商,则当第一电子设备由预设的生产商生产时,可以认为该第一电子设备的身份信息满足预设身份条件;该预设身份条件可以为预设的终端商,则当第一电子设备为预设的终端商品牌时,可以认为该第一电子设备的身份信息满足预设身份条件;该预设身份条件可以为第二电子设备的生产商,则当第一电子设备的生产商与第二电子设备的生产商一致时,可以认为该第一电子设备的身份信息满足预设身份条件;该预设身份条件可以为第二电子设备的终端商,则当第一电子设备的终端商品牌与第二电子设备的终端商品牌一致时,可以认为该第一电子设备的身份信息满足预设身份条件等,在此不做限定。As a method, the preset identity condition may be a preset manufacturer, then when the first electronic device is produced by the preset manufacturer, it may be considered that the identity information of the first electronic device satisfies the preset identity condition; The preset identity condition may be a preset terminal vendor, and when the first electronic device is a preset brand of a terminal vendor, it may be considered that the identity information of the first electronic device satisfies the preset identity condition; the preset identity condition may be The manufacturer of the second electronic device, when the manufacturer of the first electronic device is consistent with the manufacturer of the second electronic device, it can be considered that the identity information of the first electronic device satisfies the preset identity condition; the preset identity condition can be is the terminal provider of the second electronic device, when the brand of the terminal provider of the first electronic device is consistent with the brand of the terminal provider of the second electronic device, it can be considered that the identity information of the first electronic device satisfies the preset identity conditions, etc., here No limit.
步骤S630:当所述接收信号强度不大于所述接收信号强度阈值时,拦截所述目标信息。Step S630: When the received signal strength is not greater than the received signal strength threshold, intercept the target information.
在一些实施方式中,该第二电子设备在获取接收到的第一电子设备发射的广播消息的接收信号强度后,可以将该接收信号强度与接收信号强度阈值进行比较,以判断该接收信号强度是否大于接收信号强度阈值。其中,当判定该接收信号强度不大于目标接收信号强度阈值时,可以确定该接收信号强度未达到显 示提示的信号强度要求,则可以拦截目标信息,即,可以不显示目标信息。其中,拦截目标信息的方式可以包括隐藏该目标信息、删除该目标信息、最小化该目标信息等,在此不做限定。In some implementations, after the second electronic device acquires the received signal strength of the broadcast message transmitted by the first electronic device, it can compare the received signal strength with a received signal strength threshold to determine the received signal strength Whether it is greater than the received signal strength threshold. Wherein, when it is determined that the received signal strength is not greater than the target received signal strength threshold, it can be determined that the received signal strength does not meet the signal strength requirement for displaying prompts, then the target information can be intercepted, that is, the target information can not be displayed. Wherein, the manner of intercepting the target information may include hiding the target information, deleting the target information, minimizing the target information, etc., which is not limited here.
本申请一实施例提供的广播消息的发射方法,第二电子设备获取接收到的第一电子设备发射的广播消息的接收信号强度,其中,该广播消息由第一电子设备基于目标发射功率发射,目标发射功率由第一电子设备根据其所处的状态从至少两个预设发射功率中确定,当接收信号强度大于接收信号强度阈值且第一电子设备满足预设设备条件时,显示目标信息,当接收信号强度不大于接收信号强度阈值时,拦截用于提示与第一电子设备进行连接的目标信息。相较于图5所示的广播消息的发射方法,本实施例还在接收信号强度不大于目标接收信号强度阈值时,对提示信息进行拦截,避免对用户的打扰以改善用户体验。另外,在第一电子设备满足预设设备条件时显示目标信息,从而避免其他电子设备对用户的打扰以改善用户体验。In the method for transmitting a broadcast message provided by an embodiment of the present application, the second electronic device obtains the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on the target transmission power, The target transmission power is determined by the first electronic device from at least two preset transmission powers according to its state, and when the received signal strength is greater than the received signal strength threshold and the first electronic device meets the preset device condition, display the target information, When the received signal strength is not greater than the received signal strength threshold, intercept the target information used to prompt the connection with the first electronic device. Compared with the broadcast message transmission method shown in FIG. 5 , this embodiment also intercepts the prompt information when the received signal strength is not greater than the target received signal strength threshold, so as to avoid disturbing the user and improve user experience. In addition, the target information is displayed when the first electronic device satisfies the preset device condition, so as to avoid disturbing the user by other electronic devices and improve user experience.
请参阅图11,如图11所示,该第一电子设备可以为蓝牙耳机装置,该第二电子设备可以为智能设备(如智能手机、平板电脑等)。其中,当蓝牙耳机装置的耳机盒开盒时,则可以判断该蓝牙耳机是否处于配对状态。如果判定该蓝牙耳机处于配对状态,则以较大的发射功率发射BLE广播,如果判定该蓝牙耳机没有处于配对状态(如处于回连状态),则以较小的发射功率发射BLE广播其中,该BLE广播中可以携带有该蓝牙耳机的信息,例如,连接记录等。在该当蓝牙耳机的广播范围内的智能设备可以接收到该BLE广播,并对该BLE广播进行解析,获得解析结果。基于该解析结果判断该蓝牙耳机是否为目标设备,例如,判断该蓝牙耳机的身份信息是否满足预设身份条件。其中,当判定该蓝牙耳机为目标设备时,则将接收信号强度与弹窗阈值进行比较,如果接收信号强度大于弹窗阈值,则弹窗,如果接收信号强度不大于弹窗阈值,则不弹窗。请参与图12,图12示出了本申请一实施例提供的广播消息的发射装置的模块框图。该广播消息的发射装置300应用于上述第一电子设备,下面将针对图12所示的框图进行阐述,所述广播消息的发射装置300包括:发射功率确定模块310以及广播消息发射模块320,其中:Please refer to FIG. 11 , as shown in FIG. 11 , the first electronic device may be a Bluetooth headset device, and the second electronic device may be a smart device (such as a smart phone, a tablet computer, etc.). Wherein, when the earphone box of the bluetooth earphone device is opened, it can be judged whether the bluetooth earphone is in a pairing state. If it is determined that the Bluetooth headset is in the pairing state, then transmit the BLE broadcast with a larger transmission power, and if it is determined that the Bluetooth headset is not in the pairing state (such as in the reconnection state), then transmit the BLE broadcast with a smaller transmission power. The BLE broadcast may carry information about the Bluetooth headset, for example, connection records and the like. The smart device within the broadcast range of the Bluetooth headset can receive the BLE broadcast, and analyze the BLE broadcast to obtain the analysis result. Based on the parsing result, it is judged whether the Bluetooth headset is a target device, for example, whether the identity information of the Bluetooth headset satisfies a preset identity condition. Among them, when it is determined that the Bluetooth headset is the target device, the received signal strength is compared with the threshold of the pop-up window, if the received signal strength is greater than the threshold of the pop-up window, the window will pop up, and if the strength of the received signal is not greater than the threshold of the pop-up window, the window will not pop up window. Please refer to FIG. 12 . FIG. 12 shows a module block diagram of a device for transmitting a broadcast message provided by an embodiment of the present application. The apparatus 300 for transmitting a broadcast message is applied to the above-mentioned first electronic device, and will be described below with respect to the block diagram shown in FIG. :
发射功率确定模块310,用于根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率,其中,所述至少两个预设发射功率的大小不同。The transmit power determining module 310 is configured to determine a target transmit power from at least two preset transmit powers according to the state of the first electronic device, wherein the at least two preset transmit powers are different in magnitude.
进一步地,所述至少两个预设发射功率包括第一预设发射功率和第二预设发射功率,其中,所述第一预设发射功率大于所述第二预设发射功率,所述发射功率确定模块310包括:第一发射功率确定子模块,其中:Further, the at least two preset transmit powers include a first preset transmit power and a second preset transmit power, wherein the first preset transmit power is greater than the second preset transmit power, and the transmit The power determination module 310 includes: a first transmit power determination submodule, wherein:
第一发射功率确定子模块,用于当所述第一电子设备所处的状态为配对状态时,从所述至少两个预设发射功率中确定第一预设发射功率作为所述目标发射功率,其中,所述配对状态用于表征所述第一电子设备与第二电子设备之间待执行配对操作。A first transmit power determining submodule, configured to determine a first preset transmit power from the at least two preset transmit powers as the target transmit power when the state of the first electronic device is a pairing state , wherein the pairing status is used to indicate that a pairing operation is to be performed between the first electronic device and the second electronic device.
进一步地,所述发射功率确定模块310包括:第二发射功率确定子模块,其中:Further, the transmit power determining module 310 includes: a second transmit power determining submodule, wherein:
第二发射功率确定子模块,用于当所述第一电子设备所处的状态为回连状态时,从所述至少两个预设发射功率中确定所述第二预设发射功率作为所述目标发射功率,其中,所述回连状态用于表征所述第一电子设备与第三电子设备之间待执行配对后的回连操作。The second transmit power determining submodule is configured to determine the second preset transmit power from the at least two preset transmit powers as the The target transmit power, wherein the connection back state is used to represent a connection back operation between the first electronic device and the third electronic device to be performed after pairing.
进一步地,所述第一电子设备为蓝牙耳机,所述蓝牙耳机容置于充电装置内,所述发射功率确定模块310包括:第三发射功率确定子模块,其中:Further, the first electronic device is a Bluetooth headset, and the Bluetooth headset is accommodated in a charging device, and the transmission power determination module 310 includes: a third transmission power determination submodule, wherein:
第三发射功率确定子模块,用于当检测到所述充电装置打开时,根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率。The third transmit power determining submodule is configured to determine a target transmit power from at least two preset transmit powers according to the state of the first electronic device when it is detected that the charging device is turned on.
广播消息发射模块320,用于基于所述目标发射功率发射广播消息,以指示接收到所述广播消息的第二电子设备在确定所述广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息。A broadcast message transmitting module 320, configured to transmit a broadcast message based on the target transmission power, to instruct the second electronic device that has received the broadcast message to display the target when determining that the received signal strength of the broadcast message is greater than the received signal strength threshold information.
进一步地,所述广播消息的发射装置300还包括:配对状态获取模块和回连状态获取模块,其中:Further, the broadcast message transmitting device 300 also includes: a pairing state acquisition module and a connection back state acquisition module, wherein:
配对状态获取模块,用于当所述第一电子设备不存在连接记录时,确定所述第一电子设备所处的状态为配对状态,其中,所述配对状态用于表征所述第一电子设备与所述第二电子设备之间待执行配对操作。A pairing state acquisition module, configured to determine that the state of the first electronic device is a pairing state when there is no connection record for the first electronic device, wherein the pairing state is used to characterize the first electronic device A pairing operation is to be performed with the second electronic device.
回连状态获取模块,用于当所述第一电子设备存在连接记录时,确定所述第一电子设备所处的状态为回连状态,其中,所述回连状态用于表征所述第一电子设备与第三电子设备待执行配对后的回连操作。A connection back state acquisition module, configured to determine that the state of the first electronic device is a connection back state when there is a connection record for the first electronic device, wherein the connection back state is used to represent the first The electronic device and the third electronic device are to be connected back after being paired.
请参阅图13,图13示出了本申请一实施例提供的广播消息的发射装置的模块框图。该广播消息的发射装置400应用于上述第二电子设备,下面将针对图13所示的框图进行阐述,所述广播消息的发射装置400包括:接收信号强度获取模块410和提示信息显示模块420,其中:Referring to FIG. 13 , FIG. 13 shows a block diagram of a device for transmitting a broadcast message according to an embodiment of the present application. The apparatus 400 for transmitting a broadcast message is applied to the above-mentioned second electronic device, and will be described below with respect to the block diagram shown in FIG. in:
接收信号强度获取模块410,用于获取接收到的第一电子设备发射的广播消息的接收信号强度,其中,所述广播消息由所述第一电子设备基于目标发射功率发射,所述目标发射功率由所述第一电子设备根据其所处的状态从至少两个预设发射功率中确定,所述至少两个预设发射功率的大小不同。The received signal strength acquiring module 410 is configured to acquire the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on a target transmit power, and the target transmit power The first electronic device is determined from at least two preset transmit powers according to its state, and the at least two preset transmit powers are different in magnitude.
提示信息显示模块420,用于当所述接收信号强度大于接收信号强度阈值时,显示目标信息。The prompt information display module 420 is configured to display target information when the received signal strength is greater than the received signal strength threshold.
进一步地,所述提示信息显示模块420包括:提示信息显示子模块,其中:Further, the prompt information display module 420 includes: a prompt information display submodule, wherein:
提示信息显示子模块,用于当所述接收信号强度大于接收信号强度阈值且所述第一电子设备满足预设设备条件时,显示所述目标信息。The prompt information display submodule is configured to display the target information when the received signal strength is greater than a received signal strength threshold and the first electronic device satisfies a preset device condition.
进一步地,所述提示信息显示子模块包括:提示信息显示单元,其中:Further, the prompt information display submodule includes: a prompt information display unit, wherein:
提示信息显示单元,用于当所述接收信号强度大于接收信号强度阈值且所述第一电子设备的身份信息满足预设身份条件时,显示所述目标信息。The prompt information display unit is configured to display the target information when the received signal strength is greater than a received signal strength threshold and the identity information of the first electronic device satisfies a preset identity condition.
进一步地,所述广播消息的发射装置400还包括:提示信息拦截模块,其中:Further, the broadcast message transmitting device 400 also includes: a prompt information interception module, wherein:
提示信息拦截模块,用于当所述接收信号强度不大于所述接收信号强度阈值时,拦截所述目标信息。The prompt information interception module is configured to intercept the target information when the received signal strength is not greater than the received signal strength threshold.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the devices and modules described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
请参阅图14,其示出了本申请实施例提供的一种电子设备500的结构框图,其中,该电子设备500可以为第一电子设备200,也可以为第二电子设备100,在此不做限定。该电子设备500可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备500可以包括一个或多个如下部件:处理器510、存储器520以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器520中并被配置为由一个或多个处理器510执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 14 , which shows a structural block diagram of an electronic device 500 provided by an embodiment of the present application, wherein the electronic device 500 may be the first electronic device 200 or the second electronic device 100 , which is not shown here. Do limited. The electronic device 500 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, and an e-book. The electronic device 500 in this application may include one or more of the following components: a processor 510, a memory 520, and one or more application programs, wherein one or more application programs may be stored in the memory 520 and configured to be executed by a or a plurality of processors 510, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
其中,处理器510可以包括一个或者多个处理核。处理器510利用各种接口和线路连接整个电子设备500内的各个部分,通过运行或执行存储在存储器520内的指令、程序、代码集或指令集,以及调用存储在存储器520内的数据,执行电子设备500的各种功能和处理数据。可选地,处理器510可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器510可集成中央处理器(Central Processing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责待显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器510中,单独通过一块通信芯片进行实现。Wherein, the processor 510 may include one or more processing cores. The processor 510 uses various interfaces and lines to connect various parts of the entire electronic device 500, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 520, and calling data stored in the memory 520. Various functions of the electronic device 500 and processing data. Optionally, the processor 510 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware. The processor 510 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used to render and draw the content to be displayed; the modem is used to handle wireless communication. It can be understood that the above modem may also not be integrated into the processor 510, but implemented by a communication chip alone.
存储器520可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器520可用于存储指令、程序、代码、代码集或指令集。存储器520可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备500在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 520 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory). Memory 520 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 520 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like. The storage data area can also store data created by the electronic device 500 during use (such as phonebook, audio and video data, chat record data) and the like.
请参阅图15,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质600中存储有程序代码,所述程序代码可被处理器调用待执行上述方法实施例中所描述的方法。Please refer to FIG. 15 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program codes are stored in the computer-readable medium 600, and the program codes can be invoked by a processor to execute the methods described in the foregoing method embodiments.
计算机可读存储介质600可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质600包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质600具有待执行上述方法中的任何方法步骤的程序代码610的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码610可以例如以适当形式进行压缩。The computer readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The computer-readable storage medium 600 has a storage space for program code 610 to execute any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products. Program code 610 may, for example, be compressed in a suitable form.
综上所述,本申请实施例提供的广播消息的发射方法、装置、电子设备以及存储介质,根据第一电子设备所处的状态,从至少两个大小不同的预设发射功率中确定目标发射功率,基于目标发射功率发射广播消息,以指示接收到该广播消息的第二电子设备在确定广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息,从而通过根据电子设备所处的状态,动态确定目标发射功率进行广播消息的发射,以供其他电子设备确定对提示信息的显示,实现更好地控制提示信息的显示,避免对用户的打扰以改善用户体验。To sum up, the broadcast message transmission method, device, electronic device, and storage medium provided by the embodiments of the present application determine the target transmission from at least two preset transmission powers of different sizes according to the state of the first electronic device. power, transmitting the broadcast message based on the target transmit power, to instruct the second electronic device that has received the broadcast message to display the target information when it is determined that the received signal strength of the broadcast message is greater than the received signal strength threshold, thereby and dynamically determine the target transmission power to transmit the broadcast message for other electronic devices to determine the display of the prompt information, so as to better control the display of the prompt information, avoid disturbing the user and improve user experience.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not drive the essence of the corresponding technical solutions away from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims (20)
- 一种广播消息的发射方法,其特征在于,应用于第一电子设备,所述方法包括:A method for transmitting a broadcast message, characterized in that it is applied to a first electronic device, and the method includes:根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率,其中,所述至少两个预设发射功率的大小不同;determining a target transmission power from at least two preset transmission powers according to the state of the first electronic device, wherein the at least two preset transmission powers are different in magnitude;基于所述目标发射功率发射广播消息,以指示接收到所述广播消息的第二电子设备在确定所述广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息。Transmitting a broadcast message based on the target transmit power to instruct a second electronic device that has received the broadcast message to display target information when determining that the received signal strength of the broadcast message is greater than a received signal strength threshold.
- 根据权利要求1所述的方法,其特征在于,所述至少两个预设发射功率包括第一预设发射功率和第二预设发射功率,其中,所述第一预设发射功率大于所述第二预设发射功率,所述根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率,包括:The method according to claim 1, wherein the at least two preset transmit powers include a first preset transmit power and a second preset transmit power, wherein the first preset transmit power is greater than the The second preset transmission power, said determining the target transmission power from at least two preset transmission powers according to the state of the first electronic device, includes:当所述第一电子设备所处的状态为配对状态时,从所述至少两个预设发射功率中确定第一预设发射功率作为所述目标发射功率,其中,所述配对状态用于表征所述第一电子设备与所述第二电子设备之间待执行配对操作。When the state of the first electronic device is the pairing state, determine the first preset transmission power from the at least two preset transmission powers as the target transmission power, wherein the pairing state is used to represent A pairing operation is to be performed between the first electronic device and the second electronic device.
- 根据权利要求2所述的方法,其特征在于,所述根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率,包括:The method according to claim 2, wherein the determining the target transmission power from at least two preset transmission powers according to the state of the first electronic device comprises:当所述第一电子设备所处的状态为回连状态时,从所述至少两个预设发射功率中确定所述第二预设发射功率作为所述目标发射功率,其中,所述回连状态用于表征所述第一电子设备与第三电子设备之间待执行配对后的回连操作。When the state of the first electronic device is the connection back state, the second preset transmission power is determined from the at least two preset transmission powers as the target transmission power, wherein the connection back The state is used to represent a connection back operation between the first electronic device and the third electronic device after pairing is to be performed.
- 根据权利要求1-3任一项所述的方法,其特征在于,所述根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率之前,还包括:The method according to any one of claims 1-3, wherein before determining the target transmission power from at least two preset transmission powers according to the state of the first electronic device, further comprising:当所述第一电子设备不存在连接记录时,确定所述第一电子设备所处的状态为配对状态,其中,所述配对状态用于表征所述第一电子设备与所述第二电子设备之间待执行配对操作;或者When there is no connection record for the first electronic device, determine that the state of the first electronic device is a pairing state, wherein the pairing state is used to represent the first electronic device and the second electronic device between pending pairing operations; or当所述第一电子设备存在连接记录时,确定所述第一电子设备所处的状态为回连状态,其中,所述回连状态用于表征所述第一电子设备与第三电子设备待执行配对后的回连操作。When there is a connection record for the first electronic device, it is determined that the state of the first electronic device is the connection back state, wherein the connection back state is used to indicate that the first electronic device and the third electronic device are waiting for Perform the reconnect operation after pairing.
- 根据权利要求4所述的方法,其特征在于,所述当所述第一电子设备不存在连接记录时,确定所述第一电子设备所处的状态为配对状态,包括:The method according to claim 4, wherein when the first electronic device does not have a connection record, determining that the state of the first electronic device is a pairing state includes:当所述第一电子设备未存储有其他电子设备的地址信息时,确定所述电子设备所处的状态为配对状态。When the first electronic device does not store address information of other electronic devices, it is determined that the state of the electronic device is a pairing state.
- 根据权利要求4所述的方法,其特征在于,所述当所述第一电子设备存在连接记录时,确定所述第一电子设备所处的状态为回连状态,包括:The method according to claim 4, wherein when the first electronic device has a connection record, determining that the state of the first electronic device is a reconnection state includes:当所述第一电子设备存储有其他电子设备的地址信息时,确定所述电子设备所处的状态为回连状态。When the first electronic device stores address information of other electronic devices, it is determined that the state of the electronic device is a connection back state.
- 根据权利要求1-3任一项所述的方法,其特征在于,所述第一电子设备为蓝牙耳机,所述蓝牙耳机容置于充电装置内,所述根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率,包括:The method according to any one of claims 1-3, wherein the first electronic device is a Bluetooth headset, the Bluetooth headset is accommodated in a charging device, and the state, determine the target transmission power from at least two preset transmission powers, including:当检测到所述充电装置打开时,根据所述第一电子设备所处的状态,从所述至少两个预设发射功率中确定目标发射功率。When it is detected that the charging device is turned on, according to the state of the first electronic device, the target transmission power is determined from the at least two preset transmission powers.
- 一种广播消息的发射方法,其特征在于,应用于第二电子设备,所述方法包括:A method for transmitting a broadcast message, characterized in that it is applied to a second electronic device, and the method includes:获取接收到的第一电子设备发射的广播消息的接收信号强度,其中,所述广播消息由所述第一电子设备基于目标发射功率发射,所述目标发射功率由所述第一电子设备根据其所处的状态从至少两个预设发射功率中确定,所述至少两个预设发射功率的大小不同;Acquiring the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on a target transmit power, and the target transmit power is determined by the first electronic device according to its The state is determined from at least two preset transmission powers, and the at least two preset transmission powers are different in size;当所述接收信号强度大于接收信号强度阈值时,显示目标信息。When the received signal strength is greater than the received signal strength threshold, target information is displayed.
- 根据权利要求8所述的方法,其特征在于,所述当所述接收信号强度大于接收信号强度阈值时,显示目标信息,包括:The method according to claim 8, wherein the displaying target information when the received signal strength is greater than a received signal strength threshold comprises:当所述接收信号强度大于接收信号强度阈值且所述第一电子设备满足预设设备条件时,显示所述目标信息。When the received signal strength is greater than a received signal strength threshold and the first electronic device satisfies a preset device condition, displaying the target information.
- 根据权利要求9所述的方法,其特征在于,所述当所述接收信号强度大于接收信号强度阈值且所述第一电子设备满足预设设备条件时,显示所述目标信息,包括:The method according to claim 9, wherein the displaying the target information when the received signal strength is greater than a received signal strength threshold and the first electronic device satisfies a preset device condition comprises:当所述接收信号强度大于接收信号强度阈值且所述第一电子设备的身份信息满足预设身份条件时,显示所述目标信息。When the received signal strength is greater than a received signal strength threshold and the identity information of the first electronic device satisfies a preset identity condition, displaying the target information.
- 根据权利要求9所述的方法,其特征在于,所述当所述接收信号强度大于接收信号强度阈值且所述第一电子设备满足预设设备条件时,显示所述目标信息,包括:The method according to claim 9, wherein the displaying the target information when the received signal strength is greater than a received signal strength threshold and the first electronic device satisfies a preset device condition comprises:当所述接收信号强度大于接收信号强度阈值且成功解析所述第一电子设备发射的广播消息时,显示 所述目标信息。When the received signal strength is greater than a received signal strength threshold and the broadcast message transmitted by the first electronic device is successfully parsed, the target information is displayed.
- 根据权利要求8-11任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 8-11, wherein the method further comprises:当所述接收信号强度不大于所述接收信号强度阈值时,拦截所述目标信息。When the received signal strength is not greater than the received signal strength threshold, intercept the target information.
- 根据权利要求8-11任一项所述的方法,其特征在于,所述显示目标信息,包括:The method according to any one of claims 8-11, wherein the displaying target information includes:在显示界面显示所述目标信息;或者displaying the target information on a display interface; or在显示界面上弹窗显示所述目标信息;或者Displaying the target information in a pop-up window on the display interface; or在状态栏显示所述目标信息。Display the target information in the status bar.
- 一种广播消息的发射装置,其特征在于,应用于第一电子设备,所述装置包括:A device for transmitting a broadcast message, characterized in that it is applied to a first electronic device, and the device includes:发射功率确定模块,用于根据所述第一电子设备所处的状态,从至少两个预设发射功率中确定目标发射功率,其中,所述至少两个预设发射功率的大小不同;A transmit power determining module, configured to determine a target transmit power from at least two preset transmit powers according to the state of the first electronic device, wherein the at least two preset transmit powers are different in size;广播消息发射模块,用于基于所述目标发射功率发射广播消息,以指示接收到所述广播消息的第二电子设备在确定所述广播消息的接收信号强度大于接收信号强度阈值时,显示目标信息。A broadcast message transmitting module, configured to transmit a broadcast message based on the target transmission power, to instruct the second electronic device that receives the broadcast message to display target information when determining that the received signal strength of the broadcast message is greater than the received signal strength threshold .
- 根据权利要求14所述的装置,其特征在于,所述至少两个预设发射功率包括第一预设发射功率和第二预设发射功率,其中,所述第一预设发射功率大于所述第二预设发射功率,所述发射功率确定模块包括:The device according to claim 14, wherein the at least two preset transmit powers include a first preset transmit power and a second preset transmit power, wherein the first preset transmit power is greater than the The second preset transmission power, the transmission power determination module includes:第一发射功率确定子模块,用于当所述第一电子设备所处的状态为配对状态时,从所述至少两个预设发射功率中确定第一预设发射功率作为所述目标发射功率,其中,所述配对状态用于表征所述第一电子设备与第二电子设备之间待执行配对操作。A first transmit power determining submodule, configured to determine a first preset transmit power from the at least two preset transmit powers as the target transmit power when the state of the first electronic device is a pairing state , wherein the pairing status is used to indicate that a pairing operation is to be performed between the first electronic device and the second electronic device.
- 根据权利要求15所述的装置,其特征在于,所述发射功率确定模块包括:The device according to claim 15, wherein the transmit power determining module comprises:第二发射功率确定子模块,用于当所述第一电子设备所处的状态为回连状态时,从所述至少两个预设发射功率中确定所述第二预设发射功率作为所述目标发射功率,其中,所述回连状态用于表征所述第一电子设备与第三电子设备之间待执行配对后的回连操作。The second transmit power determining submodule is configured to determine the second preset transmit power from the at least two preset transmit powers as the The target transmit power, wherein the connection back state is used to represent a connection back operation between the first electronic device and the third electronic device to be performed after pairing.
- 根据权利要求14-16任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 14-16, wherein the device further comprises:配对状态获取模块,用于当所述第一电子设备不存在连接记录时,确定所述第一电子设备所处的状态为配对状态,其中,所述配对状态用于表征所述第一电子设备与所述第二电子设备之间待执行配对操作;或者A pairing state acquisition module, configured to determine that the state of the first electronic device is a pairing state when there is no connection record for the first electronic device, wherein the pairing state is used to characterize the first electronic device A pairing operation is to be performed with the second electronic device; or回连状态获取模块,用于当所述第一电子设备存在连接记录时,确定所述第一电子设备所处的状态为回连状态,其中,所述回连状态用于表征所述第一电子设备与第三电子设备待执行配对后的回连操作。A connection back state acquisition module, configured to determine that the state of the first electronic device is a connection back state when there is a connection record for the first electronic device, wherein the connection back state is used to represent the first The electronic device and the third electronic device are to be connected back after being paired.
- 一种广播消息的发射装置,其特征在于,应用于第二电子设备,所述装置包括:A device for transmitting a broadcast message, characterized in that it is applied to a second electronic device, and the device includes:接收信号强度获取模块,用于获取接收到的第一电子设备发射的广播消息的接收信号强度,其中,所述广播消息由所述第一电子设备基于目标发射功率发射,所述目标发射功率由所述第一电子设备根据其所处的状态从至少两个预设发射功率中确定,所述至少两个预设发射功率的大小不同;The received signal strength acquisition module is configured to acquire the received signal strength of the received broadcast message transmitted by the first electronic device, wherein the broadcast message is transmitted by the first electronic device based on a target transmission power, and the target transmission power is determined by The first electronic device is determined from at least two preset transmit powers according to its state, and the at least two preset transmit powers are different in magnitude;提示信息显示模块,用于当所述接收信号强度大于接收信号强度阈值时,显示目标信息。The prompt information display module is configured to display target information when the received signal strength is greater than the received signal strength threshold.
- 一种电子设备,其特征在于,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行如权利要求1-7任一项或如权利要求8-13任一项所述的方法。An electronic device, characterized in that it includes a memory and a processor, the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor performs Any one of claims 1-7 or the method according to any one of claims 8-13.
- 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-7任一项或如权利要求8-13任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores program codes, and the program codes can be invoked by a processor to execute any one of claims 1-7 or any one of claims The method described in any one of 8-13.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111038917.7 | 2021-09-06 | ||
CN202111038917.7A CN115776644B (en) | 2021-09-06 | 2021-09-06 | Broadcast message transmitting method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023030071A1 true WO2023030071A1 (en) | 2023-03-09 |
Family
ID=85387421
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/113981 WO2023030071A1 (en) | 2021-09-06 | 2022-08-22 | Broadcast message transmitting method and apparatus, and electronic device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115776644B (en) |
WO (1) | WO2023030071A1 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090143012A1 (en) * | 2007-12-04 | 2009-06-04 | Samsung Electronics Co. Ltd. | Bluetooth-enabled mobile terminal and fast device connection method thereof |
CN107249214A (en) * | 2017-07-07 | 2017-10-13 | 宇龙计算机通信科技(深圳)有限公司 | Bluetooth power consumption adjusting method and system |
CN110267358A (en) * | 2019-07-01 | 2019-09-20 | 张洋 | Establish the system, method and blue-tooth device of bluetooth connection |
WO2020192546A1 (en) * | 2019-03-26 | 2020-10-01 | 华为技术有限公司 | Bluetooth transmission power control method and terminal device |
CN112821963A (en) * | 2020-12-30 | 2021-05-18 | 恒玄科技(上海)股份有限公司 | Method and device for reducing interference to loudspeaker and electronic equipment |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7174130B2 (en) * | 2001-09-12 | 2007-02-06 | Agere Systems Inc. | Security apparatus and method during BLUETOOTH pairing |
EP2237582B1 (en) * | 2009-04-01 | 2015-08-26 | Oticon A/S | Pairing wireless devices |
US9066327B2 (en) * | 2013-06-21 | 2015-06-23 | Bose Corporation | Low energy wireless proximity pairing |
CN104092823A (en) * | 2014-07-09 | 2014-10-08 | 北京深思数盾科技有限公司 | Information safety device and Bluetooth pairing method |
CN106936825B (en) * | 2017-03-10 | 2021-07-27 | Oppo广东移动通信有限公司 | Method and device for controlling broadcast transmission and mobile terminal |
CN113382397B (en) * | 2019-04-18 | 2023-12-08 | 华为技术有限公司 | Bluetooth connection method, device and system |
CN112449328B (en) * | 2019-08-30 | 2023-08-22 | 华为技术有限公司 | Bluetooth searching method, system and related device |
CN112333332B (en) * | 2020-10-27 | 2021-05-28 | 维沃移动通信有限公司 | Prompt message display method and device and electronic equipment |
CN113286282B (en) * | 2021-05-18 | 2023-06-09 | Oppo广东移动通信有限公司 | Prompting method, prompting device, electronic equipment, target equipment, connection system and medium |
CN113316082B (en) * | 2021-05-26 | 2022-06-14 | Oppo广东移动通信有限公司 | Pairing method, pairing device, mobile terminal and storage medium |
CN115604801A (en) * | 2021-07-07 | 2023-01-13 | Oppo广东移动通信有限公司(Cn) | Prompting method, prompting device, target equipment, electronic equipment, connection system and medium |
CN116320859A (en) * | 2021-12-08 | 2023-06-23 | Oppo广东移动通信有限公司 | State control method and device of earphone device, earphone device and storage medium |
-
2021
- 2021-09-06 CN CN202111038917.7A patent/CN115776644B/en active Active
-
2022
- 2022-08-22 WO PCT/CN2022/113981 patent/WO2023030071A1/en unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090143012A1 (en) * | 2007-12-04 | 2009-06-04 | Samsung Electronics Co. Ltd. | Bluetooth-enabled mobile terminal and fast device connection method thereof |
CN107249214A (en) * | 2017-07-07 | 2017-10-13 | 宇龙计算机通信科技(深圳)有限公司 | Bluetooth power consumption adjusting method and system |
WO2020192546A1 (en) * | 2019-03-26 | 2020-10-01 | 华为技术有限公司 | Bluetooth transmission power control method and terminal device |
CN110267358A (en) * | 2019-07-01 | 2019-09-20 | 张洋 | Establish the system, method and blue-tooth device of bluetooth connection |
CN112821963A (en) * | 2020-12-30 | 2021-05-18 | 恒玄科技(上海)股份有限公司 | Method and device for reducing interference to loudspeaker and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN115776644A (en) | 2023-03-10 |
CN115776644B (en) | 2024-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11848773B2 (en) | Transmit antenna switching method and terminal device | |
WO2023030531A1 (en) | Prompt information display method and apparatus, electronic device, and storage medium | |
US10269163B2 (en) | Method and apparatus for switching real-time image in instant messaging | |
CN108965306B (en) | Call processing method and mobile terminal | |
US10813058B2 (en) | Method for processing information and terminal device | |
CN107231473B (en) | Audio output regulation and control method, equipment and computer readable storage medium | |
CN106528545B (en) | Voice information processing method and device | |
CN109379490B (en) | Audio playing method and device, electronic equipment and computer readable medium | |
WO2020063046A1 (en) | Audio playback method and device, electronic device and storage medium | |
CN107959952B (en) | Method and terminal for detecting inter-system cell | |
CN107786424B (en) | Audio and video communication method, terminal and server | |
CN109819489B (en) | Terminal calling method and terminal | |
US20230031044A1 (en) | Service processing method, user device, and computer-readable storage medium | |
US11800431B2 (en) | Access control method, message broadcasting method, and related devices | |
CN108111986A (en) | A kind of conversion method of notification message, terminal and computer readable storage medium | |
CN108432220B (en) | Method and terminal for switching call mode | |
JP2023508739A (en) | Multicast service transmission method, transmission processing method and related equipment | |
CN111615219B (en) | PC5 link establishing method, equipment and system | |
CN109151741B (en) | Multimedia message receiving method and terminal | |
WO2020082387A1 (en) | Method for changing audio channel, and related device | |
WO2023030071A1 (en) | Broadcast message transmitting method and apparatus, and electronic device and storage medium | |
WO2019154183A1 (en) | Method for registration to network, and mobile terminal | |
WO2022247468A1 (en) | Data processing method and apparatus, and electronic device and storage medium | |
CN108040311B (en) | Audio playing method, terminal and computer readable storage medium | |
CN108668007A (en) | Processing method, mobile terminal and the storage medium of new information in a kind of mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22863210 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |