WO2022042637A1 - Bluetooth-based data transmission method and related apparatus - Google Patents

Bluetooth-based data transmission method and related apparatus Download PDF

Info

Publication number
WO2022042637A1
WO2022042637A1 PCT/CN2021/114744 CN2021114744W WO2022042637A1 WO 2022042637 A1 WO2022042637 A1 WO 2022042637A1 CN 2021114744 W CN2021114744 W CN 2021114744W WO 2022042637 A1 WO2022042637 A1 WO 2022042637A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
broadcast
data
scan request
scanning
Prior art date
Application number
PCT/CN2021/114744
Other languages
French (fr)
Chinese (zh)
Inventor
赵丽美
李�荣
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022042637A1 publication Critical patent/WO2022042637A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the field of electronic technology, and in particular, to a Bluetooth data transmission method and related devices.
  • Bluetooth low energy Due to its low power consumption and low cost, Bluetooth low energy (BLE) is widely used in healthcare, sports and fitness, beacons, security, home entertainment and other fields.
  • BLE Bluetooth low energy
  • data information is mainly carried and sent through BLE broadcast packets.
  • BLE connection communication process data information is mainly carried and sent through BLE connection data packets.
  • the scanning device cannot send data information to the broadcasting device. If the scanning device needs to send data information to the broadcasting device, the scanning device needs to add the BLE broadcasting function, which will increase the power consumption of the device.
  • the data exchange can only be carried out after the BLE connection is established between the devices; the process of establishing the BLE connection and maintaining the BLE connection will also increase the workload of the device, thereby increasing the power consumption of the device. Therefore, how to realize data interaction without increasing the power consumption of the device or slightly increasing the power consumption of the device is an urgent problem to be solved.
  • the present application provides a Bluetooth data transmission method and related apparatus, which can realize the interaction of data and information without increasing the power consumption of the device or slightly increasing the power consumption of the device.
  • the present application provides a Bluetooth data transmission method, the method includes: a broadcast device sends a broadcast message to a scanning device; the broadcast device receives a scan request message sent by the scanning device, the scan request message The message is sent by the scanning device to the broadcast device according to the broadcast message, and the scan request message carries data information; the broadcast device processes the data information.
  • a broadcast device sends a broadcast message to a scanning device
  • the broadcast device receives a scan request message sent by the scanning device, the scan request message
  • the message is sent by the scanning device to the broadcast device according to the broadcast message, and the scan request message carries data information; the broadcast device processes the data information.
  • the scan request message includes a scan request data field, and the scan request data field includes the data information.
  • the processing of the data information by the broadcast device includes: the broadcast device parses the scan request packet, and determines whether the scan request packet contains carrying the data information; if the scan request message carries the data information, the broadcast device processes the data information.
  • the broadcasting device processes the data information, including: : The broadcasting device displays a prompt message in the user interface according to the power information, where the prompt message is used to remind the user of the power status of the scanning device.
  • the device information is information of each device in the Bluetooth networking or Wi-Fi networking where the scanning device is located;
  • the broadcasting device processing the data information includes: the broadcasting device storing the device information in a device information list, where the device information list is used to store each of the Bluetooth networking or Wi-Fi networking. device information.
  • the broadcast message includes device data
  • the device data includes the manufacturer's identifier of the broadcast device, the user account information logged in the broadcast device, and the originator of the broadcast device.
  • the identifier of the application that broadcasts the request includes the manufacturer's identifier of the application that broadcasts the request, and the user account information of the application that initiates the broadcast request.
  • an embodiment of the present application provides another method for transmitting Bluetooth data, the method includes: a scanning device receives a broadcast message sent by a broadcast device; the scanning device sends a broadcast message to the broadcast device according to the broadcast message A scan request message, where the scan request message carries data information.
  • the interaction of data and information can be realized without increasing the power consumption of the device or slightly increasing the power consumption of the device.
  • the scan request message includes a scan request data field, and the scan request data field includes the data information.
  • the power information is used to indicate the power of the scanning device.
  • the device information is information of each device in the Bluetooth networking or Wi-Fi networking where the scanning device is located.
  • the broadcast message includes device data
  • the device data includes the manufacturer's identifier of the broadcast device, user account information logged in the broadcast device, and the originator of the broadcast device.
  • the scanning device sends a scanning request message to the broadcasting device according to the broadcast message, including: The scanning device sends a scanning request message to the broadcasting device according to the device data in the broadcasting message.
  • an embodiment of the present application provides a broadcast device, the broadcast device includes one or more processors and a memory, the memory is coupled to the one or more processors, and the memory is used for storing a program code, the one or more processors invoke the program code to cause the broadcast device to perform the following operations: send a broadcast message to a scanning device; receive a scan request message sent by the scanning device, the scan request message The message is sent by the scanning device to the broadcast device according to the broadcast message, and the scan request message carries data information; the data information is processed.
  • the scan request message includes a scan request data field, and the scan request data field includes the data information.
  • the one or more processors invoke the program code to cause the broadcasting device to specifically perform the following operations: parse the scan request message, determine the whether the scan request message carries the data information; if the scan request message carries the data information, the broadcast device processes the data information.
  • the data information is power information
  • the power information is used to indicate the power of the scanning device
  • the one or more processors call the program code So that the broadcasting device specifically performs the following operation: displaying a prompt message in the user interface according to the power information, where the prompt message is used to remind the user of the power status of the scanning device.
  • the device information is information of each device in the Bluetooth networking or Wi-Fi networking where the scanning device is located;
  • the one or more processors invoke the program code to cause the broadcast device to specifically perform the following operations: store the device information in a device information list, where the device information list is used to store Bluetooth networking or Wi-Fi Information about each device in the Fi network.
  • an embodiment of the present application provides a scanning device, the scanning device includes one or more processors and a memory, the memory is coupled to the one or more processors, and the memory is used for storing a program code, the one or more processors call the program code to cause the scanning device to perform the following operations: receive a broadcast message sent by a broadcast device; send a scan request message to the broadcast device according to the broadcast message , the scan request message carries data information.
  • the scan request message includes a scan request data field, and the scan request data field includes the data information.
  • the power information is used to indicate the power of the scanning device.
  • the device information is information of each device in the Bluetooth networking or Wi-Fi networking where the scanning device is located.
  • the broadcast message includes device data
  • the device data includes the manufacturer's identifier of the broadcast device, the user account information logged in the broadcast device, and the originator of the broadcast device.
  • the one or more processors call the program code to cause the scanning device to specifically perform the following operations:
  • the scanning device sends a scanning request message to the broadcasting device according to the device data in the broadcasting message.
  • an embodiment of the present application provides a computer program product, where the computer program product includes computer instructions, which, when the computer instructions are executed on an electronic device, cause a computer to execute the first aspect or any one of the first aspects.
  • the computer program product includes computer instructions, which, when the computer instructions are executed on an electronic device, cause a computer to execute the first aspect or any one of the first aspects.
  • an embodiment of the present application provides a computer program product, where the computer program product includes computer instructions, when the computer instructions are executed on an electronic device, the computer is caused to execute the second aspect or any one of the second aspects.
  • the computer program product includes computer instructions, when the computer instructions are executed on an electronic device, the computer is caused to execute the second aspect or any one of the second aspects.
  • an embodiment of the present application provides a computer-readable storage medium, including instructions, when the instructions are executed on an electronic device, the electronic device may perform the first aspect or any one of the first aspects. method in the implementation.
  • embodiments of the present application provide a computer-readable storage medium, including instructions, when the instructions are executed on an electronic device, the electronic device may perform the second aspect or any one of the second aspects. method in the implementation.
  • the scanning device after the scanning device starts scanning and receives a broadcast message sent by the broadcast device, it sends a scan request message to the broadcast device, so that the data information in the scan device can be synchronized to the broadcast device.
  • the scan request message includes data information. In this way, the interaction of data and information is realized without increasing the power consumption of the device or slightly increasing the power consumption of the device.
  • FIG. 1A is a schematic diagram of a Bluetooth communication system provided by an embodiment of the present application.
  • 1B is a schematic diagram of a communication process of a scannable BLE broadcast message provided by an embodiment of the present application
  • 1C is a schematic diagram of a communication process of a BLE connection data packet provided by an embodiment of the present application.
  • FIG. 2A is a schematic structural diagram of an electronic device 10 provided by an embodiment of the present application.
  • 2B is a schematic structural diagram of a Bluetooth communication module provided by an embodiment of the present application.
  • FIG. 2C is a software structural block diagram of an electronic device 10 provided by an embodiment of the present application.
  • FIG. 2D is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application.
  • 2E is a software structural block diagram of a Bluetooth communication module provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a Bluetooth data transmission method provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a possible scan request message provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an application scenario of a possible Bluetooth data transmission method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an application scenario of another possible Bluetooth data transmission method provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of another Bluetooth data transmission method provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes, and should not be construed as implying or implying relative importance or implying the number of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, the “multiple” The meaning is two or more.
  • the user interface in the embodiments of the present application is a medium interface for interaction and information exchange between an application program or an operating system and a user, and it realizes the conversion between the internal form of the information and the form acceptable to the user.
  • the user interface of the application is the source code written in a specific computer language such as java, extensible markup language (XML), the interface source code is parsed and rendered on the electronic device 300, and finally presented as a user-identifiable Content, such as images, text, buttons and other controls.
  • Controls are the basic elements of the user interface. Typical controls include buttons, widgets, toolbars, menu bars, text boxes, scroll bars ( scrollbar), pictures and text.
  • the attributes and content of controls in the interface are defined by tags or nodes.
  • XML specifies the controls contained in the interface through nodes such as ⁇ Textview>, ⁇ ImgView>, and ⁇ VideoView>.
  • a node corresponds to a control or property in the interface, and the node is rendered as user-visible content after parsing and rendering.
  • applications such as hybrid applications, often contain web pages in their interface.
  • a web page also known as a page, can be understood as a special control embedded in an application program interface.
  • a web page is source code written in a specific computer language, such as hypertext markup language (HTML), cascading styles Tables (cascading style sheets, CSS), java scripts (JavaScript, JS), etc.
  • the source code of the web page can be loaded and displayed as user-identifiable content by a browser or a web page display component similar in function to a browser.
  • the specific content contained in a web page is also defined by tags or nodes in the source code of the web page. For example, HTML uses ⁇ p>, ⁇ img>, and ⁇ video> to define the elements and attributes of the web page.
  • GUI graphical user interface
  • FIG. 1A is a schematic diagram of a Bluetooth communication system provided by an embodiment of the present application.
  • the Bluetooth communication system 10 may include a broadcasting device 100 and a scanning device 200 . in:
  • the broadcasting device 100 is a power consumption sensitive device that is not always charged, and has the BLE broadcasting function; for example, it may be a smart wearable terminal device such as a smart watch and smart glasses, or a terminal device with a small battery capacity.
  • the number of broadcasting devices 100 in the Bluetooth communication system is not limited, and may be multiple.
  • a smart watch is used as an example.
  • the scanning device 200 may be an electronic device with a BLE scanning function, such as a mobile terminal, a tablet computer, a notebook computer, and a personal computer.
  • the number of scanning devices 200 is not limited, and may be multiple.
  • a mobile terminal is used as an example.
  • the broadcasting device 100 and the scanning device 200 may be connected through BLE.
  • FIG. 1B it is a schematic diagram of a communication process of a scannable BLE broadcast message provided by an embodiment of the present application.
  • the application A in the broadcasting device 100 starts broadcasting, and the Bluetooth communication module A sends broadcasting messages such as general broadcasting indication (ADV_IND) to the scanning device 200 through BLE.
  • the scanning device 200 starts BLE scanning, and after scanning the broadcast message, it can obtain more information from the broadcast device 100 by sending a request message (SCAN_REQ).
  • the broadcast device 100 After receiving the SCAN_REQ, the broadcast device 100 sends a scan response message (SCAN_RSP) carrying the response information to the scan device 200 , and the scan device 200 can report the SCAN_RSP to the application B.
  • SCAN_RSP scan response message
  • SCAN_REQ cannot carry data information. Therefore, the scanning device 200 cannot send data information to the broadcast device 100, and the broadcast communication process can only transmit data information in one direction. If the scanning device 200 needs to send data information to the broadcasting device 100, the scanning device 200 needs to add the BLE broadcasting function, and the broadcasting device 100 also needs to add the BLE scanning function, which will increase the power consumption of the device.
  • FIG. 1C it is a schematic diagram of a communication process of a BLE connection data packet provided by an embodiment of the present application.
  • the broadcast device 100 (slave device) sends connectable broadcast messages such as ADV_IND through BLE.
  • the scanning device 200 (the master device Master) starts BLE scanning, and after receiving the broadcast message, can establish a connection with the broadcast device 100 by sending a connection request message (CONNECT_IND). After the connection is established successfully, the scanning device 200 may send a data packet (M->S Data) to the broadcasting device 100 . After receiving the data packet, the broadcasting device 100 sends the data packet (S->M Data) to the scanning device 200 within the frame interval ( TIFS ).
  • a BLE connection needs to be established.
  • the process of establishing a BLE connection and maintaining a BLE connection requires increased work and also increases power consumption.
  • the current number of BLE connections is limited and cannot satisfy more connected services.
  • some low-cost bluetooth beacon (ibeacon) or bluetooth chip (mesh chip) do not support connection capability.
  • the Bluetooth data transmission method of the embodiment of the present application is provided.
  • the scanning device 200 starts BLE scanning and receives the broadcast message sent by the broadcast device 100, it adds a scan request data field in the scan request message to synchronize the data information in the scanning device to the broadcasting device 100 .
  • the interaction of data and information can be realized without increasing the power consumption of the device or slightly increasing the power consumption of the device.
  • the Bluetooth communication system 10 shown in FIG. 1A is a Bluetooth system based on the Bluetooth protocol. That is, the broadcasting device 100 and the scanning device 200 may both support the broadcasting communication function of BLE. Specifically, the broadcasting device 100 may broadcast the BLE broadcasting signal on the BLE broadcasting channel, and the scanning device 200 may scan the BLE broadcasting channel and receive the BLE broadcasting signal.
  • the embodiments of the present application are introduced by taking the Bluetooth communication system 10 based on the Bluetooth protocol as an example for introduction, but the embodiments of the present application are not limited to BLE broadcast communication, and may also be Wi-Fi broadcast communication or other short-distance wireless broadcast communication. (For example, near field communication (near field communication, NFC)), the embodiment of the present application does not limit the manner of broadcast communication.
  • the scanning device 200 may be an electronic device, and the electronic device 10 involved in the embodiments of the present application will be introduced below. Please refer to FIG. 2A , which is a schematic structural diagram of an electronic device 10 provided by an embodiment of the present application.
  • the electronic device 10 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, And a subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the electronic device 10 shown in FIG. 2A is only an example, and the electronic device 10 may have more or fewer components than those shown in FIG. 2A, two or more components may be combined, or Different component configurations are possible.
  • the various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • graphics processor graphics processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the controller may be the nerve center and command center of the electronic device 10 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface, so as to realize the touch function of the electronic device 10 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit an audio signal to the wireless communication module 160 through the I2S interface, so as to realize the function of turning on or off the device by voice.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of turning on or off the device. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth communication module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 may transmit an audio signal to the wireless communication module 160 through the UART interface, so as to realize the function of voice reminder.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the photographing function of the electronic device 10 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 10 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 10, and can also be used to transmit data between the electronic device 10 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 10 .
  • the electronic device 10 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the electronic device 10 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 10 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 10 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna for WLAN.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 10 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 10 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the BLE scanning function in the wireless communication module 160 may be implemented by the Bluetooth communication module shown in FIG. 2B .
  • the Bluetooth communication module may include, but is not limited to, a Bluetooth host (bluetooth host) 160A and a Bluetooth module (Bluetooth module) 160B.
  • the Bluetooth host 160A may be a Bluetooth chip.
  • the host can receive an instruction issued by an application program (application) running in the electronic device 10; or preset a higher layer protocol (higher layer); or call a host controller interface (HCI).
  • application application running in the electronic device 10
  • HCI host controller interface
  • the Bluetooth module 160B may include, but is not limited to, a host controller (host controller) 1611, a link manager (link manager) 1612, a base band & link controller (base band & link controller) 1613, and a radio frequency (radio TX/RX) 1614.
  • the application program issues an instruction to start the BLE scan, and the Bluetooth host 160A configures scan request parameters to form a scan request message. Then, the host control interface 1603 is called to send the message to the host controller 1611 in the Bluetooth module 160B. Then, it is sent to the Bluetooth communication module of the broadcasting device through the link management 1612, the baseband and link controller 1613, the radio frequency 1614, and the antenna 1615.
  • the electronic device 10 needs to enable the software module related to the function of scanning the BLE broadcast signal on the Bluetooth communication module.
  • the BLE scanning function can be started.
  • the antenna 1 of the electronic device 10 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 10 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 10 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 10 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 10 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 10 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 10 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.
  • Video codecs are used to compress or decompress digital video.
  • Electronic device 10 may support one or more video codecs.
  • the electronic device 10 can play or record videos in various encoding formats, for example, moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 10 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 10 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 10 by executing the instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 10 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the electronic device 10 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 10 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 10 may be provided with at least one microphone 170C. In other embodiments, the electronic device 10 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 10 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 10 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 10 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 10 can also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 10 .
  • the angular velocity of electronic device 10 about three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyroscope sensor 180B detects the shaking angle of the electronic device 10, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to counteract the shaking of the electronic device 10 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 10 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 10 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the electronic device 10 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 10 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 10 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 10 can measure distances by infrared or laser. In some embodiments, when shooting a scene, the electronic device 10 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 10 emits infrared light to the outside through light emitting diodes.
  • Electronic device 10 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 10 . When insufficient reflected light is detected, the electronic device 10 may determine that there is no object near the electronic device 10 .
  • the electronic device 10 can use the proximity light sensor 180G to detect that the user holds the electronic device 10 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device 10 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 10 is in the pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 10 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 10 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 10 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 10 heats the battery 142 to avoid abnormal shutdown of the electronic device 10 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 10 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 10 , which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 10 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 10 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 10 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the electronic device 10 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 10 interacts with the network through the SIM card to realize functions such as call and data communication.
  • the electronic device 10 employs an eSIM, ie: an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 10 and cannot be separated from the electronic device 10 .
  • the software system of the electronic device 10 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 10 .
  • FIG. 2C is a software structural block diagram of an electronic device 10 provided by an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages. As shown in FIG. 2C, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 10 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, images, layout files, video files, etc.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the smart terminal vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in the virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, G.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • the broadcasting device 100 may be an electronic device, and the electronic device 20 involved in the embodiments of the present application will be introduced below. Please refer to FIG. 2D , which is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application.
  • the electronic device 20 may include: a processor 301 , a memory 302 , a wireless communication module 303 , and a power supply 304 . These components can be connected via a bus.
  • the processor 301 may be configured to read and execute computer-readable instructions, and the processor 301 executes these application program codes to cause the electronic device 20 to execute the methods in the embodiments of the present application.
  • the processor 301 may mainly include a controller, an arithmetic unit, and a register.
  • the controller is mainly responsible for instruction decoding, and sends out control signals for the operations corresponding to the instructions.
  • the arithmetic unit is mainly responsible for performing fixed-point or floating-point arithmetic operations, shift operations, and logical operations, and can also perform address operations and conversions.
  • Registers are mainly responsible for saving register operands and intermediate operation results temporarily stored during instruction execution.
  • the hardware architecture of the processor 301 may be an application specific integrated circuit (Application Specific Integrated Circuits, ASIC) architecture, a MIPS architecture, an ARM architecture, an NP architecture, or the like.
  • the processor 301 may be configured to parse the signal received by the wireless communication processing module 303, for example, the received signal may be data information sent by the electronic device 10, and the data information is information of the electronic device 10, Such as power information, physical address information of the electronic device 10, and the like.
  • the processor 301 may be configured to perform corresponding processing operations according to the analysis result. For example, after receiving such a signal, the electronic device 20 reminds the user of the power status of the electronic device 10 through an application program.
  • the processor 301 may also be configured to generate a signal sent by the wireless communication processing module 303 to the outside, such as a BLE broadcast message sent by the electronic device 20 to the electronic device 10 .
  • Memory 302 is coupled to processor 301 for storing various software programs and/or sets of instructions.
  • memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
  • the memory 302 may also store communication programs that may be used to communicate with the electronic device 10 .
  • a Bluetooth address for uniquely identifying the electronic device 20 may also be stored in the memory 302 .
  • the wireless communication processing module 303 may include one or more of the Bluetooth communication module 104A and the WLAN communication processing module 104B.
  • the wireless communication module 303 is used to support short-distance communication between the electronic device 20 and the electronic device 10 .
  • the structure of the Bluetooth communication module 104A is the same as that of the Bluetooth communication module of the electronic device 10, and reference may be made to the description corresponding to FIG. 2B, which will not be repeated here.
  • the functions supported by the Bluetooth communication module 104A and the functions supported by the Bluetooth communication module of the electronic device 10 may be the same or different.
  • the Bluetooth communication module 104A supports the broadcast communication function of BLE.
  • the Bluetooth communication module 104A can be used to send broadcast messages.
  • the Bluetooth communication module 104A can also receive the scan request message sent by the Bluetooth communication module of the electronic device 10 through the antenna; The data information is reported to the application running in the electronic device 20 .
  • the power supply 304 may be used to supply power to various components included in the electronic device 20 .
  • the power source 304 may be a battery, such as a rechargeable battery.
  • Electronic device 20 may have more or fewer components than those shown in Figure 2C, may combine two or more components, or may have different component configurations.
  • the various components shown in Figure 2C may be implemented in hardware, software, or a combination of software and hardware.
  • the software systems of the Bluetooth communication modules of the electronic device 10 and the electronic device 20 can also be described by using a layered architecture.
  • the embodiments of the present application take a layered architecture as an example to exemplarily describe the software structure of the Bluetooth communication module.
  • FIG. 2E is a software structural block diagram of a Bluetooth communication module provided by an embodiment of the present application.
  • the software structure of the Bluetooth communication module is divided into three layers, from top to bottom are the application layer, the host layer, and the control layer.
  • the application layer may correspond to the application layer in the software structure of the electronic device 10 , which will not be repeated here.
  • the host layer includes but is not limited to the BLE protocol stack, higher layer protocols and host control interface HCI.
  • the BLE protocol stack pre-stores codes for implementing the BLE protocol;
  • the high-level protocol specifies the high-level signaling of wireless communication;
  • the host control interface is used for data interaction between the host layer and the control layer.
  • the control layer includes, but is not limited to, the host controller, the link layer, and the physical layer.
  • the host controller is connected with the host control interface, which can realize the data interaction between the host layer and the control layer; the link layer and the physical layer are mainly used to transmit signals.
  • the Bluetooth data transmission method includes but is not limited to the following steps:
  • the broadcasting device sends a broadcasting message; correspondingly, the scanning device receives the broadcasting message.
  • step S301 may refer to the following steps:
  • the application program A in the broadcasting device sends a start instruction to start the BLE broadcast.
  • the start command will be issued to BLE protocol stack A and link control A, etc.
  • the BLE protocol stack A sets broadcast parameters.
  • Link control A generates a broadcast message according to the broadcast parameter. Then, the broadcast message is sent to the scanning device through the antenna A. Correspondingly, the antenna B in the scanning device receives the broadcast message, and then reports it to the link control B in the scanning device.
  • the scanning device sends a scanning request message; correspondingly, the broadcasting device receives the scanning request message; the scanning request message carries data information.
  • step S302 may refer to the following steps:
  • the application program B in the scanning device sends a start instruction to start the BLE scan.
  • the start command will be issued to BLE protocol stack B and link control B, etc.
  • the BLE protocol stack B in the scanning device sets the scanning request parameter.
  • the scan request parameter includes data information.
  • the data information may be power information, and the data information may also be device information in the Bluetooth network or Wi-Fi network where the scanning device is located, etc. .
  • the BLE protocol stack B in the scanning device delivers the scanning request parameter to the link control B, and the link control B generates a scanning request message according to the scanning request parameter.
  • the link control B in the scanning device sends the scanning request message to the broadcasting device through the antenna B according to the received broadcast message.
  • the antenna A of the broadcasting device receives the scan request message and reports it to the link control A.
  • the scan request message includes a scan address field (Scan Address), a broadcast address field (Adv Address) and a scan request data field.
  • the scan address field contains the public or random address of the scanning device
  • the broadcast address field contains the public or random address of the broadcast device.
  • a new scan request data field (Scan Request Data) is added.
  • the scan request data field contains data information.
  • the Scan Request Data may include a data length field (Scan_Request_Data_Length) and a data field (Scan_Request_Data), the Scan_Request_Data is used to store data information, and Scan_Request_Data_Length is used to store the length of the data information.
  • the length of the scan request data field is not limited.
  • the length of the 1M scan request data field for the physical layer (PHY) is 0 to 25 bytes
  • the length of the PHY 2M scan request data field is 0 to 254 bytes. Festival.
  • the field length of Scan_Request_Data_Length is also not limited, for example, it can be 5 bytes.
  • the Scan Request Data may only include data fields.
  • the Scan Request Data may also include other fields.
  • the scan request parameter settings (LE Set Extended Scan Parameters command) are shown in Table 1 below.
  • the scan request message also includes parameters such as own address type (Own_Address_Type), interception policy (Scanning_Filter_Policy), scanning window (Scan_Window) and scan interval (Scan_Interval).
  • OCF represents an Opcode Command Field
  • Command Parameters represents a command parameter
  • Return Parameters represents a return parameter.
  • the broadcast device processes the data information contained in the scan request message.
  • step S303 may refer to the following steps:
  • the link control A reports the scan request message to the BLE protocol stack A.
  • the BLE protocol stack A in the broadcasting device parses the scan request message to determine whether the message carries data information. If the data information is carried, the data information is reported to the application A in the broadcasting device. Application A processes the data information.
  • Application Scenario 1 the following describes the embodiments of the present application by taking the scanning device as a mobile terminal, the broadcasting device as a smart watch, and the data information as the power information of the mobile terminal as an application scenario.
  • the data information is power information
  • the power information is used to indicate the power of the scanning device
  • the broadcasting device processes the data information, including: the broadcasting device
  • a prompt message is displayed in the user interface according to the power information, where the prompt message is used to remind the user of the power status of the scanning device.
  • application program B can be used to monitor the power of the mobile terminal.
  • Application B can issue a startup command to start BLE scanning when the battery of the mobile terminal is too low.
  • the BLE protocol stack of the mobile terminal configures scan request parameters to form a scan request message, and the message carries power information.
  • the smart watch can be in the broadcasting state all the time. After the mobile terminal starts BLE scanning, it can scan the broadcast message sent by the smart watch, so that the mobile terminal can send the scanning request message to the mobile terminal.
  • the application program A may be used to process the received power information of the mobile terminal, and to remind when the power of the mobile terminal is too low.
  • the antenna in the smart watch receives the scan request message sent by the mobile terminal and reports it to the BLE protocol stack.
  • the BLE protocol stack parses the scan request packet, obtains the power information carried in the scan request packet, and reports the power information to application A.
  • the application A may display the power information to the user through the user interface; or determine whether it is necessary to remind the user that the power of the mobile terminal is too low according to the power information.
  • the smart watch can remind users through voice, vibration, and prompt messages displayed on the user interface.
  • the smart watch displays or voice prompts that the power of the mobile terminal is lower than 20%, as shown in Figure 5.
  • the mobile terminal can synchronize data information to the smart watch through the BLE scan request message, without adding additional scanning and broadcasting, saving power consumption and spectrum resources.
  • Application scenario 2 the following describes the embodiments of the present application by taking the scanning device as the mobile terminal, the broadcasting device as the smart watch, and the data information as the device information as the application scenario.
  • the data information is device information
  • the device information is information of each device in the Bluetooth networking or Wi-Fi networking where the scanning device is located;
  • the processing of the data information includes: the broadcasting device storing the device information in a device information list, where the device information list is used to store information of each device in the Bluetooth networking or Wi-Fi networking.
  • the Bluetooth network or Wi-Fi network where the scanning device is located may include one or more devices.
  • the scanning device may store device information of each device in the Bluetooth networking or Wi-Fi networking.
  • the device information can be carried in the newly added scan request data field of the scan request message, and then the device information can be synchronized to the broadcast device.
  • the device information may include, but is not limited to, MAC address (media access control address), IP address (internet protocol address), BLE scan address, BLE broadcast address, etc., or include online/offline status information, volume information, shutdown/ Power-on status information, etc.
  • the broadcasting device can obtain the device information of each device in the Bluetooth network or Wi-Fi network where the scanning device is located (which also includes the device information of the scanning device). Further, the broadcasting device can conveniently perform data communication with one or more of the devices according to the device information, such as sending control instructions such as on/off.
  • the broadcasting device may maintain a device information list, where the device information list is used to store information of each device in the Bluetooth networking or Wi-Fi networking.
  • the device information list can be updated or deleted according to the actual connection status of the devices in the BLE networking.
  • the BLE networking includes three devices, which are a smartphone 600 , a tablet computer 602 and a laptop computer 601 .
  • the scanning device is a smart phone 600
  • the broadcasting device is a smart watch 604 .
  • the smartphone 600 may store device information of each device in the BLE network where it is located.
  • the scanning device sends the scan request message
  • the device information can be carried in the newly added scan request data field of the scan request message, and then the device information can be synchronized to the broadcast device.
  • the smart watch 604 can obtain the device information of each device in the BLE network where the smart phone 600 is located.
  • the scanning device after the scanning device starts BLE scanning and receives the broadcast message sent by the broadcasting device, it can synchronize the data information in the scanning device to the scanning request message by adding a scanning request data field to the scanning device. broadcasting equipment. In this way, the interaction of data and information is realized without increasing the power consumption of the device or slightly increasing the power consumption of the device.
  • FIG. 7 is another Bluetooth data transmission method provided by an embodiment of the present application. The method includes but is not limited to the following steps:
  • the broadcasting device sends a broadcasting message; correspondingly, the scanning device receives the broadcasting message.
  • step S701 may refer to the following steps:
  • BLE protocol stack A sends broadcast parameter A and broadcast parameter B to BLE link control A respectively.
  • the link control A generates a broadcast packet A and a broadcast packet B according to the broadcast parameter A and the broadcast parameter B. Then, the broadcast message A and the broadcast message B are sent to the scanning device through the antenna A. Correspondingly, the antenna B in the scanning device receives the broadcast message A and the broadcast message B, and then reports them to the link control B in the scanning device.
  • the broadcast message includes device data
  • the device data includes the manufacturer identifier of the broadcast device, the user account information logged on the broadcast device, the identifier of the application that initiates the broadcast request, and the broadcast device that initiates the broadcast.
  • the broadcast packet A may include the identifier of the application A
  • the broadcast packet B may include the identifier of the application B.
  • the scanning device sends a scanning request message; correspondingly, the broadcasting device receives the scanning request message; the scanning request message may carry data information.
  • step S702 may refer to the following steps:
  • application A and application C can be the same application, such as WeChat; they can also be different versions of the same application, such as Weibo and Weibo International; they can also be applications of the same type Programs, such as instant messaging software; such as WeChat, QQ, etc.
  • application B and application D also meet the above conditions.
  • S7021 and the BLE protocol stack B respectively set the scan request parameter C corresponding to the application C and the scan request parameter D corresponding to the application D.
  • the BLE protocol stack B in the scanning device sends the scan request parameter C and the scan request parameter D to the link control B, and the link control B generates the scan request message C and the scan request message according to the scan request parameter C and the scan request parameter D. Text D.
  • the scan request message C includes the newly added fields Scan_Request_Data_Length and Scan_Request_Data (for example, the data information is whether the power value of the scanning device is lower than 20%);
  • the scan request message D includes the newly added fields Scan_Request_Data_Length and Scan_Request_Data (for example, the data information is the application program). D has a new message).
  • the scan request parameter includes data information and filter conditions.
  • the filter condition may be whether the broadcast message contains preset device data, and the device data may be the identifier of the manufacturer of the broadcast device, the user account information logged in the broadcast device, the identifier of the application that initiates the broadcast request, One or more items of user account information of the application that initiates the broadcast request.
  • the data information contained in the scan request parameter C may be power information
  • the filter condition A may be whether the broadcast message contains the identifier of the application program A.
  • the data information contained in the scan request parameter D may be prompt information
  • the filter condition B may be whether the broadcast message contains the identifier of the application program B.
  • other filtering conditions may also exist, which will not be repeated here.
  • link control B matches broadcast packets from different application programs according to the filtering conditions.
  • matching broadcast packet A according to filter condition A corresponds to scan request packet C of application C
  • matching broadcast packet B according to filter condition B corresponds to scanning request packet D of application D. That is to say, the scanning device sends a scanning request message to the broadcasting device according to the device data in the broadcasting message.
  • the data information may be obtained from the broadcast message through a binary mask of the same length as the broadcast message, and the obtained data information may be matched with each filter condition.
  • the link control B sends the scan request message C and the scan request message D to the broadcast device.
  • the antenna A in the broadcasting device receives the scan request message C and the scan request message D, and reports them to the link control A.
  • the broadcast device processes the data information contained in the scan request message.
  • step S703 may refer to the following steps:
  • the link controller A reports the scan request packet C and the scan request packet D to the BLE protocol stack A.
  • the BLE protocol stack A parses the scan request message C and the scan request message D, and determines whether the scan request message carries data information. If it carries business data information, the data information is reported to different application programs of the application layer.
  • data information C is reported to application A
  • data information D is reported to application B.
  • the application program A and the application program B respectively perform relevant processing on the data information carried in the received scan request message. For example, the smartwatch displays or voice prompts that the battery of the scanning device is below 20%; or the smartwatch displays or voice prompts that App D has received a new message.
  • multiple applications in the broadcasting device start broadcasting and send multiple broadcasting messages to the scanning device; multiple applications in the scanning device enable BLE scanning, and according to the broadcasting messages sent by the broadcasting device , match broadcast messages from different applications through different filter conditions; then send different data information carried in the newly added scan request data field in the scan request message to the corresponding application program in the broadcast device, and different applications of the broadcast device
  • the program processes the corresponding data information.
  • the interaction of data and information is realized without increasing the power consumption of the device or a small increase in the power consumption of the device; and at the same time, it supports the Bluetooth broadcast two-way communication of multiple applications, and scan request messages sent by different applications. carry different data information.
  • the steps performed by the broadcasting device in the Bluetooth data transmission method provided by the above embodiments of the present application may also be performed by a Bluetooth chip included in the broadcasting device.
  • the computer program stored in the memory is invoked to implement the steps performed by the above-mentioned broadcasting device.
  • the steps performed by the scanning device may also be performed by a Bluetooth chip included in the scanning device.
  • the Bluetooth chip is running, the computer program stored in the memory is called to realize the steps performed by the above scanning device.

Abstract

Disclosed in the present application are a Bluetooth-based data transmission method and a related apparatus. The method comprises: a broadcast device sends a broadcast packet to a scanning device; the broadcast device receives a scanning request packet sent by the scanning device, the scanning request packet being sent to the broadcast device by the scanning device in response to the broadcast packet, and the scanning request packet carrying data information; the broadcast device processes the data information. In this way, data information exchange can be implemented by increasing the power consumption of the device by a small amount or without increasing the power consumption of the device.

Description

一种蓝牙数据传输方法及相关装置A Bluetooth data transmission method and related device
本申请要求于2020年8月31日提交中国国家知识产权局、申请号为202010906576.X、申请名称为“一种蓝牙数据传输方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202010906576.X and the application name "A Bluetooth data transmission method and related device" submitted to the State Intellectual Property Office of China on August 31, 2020, the entire content of which is approved by Reference is incorporated in this application.
技术领域technical field
本申请涉及电子技术领域,尤其涉及一种蓝牙数据传输方法及相关装置。The present application relates to the field of electronic technology, and in particular, to a Bluetooth data transmission method and related devices.
背景技术Background technique
蓝牙低功耗(bluetooth low energy,BLE)因具有低耗电量以及低成本的特点,被广泛应用在医疗保健、运动健身、信标、安防、家庭娱乐等领域。目前,在BLE广播通信过程中,数据信息主要是通过BLE广播报文携带发送。在BLE连接通信过程中,数据信息主要是通过BLE连接数据报文携带发送。Due to its low power consumption and low cost, Bluetooth low energy (BLE) is widely used in healthcare, sports and fitness, beacons, security, home entertainment and other fields. At present, in the process of BLE broadcast communication, data information is mainly carried and sent through BLE broadcast packets. In the BLE connection communication process, data information is mainly carried and sent through BLE connection data packets.
但是,在BLE广播通信过程中,扫描设备无法发送数据信息给广播设备,如果扫描设备需要发送数据信息给广播设备,则扫描设备需要额外增加BLE广播功能,从而会增加设备的功耗。在BLE连接通信过程中,设备之间必须建立BLE连接后,才能进行数据的交互;建立BLE连接过程和维持BLE连接也会增加设备的工作量,从而带来设备功耗的增加。因此如何在不增加设备功耗或少量增加设备功耗的情况下,实现数据的交互是亟需解决的问题。However, during the BLE broadcast communication process, the scanning device cannot send data information to the broadcasting device. If the scanning device needs to send data information to the broadcasting device, the scanning device needs to add the BLE broadcasting function, which will increase the power consumption of the device. During the BLE connection communication process, the data exchange can only be carried out after the BLE connection is established between the devices; the process of establishing the BLE connection and maintaining the BLE connection will also increase the workload of the device, thereby increasing the power consumption of the device. Therefore, how to realize data interaction without increasing the power consumption of the device or slightly increasing the power consumption of the device is an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种蓝牙数据传输方法及相关装置,可以在不增加设备功耗或少量增加设备功耗的情况下,实现数据信息的交互。The present application provides a Bluetooth data transmission method and related apparatus, which can realize the interaction of data and information without increasing the power consumption of the device or slightly increasing the power consumption of the device.
第一方面,本申请提供了一种蓝牙数据传输方法,该方法包括:广播设备向扫描设备发送广播报文;所述广播设备接收所述扫描设备发送的扫描请求报文,所述扫描请求报文是所述扫描设备根据所述广播报文向所述广播设备发送的,所述扫描请求报文携带有数据信息;所述广播设备对所述数据信息进行处理。通过这种方式,可以在不增加设备功耗或少量增加设备功耗的情况下,实现数据信息的交互。In a first aspect, the present application provides a Bluetooth data transmission method, the method includes: a broadcast device sends a broadcast message to a scanning device; the broadcast device receives a scan request message sent by the scanning device, the scan request message The message is sent by the scanning device to the broadcast device according to the broadcast message, and the scan request message carries data information; the broadcast device processes the data information. In this way, the interaction of data and information can be realized without increasing the power consumption of the device or slightly increasing the power consumption of the device.
结合第一方面,在一种可能的实现方式中,所述扫描请求报文中包含有扫描请求数据字段,所述扫描请求数据字段中包含所述数据信息。With reference to the first aspect, in a possible implementation manner, the scan request message includes a scan request data field, and the scan request data field includes the data information.
结合第一方面,在一种可能的实现方式中,所述广播设备对所述数据信息进行处理包括:所述广播设备对所述扫描请求报文进行解析,确定所述扫描请求报文中是否携带有所述数据信息;若所述扫描请求报文中携带有所述数据信息,则所述广播设备对所述数据信息进行处理。With reference to the first aspect, in a possible implementation manner, the processing of the data information by the broadcast device includes: the broadcast device parses the scan request packet, and determines whether the scan request packet contains carrying the data information; if the scan request message carries the data information, the broadcast device processes the data information.
结合第一方面,在一种可能的实现方式中,若所述数据信息为电量信息,所述电量信息用于指示所述扫描设备的电量;所述广播设备对所述数据信息进行处理,包括:所述广播设备根据所述电量信息在用户界面中显示提示消息,所述提示消息用于提醒用户所述扫描设备的电量情况。With reference to the first aspect, in a possible implementation manner, if the data information is power information, the power information is used to indicate the power of the scanning device; the broadcasting device processes the data information, including: : The broadcasting device displays a prompt message in the user interface according to the power information, where the prompt message is used to remind the user of the power status of the scanning device.
结合第一方面,在一种可能的实现方式中,若所述数据信息为设备信息,所述设备信息为所述扫描设备所在的蓝牙组网或者Wi-Fi组网中的各个设备的信息;所述广播设备对所述数据信息进行处理,包括:所述广播设备将所述设备信息存储在设备信息列表中,所述设备信息列表用于存储蓝牙组网或者Wi-Fi组网中的各个设备的信息。With reference to the first aspect, in a possible implementation manner, if the data information is device information, the device information is information of each device in the Bluetooth networking or Wi-Fi networking where the scanning device is located; The broadcasting device processing the data information includes: the broadcasting device storing the device information in a device information list, where the device information list is used to store each of the Bluetooth networking or Wi-Fi networking. device information.
结合第一方面,在一种可能的实现方式中,所述广播报文中包括设备数据,所述设备数据包括所述广播设备的生产厂商标识、所述广播设备上登录的用户账号信息、发起广播请求的应用程序的标识、发起广播请求的应用程序的用户账号信息中的一项或者多项。With reference to the first aspect, in a possible implementation manner, the broadcast message includes device data, and the device data includes the manufacturer's identifier of the broadcast device, the user account information logged in the broadcast device, and the originator of the broadcast device. One or more of the identifier of the application that broadcasts the request, and the user account information of the application that initiates the broadcast request.
第二方面,本申请实施例提供了又一种蓝牙数据传输方法,所述方法包括:扫描设备接收广播设备发送的广播报文;所述扫描设备根据所述广播报文向所述广播设备发送扫描请求报文,所述扫描请求报文携带有数据信息。通过这种方式,可以在不增加设备功耗或少量增加设备功耗的情况下,实现数据信息的交互。In a second aspect, an embodiment of the present application provides another method for transmitting Bluetooth data, the method includes: a scanning device receives a broadcast message sent by a broadcast device; the scanning device sends a broadcast message to the broadcast device according to the broadcast message A scan request message, where the scan request message carries data information. In this way, the interaction of data and information can be realized without increasing the power consumption of the device or slightly increasing the power consumption of the device.
结合第二方面,在一种可能的实现方式中,所述扫描请求报文中包含有扫描请求数据字段,所述扫描请求数据字段中包含所述数据信息。With reference to the second aspect, in a possible implementation manner, the scan request message includes a scan request data field, and the scan request data field includes the data information.
结合第二方面,在一种可能的实现方式中,若所述数据信息为电量信息,所述电量信息用于指示所述扫描设备的电量。With reference to the second aspect, in a possible implementation manner, if the data information is power information, the power information is used to indicate the power of the scanning device.
结合第二方面,在一种可能的实现方式中,若所述数据信息为设备信息,所述设备信息为所述扫描设备所在的蓝牙组网或者Wi-Fi组网中的各个设备的信息。With reference to the second aspect, in a possible implementation manner, if the data information is device information, the device information is information of each device in the Bluetooth networking or Wi-Fi networking where the scanning device is located.
结合第二方面,在一种可能的实现方式中,所述广播报文中包括设备数据,所述设备数据包括所述广播设备的生产厂商标识、所述广播设备上登录的用户账号信息、发起广播请求的应用程序的标识、发起广播请求的应用程序的用户账号信息中的一项或者多项;所述扫描设备根据所述广播报文向所述广播设备发送扫描请求报文,包括:所述扫描设备根据所述广播报文中的设备数据向所述广播设备发送扫描请求报文。With reference to the second aspect, in a possible implementation manner, the broadcast message includes device data, and the device data includes the manufacturer's identifier of the broadcast device, user account information logged in the broadcast device, and the originator of the broadcast device. One or more of the identification of the application that broadcasts the request, and the user account information of the application that initiates the broadcast request; the scanning device sends a scanning request message to the broadcasting device according to the broadcast message, including: The scanning device sends a scanning request message to the broadcasting device according to the device data in the broadcasting message.
第三方面,本申请实施例提供了一种广播设备,所述广播设备包括一个或多个处理器、存储器,所述存储器与所述一个或多个处理器耦合,所述存储器用于存储程序代码,所述一个或多个处理器调用所述程序代码以使得所述广播设备执行以下操作:向扫描设备发送广播报文;接收所述扫描设备发送的扫描请求报文,所述扫描请求报文是所述扫描设备根据所述广播报文向所述广播设备发送的,所述扫描请求报文携带有数据信息;对所述数据信息进行处理。In a third aspect, an embodiment of the present application provides a broadcast device, the broadcast device includes one or more processors and a memory, the memory is coupled to the one or more processors, and the memory is used for storing a program code, the one or more processors invoke the program code to cause the broadcast device to perform the following operations: send a broadcast message to a scanning device; receive a scan request message sent by the scanning device, the scan request message The message is sent by the scanning device to the broadcast device according to the broadcast message, and the scan request message carries data information; the data information is processed.
结合第三方面,在一种可能的实现方式中,所述扫描请求报文中包含有扫描请求数据字段,所述扫描请求数据字段中包含所述数据信息。With reference to the third aspect, in a possible implementation manner, the scan request message includes a scan request data field, and the scan request data field includes the data information.
结合第三方面,在一种可能的实现方式中,所述一个或多个处理器调用所述程序代码以使得所述广播设备具体执行以下操作:对所述扫描请求报文进行解析,确定所述扫描请求报文中是否携带有所述数据信息;若所述扫描请求报文中携带有所述数据信息,则所述广播设备对所述数据信息进行处理。With reference to the third aspect, in a possible implementation manner, the one or more processors invoke the program code to cause the broadcasting device to specifically perform the following operations: parse the scan request message, determine the whether the scan request message carries the data information; if the scan request message carries the data information, the broadcast device processes the data information.
结合第三方面,在一种可能的实现方式中,若所述数据信息为电量信息,所述电量信息用于指示所述扫描设备的电量;所述一个或多个处理器调用所述程序代码以使得所述广播设备具体执行以下操作:根据所述电量信息在用户界面中显示提示消息,所述提示消息用于提醒用户所述扫描设备的电量情况。With reference to the third aspect, in a possible implementation manner, if the data information is power information, the power information is used to indicate the power of the scanning device; the one or more processors call the program code So that the broadcasting device specifically performs the following operation: displaying a prompt message in the user interface according to the power information, where the prompt message is used to remind the user of the power status of the scanning device.
结合第三方面,在一种可能的实现方式中,若所述数据信息为设备信息,所述设备信息为所述扫描设备所在的蓝牙组网或者Wi-Fi组网中的各个设备的信息;所述一个或多个处理器调用所述程序代码以使得所述广播设备具体执行以下操作:将所述设备信息存储在设备信 息列表中,所述设备信息列表用于存储蓝牙组网或者Wi-Fi组网中的各个设备的信息。With reference to the third aspect, in a possible implementation manner, if the data information is device information, the device information is information of each device in the Bluetooth networking or Wi-Fi networking where the scanning device is located; The one or more processors invoke the program code to cause the broadcast device to specifically perform the following operations: store the device information in a device information list, where the device information list is used to store Bluetooth networking or Wi-Fi Information about each device in the Fi network.
第四方面,本申请实施例提供了一种扫描设备,所述扫描设备包括一个或多个处理器、存储器,所述存储器与所述一个或多个处理器耦合,所述存储器用于存储程序代码,所述一个或多个处理器调用所述程序代码以使得所述扫描设备执行以下操作:接收广播设备发送的广播报文;根据所述广播报文向所述广播设备发送扫描请求报文,所述扫描请求报文携带有数据信息。In a fourth aspect, an embodiment of the present application provides a scanning device, the scanning device includes one or more processors and a memory, the memory is coupled to the one or more processors, and the memory is used for storing a program code, the one or more processors call the program code to cause the scanning device to perform the following operations: receive a broadcast message sent by a broadcast device; send a scan request message to the broadcast device according to the broadcast message , the scan request message carries data information.
结合第四方面,在一种可能的实现方式中,所述扫描请求报文中包含有扫描请求数据字段,所述扫描请求数据字段中包含所述数据信息。With reference to the fourth aspect, in a possible implementation manner, the scan request message includes a scan request data field, and the scan request data field includes the data information.
结合第四方面,在一种可能的实现方式中,若所述数据信息为电量信息,所述电量信息用于指示所述扫描设备的电量。With reference to the fourth aspect, in a possible implementation manner, if the data information is power information, the power information is used to indicate the power of the scanning device.
结合第四方面,在一种可能的实现方式中,若所述数据信息为设备信息,所述设备信息为所述扫描设备所在的蓝牙组网或者Wi-Fi组网中的各个设备的信息。With reference to the fourth aspect, in a possible implementation manner, if the data information is device information, the device information is information of each device in the Bluetooth networking or Wi-Fi networking where the scanning device is located.
结合第四方面,在一种可能的实现方式中,所述广播报文中包括设备数据,所述设备数据包括所述广播设备的生产厂商标识、所述广播设备上登录的用户账号信息、发起广播请求的应用程序的标识、发起广播请求的应用程序的用户账号信息中的一项或者多项;所述一个或多个处理器调用所述程序代码以使得所述扫描设备具体执行以下操作:所述扫描设备根据所述广播报文中的设备数据向所述广播设备发送扫描请求报文。With reference to the fourth aspect, in a possible implementation manner, the broadcast message includes device data, and the device data includes the manufacturer's identifier of the broadcast device, the user account information logged in the broadcast device, and the originator of the broadcast device. One or more of the identification of the application that broadcasts the request, and the user account information of the application that initiates the broadcast request; the one or more processors call the program code to cause the scanning device to specifically perform the following operations: The scanning device sends a scanning request message to the broadcasting device according to the device data in the broadcasting message.
第五方面,本申请实施例提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,当所述计算机指令在电子设备上运行时,使得计算机执行上述第一方面或者第一方面任一项可能的实现方式中的方法。In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes computer instructions, which, when the computer instructions are executed on an electronic device, cause a computer to execute the first aspect or any one of the first aspects. A method in possible implementations of an item.
第六方面,本申请实施例提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,当所述计算机指令在电子设备上运行时,使得计算机执行上述第二方面或者第二方面任一项可能的实现方式中的方法。In a sixth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes computer instructions, when the computer instructions are executed on an electronic device, the computer is caused to execute the second aspect or any one of the second aspects. A method in possible implementations of an item.
第七方面,本申请实施例提供了一种计算机可读存储介质,包括指令,当所述指令在电子设备上运行时,使得所述电子设备执行上述第一方面或者第一方面任一项可能的实现方式中的方法。In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions, when the instructions are executed on an electronic device, the electronic device may perform the first aspect or any one of the first aspects. method in the implementation.
第八方面,本申请实施例提供了一种计算机可读存储介质,包括指令,当所述指令在电子设备上运行时,使得所述电子设备执行上述第二方面或者第二方面任一项可能的实现方式中的方法。In an eighth aspect, embodiments of the present application provide a computer-readable storage medium, including instructions, when the instructions are executed on an electronic device, the electronic device may perform the second aspect or any one of the second aspects. method in the implementation.
在本申请实施例中,扫描设备在开启扫描,并接收到广播设备发送的广播报文后,通过向广播设备发送扫描请求报文,可以将扫描设备中的数据信息同步至广播设备。其中,该扫描请求报文中包含有数据信息。通过这种方式,不增加设备功耗或少量增加设备功耗的情况下,实现了数据信息的交互。In the embodiment of the present application, after the scanning device starts scanning and receives a broadcast message sent by the broadcast device, it sends a scan request message to the broadcast device, so that the data information in the scan device can be synchronized to the broadcast device. The scan request message includes data information. In this way, the interaction of data and information is realized without increasing the power consumption of the device or slightly increasing the power consumption of the device.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that are required to be used in the description of the embodiments or the prior art.
图1A是本申请实施例提供的一种蓝牙通信***的示意图;1A is a schematic diagram of a Bluetooth communication system provided by an embodiment of the present application;
图1B是本申请实施例提供的一种可被扫描的BLE广播报文的通信过程的示意图;1B is a schematic diagram of a communication process of a scannable BLE broadcast message provided by an embodiment of the present application;
图1C是本申请实施例提供的一种BLE连接数据报文的通信过程的示意图;1C is a schematic diagram of a communication process of a BLE connection data packet provided by an embodiment of the present application;
图2A是本申请实施例提供的电子设备10的结构示意图;FIG. 2A is a schematic structural diagram of an electronic device 10 provided by an embodiment of the present application;
图2B是本申请实施例提供的蓝牙通信模块的结构示意图;2B is a schematic structural diagram of a Bluetooth communication module provided by an embodiment of the present application;
图2C是本申请实施例提供的一种电子设备10的软件结构框图;FIG. 2C is a software structural block diagram of an electronic device 10 provided by an embodiment of the present application;
图2D是本申请实施例提供的电子设备20的结构示意图;FIG. 2D is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application;
图2E是本申请实施例提供的一种蓝牙通信模块的软件结构框图;2E is a software structural block diagram of a Bluetooth communication module provided by an embodiment of the present application;
图3是本申请实施例提供的一种蓝牙数据传输方法的流程示意图;3 is a schematic flowchart of a Bluetooth data transmission method provided by an embodiment of the present application;
图4是本申请实施例提供的一种可能的扫描请求报文的示意图;4 is a schematic diagram of a possible scan request message provided by an embodiment of the present application;
图5是本申请实施例提供的一种可能的蓝牙数据传输方法的应用场景示意图;5 is a schematic diagram of an application scenario of a possible Bluetooth data transmission method provided by an embodiment of the present application;
图6是本申请实施例提供的又一种可能的蓝牙数据传输方法的应用场景示意图;6 is a schematic diagram of an application scenario of another possible Bluetooth data transmission method provided by an embodiment of the present application;
图7是本申请实施例提供的又一种蓝牙数据传输方法的流程示意图。FIG. 7 is a schematic flowchart of another Bluetooth data transmission method provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合附图对本申请实施例中的技术方案进行清除、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be cleared and described in detail below with reference to the accompanying drawings. Wherein, in the description of the embodiments of the present application, unless otherwise specified, “/” means or, for example, A/B can mean A or B; “and/or” in the text is only a description of an associated object The association relationship indicates that there can be three kinds of relationships, for example, A and/or B can indicate that A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of this application , "plurality" means two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as implying or implying relative importance or implying the number of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, the "multiple" The meaning is two or more.
本申请实施例中的用户界面(user interface,UI),是应用程序或操作***与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。应用程序的用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在电子设备300设备上经过解析,渲染,最终呈现为用户可以识别的内容,比如图片、文字、按钮等控件。控件(control),是用户界面的基本元素,典型的控件有按钮(button)、小工具(widget)、工具栏(toolbar)、菜单栏(menu bar)、文本框(text box)、滚动条(scrollbar)、图片和文本。界面中的控件的属性和内容是通过标签或者节点来定义的,比如XML通过<Textview>、<ImgView>、<VideoView>等节点来规定界面所包含的控件。一个节点对应界面中一个控件或属性,节点经过解析和渲染之后呈现为用户可视的内容。此外,很多应用程序,比如混合应用(hybrid application)的界面中通常还包含有网页。网页,也称为页面,可以理解为内嵌在应用程序界面中的一个特殊的控件,网页是通过特定计算机语言编写的源代码,例如超文本标记语言(hyper text markup language,HTML),层叠样式表(cascading style sheets,CSS),java脚本(JavaScript,JS)等,网页源代码可以由浏览器或与浏览器功能类似的网页显示组件加载和显示为用户可识别的内容。网页所包含的具体内容也是通过网页源代码中的标签或者节点来定义的,比如HTML通过<p>、<img>、<video>、来定义网页的元素和属性。The user interface (user interface, UI) in the embodiments of the present application is a medium interface for interaction and information exchange between an application program or an operating system and a user, and it realizes the conversion between the internal form of the information and the form acceptable to the user. The user interface of the application is the source code written in a specific computer language such as java, extensible markup language (XML), the interface source code is parsed and rendered on the electronic device 300, and finally presented as a user-identifiable Content, such as images, text, buttons and other controls. Controls are the basic elements of the user interface. Typical controls include buttons, widgets, toolbars, menu bars, text boxes, scroll bars ( scrollbar), pictures and text. The attributes and content of controls in the interface are defined by tags or nodes. For example, XML specifies the controls contained in the interface through nodes such as <Textview>, <ImgView>, and <VideoView>. A node corresponds to a control or property in the interface, and the node is rendered as user-visible content after parsing and rendering. In addition, many applications, such as hybrid applications, often contain web pages in their interface. A web page, also known as a page, can be understood as a special control embedded in an application program interface. A web page is source code written in a specific computer language, such as hypertext markup language (HTML), cascading styles Tables (cascading style sheets, CSS), java scripts (JavaScript, JS), etc., the source code of the web page can be loaded and displayed as user-identifiable content by a browser or a web page display component similar in function to a browser. The specific content contained in a web page is also defined by tags or nodes in the source code of the web page. For example, HTML uses <p>, <img>, and <video> to define the elements and attributes of the web page.
用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的一个图标、 窗口、控件等界面元素。A commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed graphically. It can be an icon, window, control or other interface element displayed in the display screen of the electronic device.
为了更好的理解本申请实施例,对本申请实施例提供的蓝牙通信***进行介绍。请参见图1A,图1A是本申请实施例提供的一种蓝牙通信***的示意图。蓝牙通信***10可以包括广播设备100以及扫描设备200。其中:In order to better understand the embodiments of the present application, the Bluetooth communication system provided by the embodiments of the present application is introduced. Please refer to FIG. 1A . FIG. 1A is a schematic diagram of a Bluetooth communication system provided by an embodiment of the present application. The Bluetooth communication system 10 may include a broadcasting device 100 and a scanning device 200 . in:
广播设备100为非一直充电的功耗敏感设备,且具备BLE广播功能;例如,可以是智能手表、智能眼镜等智能穿戴终端设备,或电池容量小的终端设备。在蓝牙通信***中广播设备100的个数不做限制,可以为多个,图1A中以一个智能手表为例。扫描设备200,可以为移动终端、平板电脑、笔记本电脑、个人电脑等具备BLE扫描功能的电子设备。在蓝牙通信***中扫描设备200的个数不做限制,可以为多个,图1A中以一个移动终端为例。广播设备100和扫描设备200可以通过BLE进行连接。The broadcasting device 100 is a power consumption sensitive device that is not always charged, and has the BLE broadcasting function; for example, it may be a smart wearable terminal device such as a smart watch and smart glasses, or a terminal device with a small battery capacity. The number of broadcasting devices 100 in the Bluetooth communication system is not limited, and may be multiple. In FIG. 1A , a smart watch is used as an example. The scanning device 200 may be an electronic device with a BLE scanning function, such as a mobile terminal, a tablet computer, a notebook computer, and a personal computer. In the Bluetooth communication system, the number of scanning devices 200 is not limited, and may be multiple. In FIG. 1A , a mobile terminal is used as an example. The broadcasting device 100 and the scanning device 200 may be connected through BLE.
首先对现有技术中的数据信息的传输方法进行介绍。参见图1B,是本申请实施例提供的一种可被扫描的BLE广播报文的通信过程的示意图。广播设备100中的应用程序A启动广播,蓝牙通信模块A通过BLE发送通用广播指示(ADV_IND)等广播报文给扫描设备200。扫描设备200启动BLE扫描,扫描到广播报文后,可通过发送请求报文(SCAN_REQ)从广播设备100获取更多信息。广播设备100收到SCAN_REQ后,发送扫描响应报文(SCAN_RSP)携带响应信息给扫描设备200,扫描设备200可上报该SCAN_RSP给应用程序B。但是目前的蓝牙标准中,SCAN_REQ无法携带数据信息。因此,扫描设备200无法发送数据信息给广播设备100,该广播通信过程只能传输单向的数据信息。如果扫描设备200需要发送数据信息给广播设备100,则扫描设备200需额外增加BLE广播功能,广播设备100也需要增加BLE扫描功能,这种方式会增加设备的功耗。First, the data information transmission method in the prior art is introduced. Referring to FIG. 1B , it is a schematic diagram of a communication process of a scannable BLE broadcast message provided by an embodiment of the present application. The application A in the broadcasting device 100 starts broadcasting, and the Bluetooth communication module A sends broadcasting messages such as general broadcasting indication (ADV_IND) to the scanning device 200 through BLE. The scanning device 200 starts BLE scanning, and after scanning the broadcast message, it can obtain more information from the broadcast device 100 by sending a request message (SCAN_REQ). After receiving the SCAN_REQ, the broadcast device 100 sends a scan response message (SCAN_RSP) carrying the response information to the scan device 200 , and the scan device 200 can report the SCAN_RSP to the application B. However, in the current Bluetooth standard, SCAN_REQ cannot carry data information. Therefore, the scanning device 200 cannot send data information to the broadcast device 100, and the broadcast communication process can only transmit data information in one direction. If the scanning device 200 needs to send data information to the broadcasting device 100, the scanning device 200 needs to add the BLE broadcasting function, and the broadcasting device 100 also needs to add the BLE scanning function, which will increase the power consumption of the device.
参见图1C,是本申请实施例提供的一种BLE连接数据报文的通信过程的示意图。广播设备100(从设备Slave)通过BLE发送ADV_IND等可连接的广播报文。扫描设备200(主设备Master)开启BLE扫描,收到广播报文后,可通过发送连接请求报文(CONNECT_IND)与广播设备100建立连接。连接建立成功后,扫描设备200可向广播设备100发送数据报文(M->S Data)。广播设备100接收到数据报文后,在帧间距(T IFS)内向扫描设备200发送数据报文(S->M Data)。扫描设备200发送数据信息给广播设备100,或广播设备100与扫描设备200之间进行数据通信时,需要建立BLE连接。但是,建立BLE连接过程和维持BLE连接是需要增加工作,也带来功耗增加。其次,当前BLE连接数是有限制的,无法满足更多连接的业务。并且有些低成本的蓝牙beacon(ibeacon)或蓝牙芯片(mesh芯片)是不支持连接能力的。 Referring to FIG. 1C , it is a schematic diagram of a communication process of a BLE connection data packet provided by an embodiment of the present application. The broadcast device 100 (slave device) sends connectable broadcast messages such as ADV_IND through BLE. The scanning device 200 (the master device Master) starts BLE scanning, and after receiving the broadcast message, can establish a connection with the broadcast device 100 by sending a connection request message (CONNECT_IND). After the connection is established successfully, the scanning device 200 may send a data packet (M->S Data) to the broadcasting device 100 . After receiving the data packet, the broadcasting device 100 sends the data packet (S->M Data) to the scanning device 200 within the frame interval ( TIFS ). When the scanning device 200 sends data information to the broadcasting device 100, or performs data communication between the broadcasting device 100 and the scanning device 200, a BLE connection needs to be established. However, the process of establishing a BLE connection and maintaining a BLE connection requires increased work and also increases power consumption. Secondly, the current number of BLE connections is limited and cannot satisfy more connected services. And some low-cost bluetooth beacon (ibeacon) or bluetooth chip (mesh chip) do not support connection capability.
鉴于此,提供本申请实施例的蓝牙数据传输方法。在本申请实施例中,扫描设备200在开启BLE扫描,并接收到广播设备100发送的广播报文后,通过在扫描请求报文中新增扫描请求数据字段,将扫描设备中的数据信息同步至广播设备100。通过这种方式,在不增加设备功耗或少量增加设备功耗的情况下,可以实现数据信息的交互。In view of this, the Bluetooth data transmission method of the embodiment of the present application is provided. In the embodiment of the present application, after the scanning device 200 starts BLE scanning and receives the broadcast message sent by the broadcast device 100, it adds a scan request data field in the scan request message to synchronize the data information in the scanning device to the broadcasting device 100 . In this way, the interaction of data and information can be realized without increasing the power consumption of the device or slightly increasing the power consumption of the device.
在本申请实施例中,图1A所示的蓝牙通信***10是基于蓝牙协议的蓝牙***。即,广播设备100、扫描设备200可以均支持BLE的广播通信功能。具体的,广播设备100可以在BLE广播信道上广播BLE广播信号,扫描设备200可以扫描BLE广播信道并接收BLE广播信号。In the embodiment of the present application, the Bluetooth communication system 10 shown in FIG. 1A is a Bluetooth system based on the Bluetooth protocol. That is, the broadcasting device 100 and the scanning device 200 may both support the broadcasting communication function of BLE. Specifically, the broadcasting device 100 may broadcast the BLE broadcasting signal on the BLE broadcasting channel, and the scanning device 200 may scan the BLE broadcasting channel and receive the BLE broadcasting signal.
可以理解的,本申请实施例以蓝牙通信***10是基于蓝牙协议实现为例进行介绍,但是本申请实施例不限于BLE广播通信,也可以是Wi-Fi广播通信或者其他短距离的无线广播通 信(例如,近场通信(near field communication,NFC)),本申请实施例对广播通信的方式不做限制。It can be understood that the embodiments of the present application are introduced by taking the Bluetooth communication system 10 based on the Bluetooth protocol as an example for introduction, but the embodiments of the present application are not limited to BLE broadcast communication, and may also be Wi-Fi broadcast communication or other short-distance wireless broadcast communication. (For example, near field communication (near field communication, NFC)), the embodiment of the present application does not limit the manner of broadcast communication.
本申请实施例中,扫描设备200可以为一种电子设备,下面对本申请实施例涉及的电子设备10进行介绍。请参阅图2A,图2A是本申请实施例提供的电子设备10的结构示意图。In the embodiments of the present application, the scanning device 200 may be an electronic device, and the electronic device 10 involved in the embodiments of the present application will be introduced below. Please refer to FIG. 2A , which is a schematic structural diagram of an electronic device 10 provided by an embodiment of the present application.
电子设备10可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 10 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2. Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, And a subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
应该理解的是,图2A所示电子设备10仅是一个范例,并且电子设备10可以具有比图2A中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the electronic device 10 shown in FIG. 2A is only an example, and the electronic device 10 may have more or fewer components than those shown in FIG. 2A, two or more components may be combined, or Different component configurations are possible. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
其中,控制器可以是电子设备10的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 10 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备10的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface, so as to realize the touch function of the electronic device 10 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。 在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现语音打开或关闭设备的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the I2S interface, so as to realize the function of turning on or off the device by voice.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现打开或关闭设备的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of turning on or off the device. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙通信模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现语音提醒的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth communication module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the UART interface, so as to realize the function of voice reminder.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等***器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备10的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备10的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the photographing function of the electronic device 10 . The processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 10 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备10充电,也可以用于电子设备10与***设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 10, and can also be used to transmit data between the electronic device 10 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备10的结构限定。在本申请另一些实施例中,电子设备10也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 10 . In other embodiments of the present application, the electronic device 10 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备10的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through the wireless charging coil of the electronic device 10 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备10的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 10 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备10中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用 为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 10 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be multiplexed as a diversity antenna for WLAN. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备10上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 10 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备10上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 10 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
其中,无线通信模块160中的BLE扫描功能可以是由图2B所示的蓝牙通信模块实现。如图2B所示,蓝牙通信模块可以包括但不限于蓝牙主机(bluetooth host)160A和蓝牙模块(Bluetooth module)160B。其中,蓝牙主机160A可以为一种蓝牙芯片。该主机可以接收运行在电子设备10中的应用程序(application)下发的指令;或预设高层协议(higher layer);或调用主机控制接口(host controller interface,HCI)。蓝牙模块160B可以包括但不限于主机控制器(host controller)1611、链路管理(link manager)1612、基带与链路控制(base band & link controller)1613和射频(radio TX/RX)1614。应用程序下发启动BLE扫描指令,蓝牙主机160A配置扫描请求参数,形成扫描请求报文。然后调用主机控制接口1603下发该报文到蓝牙模块160B中的主机控制器1611。再经过链路管理1612、基带与链路控制器1613、射频1614、天线1615发送到广播设备的蓝牙通信模块。The BLE scanning function in the wireless communication module 160 may be implemented by the Bluetooth communication module shown in FIG. 2B . As shown in FIG. 2B , the Bluetooth communication module may include, but is not limited to, a Bluetooth host (bluetooth host) 160A and a Bluetooth module (Bluetooth module) 160B. The Bluetooth host 160A may be a Bluetooth chip. The host can receive an instruction issued by an application program (application) running in the electronic device 10; or preset a higher layer protocol (higher layer); or call a host controller interface (HCI). The Bluetooth module 160B may include, but is not limited to, a host controller (host controller) 1611, a link manager (link manager) 1612, a base band & link controller (base band & link controller) 1613, and a radio frequency (radio TX/RX) 1614. The application program issues an instruction to start the BLE scan, and the Bluetooth host 160A configures scan request parameters to form a scan request message. Then, the host control interface 1603 is called to send the message to the host controller 1611 in the Bluetooth module 160B. Then, it is sent to the Bluetooth communication module of the broadcasting device through the link management 1612, the baseband and link controller 1613, the radio frequency 1614, and the antenna 1615.
电子设备10扫描BLE广播信道并接收广播报文,需要启用蓝牙通信模块上的扫描BLE广播信号功能相关的软件模块。本申请实施例中,若扫描设备200中的应用程序下发启动指令,则可以启动BLE扫描功能。To scan the BLE broadcast channel and receive the broadcast message, the electronic device 10 needs to enable the software module related to the function of scanning the BLE broadcast signal on the Bluetooth communication module. In this embodiment of the present application, if an application program in the scanning device 200 issues a start instruction, the BLE scanning function can be started.
在一些实施例中,电子设备10的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备10可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯***(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址 (time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位***(global positioning system,GPS),全球导航卫星***(global navigation satellite system,GLONASS),北斗卫星导航***(beidou navigation satellite system,BDS),准天顶卫星***(quasi-zenith satellite system,QZSS)和/或星基增强***(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 10 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 10 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
电子设备10通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 10 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备10可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 10 may include one or N display screens 194 , where N is a positive integer greater than one.
电子设备10可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 10 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备10可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 10 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备10在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 10 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.
视频编解码器用于对数字视频压缩或解压缩。电子设备10可以支持一种或多种视频编解码器。这样,电子设备10可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. Electronic device 10 may support one or more video codecs. In this way, the electronic device 10 can play or record videos in various encoding formats, for example, moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备10的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 10 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备10的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 10 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备10的各种功能应用以 及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,至少一个功能所需的应用(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备10使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 10 by executing the instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 10 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
电子设备10可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 10 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备10可以通过扬声器170A收听音乐,或收听免提通话。 Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 10 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备10接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 10 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备10可以设置至少一个麦克风170C。在另一些实施例中,电子设备10可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备10还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The electronic device 10 may be provided with at least one microphone 170C. In other embodiments, the electronic device 10 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 10 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备10根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备10根据压力传感器180A检测所述触摸操作强度。电子设备10也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 10 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 10 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 10 can also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备10的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备10围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备10抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备10的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the electronic device 10 . In some embodiments, the angular velocity of electronic device 10 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyroscope sensor 180B detects the shaking angle of the electronic device 10, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to counteract the shaking of the electronic device 10 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,电子设备10通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 10 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备10可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备10是翻盖机时,电子设备10可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 10 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 10 is a flip machine, the electronic device 10 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备10在各个方向上(一般为三轴)加速度的大小。当电子设备10静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 10 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 10 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备10可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备10可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The electronic device 10 can measure distances by infrared or laser. In some embodiments, when shooting a scene, the electronic device 10 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备10通过发光二极管向外发射红外光。电子设备10使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备10附近有物体。当检测到不充分的反射光时,电子设备10可以确定电子设备10附近没有物体。电子设备10可以利用接近光传感器180G检测用户手持电子设备10贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 10 emits infrared light to the outside through light emitting diodes. Electronic device 10 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 10 . When insufficient reflected light is detected, the electronic device 10 may determine that there is no object near the electronic device 10 . The electronic device 10 can use the proximity light sensor 180G to detect that the user holds the electronic device 10 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。电子设备10可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备10是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The electronic device 10 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 10 is in the pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备10可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 10 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备10利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备10执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备10对电池142加热,以避免低温导致电子设备10异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备10对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 10 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 10 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 10 heats the battery 142 to avoid abnormal shutdown of the electronic device 10 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 10 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备10的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 10 , which is different from the location where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备10可以接收按键输入,产生与电子设备10的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The electronic device 10 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 10 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过***SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备10的接触和分离。电子设备10可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时***多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备10通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备10采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备10中,不能和电子设备10分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 10 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The electronic device 10 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 10 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the electronic device 10 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 10 and cannot be separated from the electronic device 10 .
电子设备10的软件***可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android***为例,示例性说明电子设备10的软件结构。The software system of the electronic device 10 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 10 .
图2C是本申请实施例提供的一种电子设备10的软件结构框图。FIG. 2C is a software structural block diagram of an electronic device 10 provided by an embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android***分为四层,从上至下分别为应用层,应用框架层,安卓运行时(Android runtime)和***库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
应用层可以包括一系列应用包。如图2C所示,应用包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用。The application layer can include a series of application packages. As shown in FIG. 2C, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
应用框架层为应用层的应用提供应用编程接口(application programming interface,API)和编程框架。应用框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some predefined functions.
如图2C所示,应用框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器等。As shown in FIG. 2C, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备10的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 10 . For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, images, layout files, video files, etc.
通知管理器使应用可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信 息,发出提示音,智能终端振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the smart terminal vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓***的调度和管理。Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用层和应用框架层运行在虚拟机中。虚拟机将应用层和应用框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子***进行管理,并且为多个应用提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,G.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, G.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
本申请实施例中,广播设备100可以为一种电子设备,下面对本申请实施例涉及的电子设备20进行介绍。请参阅图2D,图2D是本申请实施例提供的电子设备20的结构示意图。In the embodiments of the present application, the broadcasting device 100 may be an electronic device, and the electronic device 20 involved in the embodiments of the present application will be introduced below. Please refer to FIG. 2D , which is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application.
如图2D所示,电子设备20可以包括:处理器301、存储器302、无线通信模块303、以及电源304。这些部件可以通过总线连接。As shown in FIG. 2D , the electronic device 20 may include: a processor 301 , a memory 302 , a wireless communication module 303 , and a power supply 304 . These components can be connected via a bus.
其中,处理器301可用于读取和执行计算机可读指令,处理器301执行这些应用程序代码以使得电子设备20执行本申请实施例中的方法。具体实现中,处理器301可主要包括控制器、运算器和寄存器。其中,控制器主要负责指令译码,并为指令对应的操作发出控制信号。运算器主要负责执行定点或浮点算数运算操作、移位操作以及逻辑操作等,也可以执行地址运算和转换。寄存器主要负责保存指令执行过程中临时存放的寄存器操作数和中间操作结果等。具体实现中,处理器301的硬件架构可以是专用集成电路(Application Specific Integrated Circuits,ASIC)架构、MIPS架构、ARM架构或者NP架构等等。The processor 301 may be configured to read and execute computer-readable instructions, and the processor 301 executes these application program codes to cause the electronic device 20 to execute the methods in the embodiments of the present application. In a specific implementation, the processor 301 may mainly include a controller, an arithmetic unit, and a register. Among them, the controller is mainly responsible for instruction decoding, and sends out control signals for the operations corresponding to the instructions. The arithmetic unit is mainly responsible for performing fixed-point or floating-point arithmetic operations, shift operations, and logical operations, and can also perform address operations and conversions. Registers are mainly responsible for saving register operands and intermediate operation results temporarily stored during instruction execution. In specific implementation, the hardware architecture of the processor 301 may be an application specific integrated circuit (Application Specific Integrated Circuits, ASIC) architecture, a MIPS architecture, an ARM architecture, an NP architecture, or the like.
在一些实施例中,处理器301可以用于解析无线通信处理模块303接收到的信号,例如,该接收到的信号可以是电子设备10发送的数据信息,该数据信息为电子设备10的信息,如电子设备10的电量信息、物理地址信息等。处理器301可以用于根据解析结果进行相应的处理操作,例如,在接收到这样的信号之后,电子设备20通过应用程序提醒用户电子设备10的电量情况。In some embodiments, the processor 301 may be configured to parse the signal received by the wireless communication processing module 303, for example, the received signal may be data information sent by the electronic device 10, and the data information is information of the electronic device 10, Such as power information, physical address information of the electronic device 10, and the like. The processor 301 may be configured to perform corresponding processing operations according to the analysis result. For example, after receiving such a signal, the electronic device 20 reminds the user of the power status of the electronic device 10 through an application program.
在一些实施例中,处理器301还可以用于生成无线通信处理模块303向外发送的信号,例如电子设备20向电子设备10发送的BLE广播报文。In some embodiments, the processor 301 may also be configured to generate a signal sent by the wireless communication processing module 303 to the outside, such as a BLE broadcast message sent by the electronic device 20 to the electronic device 10 .
存储器302与处理器301耦合,用于存储各种软件程序和/或多组指令。具体实现中,存储器302可包括高速随机存取的存储器,并且也可包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。存储器302还可以存储通信程序,该通信程序可用于与电子设备10进行通信。存储器302中还可以存储用于唯一标识该电子设备20的蓝牙地址。 Memory 302 is coupled to processor 301 for storing various software programs and/or sets of instructions. In particular implementations, memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 302 may also store communication programs that may be used to communicate with the electronic device 10 . A Bluetooth address for uniquely identifying the electronic device 20 may also be stored in the memory 302 .
无线通信处理模块303可以包括蓝牙通信模块104A、WLAN通信处理模块104B中的一项或多项。无线通信模块303,用于支持电子设备20与电子设备10之间的短距离通信。在一些实施例中,该蓝牙通信模块104A与电子设备10的蓝牙通信模块的结构相同,可参见图 2B所对应的描述,这里不再赘述。需要说明的是,该蓝牙通信模块104A支持的功能与电子设备10的蓝牙通信模块支持的功能可以相同也可以不同。例如该蓝牙通信模块104A支持BLE的广播通信功能。具体的,该蓝牙通信模块104A可以用于发送广播报文。该蓝牙通信模块104A还可以通过天线接收电子设备10的蓝牙通信模块发送的扫描请求报文;再经过链路管理、基带与链路控制器、射频、主机控制接口等,将扫描请求报文中的数据信息上报给运行在电子设备20中的应用程序。The wireless communication processing module 303 may include one or more of the Bluetooth communication module 104A and the WLAN communication processing module 104B. The wireless communication module 303 is used to support short-distance communication between the electronic device 20 and the electronic device 10 . In some embodiments, the structure of the Bluetooth communication module 104A is the same as that of the Bluetooth communication module of the electronic device 10, and reference may be made to the description corresponding to FIG. 2B, which will not be repeated here. It should be noted that the functions supported by the Bluetooth communication module 104A and the functions supported by the Bluetooth communication module of the electronic device 10 may be the same or different. For example, the Bluetooth communication module 104A supports the broadcast communication function of BLE. Specifically, the Bluetooth communication module 104A can be used to send broadcast messages. The Bluetooth communication module 104A can also receive the scan request message sent by the Bluetooth communication module of the electronic device 10 through the antenna; The data information is reported to the application running in the electronic device 20 .
电源304,可以用于向电子设备20包含的各个部件供电。在一些实施例中,该电源304可以是电池,如可充电电池。The power supply 304 may be used to supply power to various components included in the electronic device 20 . In some embodiments, the power source 304 may be a battery, such as a rechargeable battery.
可以理解的是,本申请实施例示意的结构并不构成对电子设备20的具体限定。电子设备20可以具有比图2C中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图2C中所示出的各种部件可以以硬件、软件、或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 20 . Electronic device 20 may have more or fewer components than those shown in Figure 2C, may combine two or more components, or may have different component configurations. The various components shown in Figure 2C may be implemented in hardware, software, or a combination of software and hardware.
需要说明的是,电子设备10和电子设备20的蓝牙通信模块的软件***也可以采用分层架构来描述。本申请实施例以分层架构为例,示例性说明蓝牙通信模块的软件结构。It should be noted that the software systems of the Bluetooth communication modules of the electronic device 10 and the electronic device 20 can also be described by using a layered architecture. The embodiments of the present application take a layered architecture as an example to exemplarily describe the software structure of the Bluetooth communication module.
图2E是本申请实施例提供的一种蓝牙通信模块的软件结构框图。FIG. 2E is a software structural block diagram of a Bluetooth communication module provided by an embodiment of the present application.
将蓝牙通信模块的软件结构分为三层,从上至下分别为应用层,主机层,以及控制层。The software structure of the Bluetooth communication module is divided into three layers, from top to bottom are the application layer, the host layer, and the control layer.
应用层可与电子设备10的软件结构中的应用层对应,这里不再赘述。The application layer may correspond to the application layer in the software structure of the electronic device 10 , which will not be repeated here.
主机层包括但不限于BLE协议栈、高层协议和主机控制接口HCI。其中,该BLE协议栈预存了实现BLE协议的代码;该高层协议中规定了无线通信的高层信令;该主机控制接口用于主机层与控制层之间的数据交互。The host layer includes but is not limited to the BLE protocol stack, higher layer protocols and host control interface HCI. Among them, the BLE protocol stack pre-stores codes for implementing the BLE protocol; the high-level protocol specifies the high-level signaling of wireless communication; the host control interface is used for data interaction between the host layer and the control layer.
控制层包括但不限于主机控制器、链路层和物理层。其中,主机控制器与主机控制接口相连,可以实现主机层与控制层之间的数据交互;链路层和物理层主要用于对信号进行传输。The control layer includes, but is not limited to, the host controller, the link layer, and the physical layer. Among them, the host controller is connected with the host control interface, which can realize the data interaction between the host layer and the control layer; the link layer and the physical layer are mainly used to transmit signals.
下面基于上述内容中介绍的蓝牙通信***10、电子设备10、电子设备20,结合其他附图对本申请实施例提供的蓝牙数据传输方法进行详细说明。本申请提出一种蓝牙数据传输方法,可以在不增加设备功耗或少量增加设备功耗的情况下,实现数据信息的交互。请参见图3,如图3所示该蓝牙数据传输方法包括但不限于以下步骤:Based on the Bluetooth communication system 10 , the electronic device 10 , and the electronic device 20 introduced in the above content, the Bluetooth data transmission method provided by the embodiments of the present application will be described in detail below with reference to other drawings. The present application proposes a Bluetooth data transmission method, which can realize the interaction of data and information without increasing the power consumption of the device or slightly increasing the power consumption of the device. Please refer to FIG. 3. As shown in FIG. 3, the Bluetooth data transmission method includes but is not limited to the following steps:
S301、广播设备发送广播报文;相应地,扫描设备接收广播报文。S301. The broadcasting device sends a broadcasting message; correspondingly, the scanning device receives the broadcasting message.
具体地,步骤S301的具体实施过程可以参照以下步骤:Specifically, the specific implementation process of step S301 may refer to the following steps:
S3010、应用程序A启动广播。S3010, application A starts broadcasting.
示例性的,由广播设备中的应用程序A下发启动指令启动BLE广播。可选地,启动指令会下发给BLE协议栈A和链路控制A等。Exemplarily, the application program A in the broadcasting device sends a start instruction to start the BLE broadcast. Optionally, the start command will be issued to BLE protocol stack A and link control A, etc.
S3011、BLE协议栈A设置广播参数。S3011, the BLE protocol stack A sets broadcast parameters.
广播设备中的BLE协议栈A对广播参数进行设置;并在蓝牙标准协议中LE Set Extended Advertising Parameters中设置Scan_Request_Notification_Enable=Enable。之后,BLE协议栈A将广播参数下发给链路控制A。The BLE protocol stack A in the broadcast device sets the broadcast parameters; and sets Scan_Request_Notification_Enable=Enable in the LE Set Extended Advertising Parameters in the Bluetooth standard protocol. After that, the BLE protocol stack A sends the broadcast parameters to the link controller A.
S3012、链路控制A根据广播参数生成广播报文。然后,通过天线A将该广播报文发送给扫描设备。相应地,扫描设备中的天线B接收到广播报文,然后上报给扫描设备中的链路控制B。S3012. Link control A generates a broadcast message according to the broadcast parameter. Then, the broadcast message is sent to the scanning device through the antenna A. Correspondingly, the antenna B in the scanning device receives the broadcast message, and then reports it to the link control B in the scanning device.
S302、扫描设备发送扫描请求报文;相应地,广播设备接收扫描请求报文;该扫描请求报文携带有数据信息。S302, the scanning device sends a scanning request message; correspondingly, the broadcasting device receives the scanning request message; the scanning request message carries data information.
具体地,步骤S302的具体实施过程可以参照以下步骤:Specifically, the specific implementation process of step S302 may refer to the following steps:
S3020、应用程序B启动扫描。S3020, application B starts scanning.
示例性的,由扫描设备中的应用程序B下发启动指令启动BLE扫描。可选地,启动指令会下发给BLE协议栈B和链路控制B等。Exemplarily, the application program B in the scanning device sends a start instruction to start the BLE scan. Optionally, the start command will be issued to BLE protocol stack B and link control B, etc.
S3021、扫描设备中的BLE协议栈B对扫描请求参数进行设置。S3021, the BLE protocol stack B in the scanning device sets the scanning request parameter.
其中,该扫描请求参数中包含数据信息,举例而言,该数据信息可以是电量信息,该数据信息还可以是扫面设备所在的蓝牙组网或者Wi-Fi组网中的设备信息,等等。The scan request parameter includes data information. For example, the data information may be power information, and the data information may also be device information in the Bluetooth network or Wi-Fi network where the scanning device is located, etc. .
S3022、扫描设备中的BLE协议栈B将该扫描请求参数下发给链路控制B,链路控制B根据扫描请求参数生成扫描请求报文。扫描设备中的链路控制B根据接收到的广播报文,通过天线B将扫描请求报文发送给广播设备。相应地,广播设备的天线A接收扫描请求报文,并上报给链路控制A。S3022. The BLE protocol stack B in the scanning device delivers the scanning request parameter to the link control B, and the link control B generates a scanning request message according to the scanning request parameter. The link control B in the scanning device sends the scanning request message to the broadcasting device through the antenna B according to the received broadcast message. Correspondingly, the antenna A of the broadcasting device receives the scan request message and reports it to the link control A.
具体地,可参见图4,图4是本申请实施例提供的一种可能的扫描请求报文的示意图。如图4所示,该扫描请求报文包括扫描地址字段(Scan Address)、广播地址字段(Adv Address)以及扫描请求数据字段。扫描地址字段包含有扫描设备的公共或随机地址,广播地址字段包含有广播设备的公共或随机地址。相比于现有技术中的扫描请求报文,扫描请求报文的净荷(SCAN_REQ Payload)中,新增扫描请求数据字段(Scan Request Data)。该扫描请求数据字段中包含有数据信息。Specifically, reference may be made to FIG. 4 , which is a schematic diagram of a possible scan request message provided by an embodiment of the present application. As shown in FIG. 4 , the scan request message includes a scan address field (Scan Address), a broadcast address field (Adv Address) and a scan request data field. The scan address field contains the public or random address of the scanning device, and the broadcast address field contains the public or random address of the broadcast device. Compared with the scan request message in the prior art, in the payload (SCAN_REQ Payload) of the scan request message, a new scan request data field (Scan Request Data) is added. The scan request data field contains data information.
在一种可能的实现方式中,该Scan Request Data中可以包括数据长度字段(Scan_Request_Data_Length)和数据字段(Scan_Request_Data),该Scan_Request_Data用于存储数据信息,Scan_Request_Data_Length用于存储数据信息的长度。其中,扫描请求数据字段的长度不做限制,例如针对物理层(physical layer,PHY)1M扫描请求数据字段的长度是0到25字节,针对PHY 2M扫描请求数据字段的长度是0到254字节。Scan_Request_Data_Length的字段长度也不做限制,例如可以为5字节。在又一种可能的实现方式中,该Scan Request Data中可以只包括数据字段。在又一种可能的实现方式中,该Scan Request Data中还可以包括其他的字段。In a possible implementation manner, the Scan Request Data may include a data length field (Scan_Request_Data_Length) and a data field (Scan_Request_Data), the Scan_Request_Data is used to store data information, and Scan_Request_Data_Length is used to store the length of the data information. The length of the scan request data field is not limited. For example, the length of the 1M scan request data field for the physical layer (PHY) is 0 to 25 bytes, and the length of the PHY 2M scan request data field is 0 to 254 bytes. Festival. The field length of Scan_Request_Data_Length is also not limited, for example, it can be 5 bytes. In another possible implementation manner, the Scan Request Data may only include data fields. In another possible implementation manner, the Scan Request Data may also include other fields.
需要说明的是,蓝牙标准协议中,扫描请求参数设置(LE Set Extended Scan Parameters command)如下表1所示。扫描请求报文中还包括自身地址类型(Own_Address_Type)、拦截政策(Scanning_Filter_Policy)、扫描的窗口(Scan_Window)和扫描周期(Scan_Interval)等参数。表1中Command表示命令,OCF表示操作码命令字段(Opcode Command Field),Command Parameters表示命令参数,Return Parameters表示返回参数。It should be noted that, in the Bluetooth standard protocol, the scan request parameter settings (LE Set Extended Scan Parameters command) are shown in Table 1 below. The scan request message also includes parameters such as own address type (Own_Address_Type), interception policy (Scanning_Filter_Policy), scanning window (Scan_Window) and scan interval (Scan_Interval). In Table 1, Command represents a command, OCF represents an Opcode Command Field, Command Parameters represents a command parameter, and Return Parameters represents a return parameter.
表1Table 1
Figure PCTCN2021114744-appb-000001
Figure PCTCN2021114744-appb-000001
S303、广播设备对该扫描请求报文中包含的数据信息进行处理。S303. The broadcast device processes the data information contained in the scan request message.
具体地,步骤S303的具体实施过程可以参照以下步骤:Specifically, the specific implementation process of step S303 may refer to the following steps:
S3030、链路控制A将扫描请求报文上报给BLE协议栈A。S3030 , the link control A reports the scan request message to the BLE protocol stack A.
S3031、广播设备中的BLE协议栈A对扫描请求报文进行解析,确定该报文是否携带数据信息。如果携带有数据信息,则上报数据信息给广播设备中的应用程序A。应用程序A对该数据信息进行处理。S3031. The BLE protocol stack A in the broadcasting device parses the scan request message to determine whether the message carries data information. If the data information is carried, the data information is reported to the application A in the broadcasting device. Application A processes the data information.
需要说明的是,广播设备与扫描设备之间没有建立BLE连接,通过广播和BLE扫描来保持设备之间的蓝牙通信,这种方式可以称为虚连接。虚连接解决了BLE连接数有限制的问题,可以满足更多连接的业务。通过这种方式,进行数据通信的双方无需建立BLE连接,减少了功耗和频谱资源。It should be noted that there is no BLE connection established between the broadcasting device and the scanning device, and the Bluetooth communication between the devices is maintained through broadcasting and BLE scanning, which can be called a virtual connection. The virtual connection solves the problem that the number of BLE connections is limited, and can meet more connected services. In this way, both parties in data communication do not need to establish a BLE connection, which reduces power consumption and spectrum resources.
为更好的理解本申请实施例,基于图3所述的蓝牙数据传输方法,结合下面的应用场景进行阐述。需要说明的是,以下应用场景仅为举例,并不对本申请实施例进行限制。In order to better understand the embodiments of the present application, based on the Bluetooth data transmission method described in FIG. 3 , the following application scenarios are combined. It should be noted that the following application scenarios are only examples, and do not limit the embodiments of the present application.
应用场景一,下面以扫描设备为移动终端,广播设备为智能手表,数据信息为移动终端的电量信息为应用场景,对本申请实施例进行阐述。在一种可能的实现方式中,若所述数据信息为电量信息,所述电量信息用于指示所述扫描设备的电量;所述广播设备对所述数据信息进行处理,包括:所述广播设备根据所述电量信息在用户界面中显示提示消息,所述提示消息用于提醒用户所述扫描设备的电量情况。Application Scenario 1, the following describes the embodiments of the present application by taking the scanning device as a mobile terminal, the broadcasting device as a smart watch, and the data information as the power information of the mobile terminal as an application scenario. In a possible implementation manner, if the data information is power information, the power information is used to indicate the power of the scanning device; the broadcasting device processes the data information, including: the broadcasting device A prompt message is displayed in the user interface according to the power information, where the prompt message is used to remind the user of the power status of the scanning device.
移动终端中运行有一个或多个应用程序,示例性地,应用程序B可以用于监测移动终端的电量。应用程序B可以在移动终端电量过低时,下发启动指令开启BLE扫描。移动终端的BLE协议栈配置扫描请求参数形成扫描请求报文,该报文中携带电量信息。通过天线发送该报文给广播设备。其中,智能手表可以一直处于广播状态,移动终端开启BLE扫描后,能够扫描到智能手表发送的广播报文,从而移动终端可以发送扫描请求报文给移动终端。One or more application programs are running in the mobile terminal. Exemplarily, application program B can be used to monitor the power of the mobile terminal. Application B can issue a startup command to start BLE scanning when the battery of the mobile terminal is too low. The BLE protocol stack of the mobile terminal configures scan request parameters to form a scan request message, and the message carries power information. Send the message to the broadcast device through the antenna. The smart watch can be in the broadcasting state all the time. After the mobile terminal starts BLE scanning, it can scan the broadcast message sent by the smart watch, so that the mobile terminal can send the scanning request message to the mobile terminal.
进而,智能手表中运行有一个或多个应用程序,示例性地,应用程序A可以用于处理接收到的移动终端的电量信息,并在移动终端电量过低时进行提醒。具体的,智能手表中的天线接收移动终端发送的扫描请求报文,上报给BLE协议栈。BLE协议栈对扫描请求报文进行解析,得到该扫描请求报文中携带的电量信息,上报该电量信息给应用程序A。应用程序A可以将该电量信息通过用户界面显示给用户;或者根据电量信息确定是否需要提醒用户移动终端的电量过低。其中智能手表可以通过语音、振动、在用户界面显示提示消息等方式对用户进行提醒。如智能手表显示或语音提示移动终端电量低于20%,如图5所示。移动终端可以通过BLE的扫描请求报文同步数据信息到智能手表,无需添加额外的扫描和广播,节省了功耗和频谱资源。Furthermore, one or more application programs run in the smart watch. Exemplarily, the application program A may be used to process the received power information of the mobile terminal, and to remind when the power of the mobile terminal is too low. Specifically, the antenna in the smart watch receives the scan request message sent by the mobile terminal and reports it to the BLE protocol stack. The BLE protocol stack parses the scan request packet, obtains the power information carried in the scan request packet, and reports the power information to application A. The application A may display the power information to the user through the user interface; or determine whether it is necessary to remind the user that the power of the mobile terminal is too low according to the power information. Among them, the smart watch can remind users through voice, vibration, and prompt messages displayed on the user interface. For example, the smart watch displays or voice prompts that the power of the mobile terminal is lower than 20%, as shown in Figure 5. The mobile terminal can synchronize data information to the smart watch through the BLE scan request message, without adding additional scanning and broadcasting, saving power consumption and spectrum resources.
应用场景二,下面以扫描设备为移动终端,广播设备为智能手表,数据信息为设备信息为应用场景,对本申请实施例进行阐述。在一种可能的实现方式中,若所述数据信息为设备信息,所述设备信息为所述扫描设备所在的蓝牙组网或者Wi-Fi组网中的各个设备的信息;所述广播设备对所述数据信息进行处理,包括:所述广播设备将所述设备信息存储在设备信息列表中,所述设备信息列表用于存储蓝牙组网或者Wi-Fi组网中的各个设备的信息。Application scenario 2, the following describes the embodiments of the present application by taking the scanning device as the mobile terminal, the broadcasting device as the smart watch, and the data information as the device information as the application scenario. In a possible implementation manner, if the data information is device information, the device information is information of each device in the Bluetooth networking or Wi-Fi networking where the scanning device is located; The processing of the data information includes: the broadcasting device storing the device information in a device information list, where the device information list is used to store information of each device in the Bluetooth networking or Wi-Fi networking.
扫描设备所在蓝牙组网或者Wi-Fi组网可以包含一个或者多个设备。该扫描设备中可以存储有该蓝牙组网或者Wi-Fi组网中的各个设备的设备信息。扫描设备在发送扫描请求报文时,可以将这些设备信息携带在扫描请求报文的新增扫描请求数据字段中,进而将这些设备信息同步到广播设备中。其中,该设备信息可以包括但不限于MAC地址(media access control  address)、IP地址(internet protocol address)、BLE扫描地址、BLE广播地址等,或者包括在线/离线状态信息,音量大小信息,关机/开机状态信息,等等。通过这种方式,广播设备可以获取到扫描设备所在蓝牙组网或者Wi-Fi组网中各个设备的设备信息(其中也包含扫描设备的设备信息)。进一步的,广播设备可以根据这些设备信息对方便地与其中的某个或者多个设备进行数据通信,例如发送打开/关闭等控制指令。可选的,广播设备可以维护一个设备信息列表,该设备信息列表用于存储蓝牙组网或者Wi-Fi组网中的各个设备的信息。可选地,该设备信息列表可以根据BLE组网中设备的实际连接情况进行更新或删除。The Bluetooth network or Wi-Fi network where the scanning device is located may include one or more devices. The scanning device may store device information of each device in the Bluetooth networking or Wi-Fi networking. When the scanning device sends the scan request message, the device information can be carried in the newly added scan request data field of the scan request message, and then the device information can be synchronized to the broadcast device. The device information may include, but is not limited to, MAC address (media access control address), IP address (internet protocol address), BLE scan address, BLE broadcast address, etc., or include online/offline status information, volume information, shutdown/ Power-on status information, etc. In this way, the broadcasting device can obtain the device information of each device in the Bluetooth network or Wi-Fi network where the scanning device is located (which also includes the device information of the scanning device). Further, the broadcasting device can conveniently perform data communication with one or more of the devices according to the device information, such as sending control instructions such as on/off. Optionally, the broadcasting device may maintain a device information list, where the device information list is used to store information of each device in the Bluetooth networking or Wi-Fi networking. Optionally, the device information list can be updated or deleted according to the actual connection status of the devices in the BLE networking.
示例性地,如图6所示,BLE组网中包含三个设备,分别为智能手机600、平板电脑602和笔记本电脑601。其中,扫描设备为智能手机600,广播设备为智能手表604。智能手机600中可以存储有自身所在BLE组网中的各个设备的设备信息。扫描设备在发送扫描请求报文时,可以将这些设备信息携带在扫描请求报文的新增扫描请求数据字段中,进而将这些设备信息同步到广播设备中。通过这种方式,智能手表604可以获取到智能手机600所在的BLE组网中各个设备的设备信息。Exemplarily, as shown in FIG. 6 , the BLE networking includes three devices, which are a smartphone 600 , a tablet computer 602 and a laptop computer 601 . The scanning device is a smart phone 600 , and the broadcasting device is a smart watch 604 . The smartphone 600 may store device information of each device in the BLE network where it is located. When the scanning device sends the scan request message, the device information can be carried in the newly added scan request data field of the scan request message, and then the device information can be synchronized to the broadcast device. In this way, the smart watch 604 can obtain the device information of each device in the BLE network where the smart phone 600 is located.
在本申请实施例中,扫描设备在开启BLE扫描,并接收到广播设备发送的广播报文后,通过在扫描请求报文中新增扫描请求数据字段,可以将扫描设备中的数据信息同步至广播设备。通过这种方式,不增加设备功耗或少量增加设备功耗的情况下,实现了数据信息的交互。In the embodiment of the present application, after the scanning device starts BLE scanning and receives the broadcast message sent by the broadcasting device, it can synchronize the data information in the scanning device to the scanning request message by adding a scanning request data field to the scanning device. broadcasting equipment. In this way, the interaction of data and information is realized without increasing the power consumption of the device or slightly increasing the power consumption of the device.
请参见图7,图7是本申请实施例提供的又一种蓝牙数据传输方法,该方法包括但不限以下步骤:Please refer to FIG. 7. FIG. 7 is another Bluetooth data transmission method provided by an embodiment of the present application. The method includes but is not limited to the following steps:
S701、广播设备发送广播报文;相应地,扫描设备接收广播报文。S701. The broadcasting device sends a broadcasting message; correspondingly, the scanning device receives the broadcasting message.
具体地,步骤S701的具体实施过程可以参照以下步骤:Specifically, the specific implementation process of step S701 may refer to the following steps:
S7010、广播设备中的多个应用程序启动BLE广播(如应用程序A和应用程序B)。S7010. Multiple applications in the broadcast device start BLE broadcast (for example, application A and application B).
S7011、BLE协议栈A分别对应用程序A对应的广播参数A、应用程序B对应的广播参数B进行设置;如在蓝牙标准协议中LE Set Extended Advertising Parameters中设置Scan_Request_Notification_Enable=Enable。之后,BLE协议栈A分别下发广播参数A和广播参数B到BLE链路控制A。S7011 and BLE protocol stack A respectively set the broadcast parameter A corresponding to application A and the broadcast parameter B corresponding to application B; for example, set Scan_Request_Notification_Enable=Enable in LE Set Extended Advertising Parameters in the Bluetooth standard protocol. After that, BLE protocol stack A sends broadcast parameter A and broadcast parameter B to BLE link control A respectively.
S7012、链路控制A根据广播参数A和广播参数B生成广播报文A和广播报文B。然后通过天线A将该广播报文A和广播报文B发送给扫描设备。相应地,扫描设备中的天线B接收到广播报文A和广播报文B,然后上报给扫描设备中的链路控制B。S7012 , the link control A generates a broadcast packet A and a broadcast packet B according to the broadcast parameter A and the broadcast parameter B. Then, the broadcast message A and the broadcast message B are sent to the scanning device through the antenna A. Correspondingly, the antenna B in the scanning device receives the broadcast message A and the broadcast message B, and then reports them to the link control B in the scanning device.
可选的,所述广播报文中包括设备数据,所述设备数据包括所述广播设备的生产厂商标识、所述广播设备上登录的用户账号信息、发起广播请求的应用程序的标识、发起广播请求的应用程序的用户账号信息中的一项或者多项。示例性的,广播报文A中可以包括应用程序A的标识,广播报文B中可以包括应用程序B的标识。Optionally, the broadcast message includes device data, and the device data includes the manufacturer identifier of the broadcast device, the user account information logged on the broadcast device, the identifier of the application that initiates the broadcast request, and the broadcast device that initiates the broadcast. One or more of the user account information for the requested application. Exemplarily, the broadcast packet A may include the identifier of the application A, and the broadcast packet B may include the identifier of the application B.
S702、扫描设备发送扫描请求报文;相应地,广播设备接收扫描请求报文;该扫描请求报文中可携带数据信息。S702, the scanning device sends a scanning request message; correspondingly, the broadcasting device receives the scanning request message; the scanning request message may carry data information.
具体地,步骤S702的具体实施过程可以参照以下步骤:Specifically, the specific implementation process of step S702 may refer to the following steps:
S7020、扫描设备多个应用程序分别启动BLE扫描(如应用程序C和应用程序D)。S7020. Multiple applications of the scanning device respectively start BLE scanning (such as application C and application D).
示例性的,应用程序A和应用程序C可以为相同的应用程序,如都为微信;也可以为相同应用程序的不同版本,如微博和微博国际版;还可以是同种类型的应用程序,如都是即时通讯类的软件;例如微信、QQ等。同理,应用程序B和应用程序D也满足上述条件。Exemplarily, application A and application C can be the same application, such as WeChat; they can also be different versions of the same application, such as Weibo and Weibo International; they can also be applications of the same type Programs, such as instant messaging software; such as WeChat, QQ, etc. Similarly, application B and application D also meet the above conditions.
S7021、BLE协议栈B分别对应用程序C对应的扫描请求参数C、应用程序D对应的扫 描请求参数D进行设置。扫描设备中的BLE协议栈B将扫描请求参数C和扫描请求参数D下发至链路控制B,链路控制B根据扫描请求参数C和扫描请求参数D生成扫描请求报文C和扫描请求报文D。其中,扫描请求报文C包括新增字段Scan_Request_Data_Length和Scan_Request_Data(如数据信息是扫描设备的电量值是否低于20%);扫描请求报文D包括新增字段Scan_Request_Data_Length和Scan_Request_Data(如数据信息是应用程序D有一条新消息)。S7021 and the BLE protocol stack B respectively set the scan request parameter C corresponding to the application C and the scan request parameter D corresponding to the application D. The BLE protocol stack B in the scanning device sends the scan request parameter C and the scan request parameter D to the link control B, and the link control B generates the scan request message C and the scan request message according to the scan request parameter C and the scan request parameter D. Text D. Among them, the scan request message C includes the newly added fields Scan_Request_Data_Length and Scan_Request_Data (for example, the data information is whether the power value of the scanning device is lower than 20%); the scan request message D includes the newly added fields Scan_Request_Data_Length and Scan_Request_Data (for example, the data information is the application program). D has a new message).
其中,该扫描请求参数中包含数据信息以及过滤条件。其中,过滤条件可以是广播报文中是否包含预设的设备数据,该设备数据可以是广播设备的生产厂商标识、所述广播设备上登录的用户账号信息、发起广播请求的应用程序的标识、发起广播请求的应用程序的用户账号信息中的一项或者多项。举例而言,扫描请求参数C中包含的数据信息可以是电量信息,过滤条件A可以是广播报文中是否包含应用程序A的标识。扫描请求参数D中包含的数据信息可以是提示信息,过滤条件B可以是广播报文中是否包含应用程序B的标识。另外,还可以存在其他的过滤条件,此处不一一赘述。The scan request parameter includes data information and filter conditions. Wherein, the filter condition may be whether the broadcast message contains preset device data, and the device data may be the identifier of the manufacturer of the broadcast device, the user account information logged in the broadcast device, the identifier of the application that initiates the broadcast request, One or more items of user account information of the application that initiates the broadcast request. For example, the data information contained in the scan request parameter C may be power information, and the filter condition A may be whether the broadcast message contains the identifier of the application program A. The data information contained in the scan request parameter D may be prompt information, and the filter condition B may be whether the broadcast message contains the identifier of the application program B. In addition, other filtering conditions may also exist, which will not be repeated here.
S7022、链路控制B根据过滤条件,匹配来自不同应用程序的广播报文。例如根据过滤条件A匹配广播报文A与应用程序C的扫描请求报文C对应;根据过滤条件B匹配广播报文B与应用程序D的扫描请求报文D对应。也即是说,扫描设备根据所述广播报文中的设备数据向所述广播设备发送扫描请求报文。可选的,可以通过与广播报文等长的二进制掩码,从广播报文中获取到数据信息,并将获取到的数据信息与各个过滤条件进行匹配。S7022, link control B matches broadcast packets from different application programs according to the filtering conditions. For example, matching broadcast packet A according to filter condition A corresponds to scan request packet C of application C; matching broadcast packet B according to filter condition B corresponds to scanning request packet D of application D. That is to say, the scanning device sends a scanning request message to the broadcasting device according to the device data in the broadcasting message. Optionally, the data information may be obtained from the broadcast message through a binary mask of the same length as the broadcast message, and the obtained data information may be matched with each filter condition.
S7023、链路控制B将扫描请求报文C和扫描请求报文D发送给广播设备。相应地,广播设备中的天线A收到扫描请求报文C和扫描请求报文D,并上报给链路控制A。S7023, the link control B sends the scan request message C and the scan request message D to the broadcast device. Correspondingly, the antenna A in the broadcasting device receives the scan request message C and the scan request message D, and reports them to the link control A.
S703、广播设备对该扫描请求报文中包含的数据信息进行处理。S703. The broadcast device processes the data information contained in the scan request message.
具体地,步骤S703的具体实施过程可以参照以下步骤:Specifically, the specific implementation process of step S703 may refer to the following steps:
S7030、链路控制A将扫描请求报文C和扫描请求报文D上报给BLE协议栈A。S7030 , the link controller A reports the scan request packet C and the scan request packet D to the BLE protocol stack A.
S7031、BLE协议栈A扫描请求报文C和扫描请求报文D进行解析,确定扫描请求报文中是否携带数据信息。如果携带有业务数据信息,则将数据信息上报给应用层的不同应用程序。S7031, the BLE protocol stack A parses the scan request message C and the scan request message D, and determines whether the scan request message carries data information. If it carries business data information, the data information is reported to different application programs of the application layer.
示例性的,将数据信息C上报给应用程序A,数据信息D上报给应用程序B。应用程序A和应用程序B分别对收到扫描请求报文携带的数据信息进行相关处理。例如,智能手表显示或语音提示扫描设备的电量低于20%;或者智能手表显示或语音提示应用程序D收到一条新消息。Exemplarily, data information C is reported to application A, and data information D is reported to application B. The application program A and the application program B respectively perform relevant processing on the data information carried in the received scan request message. For example, the smartwatch displays or voice prompts that the battery of the scanning device is below 20%; or the smartwatch displays or voice prompts that App D has received a new message.
在本申请实施例中,广播设备中的多个应用程序开启广播,并向扫描设备发送多个广播报文;扫描设备中的多个应用程序开启BLE扫描,并根据广播设备发送的广播报文,通过不同的过滤条件,匹配来自不同应用程序的广播报文;然后将扫描请求报文中新增扫描请求数据字段携带的不同数据信息发送至广播设备中对应的应用程序,广播设备的不同应用程序对对应的数据信息进行处理。通过这种方式,在不增加设备功耗或少量增加设备功耗的情况下,实现了数据信息的交互;并且同时支持多个应用程序的蓝牙广播双向通信,不同应用程序发送的扫描请求报文中携带不同的数据信息。In the embodiment of the present application, multiple applications in the broadcasting device start broadcasting and send multiple broadcasting messages to the scanning device; multiple applications in the scanning device enable BLE scanning, and according to the broadcasting messages sent by the broadcasting device , match broadcast messages from different applications through different filter conditions; then send different data information carried in the newly added scan request data field in the scan request message to the corresponding application program in the broadcast device, and different applications of the broadcast device The program processes the corresponding data information. In this way, the interaction of data and information is realized without increasing the power consumption of the device or a small increase in the power consumption of the device; and at the same time, it supports the Bluetooth broadcast two-way communication of multiple applications, and scan request messages sent by different applications. carry different data information.
上述本申请实施例提供的一种蓝牙数据传输方法中广播设备所执行的步骤,也可以由广播设备中包括的一种蓝牙芯片来执行。该蓝牙芯片运行时调用存储器中存储的计算机程序,实现上述广播设备执行的步骤。类似的,上述实施例中,扫描设备执行的步骤也可以由扫描 设备包括的一种蓝牙芯片来执行。该蓝牙芯片运行时调用存储器中存储的计算机程序,实现上述扫描设备执行的步骤。The steps performed by the broadcasting device in the Bluetooth data transmission method provided by the above embodiments of the present application may also be performed by a Bluetooth chip included in the broadcasting device. When the Bluetooth chip is running, the computer program stored in the memory is invoked to implement the steps performed by the above-mentioned broadcasting device. Similarly, in the above embodiment, the steps performed by the scanning device may also be performed by a Bluetooth chip included in the scanning device. When the Bluetooth chip is running, the computer program stored in the memory is called to realize the steps performed by the above scanning device.
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。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: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (25)

  1. 一种蓝牙数据传输方法,其特征在于,所述方法包括:A Bluetooth data transmission method, characterized in that the method comprises:
    广播设备向扫描设备发送广播报文;The broadcasting device sends a broadcasting message to the scanning device;
    所述广播设备接收所述扫描设备发送的扫描请求报文,所述扫描请求报文是所述扫描设备根据所述广播报文向所述广播设备发送的,所述扫描请求报文携带有数据信息;The broadcast device receives a scan request message sent by the scan device, the scan request message is sent by the scan device to the broadcast device according to the broadcast message, and the scan request message carries data information;
    所述广播设备对所述数据信息进行处理。The broadcast device processes the data information.
  2. 根据权利要求1所述的方法,其特征在于,所述扫描请求报文中包含有扫描请求数据字段,所述扫描请求数据字段中包含所述数据信息。The method according to claim 1, wherein the scan request message includes a scan request data field, and the scan request data field includes the data information.
  3. 根据权利要求1或2所述的方法,其特征在于,所述广播设备对所述数据信息进行处理包括:The method according to claim 1 or 2, wherein the processing of the data information by the broadcasting device comprises:
    所述广播设备对所述扫描请求报文进行解析,确定所述扫描请求报文中是否携带有所述数据信息;The broadcast device parses the scan request message, and determines whether the scan request message carries the data information;
    若所述扫描请求报文中携带有所述数据信息,则所述广播设备对所述数据信息进行处理。If the scan request message carries the data information, the broadcast device processes the data information.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,若所述数据信息为电量信息,所述电量信息用于指示所述扫描设备的电量;所述广播设备对所述数据信息进行处理,包括:The method according to any one of claims 1-3, wherein if the data information is power information, the power information is used to indicate the power of the scanning device; processing, including:
    所述广播设备根据所述电量信息在用户界面中显示提示消息,所述提示消息用于提醒用户所述扫描设备的电量情况。The broadcasting device displays a prompt message in the user interface according to the power information, where the prompt message is used to remind the user of the power status of the scanning device.
  5. 根据权利要求1-3任一项所述的方法,其特征在于,若所述数据信息为设备信息,所述设备信息为所述扫描设备所在的蓝牙组网或者Wi-Fi组网中的各个设备的信息;所述广播设备对所述数据信息进行处理,包括:The method according to any one of claims 1-3, wherein if the data information is device information, the device information is each of the Bluetooth networking or Wi-Fi networking where the scanning device is located equipment information; the broadcast equipment processes the data information, including:
    所述广播设备将所述设备信息存储在设备信息列表中,所述设备信息列表用于存储蓝牙组网或者Wi-Fi组网中的各个设备的信息。The broadcasting device stores the device information in a device information list, where the device information list is used to store information of each device in the Bluetooth networking or Wi-Fi networking.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述广播报文中包括设备数据,所述设备数据包括所述广播设备的生产厂商标识、所述广播设备上登录的用户账号信息、发起广播请求的应用程序的标识、发起广播请求的应用程序的用户账号信息中的一项或者多项。The method according to any one of claims 1-5, wherein the broadcast message includes device data, and the device data includes a manufacturer identifier of the broadcast device, a user logged in on the broadcast device One or more items of account information, the identifier of the application that initiates the broadcast request, and the user account information of the application that initiates the broadcast request.
  7. 一种蓝牙数据传输方法,其特征在于,所述方法包括:A Bluetooth data transmission method, characterized in that the method comprises:
    扫描设备接收广播设备发送的广播报文;The scanning device receives the broadcast message sent by the broadcast device;
    所述扫描设备根据所述广播报文向所述广播设备发送扫描请求报文,所述扫描请求报文携带有数据信息。The scanning device sends a scan request message to the broadcast device according to the broadcast message, where the scan request message carries data information.
  8. 根据权利要求7所述的方法,其特征在于,所述扫描请求报文中包含有扫描请求数据字段,所述扫描请求数据字段中包含所述数据信息。The method according to claim 7, wherein the scan request message includes a scan request data field, and the scan request data field includes the data information.
  9. 根据权利要求7或8所述的方法,其特征在于,若所述数据信息为电量信息,所述电量信息用于指示所述扫描设备的电量。The method according to claim 7 or 8, wherein if the data information is power information, the power information is used to indicate the power of the scanning device.
  10. 根据权利要求7或8所述的方法,其特征在于,若所述数据信息为设备信息,所述设备信息为所述扫描设备所在的蓝牙组网或者Wi-Fi组网中的各个设备的信息。The method according to claim 7 or 8, wherein if the data information is device information, the device information is information of each device in a Bluetooth network or a Wi-Fi network where the scanning device is located .
  11. 根据权利要求7-10任一项所述的方法,其特征在于,所述广播报文中包括设备数据,所述设备数据包括所述广播设备的生产厂商标识、所述广播设备上登录的用户账号信息、发起广播请求的应用程序的标识、发起广播请求的应用程序的用户账号信息中的一项或者多项;The method according to any one of claims 7-10, wherein the broadcast message includes device data, and the device data includes an identifier of a manufacturer of the broadcast device, and a user logged in on the broadcast device. One or more of account information, the identifier of the application that initiated the broadcast request, and the user account information of the application that initiated the broadcast request;
    所述扫描设备根据所述广播报文向所述广播设备发送扫描请求报文,包括:The scanning device sends a scan request message to the broadcast device according to the broadcast message, including:
    所述扫描设备根据所述广播报文中的设备数据向所述广播设备发送扫描请求报文。The scanning device sends a scanning request message to the broadcasting device according to the device data in the broadcasting message.
  12. 一种广播设备,其特征在于,所述广播设备包括一个或多个处理器、存储器,所述存储器与所述一个或多个处理器耦合,所述存储器用于存储程序代码,所述一个或多个处理器调用所述程序代码以使得所述广播设备执行以下操作:A broadcasting device, characterized in that, the broadcasting device includes one or more processors and a memory, the memory is coupled to the one or more processors, and the memory is used for storing program codes, the one or more The program code is invoked by a plurality of processors to cause the broadcast device to:
    向扫描设备发送广播报文;Send broadcast messages to scanning devices;
    接收所述扫描设备发送的扫描请求报文,所述扫描请求报文是所述扫描设备根据所述广播报文向所述广播设备发送的,所述扫描请求报文携带有数据信息;receiving a scan request message sent by the scanning device, where the scan request message is sent by the scanning device to the broadcast device according to the broadcast message, and the scan request message carries data information;
    对所述数据信息进行处理。The data information is processed.
  13. 根据权利要求12所述的广播设备,其特征在于,所述扫描请求报文中包含有扫描请求数据字段,所述扫描请求数据字段中包含所述数据信息。The broadcasting device according to claim 12, wherein the scan request message includes a scan request data field, and the scan request data field includes the data information.
  14. 根据权利要求12或13所述的广播设备,其特征在于,所述一个或多个处理器调用所述程序代码以使得所述广播设备具体执行以下操作:The broadcasting device according to claim 12 or 13, wherein the one or more processors invoke the program code to cause the broadcasting device to specifically perform the following operations:
    对所述扫描请求报文进行解析,确定所述扫描请求报文中是否携带有所述数据信息;Parsing the scan request message to determine whether the scan request message carries the data information;
    若所述扫描请求报文中携带有所述数据信息,则所述广播设备对所述数据信息进行处理。If the scan request message carries the data information, the broadcast device processes the data information.
  15. 根据权利要求12-14任一项所述的广播设备,其特征在于,若所述数据信息为电量信息,所述电量信息用于指示所述扫描设备的电量;The broadcasting device according to any one of claims 12-14, wherein, if the data information is power information, the power information is used to indicate the power of the scanning device;
    所述一个或多个处理器调用所述程序代码以使得所述广播设备具体执行以下操作:The one or more processors invoke the program code to cause the broadcast device to specifically perform the following operations:
    根据所述电量信息在用户界面中显示提示消息,所述提示消息用于提醒用户所述扫描设备的电量情况。A prompt message is displayed in the user interface according to the power information, where the prompt message is used to remind the user of the power status of the scanning device.
  16. 根据权利要求12-14任一项所述的广播设备,其特征在于,若所述数据信息为设备信息,所述设备信息为所述扫描设备所在的蓝牙组网或者Wi-Fi组网中的各个设备的信息;The broadcasting device according to any one of claims 12-14, wherein if the data information is device information, the device information is a Bluetooth network or a Wi-Fi network where the scanning device is located. Information about each device;
    所述一个或多个处理器调用所述程序代码以使得所述广播设备具体执行以下操作:The one or more processors invoke the program code to cause the broadcast device to specifically perform the following operations:
    将所述设备信息存储在设备信息列表中,所述设备信息列表用于存储蓝牙组网或者Wi-Fi组网中的各个设备的信息。The device information is stored in a device information list, where the device information list is used to store information of each device in the Bluetooth networking or Wi-Fi networking.
  17. 一种扫描设备,其特征在于,所述扫描设备包括一个或多个处理器、存储器,所述存 储器与所述一个或多个处理器耦合,所述存储器用于存储程序代码,所述一个或多个处理器调用所述程序代码以使得所述扫描设备执行以下操作:A scanning device, characterized in that the scanning device comprises one or more processors and a memory, the memory is coupled to the one or more processors, the memory is used for storing program codes, the one or The program code is invoked by a plurality of processors to cause the scanning device to:
    接收广播设备发送的广播报文;Receive broadcast messages sent by broadcast equipment;
    根据所述广播报文向所述广播设备发送扫描请求报文,所述扫描请求报文携带有数据信息。Send a scan request message to the broadcast device according to the broadcast message, where the scan request message carries data information.
  18. 根据权利要求17所述的扫描设备,其特征在于,所述扫描请求报文中包含有扫描请求数据字段,所述扫描请求数据字段中包含所述数据信息。The scanning device according to claim 17, wherein the scan request message includes a scan request data field, and the scan request data field includes the data information.
  19. 根据权利要求17或18所述的扫描设备,其特征在于,若所述数据信息为电量信息,所述电量信息用于指示所述扫描设备的电量。The scanning device according to claim 17 or 18, wherein if the data information is power information, the power information is used to indicate the power of the scanning device.
  20. 根据权利要求17或18所述的扫描设备,其特征在于,若所述数据信息为设备信息,所述设备信息为所述扫描设备所在的蓝牙组网或者Wi-Fi组网中的各个设备的信息。The scanning device according to claim 17 or 18, wherein if the data information is device information, the device information is the information of each device in the Bluetooth network or Wi-Fi network where the scanning device is located. information.
  21. 根据权利要求17-20任一项所述的扫描设备,其特征在于,所述广播报文中包括设备数据,所述设备数据包括所述广播设备的生产厂商标识、所述广播设备上登录的用户账号信息、发起广播请求的应用程序的标识、发起广播请求的应用程序的用户账号信息中的一项或者多项;The scanning device according to any one of claims 17 to 20, wherein the broadcast message includes device data, and the device data includes a manufacturer's identifier of the broadcast device, and the information registered on the broadcast device. One or more of the user account information, the identifier of the application that initiated the broadcast request, and the user account information of the application that initiated the broadcast request;
    所述一个或多个处理器调用所述程序代码以使得所述扫描设备具体执行以下操作:The one or more processors invoke the program code to cause the scanning device to specifically perform the following operations:
    所述扫描设备根据所述广播报文中的设备数据向所述广播设备发送扫描请求报文。The scanning device sends a scanning request message to the broadcasting device according to the device data in the broadcasting message.
  22. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-6中任一项所述的方法。A computer program product, characterized in that the computer program product includes computer instructions, which, when the computer instructions are executed on an electronic device, cause the electronic device to perform the method according to any one of claims 1-6. method.
  23. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求7-11中任一项所述的方法。A computer program product, characterized in that the computer program product includes computer instructions, which, when the computer instructions are executed on an electronic device, cause the electronic device to perform the method according to any one of claims 7-11. method.
  24. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-6中任一项所述的方法。A computer-readable storage medium comprising instructions, characterized in that, when the instructions are executed on an electronic device, the electronic device is caused to perform the method according to any one of claims 1-6.
  25. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求7-11中任一项所述的方法。A computer-readable storage medium comprising instructions, characterized in that, when the instructions are executed on an electronic device, the electronic device is caused to perform the method of any one of claims 7-11.
PCT/CN2021/114744 2020-08-31 2021-08-26 Bluetooth-based data transmission method and related apparatus WO2022042637A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010906576.XA CN114125793A (en) 2020-08-31 2020-08-31 Bluetooth data transmission method and related device
CN202010906576.X 2020-08-31

Publications (1)

Publication Number Publication Date
WO2022042637A1 true WO2022042637A1 (en) 2022-03-03

Family

ID=80352720

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/114744 WO2022042637A1 (en) 2020-08-31 2021-08-26 Bluetooth-based data transmission method and related apparatus

Country Status (2)

Country Link
CN (1) CN114125793A (en)
WO (1) WO2022042637A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115296996A (en) * 2022-03-29 2022-11-04 杭州中天微***有限公司 Data transmission method, air upgrading method, network equipment and network system
CN115529578A (en) * 2022-09-09 2022-12-27 深圳市有方科技股份有限公司 Communication method, device and equipment based on Bluetooth
CN116709584A (en) * 2022-10-27 2023-09-05 荣耀终端有限公司 Method for connecting car machine and terminal equipment
CN116709584B (en) * 2022-10-27 2024-05-17 荣耀终端有限公司 Method for connecting car machine and terminal equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105101362A (en) * 2014-05-05 2015-11-25 刘洪明 Method of reducing signal transmitting radiation of Bluetooth low-power consumption equipment and system
CN105392184A (en) * 2014-08-22 2016-03-09 卡西欧计算机株式会社 Wireless communication device, non-transitory computer-readable recording medium, master device, and slave device
WO2017010442A1 (en) * 2015-07-14 2017-01-19 株式会社イーアールアイ Information delivery device
CN110891298A (en) * 2019-12-18 2020-03-17 惠州拓邦电气技术有限公司 Bluetooth connection method, device, Bluetooth equipment and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105101362A (en) * 2014-05-05 2015-11-25 刘洪明 Method of reducing signal transmitting radiation of Bluetooth low-power consumption equipment and system
CN105392184A (en) * 2014-08-22 2016-03-09 卡西欧计算机株式会社 Wireless communication device, non-transitory computer-readable recording medium, master device, and slave device
WO2017010442A1 (en) * 2015-07-14 2017-01-19 株式会社イーアールアイ Information delivery device
CN110891298A (en) * 2019-12-18 2020-03-17 惠州拓邦电气技术有限公司 Bluetooth connection method, device, Bluetooth equipment and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115296996A (en) * 2022-03-29 2022-11-04 杭州中天微***有限公司 Data transmission method, air upgrading method, network equipment and network system
CN115296996B (en) * 2022-03-29 2024-03-15 杭州中天微***有限公司 Data transmission method, air upgrading method, network equipment and network system
CN115529578A (en) * 2022-09-09 2022-12-27 深圳市有方科技股份有限公司 Communication method, device and equipment based on Bluetooth
CN116709584A (en) * 2022-10-27 2023-09-05 荣耀终端有限公司 Method for connecting car machine and terminal equipment
CN116709584B (en) * 2022-10-27 2024-05-17 荣耀终端有限公司 Method for connecting car machine and terminal equipment

Also Published As

Publication number Publication date
CN114125793A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2020134869A1 (en) Electronic device operating method and electronic device
WO2021000807A1 (en) Processing method and apparatus for waiting scenario in application
WO2021027666A1 (en) Bluetooth reconnection method and related apparatus
EP4084486A1 (en) Cross-device content projection method, and electronic device
EP4109891A1 (en) Device interaction method and electronic device
CN113885759A (en) Notification message processing method, device, system and computer readable storage medium
WO2021159746A1 (en) File sharing method and system, and related device
WO2021185141A1 (en) Wi-fi aware link establishment method and system, electronic device, and storage medium
WO2022033320A1 (en) Bluetooth communication method, terminal device, and computer-readable storage medium
EP4156625A1 (en) Data synchronization method, electronic device, and computer readable storage medium
WO2021052204A1 (en) Address book-based device discovery method, audio and video communication method, and electronic device
CN113961157B (en) Display interaction system, display method and equipment
WO2022001258A1 (en) Multi-screen display method and apparatus, terminal device, and storage medium
US20230297414A1 (en) Task Processing Method and Related Apparatus
WO2021218429A1 (en) Method for managing application window, and terminal device and computer-readable storage medium
WO2022179275A1 (en) Terminal application control method, terminal device, and chip system
WO2022042637A1 (en) Bluetooth-based data transmission method and related apparatus
EP4033354A1 (en) Method and apparatus for installing plug-in, and storage medium
WO2020134868A1 (en) Connection establishment method, and terminal apparatus
WO2022143180A1 (en) Collaborative display method, terminal device, and computer readable storage medium
WO2022121988A1 (en) Display synchronization method, electronic device, and readable storage medium
WO2022228180A1 (en) Application management method and electronic device
EP4293997A1 (en) Display method, electronic device, and system
WO2022135195A1 (en) Method and apparatus for displaying virtual reality interface, device, and readable storage medium

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: 21860471

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21860471

Country of ref document: EP

Kind code of ref document: A1