WO2022042254A1 - Method and apparatus for sending broadcast message, method and apparatus for receiving broadcast message, and device and storage medium - Google Patents

Method and apparatus for sending broadcast message, method and apparatus for receiving broadcast message, and device and storage medium Download PDF

Info

Publication number
WO2022042254A1
WO2022042254A1 PCT/CN2021/110875 CN2021110875W WO2022042254A1 WO 2022042254 A1 WO2022042254 A1 WO 2022042254A1 CN 2021110875 W CN2021110875 W CN 2021110875W WO 2022042254 A1 WO2022042254 A1 WO 2022042254A1
Authority
WO
WIPO (PCT)
Prior art keywords
subfield
broadcast
broadcast message
combination
indicate
Prior art date
Application number
PCT/CN2021/110875
Other languages
French (fr)
Chinese (zh)
Inventor
曾春亮
翟召轩
杨启昌
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022042254A1 publication Critical patent/WO2022042254A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • 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
    • 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 embodiments of the present application relate to the field of communication technologies, and in particular, to a method, a method, an apparatus, a device, and a storage medium for sending a broadcast message.
  • Bluetooth technology is a widely used short-range data transmission technology in the Internet of Things.
  • Bluetooth Beacon is a broadcast protocol based on the Bluetooth Low Energy (BLE) protocol.
  • the embodiments of the present application provide a method for sending a broadcast message, a method for receiving a broadcast message, an apparatus, a device, and a storage medium, and a subfield combination is set for a target field in the broadcast message, and the subfield combination can be dynamically changed according to the service scenario of the broadcast message. , so that the target field is adapted to the current business scenario and includes as few subfields as possible, thereby improving the expression efficiency of broadcast messages.
  • the technical solution is as follows:
  • a method for sending a broadcast message comprising:
  • the broadcast message is a broadcast message corresponding to a Bluetooth Beacon device
  • the subfield combination is a combination format of combining at least one subfield in the subfield set, and the subfield set includes all the subfields. Describe the predefined subfields of the target field;
  • the broadcast message is sent, and the target field in the broadcast message adopts the subfield combination.
  • a method for receiving a broadcast message comprising:
  • the subfield combination is determined by the Bluetooth Beacon device according to the service scenario, and the subfield combination is to combine at least one subfield in the subfield set
  • the combination format, the subfield set includes the predefined subfields of the target field
  • an apparatus for sending a broadcast message comprising: a first determining module and a sending module;
  • the first determining module is configured to determine a service scenario corresponding to a broadcast message, where the broadcast message is a broadcast message corresponding to a Bluetooth Beacon device;
  • the first determining module is configured to determine, according to the service scenario, a subfield combination corresponding to a target field in the broadcast message, where the subfield combination is a combination of at least one subfield in the subfield set Format, the subfield set includes subfields predefined by the target field;
  • the sending module is configured to send the broadcast message, and the target field in the broadcast message adopts the combination of the subfields.
  • an apparatus for receiving a broadcast message comprising: a receiving module, a second determining module and a parsing module;
  • the receiving module is used to receive the broadcast message sent by the Bluetooth Beacon device
  • the second determination module is configured to determine the subfield combination corresponding to the target field in the broadcast message, the subfield combination is determined by the Bluetooth Beacon device according to the service scenario, and the subfield combination is the subfield combination.
  • the parsing module is configured to parse the target field in the broadcast message according to the subfield combination.
  • a Bluetooth device includes a Bluetooth chip, and the Bluetooth chip stores computer instructions, and the computer instructions are used to execute the method for sending a broadcast message, receive method.
  • a computer-readable storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the at least one piece of program , the code set or the instruction set is loaded and executed by the processor to implement the method for sending and receiving broadcast messages as described in the above aspects.
  • a computer program product comprising computer instructions stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods for sending and receiving broadcast messages provided in the foregoing optional implementations.
  • the subfield combination can be dynamically changed according to the business scenario of the broadcast message. Since the subfield combination is a combination format of at least one subfield in the subfield set, and the subfield combination
  • the field set includes predefined subfields of the target field, so that the target field can be adapted to the current business scenario and include as few subfields as possible, thereby improving the expression efficiency of broadcast messages.
  • FIG. 1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application
  • FIG. 2 is a flowchart of a method for sending a broadcast message provided by an exemplary embodiment of the present application
  • FIG. 3 is a schematic diagram of a binary format of a header identification subfield provided by an exemplary embodiment of the present application.
  • FIG. 4 is a schematic diagram of a binary format of a status subfield provided by an exemplary embodiment of the present application.
  • FIG. 5 is a schematic diagram of a custom data field provided by an exemplary embodiment of the present application.
  • FIG. 6 is a schematic diagram of a custom data field provided by an exemplary embodiment of the present application.
  • FIG. 7 is a flowchart of a method for receiving a broadcast message provided by an exemplary embodiment of the present application.
  • FIG. 8 is a structural block diagram of an apparatus for sending a broadcast message provided by an exemplary embodiment of the present application.
  • FIG. 9 is a structural block diagram of an apparatus for receiving a broadcast message provided by an exemplary embodiment of the present application.
  • FIG. 10 is a structural block diagram of a device for sending a broadcast message provided by an exemplary embodiment of the present application.
  • FIG. 11 is a structural block diagram of a device for receiving a broadcast message provided by an exemplary embodiment of the present application.
  • FIG. 1 shows a schematic diagram of an implementation environment provided by an embodiment of the present application.
  • the implementation environment may include: a first device 10 and a second device 20 .
  • Bluetooth devices using BLE technology can be divided into master devices and slave devices.
  • the slave device can send a broadcast message for device discovery, and the master device can initiate an active connection; or the slave device can send service data to the master device in the form of a broadcast message, and the master device can scan and receive broadcast messages from the slave device.
  • the first device 10 is a sending device of a broadcast message and belongs to a slave device, and the broadcast message is broadcast in the form of a Bluetooth Beacon.
  • the first device 10 may be a smart phone, a tablet computer, a smart home appliance (such as a smart speaker, a smart refrigerator, a smart air conditioner, etc.), a wearable smart device (such as a smart glasses, a smart watch, etc.), a smart sensor (such as a temperature sensor, etc.) , door and window sensor, etc.), the embodiment of the present application does not limit the device type of the first device 10 .
  • the second device 20 is a receiving device of the broadcast message and belongs to the master device.
  • the second device 20 may be a smart phone, a tablet computer, a smart home appliance (such as a smart speaker, a smart refrigerator, a smart air conditioner, etc.), a wearable smart device (such as a smart glasses, a smart watch, etc.), a smart sensor (such as a temperature sensor, etc.) , door and window sensor, etc.), the embodiment of the present application does not limit the device type of the second device 20 .
  • the first device 10 is a smart home appliance
  • the second device 20 is a smart phone for exemplary illustration.
  • the cloud 30 may also be included.
  • the cloud 30 is a server that manages the Bluetooth devices (including the first device 10 and the second device 20 ).
  • the user can use the second device 20 to register a family account in the cloud 30, and both the first device 10 and the second device 20 are added to the family account.
  • a home communication network is formed between the first device 10 and the second device 20, and through the home communication network, Bluetooth communication can be performed between the devices. It can be understood that the functions provided by the cloud 30 can also be implemented locally, which is not limited in this embodiment of the present application.
  • the cloud 30 assigns a home address to the home account.
  • the broadcast message sent by the first device may carry a home address, so that the broadcast message can be acquired by the second device 20 or acquired by other devices in the home communication network.
  • FIG. 2 shows a flowchart of a method for sending a broadcast message provided by an exemplary embodiment of the present application.
  • the method can be applied to the first device shown in FIG. 1 , where the first device is a Bluetooth Beacon device.
  • the method may include the following steps:
  • Step 210 Determine a service scenario corresponding to the broadcast message, where the broadcast message is a broadcast message corresponding to the Bluetooth Beacon device.
  • a broadcast message is a broadcast message for the Bluetooth Beacon protocol.
  • the service scenario is the information used by the Bluetooth Beacon device to describe the purpose corresponding to the broadcast transmission when the Bluetooth Beacon device transmits the broadcast message.
  • the service scenario may be that a Bluetooth Beacon device performs device discovery.
  • the service scenario may be that a Bluetooth Beacon device sends service data.
  • the Bluetooth Beacon device predefines several service scenarios, and each time a broadcast message is about to be sent, the Bluetooth Beacon device determines the service scenario corresponding to the broadcast message from several predefined service scenarios.
  • Step 220 Determine the subfield combination corresponding to the target field in the broadcast message according to the service scenario.
  • the subfield combination is a combination format in which at least one subfield in the subfield set is combined, and the subfield set includes the subfields predefined by the target field.
  • a broadcast message can be divided into several fields, each of which is used to describe one aspect of the broadcast message.
  • the length and definition corresponding to each field may be defined in the standard, for example, the length is m bytes, and the definition represents information describing a certain aspect.
  • the target field is one of multiple fields in the broadcast message, and the combination of subfields corresponding to the target field changes dynamically according to business scenarios.
  • a subfield is a field formed by further dividing the target field.
  • the subfield set of the target field may include predefined x subfields, the subfield combination includes y subfields of the x subfields, both x and y are positive integers, and y is not greater than x.
  • the combination of subfields corresponding to the target field varies with different business scenarios, that is, at least one of the number of subfields included in the target field, the types of subfields, and the arrangement order of subfields varies with different business scenarios .
  • the subfield set includes: subfield 1 , subfield 2 , subfield 3 , subfield 4 and subfield 5 .
  • the subfield combination combines subfield 1 and subfield 2; when the business scenario is business scenario b, the subfield combination combines subfield 1, subfield 3 and subfield 4; in the business scenario When the scenario is business scenario c, the subfield combination combines subfield 1 and subfield 5.
  • the same service scenario may correspond to one or more combinations of subfields, and the same combination of subfields may also correspond to different service scenarios, which are not limited in this embodiment of the present application.
  • the Bluetooth Beacon device stores a mapping relationship table of the combination of business scenarios and subfields, and after determining the business scenario, the corresponding subfield combination is queried in the mapping relationship table.
  • step 230 a broadcast message is sent, and the target field in the broadcast message adopts a combination of subfields.
  • the Bluetooth Beacon device After the Bluetooth Beacon device determines the subfield combination, it assembles the target field in the combination format of the subfield combination, and sends a broadcast message including the target field.
  • a subfield combination is set for the target field in the broadcast message, and the subfield combination can be dynamically changed according to the service scenario of the broadcast message.
  • the broadcast message may include fields as shown in Table 1:
  • the broadcast message includes a service UUID field, and the service UUID field is a fixed value.
  • the fixed value can be "0xFD70" as shown in Table 1.
  • 0xFD70 the format of the broadcast message in the embodiment of the present application is identified.
  • the target field corresponds to a combination of subfields, and the combination of subfields depends on the service scenario. And dynamically changed.
  • the fields corresponding to bytes (n+9)-(m+n+8) are custom data fields.
  • Custom data fields are fields that are customized by different platforms that provide Bluetooth services.
  • the target field is a custom data field.
  • the set of subfields includes: a header identification subfield, a status subfield, a product identification subfield, a Media Access Control (MAC) subfield, an address subfield, and an abstract data subfield.
  • MAC Media Access Control
  • the transmission order of the subfields in the subfield set is: header identification subfield, status subfield, product identification subfield, MAC subfield, address subfield and abstract data subfield.
  • the header identification subfield may be expressed as Head Flags
  • the status subfield may be expressed as Status
  • the product identification subfield may be expressed as PID
  • the MAC subfield may be expressed as MAC Part
  • the address subfield may be expressed as Address
  • the abstract data Subfields can be represented as Abstract Data. Combined with the custom data fields shown in Table 2 below:
  • the header identification subfield is used to indicate the corresponding subfield combination of the broadcast message, and the header identification subfield is a mandatory subfield in the subfield combination.
  • the header identification subfield is a mandatory subfield in the subfield combination, which can be understood as: the Bluetooth Beacon device combines at least one subfield including the header identification subfield to form a target field. Since the header identification subfield is used to indicate the corresponding subfield combination of the broadcast message, the header identification subfield must be included in the target field.
  • the second device at the opposite end can determine the combination of subfields according to the header identification subfield in the case that the location of the header identification subfield in the broadcast message is known, so that The target field is parsed correctly. Therefore, the header identification subfield can also be understood as "this field determines the broadcast data format definition" remarked in Table 1.
  • the header identification subfield includes at least one of the following flags: a home broadcast flag, a home communication requirement flag, a version flag, and a reserved flag.
  • the home broadcast flag may be represented as H
  • the home communication requirement flag may be represented as C
  • the version flag may be represented as ver
  • the reserved flag may be represented as R.
  • the home broadcast flag bit is used to indicate whether the broadcast message is home broadcast, and home broadcast refers to the broadcast performed in the home communication network.
  • a home communication network is a network composed of Bluetooth devices added to the same home account. After the Bluetooth Beacon device is added to the home account, it can join the home communication network. After joining the home communication network, the Bluetooth Beacon device is capable of home broadcast.
  • the service scenario of the Bluetooth Beacon device may be a device discovery scenario.
  • the subfield combination can be the first subfield combination
  • the header identification subfield and the status subfield are mandatory subfields in the first subfield combination
  • the product identification subfield and the MAC subfield are the first subfield combination. optional subfield of .
  • the broadcast message when the value of H is 1, it indicates home broadcasting.
  • the broadcast message is broadcast in the home communication network, and the broadcast message carries an address subfield.
  • the service scenario of the Bluetooth Beacon device may be a service data sending scenario.
  • the subfield combination may be the second subfield combination, and the header identification subfield, the address subfield and the abstract data subfield are mandatory subfields in the second subfield combination.
  • the home communication requirement flag bit is used to indicate whether the Bluetooth Beacon device has a home communication requirement.
  • the home communication requirement refers to the requirement of the Bluetooth Beacon device to communicate with other devices in the home communication network.
  • the home communication requirement flag bit may continue to be used to indicate whether the Bluetooth Beacon device performing the home broadcast has a home communication requirement.
  • thermometer when the value of C is 0, it indicates that there is no need for home communication. At this point, the Bluetooth Beacon device does not expect to communicate with other devices. For example, the thermometer sends the temperature measured by itself to the mobile phone through a broadcast message. At this time, the thermometer only needs to send data, and there is no need for home communication.
  • the Bluetooth Beacon device when the value of C is 1, it indicates that there is a need for home communication. At this point, the Bluetooth Beacon device expects to communicate with other devices. When the Bluetooth Beacon device needs to obtain some information, the home communication requirement flag indicates that the Bluetooth Beacon device has a home communication requirement.
  • the subfield combination in response to the service scenario of the broadcast message being a time-checking request scenario, includes a header identification subfield, and the home communication requirement flag in the header identification subfield indicates that the Bluetooth Beacon device has a home communication requirement.
  • the speaker device broadcasts a time-checking request message to the Bluetooth gateway, and requests the Bluetooth gateway to initiate a connection to itself to perform time-checking. At this time, the speaker device has home communication needs.
  • the version flag bit is used to indicate the current version of the Bluetooth Beacon protocol corresponding to the broadcast message.
  • the version indicated by the version flag bit can start from 0, and the original version is incremented by 1 when the version is updated.
  • the reserved flag can be filled with 0.
  • bit positions of the foregoing four flag bits in the header identification subfield may be different from those in FIG. 3 , which are not limited in this embodiment of the present application.
  • the state subfield is used to indicate the device capability state of the Bluetooth Beacon device.
  • the status subfield is a mandatory subfield in the subfield combination.
  • the Bluetooth Beacon device informs other devices of their own device capability status through the status subfield, which is convenient for subsequent connection.
  • the status subfield includes at least one of the following flag bits: a pairing flag bit, a product identification indicator bit, a MAC indicator bit, an encryption flag bit, and a reserved flag bit.
  • the pairing flag may be represented as G
  • the product identification indication flag may be represented as P
  • the MAC indication flag may be represented as M
  • the encryption flag may be represented as E
  • the reserved flag may be represented as Resv.
  • Pairing flag bit used to indicate whether the Bluetooth Beacon device allows pairing.
  • the Bluetooth Beacon device when the value of G is 0, it indicates that the Bluetooth Beacon device refuses to pair. For example, after the second device receives the broadcast message, when the value of G is 0, the Bluetooth Beacon device is not added to the local pairable list.
  • the Bluetooth Beacon device when the value of C is 1, it indicates that the Bluetooth Beacon device allows pairing. For example, after the second device receives the broadcast message, when the value of G is 1, the Bluetooth Beacon device is added to the local pairable list.
  • the MAC indication flag bit is used to indicate whether the subfield combination contains the MAC subfield.
  • Encryption flag bit used to indicate whether the abstract data subfield is encrypted.
  • the encryption method has been agreed in advance.
  • the encryption method is indicated to the second device through other flag bits in the broadcast message.
  • the reserved flag can be filled with 0.
  • bit positions of the above five flag bits in the status subfield may be different from those in FIG. 4 , which are not limited in this embodiment of the present application.
  • the product identification subfield is used to indicate the product corresponding to the Bluetooth Beacon device.
  • Each product corresponds to a Product Identifier (PID).
  • PID Product Identifier
  • the second device can determine the product type of the Bluetooth Beacon device.
  • Bluetooth Beacon devices can be different types of products, such as: smartphones, tablet computers, smart home appliances (such as smart speakers, smart refrigerators, smart air conditioners, etc.), wearable smart devices (such as smart glasses, smart watches, etc.), Smart sensors (such as temperature sensors, door and window sensors, etc.).
  • the product identification subfield is a mandatory subfield in the subfield combination.
  • the binding process can be defined by the product identification subfield, that is, different product types can correspond to different binding processes.
  • the product identification subfield is in big-endian byte order.
  • Byte order refers to the storage order of each byte corresponding to multi-byte data.
  • the high-order byte comes first and the low-order byte follows.
  • the value of the product identification subfield is 0x2211, which is stored in two bytes: the high-order byte is 0x22, and the low-order byte is 0x11.
  • the MAC subfield is used to indicate all or part of the MAC address corresponding to the Bluetooth Beacon device.
  • a Bluetooth device of a product type can be identified, and through the MAC subfield, it can be further refined to a Bluetooth device in a class of Bluetooth devices.
  • the MAC subfield is a mandatory subfield in the subfield combination.
  • the MAC subfield includes the data of the lowest two bytes of the MAC of the Bluetooth Beacon device, and the data of the lowest two bytes is in big-endian byte order.
  • the MAC subfield can be the last two bytes of the wifi MAC; when the Bluetooth Beacon device only supports BLE, the MAC subfield can be the last two bytes of the BLE MAC.
  • the address subfield is used to indicate the home address corresponding to the home communication network to which the Bluetooth Beacon device is bound.
  • the home address is the address assigned to the home account by the cloud that provides the Bluetooth management service.
  • information related to the home account such as identity information and security information, may be obtained, and the identity information may include a home address.
  • the address subfield is a mandatory subfield in the subfield combination.
  • the address subfield includes the data of the lowest two bytes of the home address of the Bluetooth Beacon device, and the data of the lowest two bytes is in big-endian byte order.
  • the abstract data subfield is used to indicate the data carried in the broadcast message.
  • the abstract data subfield is a mandatory subfield in the subfield combination.
  • the abstract data subfield includes at least one of the following bytes: a first byte, an attribute instance identification set byte, a length byte and a data byte, the first byte includes: a type flag bit and the service instance identification flag.
  • the type flag may be represented as type
  • the service instance identifier flag may be represented as SIID
  • the attribute instance identifier set byte may be represented as IIDs
  • the length byte may be represented as Length
  • the data byte may be represented as Data.
  • the first byte, the first byte includes: the type flag bit and the service instance flag bit, the type flag bit is used to indicate the type of the abstract data subfield, and the service instance flag bit is used to indicate the service provided by the Bluetooth Beacon device. .
  • the type of abstract data subfield can include: one of event notification and attribute value.
  • Event notifications refer to abstract data subfields that describe events that meet pre-set conditions. For example, when the door and window sensor detects that a switch event occurs during an abnormal time period, the type of the abstract data subfield is event notification.
  • the attribute value refers to the properties of the abstract data subfield that can describe the Bluetooth Beacon device itself. For example, the temperature measured by the thermometer is 26 degrees, the thermometer reports the measured temperature, and the type of the abstract data subfield is the attribute value.
  • the value of the type flag bit when the value of the type flag bit is 0, it indicates that the type of the abstract data subfield is an attribute value. Exemplarily, when the value of the type flag bit is 1, it indicates that the type of the abstract data subfield is event notification.
  • a Bluetooth Beacon device may correspond to a capability set, and the capability set includes services supported and provided by the Bluetooth Beacon device.
  • the Service Instance ID (SIID) flag is used to indicate the service provided by the Bluetooth Beacon device.
  • the service may include: a fan, a battery, and a switch.
  • the service instance identification flag may include 7 bits, which can indicate 128 different services.
  • the attribute instance identification set byte is used to indicate the attribute corresponding to the service indicated in the service instance flag bit.
  • a service can correspond to several properties, and the property instance IDs (Property Instance IDs, IIDs) bytes are used to indicate the properties corresponding to the service.
  • the service may include: a fan and a battery.
  • the attributes can be steering, rotational speed, etc.; for the service "battery”, the attributes can be power, loss level, etc.
  • bit 7 is used to indicate whether the next byte is still an attribute instance identification, such as: 0 indicates no, 1 indicates yes; bit 6-0 is used to indicate attributes.
  • the length byte is used to indicate the length of the data byte.
  • the attributes may be steering and rotational speed, and the data bytes are used to describe the values corresponding to the steering and rotational speed.
  • the service instance identification flag bit includes 7 bits and can indicate 128 different services, the expression content of the data byte is correspondingly expanded to 128 kinds.
  • the service scenario includes: a device discovery scenario; then step 220 may include: according to the device discovery scenario, determining a combination of subfields corresponding to the custom data field as a first combination of subfields.
  • the header identification subfield and the status subfield are mandatory subfields in the first subfield combination, and the product identification subfield and the MAC subfield are optional subfields in the first subfield combination.
  • the custom data fields under the first subfield combination may include at least one of a header identification subfield, a status subfield, a product identification subfield, and a MAC subfield.
  • Custom data fields may include: header identification subfield and status subfield; or header identification subfield, status subfield and product identification subfield; or header identification subfield, status subfield and MAC subfield; or header identification subfield, status subfield and MAC subfield Identification subfield, status subfield, product identification subfield, and MAC subfield.
  • the custom data field includes: a header identification subfield 501 , a status subfield 502 and a product identification subfield 503 .
  • the custom data field includes: a header identification subfield 501 , a status subfield 502 , a product identification subfield 503 and a MAC subfield 504 .
  • the first subfield combination may also include other optional subfields or required subfields, such as: optional subfields in the first subfield combination.
  • the selection subfield may also include an abstract data subfield, which is not limited in this embodiment of the present application.
  • the service scenario includes: a service data sending scenario; then step 220 may include: determining, according to the service data sending scenario, a combination of subfields corresponding to the custom data field as a second combination of subfields.
  • the header identification subfield, the address subfield and the abstract data subfield are mandatory subfields in the second subfield combination.
  • the custom data field includes: a header identification subfield 601 , an address subfield 602 and an abstract data subfield 603 .
  • the second subfield combination may also include other optional subfields or mandatory subfields, which are not limited in this embodiment of the present application.
  • the target field can be a custom data field, and by redefining the custom data field, the subfields corresponding to the custom data field are clarified, so that the custom data field can be dynamically adjusted In order to adapt to business scenarios and improve the expression efficiency of broadcast messages.
  • the service UUID field is a fixed value. Since the broadcast message corresponding to this embodiment can be filtered out according to the service UUID field, it is helpful for the second device of the opposite end to determine the identity of the broadcast message, so that the correct parsed broadcast messages.
  • the method provided by this embodiment introduces the service instance identification flag bit. Since the data bytes in the abstract data subfield are used to describe the attributes corresponding to the service, in the case that the service instance identification flag bit can indicate multiple services , the data bytes can also describe a variety of services correspondingly, expanding the expression content of the data bytes.
  • a broadcast message is sent in a broadcast type that can be connected to broadcast.
  • Broadcast types can include: connectable broadcasts, non-connectable broadcasts, scannable broadcasts, and directed broadcasts.
  • the Bluetooth Beacon device sends a broadcast message in a broadcast type that can be connected to broadcast.
  • the connectable broadcast allows other devices to respond to it and establish a Bluetooth connection with it.
  • a broadcast message is sent in one of the broadcast type of non-connectable broadcast and the broadcast type of scannable broadcast.
  • the Bluetooth Beacon device sends a broadcast message in a broadcast type of non-connectable broadcast (or scannable broadcast).
  • the non-connectable broadcast (ADV_NONCONN_IND) ignores the response message and connection request
  • the scannable broadcast (ADV_IND/ADV_SCAN_IND) allows other devices to scan the broadcast message.
  • the Bluetooth Beacon device determines the data length of the broadcast message; in response to the data length being no greater than the data length supported by a single broadcast packet, the broadcast message is sent in a broadcast type of non-connectable broadcast; in response to the data length being greater than a single broadcast packet Supported data length, send part of the broadcast message with the broadcast type that can scan broadcast, and then send the rest of the broadcast message with the broadcast type of scan response.
  • the scannable broadcast message protocol can include 3 messages: SCAN_IND, SCAN_REQ and SCAN_REP.
  • SCAN_IND is sent by the first device to the second device
  • SCAN_REQ is the message responded by the second device to the first device
  • SCAN_REP ie scan response
  • the Bluetooth Beacon device sends the broadcast message twice through SCAN_IND and SCAN_REP, so as to send the broadcast message completely.
  • a broadcast message is sent in a broadcast type that can be connected to broadcast.
  • the Bluetooth Beacon device can subsequently establish a connection and receive information about school time.
  • matching broadcast types are set for different service scenarios, which is beneficial to improve the efficiency of communication.
  • FIG. 7 shows a flowchart of a method for receiving a broadcast message provided by an exemplary embodiment of the present application, and the method can be applied to the second device shown in FIG. 1 .
  • the method may include the following steps:
  • Step 710 Receive a broadcast message sent by the Bluetooth Beacon device.
  • Step 720 Determine the subfield combination corresponding to the target field in the broadcast message.
  • the subfield combination is a combination format in which at least one subfield in the subfield set is combined, and the subfield set includes the subfields predefined by the target field.
  • the subfield is a field formed by further dividing the target field.
  • the subfield set of the target field can include predefined x subfields, and the subfield combination includes y subfields in the x subfields. Both x and y are positive. Integer, y is not greater than x.
  • the subfield combination is determined by the Bluetooth Beacon device according to the service scenario.
  • the service scenario is the information used by the Bluetooth Beacon device to describe the purpose corresponding to the broadcast transmission when the Bluetooth Beacon device transmits the broadcast message.
  • the service scenario may be that a Bluetooth Beacon device performs device discovery.
  • the service scenario may be that a Bluetooth device sends service data.
  • the combination of subfields corresponding to the target field varies with different business scenarios, that is, at least one of the number of subfields included in the target field, the types of subfields, and the arrangement order of subfields varies with different business scenarios .
  • the subfield set includes: subfield 1 , subfield 2 , subfield 3 , subfield 4 and subfield 5 .
  • the subfield combination combines subfield 1 and subfield 2; when the business scenario is business scenario b, the subfield combination combines subfield 1, subfield 3 and subfield 4; in the business scenario
  • the scenario is business scenario c, the subfield combination combines subfield 1 and subfield 5.
  • Step 730 Parse the target field in the broadcast message according to the subfield combination.
  • the second device parses the target field in the received broadcast message according to the subfield combination.
  • a subfield combination is set for the target field in the broadcast message, and the subfield combination can be dynamically changed according to the service scenario of the broadcast message.
  • a combination format in which at least one subfield is combined, and the subfield set includes subfields predefined by the target field, so that the target field can be adapted to the current business scenario and include as few subfields as possible, thereby improving the expression efficiency of broadcast messages .
  • the broadcast message includes a service UUID field, and the service UUID field is a fixed value.
  • the target field includes: a custom data field; the set of subfields includes: a header identification subfield, a status subfield, a product identification subfield, a MAC subfield, an address subfield, and an abstract data subfield.
  • the receiving order of the subfields in the subfield set is: header identification subfield, status subfield, product identification subfield, MAC subfield, address subfield and abstract data subfield.
  • the header identification subfield is used to indicate the corresponding subfield combination of the broadcast message, and the header identification subfield is a mandatory subfield in the subfield combination.
  • the header identification subfield includes at least one of the following flags: a home broadcast flag, a home communication requirement flag, a version flag, and a reserved flag.
  • the home broadcast flag bit is used to indicate whether the broadcast message is home broadcast, and home broadcast refers to the broadcast performed in the home communication network.
  • the home communication requirement flag bit is used to indicate whether the Bluetooth Beacon device has a home communication requirement.
  • the home communication requirement refers to the requirement of the Bluetooth Beacon device to communicate with other devices in the home communication network.
  • the version flag bit is used to indicate the current version of the Bluetooth Beacon protocol corresponding to the broadcast message.
  • the state subfield is used to indicate the device capability state of the Bluetooth Beacon device.
  • the status subfield includes at least one of the following flags: a pairing flag, a product identification indication flag, a MAC indication flag, an encryption flag, and a reserved flag.
  • Pairing flag bit used to indicate whether the Bluetooth Beacon device allows pairing.
  • the MAC indication flag bit is used to indicate whether the subfield combination contains the MAC subfield.
  • Encryption flag bit used to indicate whether the abstract data subfield is encrypted.
  • the product identification subfield is used to indicate the product corresponding to the Bluetooth Beacon device.
  • the MAC subfield is used to indicate all or part of the MAC address corresponding to the Bluetooth Beacon device.
  • the address subfield is used to indicate the home address corresponding to the home communication network to which the Bluetooth Beacon device is bound.
  • the abstract data subfield is used to indicate the data carried in the broadcast message.
  • the abstract data subfield includes at least one of the following bytes: a first byte, an attribute instance identification set byte, a length byte and a data byte, the first byte includes: a type flag bit and the service instance identification flag.
  • the first byte, the first byte includes: the type flag bit and the service instance flag bit, the type flag bit is used to indicate the type of the abstract data subfield, and the service instance flag bit is used to indicate the service provided by the Bluetooth Beacon device. .
  • the attribute instance identification set byte is used to indicate the attribute corresponding to the service indicated in the service instance flag bit.
  • the length byte is used to indicate the length of the data byte.
  • step 720 may include: determining a subfield combination according to at least one of a header identification subfield and a status subfield in the broadcast message.
  • the header identification subfield is a mandatory subfield of the subfield combination, and the sequence of the header identification subfield in the custom data field is defined, so that the second device can correctly parse the header identification subfield in the broadcast message. After correctly parsing the header identification subfield, the second device may determine the subfield combination according to the header identification subfield, or according to the header identification subfield and the status subfield.
  • the second device determines the subfield combination according to the home broadcast flag bit in the header identification subfield.
  • the subfield combination in response to the home broadcast flag indicating that it is home broadcast, it is determined that the subfield combination is the first subfield combination, and the header identification subfield and the status subfield are mandatory in the first subfield combination field, the product identification subfield and the MAC subfield are optional subfields in the first subfield combination; according to the status subfield, it is determined whether the first subfield combination also includes the product identification subfield and the MAC subfield.
  • the subfield combination is the first subfield combination
  • the first subfield combination includes the mandatory header identification subfield and status subfield
  • the header identification subfield and the status subfield If the order of the fields in the custom data field is defined, the second device can correctly parse the header identification subfield and the status subfield. Afterwards, the second device determines whether the first subfield combination further includes the product identification subfield and the MAC subfield according to the product identification indication flag bit and the MAC indication flag bit in the status subfield.
  • the subfield combination is the second subfield combination, and the header identification subfield, the address subfield and the abstract data subfield are the second subfield.
  • Mandatory subfield in the field combination in response to the home broadcast flag indicating non-home broadcast, it is determined that the subfield combination is the second subfield combination, and the header identification subfield, the address subfield and the abstract data subfield are the second subfield.
  • the subfield combination is the second subfield combination
  • the second subfield combination includes the mandatory header identification subfield, address subfield and abstract data subfield, and the above If the order of the three subfields in the custom data field is defined, the second device can correctly parse the custom data field including the above three subfields.
  • the second device can determine the subfield combination according to at least one of the header identification subfield and the status subfield in the broadcast message, so as to correctly parse the target field.
  • FIG. 8 is a structural block diagram of an apparatus for sending a broadcast message provided by an exemplary embodiment of the present application.
  • the apparatus includes: a first determining module 801 and a sending module 802;
  • the first determining module 801 is configured to determine a service scenario corresponding to a broadcast message, where the broadcast message is a broadcast message corresponding to a Bluetooth Beacon device;
  • the first determining module 801 is configured to determine the subfield combination corresponding to the target field in the broadcast message according to the business scenario, the subfield combination is a combination format in which at least one subfield in the subfield set is combined, and the subfield set includes the target Field predefined subfields;
  • the sending module 802 is configured to send a broadcast message, and the target field in the broadcast message adopts a combination of subfields.
  • the target field includes: a custom data field; the set of subfields includes:
  • the header identification subfield is used to indicate the corresponding subfield combination of the broadcast message, and the header identification subfield is a required subfield in the subfield combination;
  • the status subfield is used to indicate the device capability status of the Bluetooth Beacon device
  • Product identification subfield used to indicate the product corresponding to the Bluetooth Beacon device
  • the MAC subfield is used to indicate all or part of the MAC address corresponding to the Bluetooth Beacon device
  • the address subfield is used to indicate the home address corresponding to the home communication network to which the Bluetooth Beacon device is bound;
  • the business scenario includes: a device discovery scenario; a first determination module 801, configured to determine, according to the device discovery scenario, a combination of subfields corresponding to the custom data field as a first combination of subfields; wherein the header The identification subfield and the status subfield are mandatory subfields in the first subfield combination, and the product identification subfield and the MAC subfield are optional subfields in the first subfield combination.
  • the sending module 802 is configured to send a broadcast message in a broadcast type that can be connected to broadcast.
  • the business scenario includes: a business data sending scenario; a first determining module 801 is configured to determine, according to the business data sending scenario, a combination of subfields corresponding to the custom data field as a second combination of subfields; wherein , the header identification subfield, the address subfield and the abstract data subfield are mandatory subfields in the second subfield combination.
  • the sending module 802 is configured to send the broadcast message in one of the broadcast type of non-connectable broadcast and the broadcast type of scannable broadcast.
  • the first determining module 801 is configured to determine the data length of the broadcast message; the sending module 802 is configured to respond that the data length is not greater than the data length supported by a single broadcast packet, with the broadcast message that cannot be connected to the broadcast.
  • the sending module 802 is configured to send part of the broadcast message in the broadcast type that can scan broadcast in response to the data length being larger than the data length supported by a single broadcast packet, and then send the remaining broadcast message in the broadcast type of the scan response.
  • the header identification subfield includes at least one of the following flag bits:
  • the home broadcast flag bit is used to indicate whether the broadcast message is home broadcast, and home broadcast refers to the broadcast carried out in the home communication network;
  • the home communication demand flag is used to indicate whether the Bluetooth Beacon device has home communication needs.
  • the home communication demand refers to the need for the Bluetooth Beacon device to communicate with other devices in the home communication network;
  • the version flag bit is used to indicate the current version of the Bluetooth Beacon protocol corresponding to the broadcast message
  • the subfield combination in response to the service scenario of the broadcast message being a time-checking scenario, includes a header identification subfield, and the home communication requirement flag in the header identification subfield indicates that the Bluetooth Beacon device has home communication need.
  • the sending module 802 is configured to send a broadcast message in a broadcast type that can be connected to broadcast.
  • the status subfield includes at least one of the following flags:
  • Pairing flag bit used to indicate whether the Bluetooth Beacon device allows pairing
  • the product identification indication flag bit is used to indicate whether the product identification subfield is included in the subfield combination
  • the MAC indication flag bit is used to indicate whether a MAC subfield is included in the subfield combination
  • Encryption flag bit used to indicate whether the abstract data subfield is encrypted
  • the abstract data subfield includes at least one of the following bytes:
  • the first byte, the first byte includes: a type flag bit and a service instance identification flag bit, the type flag bit is used to indicate the type of the abstract data subfield, and the service instance flag bit is used to indicate the service provided by the Bluetooth Beacon device;
  • the attribute instance identification set byte is used to indicate the attribute corresponding to the service indicated in the service instance flag bit
  • the sending order of the subfields in the subfield set is: header identification subfield, status subfield, product identification subfield, MAC subfield, address subfield, and abstract data subfield.
  • the broadcast message includes a service UUID field, and the service UUID field is a fixed value.
  • FIG. 9 is a structural block diagram of an apparatus for sending a broadcast message provided by an exemplary embodiment of the present application.
  • the apparatus includes: a receiving module 901, a second determining module 902, and a parsing module 903;
  • a receiving module 901 configured to receive a broadcast message sent by a Bluetooth Beacon device
  • the second determination module 902 is configured to determine the subfield combination corresponding to the target field in the broadcast message, the subfield combination is determined by the Bluetooth Beacon device according to the service scenario, and the subfield combination is to combine at least one subfield in the subfield set
  • the combined format of the subfield set includes the subfields predefined by the target field;
  • the parsing module 903 is configured to parse the target field in the broadcast message according to the sub-field combination.
  • the target field includes: a custom data field; the set of subfields includes:
  • the header identification subfield is used to indicate the corresponding subfield combination of the broadcast message, and the header identification subfield is a required subfield in the subfield combination;
  • the status subfield is used to indicate the device capability status of the Bluetooth Beacon device
  • Product identification subfield used to indicate the product corresponding to the Bluetooth Beacon device
  • the MAC subfield is used to indicate all or part of the MAC address corresponding to the Bluetooth Beacon device
  • the address subfield is used to indicate the home address corresponding to the home communication network to which the Bluetooth Beacon device is bound;
  • the second determining module 902 is configured to determine the subfield combination according to at least one of the header identification subfield and the status subfield in the broadcast message.
  • the header identification subfield includes a home broadcast flag bit, and the home broadcast flag bit is used to indicate whether the broadcast message performs home broadcast, and the home broadcast refers to the broadcast performed in the home communication network;
  • the second determination The module 902 is used to determine that the subfield combination is the first subfield combination in response to the home broadcast flag indicating that it is home broadcast, the header identification subfield and the status subfield are mandatory subfields in the first subfield combination, and the product identification The subfield and the MAC subfield are optional subfields in the first subfield combination;
  • the second determination module 902 is configured to determine, according to the status subfield, whether the first subfield combination also includes the product identification subfield and the MAC subfield Or, the second determination module 902 is used to determine that the subfield combination is the second subfield combination in response to the home broadcast flag bit indicating that it is a non-home broadcast, and the header identification subfield, the address subfield and the abstract data subfield are the second subfield combination.
  • Mandatory subfield in the subfield combination is used to
  • the header identifier subfield includes a home broadcast flag bit, and the home broadcast flag bit is used to indicate whether the broadcast message performs home broadcast, and the home broadcast refers to the broadcast performed in the home communication network; the header identifier subfield The field also includes at least one of the following flags:
  • the home communication demand flag is used to indicate whether the Bluetooth Beacon device has home communication needs.
  • the home communication demand refers to the need for the Bluetooth Beacon device to communicate with other devices in the home communication network;
  • the version flag bit is used to indicate the current version of the Bluetooth Beacon protocol corresponding to the broadcast message
  • the state subfield includes at least one of the following flags:
  • Pairing flag bit used to indicate whether the Bluetooth Beacon device allows pairing
  • the product identification indication flag bit is used to indicate whether the product identification subfield is included in the subfield combination
  • the MAC indication flag bit is used to indicate whether a MAC subfield is included in the subfield combination
  • Encryption flag bit used to indicate whether the abstract data subfield is encrypted
  • the abstract data subfield includes at least one of the following bytes:
  • the first byte, the first byte includes: a type flag bit and a service instance identification flag bit, the type flag bit is used to indicate the type of the abstract data subfield, and the service instance flag bit is used to indicate the service provided by the Bluetooth Beacon device;
  • the attribute instance identification set byte is used to indicate the attribute corresponding to the service indicated in the service instance flag bit
  • the receiving order of the subfields in the subfield set is: header identification subfield, status subfield, product identification subfield, MAC subfield, address subfield and abstract data subfield.
  • the broadcast message includes a service UUID field, and the service UUID field is a fixed value.
  • the apparatus for sending a broadcast message or the apparatus for receiving a broadcast message provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions may be allocated to different functions as required. Module completion means dividing the internal structure of the device into different functional modules to complete all or part of the functions described above.
  • the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments, which will not be repeated here.
  • FIG. 10 shows a schematic structural diagram of a broadcast message sending device 1000 provided by an embodiment of the present application.
  • the broadcast message sending device 1000 may include: a processor 1001 , a receiver 1002 , a transmitter 1003 , and a memory 1004 and bus 1005.
  • the processor 1001 includes one or more processing cores, and the processor 1001 executes various functional applications and information processing by running software programs and modules.
  • the receiver 1002 and the transmitter 1003 may be implemented as a communication component, which may be a communication chip.
  • the memory 1004 is connected to the processor 1001 through the bus 1005 .
  • the memory 1004 can be used to store a computer program, and the processor 1001 is used to execute the computer program, so as to implement various steps performed by the data packet processing device in the above method embodiments.
  • memory 1004 may be implemented by any type or combination of volatile or non-volatile storage devices including, but not limited to, magnetic or optical disks, electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (EPROM), Static Random Access Memory (SRAM), Read-Only Memory (Read-Only Memory, ROM), magnetic memory, flash memory, programmable read-only memory (Programmable Read Only Memory, PROM).
  • volatile or non-volatile storage devices including, but not limited to, magnetic or optical disks, electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (EPROM), Static Random Access Memory (SRAM), Read-Only Memory (Read-Only Memory, ROM), magnetic memory, flash memory, programmable read-only memory (Programmable Read Only Memory, PROM).
  • the processor is configured to determine a service scenario corresponding to a broadcast message, where the broadcast message is a broadcast message corresponding to a Bluetooth Beacon device;
  • the processor is configured to determine, according to the service scenario, a subfield combination corresponding to the target field in the broadcast message, where the subfield combination is a combination format in which at least one subfield in the subfield set is combined,
  • the subfield set includes subfields predefined by the target field;
  • the transceiver is configured to send the broadcast message, and the target field in the broadcast message adopts the subfield combination.
  • FIG. 11 shows a schematic structural diagram of a broadcast message receiving device 1100 provided by an embodiment of the present application.
  • the broadcast message receiving device 1100 may include: a processor 1101 , a receiver 1102 , a transmitter 1103 , and a memory 1104 and bus 1105.
  • the processor 1101 includes one or more processing cores, and the processor 1101 executes various functional applications and information processing by running software programs and modules.
  • the receiver 1102 and the transmitter 1103 may be implemented as a communication component, which may be a communication chip.
  • the memory 1104 is connected to the processor 1101 through the bus 1105 .
  • the memory 1104 can be used to store a computer program, and the processor 1101 is used to execute the computer program, so as to implement various steps performed by the data packet processing device in the above method embodiments.
  • memory 1104 may be implemented by any type or combination of volatile or non-volatile storage devices including, but not limited to, magnetic or optical disks, electrically erasable and programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (EPROM), Static Random Access Memory (SRAM), Read-Only Memory (Read-Only Memory, ROM), magnetic memory, flash memory, programmable read-only memory (Programmable Read Only Memory, PROM).
  • volatile or non-volatile storage devices including, but not limited to, magnetic or optical disks, electrically erasable and programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (EPROM), Static Random Access Memory (SRAM), Read-Only Memory (Read-Only Memory, ROM), magnetic memory, flash memory, programmable read-only memory (Programmable Read Only Memory, PROM).
  • the transceiver is configured to receive a broadcast message, where the broadcast message is a broadcast message sent by a Bluetooth Beacon device;
  • the processor is configured to determine the subfield combination corresponding to the target field in the broadcast message, the subfield combination is determined by the Bluetooth Beacon device according to the service scenario, and the subfield combination is the combination of the subfield set.
  • a combination format in which at least one subfield is combined, and the subfield set includes the subfield predefined by the target field;
  • the processor is configured to parse the target field in the broadcast message according to the subfield combination.
  • the present application also provides a computer-readable storage medium, where at least one instruction, at least one piece of program, code set or instruction set is stored in the readable storage medium, the at least one instruction, the at least one piece of program, the at least one piece of program, the The code set or instruction set is loaded and executed by the processor to implement the method for sending and receiving broadcast messages provided by any of the foregoing exemplary embodiments.
  • Embodiments of the present application provide a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method for sending and receiving broadcast messages provided in the foregoing optional implementation manners.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Disclosed are a method and apparatus for sending a broadcast message, a method and apparatus for receiving a broadcast message, and a device and a storage medium, which relate to the technical field of communications. The sending method comprises: determining a service scenario corresponding to a broadcast message, wherein the broadcast message is a broadcast message corresponding to a Bluetooth beacon device; according to the service scenario, determining a subfield combination corresponding to a target field in the broadcast message, wherein the subfield combination is a combination format in which at least one subfield in a subfield set is combined, the subfield set comprising predefined subfields of the target field; and sending the broadcast message, wherein the target field in the broadcast message uses the subfield combination.

Description

广播消息的发送方法、接收方法、装置、设备及存储介质Broadcast message sending method, receiving method, apparatus, device and storage medium
本申请要求于2020年08月31日提交的申请号为202010899470.1、发明名称为“广播消息的发送方法、接收方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202010899470.1 and the invention titled "Broadcast Message Transmission Method, Reception Method, Apparatus, Equipment and Storage Medium" filed on August 31, 2020, the entire contents of which are by reference Incorporated in this application.
技术领域technical field
本申请实施例涉及通信技术领域,特别涉及一种广播消息的发送方法、接收方法、装置、设备及存储介质。The embodiments of the present application relate to the field of communication technologies, and in particular, to a method, a method, an apparatus, a device, and a storage medium for sending a broadcast message.
背景技术Background technique
蓝牙技术是物联网中应用较为广泛的短距离数据传输技术,蓝牙信标(Beacon)是一种基于低功耗蓝牙技术(Bluetooth Low Energy,BLE)协议的广播协议。Bluetooth technology is a widely used short-range data transmission technology in the Internet of Things. Bluetooth Beacon (Beacon) is a broadcast protocol based on the Bluetooth Low Energy (BLE) protocol.
在支持蓝牙Beacon的蓝牙Beacon设备进行广播时,广播消息的表达效率不高。When a Bluetooth Beacon device supporting Bluetooth Beacon broadcasts, the expression efficiency of the broadcast message is not high.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种广播消息的发送方法、接收方法、装置、设备及存储介质,为广播消息中的目标字段设置子字段组合,子字段组合可以随着广播消息的业务场景而动态改变,使得目标字段适应于当前的业务场景,并且包括尽量少的子字段,从而提高广播消息的表达效率。所述技术方案如下:The embodiments of the present application provide a method for sending a broadcast message, a method for receiving a broadcast message, an apparatus, a device, and a storage medium, and a subfield combination is set for a target field in the broadcast message, and the subfield combination can be dynamically changed according to the service scenario of the broadcast message. , so that the target field is adapted to the current business scenario and includes as few subfields as possible, thereby improving the expression efficiency of broadcast messages. The technical solution is as follows:
根据本申请的一个方面,提供了一种广播消息的发送方法,所述方法包括:According to an aspect of the present application, there is provided a method for sending a broadcast message, the method comprising:
确定广播消息对应的业务场景,所述广播消息是蓝牙Beacon设备对应的广播消息;Determine a business scenario corresponding to the broadcast message, where the broadcast message is a broadcast message corresponding to a Bluetooth Beacon device;
根据所述业务场景,确定所述广播消息中的目标字段对应的子字段组合,所述子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,所述子字段集合包括所述目标字段预定义的子字段;According to the service scenario, determine the subfield combination corresponding to the target field in the broadcast message, where the subfield combination is a combination format of combining at least one subfield in the subfield set, and the subfield set includes all the subfields. Describe the predefined subfields of the target field;
发送所述广播消息,所述广播消息中的所述目标字段采用所述子字段组合。The broadcast message is sent, and the target field in the broadcast message adopts the subfield combination.
根据本申请的一个方面,提供了一种广播消息的接收方法,所述方法包括:According to an aspect of the present application, a method for receiving a broadcast message is provided, the method comprising:
接收蓝牙Beacon设备发送的广播消息;Receive broadcast messages sent by Bluetooth Beacon devices;
确定所述广播消息中的目标字段对应的子字段组合,所述子字段组合是所述蓝牙Beacon设备根据业务场景确定的,所述子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,所述子字段集合包括所述目标字段预定义的子字段;Determine the subfield combination corresponding to the target field in the broadcast message, the subfield combination is determined by the Bluetooth Beacon device according to the service scenario, and the subfield combination is to combine at least one subfield in the subfield set The combination format, the subfield set includes the predefined subfields of the target field;
根据所述子字段组合,解析所述广播消息中的所述目标字段。Parse the target field in the broadcast message according to the subfield combination.
根据本申请的一个方面,提供了一种广播消息的发送装置,所述装置包括:第一确定模块和发送模块;According to an aspect of the present application, there is provided an apparatus for sending a broadcast message, the apparatus comprising: a first determining module and a sending module;
所述第一确定模块,用于确定广播消息对应的业务场景,所述广播消息是蓝牙Beacon设备对应的广播消息;The first determining module is configured to determine a service scenario corresponding to a broadcast message, where the broadcast message is a broadcast message corresponding to a Bluetooth Beacon device;
所述第一确定模块,用于根据所述业务场景,确定所述广播消息中的目标字段对应的子字段组合,所述子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,所述子字段集合包括所述目标字段预定义的子字段;The first determining module is configured to determine, according to the service scenario, a subfield combination corresponding to a target field in the broadcast message, where the subfield combination is a combination of at least one subfield in the subfield set Format, the subfield set includes subfields predefined by the target field;
所述发送模块,用于发送所述广播消息,所述广播消息中的所述目标字段采用所述子字段组合。The sending module is configured to send the broadcast message, and the target field in the broadcast message adopts the combination of the subfields.
根据本申请的一个方面,提供了一种广播消息的接收装置,所述装置包括:接收模块、第二确定模块和解析模块;According to an aspect of the present application, there is provided an apparatus for receiving a broadcast message, the apparatus comprising: a receiving module, a second determining module and a parsing module;
所述接收模块,用于接收蓝牙Beacon设备发送的广播消息;The receiving module is used to receive the broadcast message sent by the Bluetooth Beacon device;
所述第二确定模块,用于确定所述广播消息中的目标字段对应的子字段组合,所述子字段组合是所述蓝牙Beacon设备根据业务场景确定的,所述子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,所述子字段集合包括所述目标字段预定义的子字段;The second determination module is configured to determine the subfield combination corresponding to the target field in the broadcast message, the subfield combination is determined by the Bluetooth Beacon device according to the service scenario, and the subfield combination is the subfield combination. A combination format in which at least one subfield in the set is combined, and the subfield set includes subfields predefined by the target field;
所述解析模块,用于根据所述子字段组合,解析所述广播消息中的所述目标字段。The parsing module is configured to parse the target field in the broadcast message according to the subfield combination.
根据本申请的一个方面,提供了一种蓝牙设备,所述蓝牙设备包括蓝牙芯片,所述蓝牙芯片存储有计算机指令,所述计算机指令用于执行如如上方面所述的广播消息的发送方法、接收方法。According to an aspect of the present application, a Bluetooth device is provided, the Bluetooth device includes a Bluetooth chip, and the Bluetooth chip stores computer instructions, and the computer instructions are used to execute the method for sending a broadcast message, receive method.
根据本申请的另一方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如上方面所述的广播消息的发送方法、接收方法。According to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the at least one piece of program , the code set or the instruction set is loaded and executed by the processor to implement the method for sending and receiving broadcast messages as described in the above aspects.
根据本申请的另一方面,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述可选实现方式中提供的广播消息的发送方法、接收方法。According to another aspect of the present application, there is provided a computer program product comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods for sending and receiving broadcast messages provided in the foregoing optional implementations.
本申请实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided in the embodiments of the present application include at least:
为广播消息中的目标字段设置子字段组合,子字段组合可以随着广播消息的业务场景而动态改变,由于子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,且子字段集合包括目标字段预定义的子字段,则可以使得目标字段适应于当前的业务场景,并且包括尽量少的子字段,从而提高广播消息的表达效率。Set the subfield combination for the target field in the broadcast message. The subfield combination can be dynamically changed according to the business scenario of the broadcast message. Since the subfield combination is a combination format of at least one subfield in the subfield set, and the subfield combination The field set includes predefined subfields of the target field, so that the target field can be adapted to the current business scenario and include as few subfields as possible, thereby improving the expression efficiency of broadcast messages.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1是本申请一个示例性实施例提供的实施环境的示意图;FIG. 1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
图2是本申请一个示例性实施例提供的广播消息的发送方法的流程图;2 is a flowchart of a method for sending a broadcast message provided by an exemplary embodiment of the present application;
图3是本申请一个示例性实施例提供的头标识子字段的二进制格式的示意图;3 is a schematic diagram of a binary format of a header identification subfield provided by an exemplary embodiment of the present application;
图4是本申请一个示例性实施例提供的状态子字段的二进制格式的示意图;4 is a schematic diagram of a binary format of a status subfield provided by an exemplary embodiment of the present application;
图5是本申请一个示例性实施例提供的自定义数据字段的示意图;5 is a schematic diagram of a custom data field provided by an exemplary embodiment of the present application;
图6是本申请一个示例性实施例提供的自定义数据字段的示意图;6 is a schematic diagram of a custom data field provided by an exemplary embodiment of the present application;
图7是本申请一个示例性实施例提供的广播消息的接收方法的流程图;7 is a flowchart of a method for receiving a broadcast message provided by an exemplary embodiment of the present application;
图8是本申请一个示例性实施例提供的广播消息的发送装置的结构框图;8 is a structural block diagram of an apparatus for sending a broadcast message provided by an exemplary embodiment of the present application;
图9是本申请一个示例性实施例提供的广播消息的接收装置的结构框图;9 is a structural block diagram of an apparatus for receiving a broadcast message provided by an exemplary embodiment of the present application;
图10是本申请一个示例性实施例提供的广播消息的发送设备的结构框图;10 is a structural block diagram of a device for sending a broadcast message provided by an exemplary embodiment of the present application;
图11是本申请一个示例性实施例提供的广播消息的接收设备的结构框图。FIG. 11 is a structural block diagram of a device for receiving a broadcast message provided by an exemplary embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
图1示出了本申请一个实施例提供的实施环境的示意图。该实施环境可以包括:第一设备10和第二设备20。FIG. 1 shows a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment may include: a first device 10 and a second device 20 .
应用BLE技术的蓝牙设备可以分为主设备和从设备。其中,从设备可以发送广播消息进行设备发现,主设备可以发起主动连接;或者从设备以广播消息的形式向主设备发送业务 数据,主设备可以通过扫描接收来自从设备的广播消息。Bluetooth devices using BLE technology can be divided into master devices and slave devices. Among them, the slave device can send a broadcast message for device discovery, and the master device can initiate an active connection; or the slave device can send service data to the master device in the form of a broadcast message, and the master device can scan and receive broadcast messages from the slave device.
第一设备10是广播消息的发送设备,属于从设备,广播消息通过蓝牙Beacon形式进行广播。第一设备10可以是智能手机、平板电脑、智能家电(比如智能音箱、智能冰箱、智能空调等等)、可穿戴式智能设备(比如智能眼镜、智能手表等等)、智能传感器(比如温度传感器、门窗传感器等等),本申请实施例并不对第一设备10的设备类型进行限定。The first device 10 is a sending device of a broadcast message and belongs to a slave device, and the broadcast message is broadcast in the form of a Bluetooth Beacon. The first device 10 may be a smart phone, a tablet computer, a smart home appliance (such as a smart speaker, a smart refrigerator, a smart air conditioner, etc.), a wearable smart device (such as a smart glasses, a smart watch, etc.), a smart sensor (such as a temperature sensor, etc.) , door and window sensor, etc.), the embodiment of the present application does not limit the device type of the first device 10 .
第二设备20是广播消息的接收设备,属于主设备。第二设备20可以是智能手机、平板电脑、智能家电(比如智能音箱、智能冰箱、智能空调等等)、可穿戴式智能设备(比如智能眼镜、智能手表等等)、智能传感器(比如温度传感器、门窗传感器等等),本申请实施例并不对第二设备20的设备类型进行限定。The second device 20 is a receiving device of the broadcast message and belongs to the master device. The second device 20 may be a smart phone, a tablet computer, a smart home appliance (such as a smart speaker, a smart refrigerator, a smart air conditioner, etc.), a wearable smart device (such as a smart glasses, a smart watch, etc.), a smart sensor (such as a temperature sensor, etc.) , door and window sensor, etc.), the embodiment of the present application does not limit the device type of the second device 20 .
如图1所示,以第一设备10是智能家电,第二设备20是智能手机进行示例性的说明。As shown in FIG. 1 , the first device 10 is a smart home appliance, and the second device 20 is a smart phone for exemplary illustration.
在本申请实施例中,还可以包括云端30。云端30是对蓝牙设备(包括第一设备10和第二设备20)进行管理的服务器。用户可以使用第二设备20在云端30注册家庭帐号,第一设备10和第二设备20均添加至该家庭帐号。第一设备10和第二设备20之间形成家庭通讯网络,通过该家庭通讯网络,设备之间可以进行蓝牙通讯。可以理解的是,云端30提供的功能也可以在本地进行实现,本申请实施例对此不进行限制。In this embodiment of the present application, the cloud 30 may also be included. The cloud 30 is a server that manages the Bluetooth devices (including the first device 10 and the second device 20 ). The user can use the second device 20 to register a family account in the cloud 30, and both the first device 10 and the second device 20 are added to the family account. A home communication network is formed between the first device 10 and the second device 20, and through the home communication network, Bluetooth communication can be performed between the devices. It can be understood that the functions provided by the cloud 30 can also be implemented locally, which is not limited in this embodiment of the present application.
示例性的,云端30为该家庭帐号分配一个家庭地址。第一设备发送的广播消息可以携带家庭地址,使得该广播消息可以被第二设备20获取,或被家庭通讯网络中的其他设备获取。Exemplarily, the cloud 30 assigns a home address to the home account. The broadcast message sent by the first device may carry a home address, so that the broadcast message can be acquired by the second device 20 or acquired by other devices in the home communication network.
图2示出了本申请一个示例性实施例提供的广播消息的发送方法的流程图,该方法可以应用于如图1所示的第一设备中,第一设备是一种蓝牙Beacon设备。该方法可以包括如下步骤:FIG. 2 shows a flowchart of a method for sending a broadcast message provided by an exemplary embodiment of the present application. The method can be applied to the first device shown in FIG. 1 , where the first device is a Bluetooth Beacon device. The method may include the following steps:
步骤210,确定广播消息对应的业务场景,广播消息是蓝牙Beacon设备对应的广播消息。Step 210: Determine a service scenario corresponding to the broadcast message, where the broadcast message is a broadcast message corresponding to the Bluetooth Beacon device.
广播消息是适用于蓝牙Beacon协议的广播消息。A broadcast message is a broadcast message for the Bluetooth Beacon protocol.
业务场景是蓝牙Beacon设备在进行广播消息发送时,用于描述此次广播发送所对应的目的的信息。示例性的,业务场景可以是蓝牙Beacon设备进行设备发现。示例性的,业务场景可以是蓝牙Beacon设备发送业务数据。The service scenario is the information used by the Bluetooth Beacon device to describe the purpose corresponding to the broadcast transmission when the Bluetooth Beacon device transmits the broadcast message. Exemplarily, the service scenario may be that a Bluetooth Beacon device performs device discovery. Exemplarily, the service scenario may be that a Bluetooth Beacon device sends service data.
在可能的实现方式中,蓝牙Beacon设备预先定义有若干个业务场景,每次即将进行广播消息发送时,蓝牙Beacon设备在预先定义好的若干个业务场景中确定该广播消息对应的业务场景。In a possible implementation manner, the Bluetooth Beacon device predefines several service scenarios, and each time a broadcast message is about to be sent, the Bluetooth Beacon device determines the service scenario corresponding to the broadcast message from several predefined service scenarios.
步骤220,根据业务场景,确定广播消息中的目标字段对应的子字段组合。Step 220: Determine the subfield combination corresponding to the target field in the broadcast message according to the service scenario.
子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,子字段集合包括目标字段预定义的子字段。The subfield combination is a combination format in which at least one subfield in the subfield set is combined, and the subfield set includes the subfields predefined by the target field.
广播消息可以被划分为若干个字段,每个字段用于描述广播消息一个方面的信息。其中,每个字段对应的长度、定义可以是在标准中定义好的,如:长度为m个字节,定义表示描述某一方面的信息。目标字段是广播消息的多个字段中的一个字段,目标字段对应的子字段组合随业务场景而动态改变。A broadcast message can be divided into several fields, each of which is used to describe one aspect of the broadcast message. The length and definition corresponding to each field may be defined in the standard, for example, the length is m bytes, and the definition represents information describing a certain aspect. The target field is one of multiple fields in the broadcast message, and the combination of subfields corresponding to the target field changes dynamically according to business scenarios.
子字段是对目标字段进行进一步划分后形成的字段。目标字段的子字段集合中可以包括预定义的x个子字段,子字段组合中包括x个子字段中的y个子字段,x和y均为正整数,y不大于x。目标字段对应的子字段组合随业务场景的不同而改变,也就是说,目标字段包括的子字段的数量、子字段的种类、子字段的排列顺序中的至少一种随业务场景的不同而改变。A subfield is a field formed by further dividing the target field. The subfield set of the target field may include predefined x subfields, the subfield combination includes y subfields of the x subfields, both x and y are positive integers, and y is not greater than x. The combination of subfields corresponding to the target field varies with different business scenarios, that is, at least one of the number of subfields included in the target field, the types of subfields, and the arrangement order of subfields varies with different business scenarios .
示例性的,子字段集合包括:子字段1、子字段2、子字段3、子字段4和子字段5。在业务场景是业务场景a时,子字段组合将子字段1和子字段2进行组合;在业务场景是业务场景b时,子字段组合将子字段1、子字段3和子字段4进行组合;在业务场景是业务场景c时,子字段组合将子字段1和子字段5进行组合。Exemplarily, the subfield set includes: subfield 1 , subfield 2 , subfield 3 , subfield 4 and subfield 5 . When the business scenario is business scenario a, the subfield combination combines subfield 1 and subfield 2; when the business scenario is business scenario b, the subfield combination combines subfield 1, subfield 3 and subfield 4; in the business scenario When the scenario is business scenario c, the subfield combination combines subfield 1 and subfield 5.
可以理解的是,同一业务场景可以对应于一种或多种子字段组合,同一个子字段组合也 可以对应于不同的业务场景,本申请实施例对此不进行限制。It can be understood that the same service scenario may correspond to one or more combinations of subfields, and the same combination of subfields may also correspond to different service scenarios, which are not limited in this embodiment of the present application.
在可能的实现方式中,蓝牙Beacon设备存储有业务场景与子字段组合的映射关系表,在确定业务场景后,在映射关系表中查询对应的子字段组合。In a possible implementation manner, the Bluetooth Beacon device stores a mapping relationship table of the combination of business scenarios and subfields, and after determining the business scenario, the corresponding subfield combination is queried in the mapping relationship table.
步骤230,发送广播消息,广播消息中的目标字段采用子字段组合。In step 230, a broadcast message is sent, and the target field in the broadcast message adopts a combination of subfields.
在蓝牙Beacon设备确定好子字段组合后,采用子字段组合的组合格式组装目标字段,并发送包括目标字段的广播消息。After the Bluetooth Beacon device determines the subfield combination, it assembles the target field in the combination format of the subfield combination, and sends a broadcast message including the target field.
综上所述,本实施例提供的方法,为广播消息中的目标字段设置子字段组合,子字段组合可以随着广播消息的业务场景而动态改变,由于子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,且子字段集合包括目标字段预定义的子字段,则可以使得目标字段适应于当前的业务场景,并且包括尽量少的子字段,从而提高广播消息的表达效率。To sum up, in the method provided in this embodiment, a subfield combination is set for the target field in the broadcast message, and the subfield combination can be dynamically changed according to the service scenario of the broadcast message. A combination format in which at least one subfield is combined, and the subfield set includes subfields predefined by the target field, the target field can be adapted to the current business scenario, and include as few subfields as possible, thereby improving the expression efficiency of broadcast messages .
在基于图2的可选实施例中,广播消息可以包括如表一所示的字段:In an optional embodiment based on FIG. 2, the broadcast message may include fields as shown in Table 1:
表一Table I
Figure PCTCN2021110875-appb-000001
Figure PCTCN2021110875-appb-000001
如表一所示,字节(n+7)-(n+8)是服务通用唯一识别码(Universally Unique Identifier,UUID)字段。在示意性实施例中,广播消息中包括服务UUID字段,服务UUID字段为固定值。固定值可以是如表一所示的“0xFD70”。通过“0xFD70”,标识本申请实施例中的广播消息的格式。示例性的,在对端的第二设备接收到广播消息后,可以根据“0xFD70”,确定广播消息采用如表一所示的格式,且目标字段对应有子字段组合,子字段组合是随业务场景而动态改变的。As shown in Table 1, bytes (n+7)-(n+8) are the service Universal Unique Identifier (UUID) field. In an exemplary embodiment, the broadcast message includes a service UUID field, and the service UUID field is a fixed value. The fixed value can be "0xFD70" as shown in Table 1. Through "0xFD70", the format of the broadcast message in the embodiment of the present application is identified. Exemplarily, after the second device of the opposite end receives the broadcast message, it can be determined according to "0xFD70" that the broadcast message adopts the format shown in Table 1, and the target field corresponds to a combination of subfields, and the combination of subfields depends on the service scenario. And dynamically changed.
如表一所示,字节(n+9)-(m+n+8)对应的字段为自定义数据字段。自定义数据字段是由不同的提供蓝牙服务的平台进行自定义的字段。As shown in Table 1, the fields corresponding to bytes (n+9)-(m+n+8) are custom data fields. Custom data fields are fields that are customized by different platforms that provide Bluetooth services.
在示意性实施例中,目标字段是自定义数据字段。In an illustrative embodiment, the target field is a custom data field.
在示意性实施例中,子字段集合包括:头标识子字段、状态子字段、产品标识子字段、媒体访问控制(Media Access Control,MAC)子字段、地址子字段和抽象数据子字段。In an exemplary embodiment, the set of subfields includes: a header identification subfield, a status subfield, a product identification subfield, a Media Access Control (MAC) subfield, an address subfield, and an abstract data subfield.
在示意性实施例中,子字段集合中的子字段的发送顺序依次为:头标识子字段、状态子字段、产品标识子字段、MAC子字段、地址子字段和抽象数据子字段。In an exemplary embodiment, the transmission order of the subfields in the subfield set is: header identification subfield, status subfield, product identification subfield, MAC subfield, address subfield and abstract data subfield.
示例性的,头标识子字段可以表示为Head Flags,状态子字段可以表示为Status,产品标 识子字段可以表示为PID,MAC子字段可以表示为MAC Part,地址子字段可以表示为Address,抽象数据子字段可以表示为Abstract Data。结合参考如下表二所示的自定义数据字段:Exemplarily, the header identification subfield may be expressed as Head Flags, the status subfield may be expressed as Status, the product identification subfield may be expressed as PID, the MAC subfield may be expressed as MAC Part, the address subfield may be expressed as Address, the abstract data Subfields can be represented as Abstract Data. Combined with the custom data fields shown in Table 2 below:
表二Table II
Figure PCTCN2021110875-appb-000002
Figure PCTCN2021110875-appb-000002
一、头标识子字段,用于指示广播消息的对应的子字段组合,头标识子字段是子字段组合中的必选子字段。1. The header identification subfield is used to indicate the corresponding subfield combination of the broadcast message, and the header identification subfield is a mandatory subfield in the subfield combination.
头标识子字段是子字段组合中的必选子字段,可以理解为:蓝牙Beacon设备将包括头标识子字段在内的至少一个子字段进行组合,构成目标字段。由于头标识子字段用于指示广播消息的对应的子字段组合,所以目标字段中必须包括头标识子字段。The header identification subfield is a mandatory subfield in the subfield combination, which can be understood as: the Bluetooth Beacon device combines at least one subfield including the header identification subfield to form a target field. Since the header identification subfield is used to indicate the corresponding subfield combination of the broadcast message, the header identification subfield must be included in the target field.
示例性的,对端的第二设备在接收到广播消息后,在头标识子字段在广播消息中的位置是已知的情况下,第二设备可以根据头标识子字段,确定子字段组合,从而正确解析目标字段。所以,头标识子字段也可以理解为表一中所备注的“此字段决定广播数据格式定义”。Exemplarily, after receiving the broadcast message, the second device at the opposite end can determine the combination of subfields according to the header identification subfield in the case that the location of the header identification subfield in the broadcast message is known, so that The target field is parsed correctly. Therefore, the header identification subfield can also be understood as "this field determines the broadcast data format definition" remarked in Table 1.
在示意性实施例中,头标识子字段包括如下标志位中的至少一种:家庭广播标志位、家庭通讯需求标志位、版本标志位和预留标志位。In an exemplary embodiment, the header identification subfield includes at least one of the following flags: a home broadcast flag, a home communication requirement flag, a version flag, and a reserved flag.
示例性的,家庭广播标志位可以表示为H,家庭通讯需求标志位可以表示为C,版本标志位可以表示为ver,预留标志位可以表示为R。结合参考如下表三所示的头标识子字段:Exemplarily, the home broadcast flag may be represented as H, the home communication requirement flag may be represented as C, the version flag may be represented as ver, and the reserved flag may be represented as R. Combined with reference to the header identification subfield shown in Table 3 below:
表三Table 3
Figure PCTCN2021110875-appb-000003
Figure PCTCN2021110875-appb-000003
1)家庭广播标志位,用于指示广播消息是否进行家庭广播,家庭广播指的是在家庭通信网络内进行的广播。1) The home broadcast flag bit is used to indicate whether the broadcast message is home broadcast, and home broadcast refers to the broadcast performed in the home communication network.
家庭通信网络是由添加至同一个家庭帐号的蓝牙设备所构成的网络。蓝牙Beacon设备完 成添加到家庭帐号后,即可加入家庭通信网络。在加入家庭通信网络后,蓝牙Beacon设备能够进行家庭广播。A home communication network is a network composed of Bluetooth devices added to the same home account. After the Bluetooth Beacon device is added to the home account, it can join the home communication network. After joining the home communication network, the Bluetooth Beacon device is capable of home broadcast.
示例性的,当H的值为0时,表明为非家庭广播。此时,广播消息不是在家庭通信网络内进行的广播,广播消息不携带地址子字段。此时,蓝牙Beacon设备的业务场景可以是设备发现场景。此时,子字段组合可以为第一子字段组合,头标识子字段和状态子字段是第一子字段组合中的必选子字段,产品标识子字段和MAC子字段是第一子字段组合中的可选子字段。Exemplarily, when the value of H is 0, it indicates non-home broadcast. At this time, the broadcast message is not broadcast in the home communication network, and the broadcast message does not carry an address subfield. At this time, the service scenario of the Bluetooth Beacon device may be a device discovery scenario. In this case, the subfield combination can be the first subfield combination, the header identification subfield and the status subfield are mandatory subfields in the first subfield combination, and the product identification subfield and the MAC subfield are the first subfield combination. optional subfield of .
示例性的,当H的值为1时,表明为家庭广播。此时,广播消息是在家庭通信网络内进行的广播,广播消息携带地址子字段。此时,蓝牙Beacon设备的业务场景可以是业务数据发送场景。此时,子字段组合可以为第二子字段组合,头标识子字段、地址子字段和抽象数据子字段是第二子字段组合中的必选子字段。Exemplarily, when the value of H is 1, it indicates home broadcasting. At this time, the broadcast message is broadcast in the home communication network, and the broadcast message carries an address subfield. At this time, the service scenario of the Bluetooth Beacon device may be a service data sending scenario. In this case, the subfield combination may be the second subfield combination, and the header identification subfield, the address subfield and the abstract data subfield are mandatory subfields in the second subfield combination.
2)家庭通讯需求标志位,用于指示蓝牙Beacon设备是否有家庭通讯需求,家庭通讯需求指的是蓝牙Beacon设备在家庭通信网络内存在与其他设备进行通讯的需求。2) The home communication requirement flag bit is used to indicate whether the Bluetooth Beacon device has a home communication requirement. The home communication requirement refers to the requirement of the Bluetooth Beacon device to communicate with other devices in the home communication network.
可以理解的是,在家庭广播标志位指示为家庭广播时,可以继续通过家庭通讯需求标志位,指示进行家庭广播的蓝牙Beacon设备是否有家庭通讯需求。It can be understood that, when the home broadcast flag indicates that the home broadcast is home broadcast, the home communication requirement flag bit may continue to be used to indicate whether the Bluetooth Beacon device performing the home broadcast has a home communication requirement.
示例性的,当C的值为0时,表明为没有家庭通讯需求。此时,蓝牙Beacon设备不期待与其他设备进行通讯。例如:温度计将自身测到的温度通过广播消息发送给手机,此时,温度计只需发送数据,没有家庭通讯需求。Exemplarily, when the value of C is 0, it indicates that there is no need for home communication. At this point, the Bluetooth Beacon device does not expect to communicate with other devices. For example, the thermometer sends the temperature measured by itself to the mobile phone through a broadcast message. At this time, the thermometer only needs to send data, and there is no need for home communication.
示例性的,当C的值为1时,表明为有家庭通讯需求。此时,蓝牙Beacon设备期待与其他设备进行通讯。在蓝牙Beacon设备需要获取一些信息时,则家庭通讯需求标志位指示蓝牙Beacon设备有家庭通讯需求。Exemplarily, when the value of C is 1, it indicates that there is a need for home communication. At this point, the Bluetooth Beacon device expects to communicate with other devices. When the Bluetooth Beacon device needs to obtain some information, the home communication requirement flag indicates that the Bluetooth Beacon device has a home communication requirement.
在示意性实施例中,响应于广播消息的业务场景是请求校时场景,子字段组合中包括头标识子字段,头标识子字段中的家庭通讯需求标志位指示蓝牙Beacon设备有家庭通讯需求。例如:音箱设备将校时请求消息通过广播发送给蓝牙网关,请求蓝牙网关对自己发起连接进行校时,此时,音箱设备有家庭通讯需求。In an exemplary embodiment, in response to the service scenario of the broadcast message being a time-checking request scenario, the subfield combination includes a header identification subfield, and the home communication requirement flag in the header identification subfield indicates that the Bluetooth Beacon device has a home communication requirement. For example, the speaker device broadcasts a time-checking request message to the Bluetooth gateway, and requests the Bluetooth gateway to initiate a connection to itself to perform time-checking. At this time, the speaker device has home communication needs.
3)版本标志位,用于指示广播消息所对应的蓝牙Beacon协议的当前版本。3) The version flag bit is used to indicate the current version of the Bluetooth Beacon protocol corresponding to the broadcast message.
版本标志位指示的版本可以从0开始,在版本进行更新时,将原来的版本增1。The version indicated by the version flag bit can start from 0, and the original version is incremented by 1 when the version is updated.
4)预留标志位。4) Reserved flag bits.
预留标志位可以填0。The reserved flag can be filled with 0.
上述4种标志位的二进制格式可以参照图3。在其他可能的实现方式中,上述4种标志位在头标识子字段中的比特位置可以与图3不同,本申请实施例对此不进行限制。For the binary formats of the above four flag bits, please refer to FIG. 3 . In other possible implementation manners, the bit positions of the foregoing four flag bits in the header identification subfield may be different from those in FIG. 3 , which are not limited in this embodiment of the present application.
二、状态子字段,用于指示蓝牙Beacon设备的设备能力状态。2. The state subfield is used to indicate the device capability state of the Bluetooth Beacon device.
示例性的,如表二所示,在广播消息的类型是可连接广播时,状态子字段是子字段组合中的必选子字段。此时,蓝牙Beacon设备通过状态子字段,告知其他设备自身的设备能力状态,方便后续进行连接。Exemplarily, as shown in Table 2, when the type of the broadcast message is connectable broadcast, the status subfield is a mandatory subfield in the subfield combination. At this time, the Bluetooth Beacon device informs other devices of their own device capability status through the status subfield, which is convenient for subsequent connection.
在示意性实施例中,状态子字段包括如下标志位中的至少一种:配对标志位、产品标识指示标志位、MAC指示标志位、加密标志位和预留标志位。In an exemplary embodiment, the status subfield includes at least one of the following flag bits: a pairing flag bit, a product identification indicator bit, a MAC indicator bit, an encryption flag bit, and a reserved flag bit.
示例性的,配对标志位可以表示为G,产品标识指示标志位可以表示为P,MAC指示标志位可以表示为M,加密标志位可以表示为E,预留标志位可以表示为Resv。结合参考如下表四所示的状态子字段:Exemplarily, the pairing flag may be represented as G, the product identification indication flag may be represented as P, the MAC indication flag may be represented as M, the encryption flag may be represented as E, and the reserved flag may be represented as Resv. Combined with reference to the status subfields shown in Table 4 below:
表四Table 4
Figure PCTCN2021110875-appb-000004
Figure PCTCN2021110875-appb-000004
Figure PCTCN2021110875-appb-000005
Figure PCTCN2021110875-appb-000005
1)配对标志位,用于指示蓝牙Beacon设备是否允许配对。1) Pairing flag bit, used to indicate whether the Bluetooth Beacon device allows pairing.
示例性的,当G的值为0时,表明蓝牙Beacon设备拒绝配对。如:在第二设备接收到广播消息后,当G的值为0时,则不在本地的可配对列表中添加蓝牙Beacon设备。Exemplarily, when the value of G is 0, it indicates that the Bluetooth Beacon device refuses to pair. For example, after the second device receives the broadcast message, when the value of G is 0, the Bluetooth Beacon device is not added to the local pairable list.
示例性的,当C的值为1时,表明蓝牙Beacon设备允许配对。如:在第二设备接收到广播消息后,当G的值为1时,则在本地的可配对列表中添加蓝牙Beacon设备。Exemplarily, when the value of C is 1, it indicates that the Bluetooth Beacon device allows pairing. For example, after the second device receives the broadcast message, when the value of G is 1, the Bluetooth Beacon device is added to the local pairable list.
2)产品标识指示标志位,用于指示子字段组合中是否包含产品标识子字段。2) The product identification indication flag bit, which is used to indicate whether the product identification subfield is included in the subfield combination.
示例性的,当P的值为0时,表明子字段组合中不包含产品标识子字段。Exemplarily, when the value of P is 0, it indicates that the product identification subfield is not included in the subfield combination.
示例性的,当P的值为1时,表明子字段组合中包含产品标识子字段。Exemplarily, when the value of P is 1, it indicates that the product identification subfield is included in the subfield combination.
3)MAC指示标志位,用于指示子字段组合中是否包含MAC子字段。3) The MAC indication flag bit is used to indicate whether the subfield combination contains the MAC subfield.
示例性的,当M的值为0时,表明子字段组合中不包含MAC子字段。Exemplarily, when the value of M is 0, it indicates that the subfield combination does not include the MAC subfield.
示例性的,当M的值为1时,表明子字段组合中包含MAC子字段。Exemplarily, when the value of M is 1, it indicates that the subfield combination includes the MAC subfield.
4)加密标志位,用于指示抽象数据子字段是否加密。4) Encryption flag bit, used to indicate whether the abstract data subfield is encrypted.
示例性的,当E的值为0时,表明抽象数据子字段不加密。Exemplarily, when the value of E is 0, it indicates that the abstract data subfield is not encrypted.
示例性的,当E的值为1时,表明抽象数据子字段加密。Exemplarily, when the value of E is 1, it indicates that the abstract data subfield is encrypted.
在一种可能的实现方式中,加密方式已经事先约定。在另一种可能的实现方式中,加密方式通过广播消息中的其他标志位指示给第二设备。In a possible implementation manner, the encryption method has been agreed in advance. In another possible implementation manner, the encryption method is indicated to the second device through other flag bits in the broadcast message.
5)预留标志位。5) Reserved flag bit.
预留标志位可以填0。The reserved flag can be filled with 0.
上述5种标志位的二进制格式可以参照图4。在其他可能的实现方式中,上述5种标志位在状态子字段中的比特位置可以与图4不同,本申请实施例对此不进行限制。For the binary format of the above five flag bits, please refer to FIG. 4 . In other possible implementation manners, the bit positions of the above five flag bits in the status subfield may be different from those in FIG. 4 , which are not limited in this embodiment of the present application.
三、产品标识子字段,用于指示蓝牙Beacon设备对应的产品。3. The product identification subfield is used to indicate the product corresponding to the Bluetooth Beacon device.
每个产品对应于一个产品标识(Product Identifier,PID)。通过产品标识子字段,第二设备可以确定蓝牙Beacon设备的产品类型。Each product corresponds to a Product Identifier (PID). Through the product identification subfield, the second device can determine the product type of the Bluetooth Beacon device.
蓝牙Beacon设备可以是不同类型的产品,如:智能手机、平板电脑、智能家电(比如智能音箱、智能冰箱、智能空调等等)、可穿戴式智能设备(比如智能眼镜、智能手表等等)、智能传感器(比如温度传感器、门窗传感器等等)。示例性的,如表二所示,在蓝牙Beacon设备发送绑定广播的情况下,为了让第二设备能够确定蓝牙Beacon设备的产品类型,产品标识子字段是子字段组合中的必选子字段。并且,绑定流程可以由产品标识子字段所定义,即不同的产品类型可以对应于不同的绑定流程。Bluetooth Beacon devices can be different types of products, such as: smartphones, tablet computers, smart home appliances (such as smart speakers, smart refrigerators, smart air conditioners, etc.), wearable smart devices (such as smart glasses, smart watches, etc.), Smart sensors (such as temperature sensors, door and window sensors, etc.). Exemplarily, as shown in Table 2, when the Bluetooth Beacon device sends a binding broadcast, in order for the second device to determine the product type of the Bluetooth Beacon device, the product identification subfield is a mandatory subfield in the subfield combination. . Moreover, the binding process can be defined by the product identification subfield, that is, different product types can correspond to different binding processes.
在可能的实现方式中,产品标识子字段采用大端字节序。字节序是指多字节数据所对应的各字节的存储顺序。在大端字节序(Big Endian)中,高位字节在前,低位字节在后。例如,产品标识子字段的数值是0x2211,使用两个字节储存:高位字节是0x22,低位字节是0x11。In a possible implementation, the product identification subfield is in big-endian byte order. Byte order refers to the storage order of each byte corresponding to multi-byte data. In Big Endian, the high-order byte comes first and the low-order byte follows. For example, the value of the product identification subfield is 0x2211, which is stored in two bytes: the high-order byte is 0x22, and the low-order byte is 0x11.
四、MAC子字段,用于指示蓝牙Beacon设备对应的全部或部分MAC地址。Fourth, the MAC subfield is used to indicate all or part of the MAC address corresponding to the Bluetooth Beacon device.
通过产品标识子字段可以识别一类产品类型的蓝牙设备,而通过MAC子字段,可以再精确到一类蓝牙设备中的一个蓝牙设备。示例性的,在绑定流程中需要精确对应设备时,MAC子字段是子字段组合中的必选子字段。Through the product identification subfield, a Bluetooth device of a product type can be identified, and through the MAC subfield, it can be further refined to a Bluetooth device in a class of Bluetooth devices. Exemplarily, when the exact corresponding device is required in the binding process, the MAC subfield is a mandatory subfield in the subfield combination.
在可能的实现方式中,MAC子字段包括蓝牙Beacon设备MAC最低两个字节数据,最低两个字节数据采用大端字节序。如:当蓝牙Beacon设备支持wifi和BLE时,MAC子字段 可以为wifi的MAC后两个字节;当蓝牙Beacon设备仅支持BLE时,MAC子字段可以为BLE的MAC后两个字节。In a possible implementation manner, the MAC subfield includes the data of the lowest two bytes of the MAC of the Bluetooth Beacon device, and the data of the lowest two bytes is in big-endian byte order. For example: when the Bluetooth Beacon device supports wifi and BLE, the MAC subfield can be the last two bytes of the wifi MAC; when the Bluetooth Beacon device only supports BLE, the MAC subfield can be the last two bytes of the BLE MAC.
五、地址子字段,用于指示蓝牙Beacon设备所绑定的家庭通信网络对应的家庭地址。5. The address subfield is used to indicate the home address corresponding to the home communication network to which the Bluetooth Beacon device is bound.
家庭地址是提供蓝牙管理服务的云端为家庭帐号分配的地址。示例性的,在蓝牙Beacon设备加入家庭帐号对应的家庭通信网络后,可以获取家庭帐号相关的信息,如:身份信息和安全信息,身份信息可以包括家庭地址。The home address is the address assigned to the home account by the cloud that provides the Bluetooth management service. Exemplarily, after the Bluetooth Beacon device joins the home communication network corresponding to the home account, information related to the home account, such as identity information and security information, may be obtained, and the identity information may include a home address.
示例性的,如表二所示,在蓝牙Beacon设备加入家庭通信网络后,地址子字段是子字段组合中的必选子字段。Exemplarily, as shown in Table 2, after the Bluetooth Beacon device joins the home communication network, the address subfield is a mandatory subfield in the subfield combination.
在可能的实现方式中,地址子字段包括蓝牙Beacon设备的家庭地址最低两个字节数据,最低两个字节数据采用大端字节序。In a possible implementation manner, the address subfield includes the data of the lowest two bytes of the home address of the Bluetooth Beacon device, and the data of the lowest two bytes is in big-endian byte order.
六、抽象数据子字段,用于指示广播消息中携带的数据。6. The abstract data subfield is used to indicate the data carried in the broadcast message.
示例性的,如表二所示,在蓝牙Beacon设备广播业务数据时,抽象数据子字段是子字段组合中的必选子字段。Exemplarily, as shown in Table 2, when the Bluetooth Beacon device broadcasts service data, the abstract data subfield is a mandatory subfield in the subfield combination.
在示意性实施例中,抽象数据子字段包括如下字节中的至少一种:第一字节、属性实例标识集字节、长度字节和数据字节,第一字节包括:类型标志位和服务实例标识标志位。In an exemplary embodiment, the abstract data subfield includes at least one of the following bytes: a first byte, an attribute instance identification set byte, a length byte and a data byte, the first byte includes: a type flag bit and the service instance identification flag.
示例性的,类型标志位可以表示为type,服务实例标识标志位可以表示为SIID,属性实例标识集字节可以表示为IIDs,长度字节可以表示为Length,数据字节可以表示为Data。结合参考如下表五所示的抽象数据子字段:Exemplarily, the type flag may be represented as type, the service instance identifier flag may be represented as SIID, the attribute instance identifier set byte may be represented as IIDs, the length byte may be represented as Length, and the data byte may be represented as Data. Combined with reference to the abstract data subfields shown in Table 5 below:
表五Table 5
Figure PCTCN2021110875-appb-000006
Figure PCTCN2021110875-appb-000006
1)第一字节,第一字节包括:类型标志位和服务实例标识标志位,类型标志位用于指示抽象数据子字段的类型,服务实例标志位用于指示蓝牙Beacon设备支持提供的服务。1) The first byte, the first byte includes: the type flag bit and the service instance flag bit, the type flag bit is used to indicate the type of the abstract data subfield, and the service instance flag bit is used to indicate the service provided by the Bluetooth Beacon device. .
抽象数据子字段的类型可以包括:事件通知和属性值中的一种。事件通知指的是抽象数据子字段可以描述满足预先设定好的条件的事件。如:在门窗传感器检测到在异常时间段发生了开关事件的情况下,抽象数据子字段的类型为事件通知。属性值指的是抽象数据子字段可以描述与蓝牙Beacon设备本身有关的性质。如:温度计测得温度为26度,温度计上报测量的温度,抽象数据子字段的类型为属性值。The type of abstract data subfield can include: one of event notification and attribute value. Event notifications refer to abstract data subfields that describe events that meet pre-set conditions. For example, when the door and window sensor detects that a switch event occurs during an abnormal time period, the type of the abstract data subfield is event notification. The attribute value refers to the properties of the abstract data subfield that can describe the Bluetooth Beacon device itself. For example, the temperature measured by the thermometer is 26 degrees, the thermometer reports the measured temperature, and the type of the abstract data subfield is the attribute value.
示例性的,当类型标志位的值为0时,表明抽象数据子字段的类型为属性值。示例性的,当类型标志位的值为1时,表明抽象数据子字段的类型为事件通知。Exemplarily, when the value of the type flag bit is 0, it indicates that the type of the abstract data subfield is an attribute value. Exemplarily, when the value of the type flag bit is 1, it indicates that the type of the abstract data subfield is event notification.
蓝牙Beacon设备可以对应有一个能力集合,能力集合中包括蓝牙Beacon设备所支持提供的服务。服务实例标识(Service Instance ID,SIID)标志位用于指示蓝牙Beacon设备支持提供的服务。示例性的,蓝牙Beacon设备是电风扇,则服务可以包括:风机、电池、开关。示例性的,如表五所示,服务实例标识标志位可以包括7个比特,能够指示128种不同的服务。A Bluetooth Beacon device may correspond to a capability set, and the capability set includes services supported and provided by the Bluetooth Beacon device. The Service Instance ID (SIID) flag is used to indicate the service provided by the Bluetooth Beacon device. Exemplarily, if the Bluetooth Beacon device is an electric fan, the service may include: a fan, a battery, and a switch. Exemplarily, as shown in Table 5, the service instance identification flag may include 7 bits, which can indicate 128 different services.
2)属性实例标识集字节,用于指示服务实例标志位中指示的服务对应的属性。2) The attribute instance identification set byte is used to indicate the attribute corresponding to the service indicated in the service instance flag bit.
一个服务可以对应于若干个属性,属性实例标识集(Property Instance IDs,IIDs)字节用于指示服务对应的属性。示例性的,蓝牙Beacon设备是电风扇,则服务可以包括:风机和电池。对于服务“风机”,属性可以是转向、转速等;对于服务“电池”’,属性可以是电量,损耗程度等。A service can correspond to several properties, and the property instance IDs (Property Instance IDs, IIDs) bytes are used to indicate the properties corresponding to the service. Exemplarily, if the Bluetooth Beacon device is an electric fan, the service may include: a fan and a battery. For the service "fan", the attributes can be steering, rotational speed, etc.; for the service "battery", the attributes can be power, loss level, etc.
示例性的,如表五所示,对于属性实例标识集字节中的任意一个字节,比特7用于指示下一字节是否还是属性实例标识,如:0表明不是,1表明是;比特6-0用于指示属性。Exemplarily, as shown in Table 5, for any byte in the attribute instance identification set bytes, bit 7 is used to indicate whether the next byte is still an attribute instance identification, such as: 0 indicates no, 1 indicates yes; bit 6-0 is used to indicate attributes.
3)长度字节,用于指示数据字节的长度。3) The length byte is used to indicate the length of the data byte.
4)数据字节,用于描述与服务对应的属性。4) Data bytes, used to describe attributes corresponding to the service.
示例性的,对于服务“风机”,属性可以是转向、转速,数据字节用于描述转向、转速所对应的值。在服务实例标识标志位包括7个比特,能够指示128种不同的服务的情况下,数据字节的表达内容相应的拓展为128种。Exemplarily, for the service "fan", the attributes may be steering and rotational speed, and the data bytes are used to describe the values corresponding to the steering and rotational speed. In the case that the service instance identification flag bit includes 7 bits and can indicate 128 different services, the expression content of the data byte is correspondingly expanded to 128 kinds.
针对如上所述的自定义数据字段和子字段集合中的子字段,下面对不同业务场景下的子字段组合进行示例性的说明。For the above-mentioned custom data fields and subfields in the subfield set, an exemplary description of subfield combinations in different business scenarios is given below.
在示意性实施例中,业务场景包括:设备发现场景;则步骤220可以包括:根据设备发现场景,确定自定义数据字段对应的子字段组合为第一子字段组合。In an exemplary embodiment, the service scenario includes: a device discovery scenario; then step 220 may include: according to the device discovery scenario, determining a combination of subfields corresponding to the custom data field as a first combination of subfields.
其中,头标识子字段和状态子字段是第一子字段组合中的必选子字段,产品标识子字段和MAC子字段是第一子字段组合中的可选子字段。The header identification subfield and the status subfield are mandatory subfields in the first subfield combination, and the product identification subfield and the MAC subfield are optional subfields in the first subfield combination.
第一子字段组合下的自定义数据字段可以包括:头标识子字段、状态子字段、产品标识子字段和MAC子字段中的至少一种。自定义数据字段可能包括:头标识子字段和状态子字段;或,头标识子字段、状态子字段和产品标识子字段;或,头标识子字段、状态子字段和MAC子字段;或,头标识子字段、状态子字段、产品标识子字段和MAC子字段。The custom data fields under the first subfield combination may include at least one of a header identification subfield, a status subfield, a product identification subfield, and a MAC subfield. Custom data fields may include: header identification subfield and status subfield; or header identification subfield, status subfield and product identification subfield; or header identification subfield, status subfield and MAC subfield; or header identification subfield, status subfield and MAC subfield Identification subfield, status subfield, product identification subfield, and MAC subfield.
示例性的,如图5中的(a)所示,自定义数据字段包括:头标识子字段501、状态子字段502和产品标识子字段503。如图5中的(b)所示,自定义数据字段包括:头标识子字段501、状态子字段502、产品标识子字段503和MAC子字段504。Exemplarily, as shown in (a) of FIG. 5 , the custom data field includes: a header identification subfield 501 , a status subfield 502 and a product identification subfield 503 . As shown in (b) of FIG. 5 , the custom data field includes: a header identification subfield 501 , a status subfield 502 , a product identification subfield 503 and a MAC subfield 504 .
可以理解的是,上述仅对第一子字段组合进行了示例性的说明,第一子字段组合中也有可能包括其他可选子字段或必选子字段,如:第一子字段组合中的可选子字段还可以包括抽象数据子字段,本申请实施例对此不进行限制。It can be understood that the above only exemplifies the first subfield combination, and the first subfield combination may also include other optional subfields or required subfields, such as: optional subfields in the first subfield combination. The selection subfield may also include an abstract data subfield, which is not limited in this embodiment of the present application.
在示意性实施例中,业务场景包括:业务数据发送场景;则步骤220可以包括:根据业务数据发送场景,确定自定义数据字段对应的子字段组合为第二子字段组合。In an exemplary embodiment, the service scenario includes: a service data sending scenario; then step 220 may include: determining, according to the service data sending scenario, a combination of subfields corresponding to the custom data field as a second combination of subfields.
其中,头标识子字段、地址子字段和抽象数据子字段是第二子字段组合中的必选子字段。示例性的,如图6所示,自定义数据字段包括:头标识子字段601、地址子字段602和抽象数据子字段603。The header identification subfield, the address subfield and the abstract data subfield are mandatory subfields in the second subfield combination. Exemplarily, as shown in FIG. 6 , the custom data field includes: a header identification subfield 601 , an address subfield 602 and an abstract data subfield 603 .
可以理解的是,上述仅对第二子字段组合进行了示例性的说明,第二子字段组合中也有可能包括其他可选子字段或必选子字段,本申请实施例对此不进行限制。It can be understood that the above only exemplifies the second subfield combination, and the second subfield combination may also include other optional subfields or mandatory subfields, which are not limited in this embodiment of the present application.
综上所述,本实施例提供的方法,目标字段可以是自定义数据字段,通过对自定义数据字段进行重新定义,明确了自定义数据字段对应的子字段,使得可以动态调整自定义数据字段以适应于业务场景,提高广播消息的表达效率。To sum up, in the method provided in this embodiment, the target field can be a custom data field, and by redefining the custom data field, the subfields corresponding to the custom data field are clarified, so that the custom data field can be dynamically adjusted In order to adapt to business scenarios and improve the expression efficiency of broadcast messages.
同时,本实施例提供的方法,服务UUID字段为固定值,由于可以根据服务UUID字段筛选出对应于本实施例示出的广播消息,有利于对端的第二设备确定该广播消息的身份,从而正确的解析广播消息。At the same time, in the method provided by this embodiment, the service UUID field is a fixed value. Since the broadcast message corresponding to this embodiment can be filtered out according to the service UUID field, it is helpful for the second device of the opposite end to determine the identity of the broadcast message, so that the correct parsed broadcast messages.
同时,本实施例提供的方法,引入了服务实例标识标志位,由于抽象数据子字段中的数据字节用于描述与服务对应的属性,在服务实例标识标志位可以指示多种服务的情况下,数据字节也相应的可以描述多种服务,扩展了数据字节的表达内容。At the same time, the method provided by this embodiment introduces the service instance identification flag bit. Since the data bytes in the abstract data subfield are used to describe the attributes corresponding to the service, in the case that the service instance identification flag bit can indicate multiple services , the data bytes can also describe a variety of services correspondingly, expanding the expression content of the data bytes.
在示意性实施例中,针对如上所述的广播消息,制定了下述发送规则:In an exemplary embodiment, for the broadcast message as described above, the following transmission rules are formulated:
第一、在业务场景包括设备发现场景时,以可连接广播的广播类型发送广播消息。First, when the service scenario includes a device discovery scenario, a broadcast message is sent in a broadcast type that can be connected to broadcast.
广播类型可以包括:可连接广播、不可连接广播、可扫描广播和定向广播。Broadcast types can include: connectable broadcasts, non-connectable broadcasts, scannable broadcasts, and directed broadcasts.
在业务场景是设备发现场景的情况下,蓝牙Beacon设备以可连接广播的广播类型发送广播消息。其中,可连接广播允许其他设备对其进行响应并与之建立蓝牙连接。When the service scenario is a device discovery scenario, the Bluetooth Beacon device sends a broadcast message in a broadcast type that can be connected to broadcast. Among them, the connectable broadcast allows other devices to respond to it and establish a Bluetooth connection with it.
第二、在业务场景包括业务数据发送场景时,以不可连接广播的广播类型和可扫描广播的广播类型中的一种,发送广播消息。Second, when the service scenario includes a service data sending scenario, a broadcast message is sent in one of the broadcast type of non-connectable broadcast and the broadcast type of scannable broadcast.
在业务场景是业务数据发送场景的情况下,蓝牙Beacon设备以不可连接广播(或可扫描广播)的广播类型发送广播消息。When the service scenario is a service data sending scenario, the Bluetooth Beacon device sends a broadcast message in a broadcast type of non-connectable broadcast (or scannable broadcast).
其中,不可连接广播(ADV_NONCONN_IND)会忽略响应消息和连接请求,可扫描广播(ADV_IND/ADV_SCAN_IND)允许其他设备对广播消息进行扫描。Among them, the non-connectable broadcast (ADV_NONCONN_IND) ignores the response message and connection request, and the scannable broadcast (ADV_IND/ADV_SCAN_IND) allows other devices to scan the broadcast message.
在示意性实施例中,蓝牙Beacon设备确定广播消息的数据长度;响应于数据长度不大于单个广播包支持的数据长度,以不可连接广播的广播类型发送广播消息;响应于数据长度大于单个广播包支持的数据长度,以可扫描广播的广播类型发送部分广播消息,再以扫描响应的广播类型发送剩余的广播消息。In an exemplary embodiment, the Bluetooth Beacon device determines the data length of the broadcast message; in response to the data length being no greater than the data length supported by a single broadcast packet, the broadcast message is sent in a broadcast type of non-connectable broadcast; in response to the data length being greater than a single broadcast packet Supported data length, send part of the broadcast message with the broadcast type that can scan broadcast, and then send the rest of the broadcast message with the broadcast type of scan response.
可扫描广播的报文协议可以包括3个报文:SCAN_IND,SCAN_REQ以及SCAN_REP。其中,SCAN_IND是由第一设备向第二设备发送的,SCAN_REQ是由第二设备向第一设备回应的报文,SCAN_REP(即扫描响应)是第一设备收到第二设备的回应报文后向第二设备发送的扫描响应报文。在数据长度大于单个广播包支持的数据长度时,蓝牙Beacon设备通过SCAN_IND以及SCAN_REP,分两次发送广播消息,从而将广播消息完整的发送出去。The scannable broadcast message protocol can include 3 messages: SCAN_IND, SCAN_REQ and SCAN_REP. Among them, SCAN_IND is sent by the first device to the second device, SCAN_REQ is the message responded by the second device to the first device, and SCAN_REP (ie scan response) is the first device after receiving the response message from the second device Scan response message sent to the second device. When the data length is greater than the data length supported by a single broadcast packet, the Bluetooth Beacon device sends the broadcast message twice through SCAN_IND and SCAN_REP, so as to send the broadcast message completely.
第三、在业务场景包括请求校时场景时,以可连接广播的广播类型发送广播消息。Third, when the business scenario includes a time-checking request scenario, a broadcast message is sent in a broadcast type that can be connected to broadcast.
通过以可连接广播的广播类型发送广播消息,蓝牙Beacon设备可以后续建立连接,接收校时有关的信息。By sending a broadcast message in a broadcast type that can be connected to broadcast, the Bluetooth Beacon device can subsequently establish a connection and receive information about school time.
综上所述,本实施例提供的方法,为不同的业务场景,设定与之匹配的广播类型,有利于提高通信的效率。To sum up, in the method provided in this embodiment, matching broadcast types are set for different service scenarios, which is beneficial to improve the efficiency of communication.
图7示出了本申请一个示例性实施例提供的广播消息的接收方法的流程图,该方法可以应用于如图1所示的第二设备中。该方法可以包括如下步骤:FIG. 7 shows a flowchart of a method for receiving a broadcast message provided by an exemplary embodiment of the present application, and the method can be applied to the second device shown in FIG. 1 . The method may include the following steps:
步骤710,接收蓝牙Beacon设备发送的广播消息。Step 710: Receive a broadcast message sent by the Bluetooth Beacon device.
步骤720,确定广播消息中的目标字段对应的子字段组合。Step 720: Determine the subfield combination corresponding to the target field in the broadcast message.
子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,子字段集合包括目标字段预定义的子字段。子字段是对目标字段进行进一步划分后形成的字段,目标字段的子字段集合中可以包括预定义的x个子字段,子字段组合中包括x个子字段中的y个子字段,x和y均为正整数,y不大于x。The subfield combination is a combination format in which at least one subfield in the subfield set is combined, and the subfield set includes the subfields predefined by the target field. The subfield is a field formed by further dividing the target field. The subfield set of the target field can include predefined x subfields, and the subfield combination includes y subfields in the x subfields. Both x and y are positive. Integer, y is not greater than x.
子字段组合是蓝牙Beacon设备根据业务场景确定的。业务场景是蓝牙Beacon设备在进行广播消息发送时,用于描述此次广播发送所对应的目的的信息。示例性的,业务场景可以是蓝牙Beacon设备进行设备发现。示例性的,业务场景可以是蓝牙设备发送业务数据。The subfield combination is determined by the Bluetooth Beacon device according to the service scenario. The service scenario is the information used by the Bluetooth Beacon device to describe the purpose corresponding to the broadcast transmission when the Bluetooth Beacon device transmits the broadcast message. Exemplarily, the service scenario may be that a Bluetooth Beacon device performs device discovery. Exemplarily, the service scenario may be that a Bluetooth device sends service data.
目标字段对应的子字段组合随业务场景的不同而改变,也就是说,目标字段包括的子字段的数量、子字段的种类、子字段的排列顺序中的至少一种随业务场景的不同而改变。示例性的,子字段集合包括:子字段1、子字段2、子字段3、子字段4和子字段5。在业务场景是业务场景a时,子字段组合将子字段1和子字段2进行组合;在业务场景是业务场景b时,子字段组合将子字段1、子字段3和子字段4进行组合;在业务场景是业务场景c时,子字段组合将子字段1和子字段5进行组合。The combination of subfields corresponding to the target field varies with different business scenarios, that is, at least one of the number of subfields included in the target field, the types of subfields, and the arrangement order of subfields varies with different business scenarios . Exemplarily, the subfield set includes: subfield 1 , subfield 2 , subfield 3 , subfield 4 and subfield 5 . When the business scenario is business scenario a, the subfield combination combines subfield 1 and subfield 2; when the business scenario is business scenario b, the subfield combination combines subfield 1, subfield 3 and subfield 4; in the business scenario When the scenario is business scenario c, the subfield combination combines subfield 1 and subfield 5.
步骤730,根据子字段组合,解析广播消息中的目标字段。Step 730: Parse the target field in the broadcast message according to the subfield combination.
由于子字段组合规定了目标字段的组合格式,则第二设备根据子字段组合,解析接收到的广播消息中的目标字段。Since the subfield combination specifies the combination format of the target field, the second device parses the target field in the received broadcast message according to the subfield combination.
综上所述,本实施例提供的方法,为广播消息中的目标字段设置子字段组合,子字段组合可以随着广播消息的业务场景而动态改变,由于子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,且子字段集合包括目标字段预定义的子字段,则可以使得目标字段适应于当前的业务场景,并且包括尽量少的子字段,从而提高广播消息的表达效率。To sum up, in the method provided in this embodiment, a subfield combination is set for the target field in the broadcast message, and the subfield combination can be dynamically changed according to the service scenario of the broadcast message. A combination format in which at least one subfield is combined, and the subfield set includes subfields predefined by the target field, so that the target field can be adapted to the current business scenario and include as few subfields as possible, thereby improving the expression efficiency of broadcast messages .
在示意性实施例中,广播消息中包括服务通用唯一识别码UUID字段,服务UUID字段为固定值。In an exemplary embodiment, the broadcast message includes a service UUID field, and the service UUID field is a fixed value.
在示意性实施例中,目标字段包括:自定义数据字段;子字段集合包括:头标识子字段、状态子字段、产品标识子字段、MAC子字段、地址子字段和抽象数据子字段。In an exemplary embodiment, the target field includes: a custom data field; the set of subfields includes: a header identification subfield, a status subfield, a product identification subfield, a MAC subfield, an address subfield, and an abstract data subfield.
在示意性实施例中,子字段集合中的子字段的接收顺序依次为:头标识子字段、状态子字段、产品标识子字段、MAC子字段、地址子字段和抽象数据子字段。In an exemplary embodiment, the receiving order of the subfields in the subfield set is: header identification subfield, status subfield, product identification subfield, MAC subfield, address subfield and abstract data subfield.
一、头标识子字段,用于指示广播消息的对应的子字段组合,头标识子字段是子字段组合中的必选子字段。1. The header identification subfield is used to indicate the corresponding subfield combination of the broadcast message, and the header identification subfield is a mandatory subfield in the subfield combination.
在示意性实施例中,头标识子字段包括如下标志位中的至少一种:家庭广播标志位、家庭通讯需求标志位、版本标志位和预留标志位。In an exemplary embodiment, the header identification subfield includes at least one of the following flags: a home broadcast flag, a home communication requirement flag, a version flag, and a reserved flag.
1)家庭广播标志位,用于指示广播消息是否进行家庭广播,家庭广播指的是在家庭通信网络内进行的广播。1) The home broadcast flag bit is used to indicate whether the broadcast message is home broadcast, and home broadcast refers to the broadcast performed in the home communication network.
2)家庭通讯需求标志位,用于指示蓝牙Beacon设备是否有家庭通讯需求,家庭通讯需求指的是蓝牙Beacon设备在家庭通信网络内存在与其他设备进行通讯的需求。2) The home communication requirement flag bit is used to indicate whether the Bluetooth Beacon device has a home communication requirement. The home communication requirement refers to the requirement of the Bluetooth Beacon device to communicate with other devices in the home communication network.
3)版本标志位,用于指示广播消息所对应的蓝牙Beacon协议的当前版本。3) The version flag bit is used to indicate the current version of the Bluetooth Beacon protocol corresponding to the broadcast message.
4)预留标志位。4) Reserved flag bits.
二、状态子字段,用于指示蓝牙Beacon设备的设备能力状态。2. The state subfield is used to indicate the device capability state of the Bluetooth Beacon device.
在示例性实施例中,状态子字段包括如下标志位中的至少一种:配对标志位、产品标识指示标志位、MAC指示标志位、加密标志位和预留标志位。In an exemplary embodiment, the status subfield includes at least one of the following flags: a pairing flag, a product identification indication flag, a MAC indication flag, an encryption flag, and a reserved flag.
1)配对标志位,用于指示蓝牙Beacon设备是否允许配对。1) Pairing flag bit, used to indicate whether the Bluetooth Beacon device allows pairing.
2)产品标识指示标志位,用于指示子字段组合中是否包含产品标识子字段。2) The product identification indication flag bit, which is used to indicate whether the product identification subfield is included in the subfield combination.
3)MAC指示标志位,用于指示子字段组合中是否包含MAC子字段。3) The MAC indication flag bit is used to indicate whether the subfield combination contains the MAC subfield.
4)加密标志位,用于指示抽象数据子字段是否加密。4) Encryption flag bit, used to indicate whether the abstract data subfield is encrypted.
5)预留标志位。5) Reserved flag bit.
三、产品标识子字段,用于指示蓝牙Beacon设备对应的产品。3. The product identification subfield is used to indicate the product corresponding to the Bluetooth Beacon device.
四、MAC子字段,用于指示蓝牙Beacon设备对应的全部或部分MAC地址。Fourth, the MAC subfield is used to indicate all or part of the MAC address corresponding to the Bluetooth Beacon device.
五、地址子字段,用于指示蓝牙Beacon设备所绑定的家庭通信网络对应的家庭地址。5. The address subfield is used to indicate the home address corresponding to the home communication network to which the Bluetooth Beacon device is bound.
六、抽象数据子字段,用于指示广播消息中携带的数据。6. The abstract data subfield is used to indicate the data carried in the broadcast message.
在示意性实施例中,抽象数据子字段包括如下字节中的至少一种:第一字节、属性实例标识集字节、长度字节和数据字节,第一字节包括:类型标志位和服务实例标识标志位。In an exemplary embodiment, the abstract data subfield includes at least one of the following bytes: a first byte, an attribute instance identification set byte, a length byte and a data byte, the first byte includes: a type flag bit and the service instance identification flag.
1)第一字节,第一字节包括:类型标志位和服务实例标识标志位,类型标志位用于指示抽象数据子字段的类型,服务实例标志位用于指示蓝牙Beacon设备支持提供的服务。1) The first byte, the first byte includes: the type flag bit and the service instance flag bit, the type flag bit is used to indicate the type of the abstract data subfield, and the service instance flag bit is used to indicate the service provided by the Bluetooth Beacon device. .
2)属性实例标识集字节,用于指示服务实例标志位中指示的服务对应的属性。2) The attribute instance identification set byte is used to indicate the attribute corresponding to the service indicated in the service instance flag bit.
3)长度字节,用于指示数据字节的长度。3) The length byte is used to indicate the length of the data byte.
4)数据字节,用于描述与服务对应的属性。4) Data bytes, used to describe attributes corresponding to the service.
针对如上所述的自定义数据字段和子字段集合中的子字段,可见上文实施例,在此不进行赘述。For the above-mentioned custom data fields and subfields in the subfield set, the above embodiments can be seen, and details are not described here.
在示意性实施例中,步骤720可以包括:根据广播消息中的头标识子字段和状态子字段中的至少一种,确定子字段组合。In an exemplary embodiment, step 720 may include: determining a subfield combination according to at least one of a header identification subfield and a status subfield in the broadcast message.
头标识子字段是子字段组合的必选子字段,且头标识子字段在自定义数据字段中的顺序 是定义好的,使得第二设备可以正确的解析广播消息中的头标识子字段。在正确解析头标识子字段后,第二设备可以根据头标识子字段,或者,根据头标识子字段和状态子字段,确定子字段组合。The header identification subfield is a mandatory subfield of the subfield combination, and the sequence of the header identification subfield in the custom data field is defined, so that the second device can correctly parse the header identification subfield in the broadcast message. After correctly parsing the header identification subfield, the second device may determine the subfield combination according to the header identification subfield, or according to the header identification subfield and the status subfield.
在示意性实施例中,第二设备根据头标识子字段中的家庭广播标志位,确定子字段组合。In an exemplary embodiment, the second device determines the subfield combination according to the home broadcast flag bit in the header identification subfield.
在一种可能的实现方式中,响应于家庭广播标志位指示为家庭广播,确定子字段组合为第一子字段组合,头标识子字段和状态子字段是第一子字段组合中的必选子字段,产品标识子字段和MAC子字段是第一子字段组合中的可选子字段;根据状态子字段,确定第一子字段组合中是否还包括产品标识子字段、MAC子字段。In a possible implementation manner, in response to the home broadcast flag indicating that it is home broadcast, it is determined that the subfield combination is the first subfield combination, and the header identification subfield and the status subfield are mandatory in the first subfield combination field, the product identification subfield and the MAC subfield are optional subfields in the first subfield combination; according to the status subfield, it is determined whether the first subfield combination also includes the product identification subfield and the MAC subfield.
在家庭广播标志位指示为家庭广播的情况下,子字段组合是第一子字段组合,第一子字段组合中包括必选的头标识子字段和状态子字段,且头标识子字段和状态子字段在自定义数据字段中的顺序是定义好的,则第二设备可以正确的解析头标识子字段和状态子字段。之后,第二设备根据状态子字段中的产品标识指示标志位和MAC指示标志位,确定第一子字段组合中是否还包括产品标识子字段、MAC子字段。In the case where the home broadcast flag indicates home broadcast, the subfield combination is the first subfield combination, and the first subfield combination includes the mandatory header identification subfield and status subfield, and the header identification subfield and the status subfield If the order of the fields in the custom data field is defined, the second device can correctly parse the header identification subfield and the status subfield. Afterwards, the second device determines whether the first subfield combination further includes the product identification subfield and the MAC subfield according to the product identification indication flag bit and the MAC indication flag bit in the status subfield.
在另一种可能的实现方式中,响应于家庭广播标志位指示为非家庭广播,确定子字段组合为第二子字段组合,头标识子字段、地址子字段和抽象数据子字段是第二子字段组合中的必选子字段。In another possible implementation manner, in response to the home broadcast flag indicating non-home broadcast, it is determined that the subfield combination is the second subfield combination, and the header identification subfield, the address subfield and the abstract data subfield are the second subfield. Mandatory subfield in the field combination.
在家庭广播标志位指示为非家庭广播的情况下,子字段组合是第二子字段组合,第二子字段组合中包括必选的头标识子字段、地址子字段和抽象数据子字段,且上述3个子字段在自定义数据字段中的顺序是定义好的,则第二设备可以正确的解析包括上述3个子字段的自定义数据字段。In the case where the home broadcast flag indicates non-home broadcast, the subfield combination is the second subfield combination, and the second subfield combination includes the mandatory header identification subfield, address subfield and abstract data subfield, and the above If the order of the three subfields in the custom data field is defined, the second device can correctly parse the custom data field including the above three subfields.
综上所述,本申请实施例提供的方法,第二设备可以根据广播消息中的头标识子字段和状态子字段中的至少一种,确定子字段组合,从而正确的对目标字段进行解析。To sum up, in the method provided by the embodiment of the present application, the second device can determine the subfield combination according to at least one of the header identification subfield and the status subfield in the broadcast message, so as to correctly parse the target field.
图8是本申请一个示例性实施例提供的广播消息的发送装置的结构框图,该装置包括:第一确定模块801和发送模块802;FIG. 8 is a structural block diagram of an apparatus for sending a broadcast message provided by an exemplary embodiment of the present application. The apparatus includes: a first determining module 801 and a sending module 802;
第一确定模块801,用于确定广播消息对应的业务场景,广播消息是蓝牙Beacon设备对应的广播消息;The first determining module 801 is configured to determine a service scenario corresponding to a broadcast message, where the broadcast message is a broadcast message corresponding to a Bluetooth Beacon device;
第一确定模块801,用于根据业务场景,确定广播消息中的目标字段对应的子字段组合,子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,子字段集合包括目标字段预定义的子字段;The first determining module 801 is configured to determine the subfield combination corresponding to the target field in the broadcast message according to the business scenario, the subfield combination is a combination format in which at least one subfield in the subfield set is combined, and the subfield set includes the target Field predefined subfields;
发送模块802,用于发送广播消息,广播消息中的目标字段采用子字段组合。The sending module 802 is configured to send a broadcast message, and the target field in the broadcast message adopts a combination of subfields.
在一个可选的实施例中,目标字段包括:自定义数据字段;子字段集合包括:In an optional embodiment, the target field includes: a custom data field; the set of subfields includes:
头标识子字段,用于指示广播消息的对应的子字段组合,头标识子字段是子字段组合中的必选子字段;The header identification subfield is used to indicate the corresponding subfield combination of the broadcast message, and the header identification subfield is a required subfield in the subfield combination;
状态子字段,用于指示蓝牙Beacon设备的设备能力状态;The status subfield is used to indicate the device capability status of the Bluetooth Beacon device;
产品标识子字段,用于指示蓝牙Beacon设备对应的产品;Product identification subfield, used to indicate the product corresponding to the Bluetooth Beacon device;
MAC子字段,用于指示蓝牙Beacon设备对应的全部或部分MAC地址;The MAC subfield is used to indicate all or part of the MAC address corresponding to the Bluetooth Beacon device;
地址子字段,用于指示蓝牙Beacon设备所绑定的家庭通信网络对应的家庭地址;The address subfield is used to indicate the home address corresponding to the home communication network to which the Bluetooth Beacon device is bound;
抽象数据子字段,用于指示广播消息中携带的数据。Abstract data subfield used to indicate the data carried in the broadcast message.
在一个可选的实施例中,业务场景包括:设备发现场景;第一确定模块801,用于根据设备发现场景,确定自定义数据字段对应的子字段组合为第一子字段组合;其中,头标识子字段和状态子字段是第一子字段组合中的必选子字段,产品标识子字段和MAC子字段是第一子字段组合中的可选子字段。In an optional embodiment, the business scenario includes: a device discovery scenario; a first determination module 801, configured to determine, according to the device discovery scenario, a combination of subfields corresponding to the custom data field as a first combination of subfields; wherein the header The identification subfield and the status subfield are mandatory subfields in the first subfield combination, and the product identification subfield and the MAC subfield are optional subfields in the first subfield combination.
在一个可选的实施例中,发送模块802,用于以可连接广播的广播类型发送广播消息。In an optional embodiment, the sending module 802 is configured to send a broadcast message in a broadcast type that can be connected to broadcast.
在一个可选的实施例中,业务场景包括:业务数据发送场景;第一确定模块801,用于 根据业务数据发送场景,确定自定义数据字段对应的子字段组合为第二子字段组合;其中,头标识子字段、地址子字段和抽象数据子字段是第二子字段组合中的必选子字段。In an optional embodiment, the business scenario includes: a business data sending scenario; a first determining module 801 is configured to determine, according to the business data sending scenario, a combination of subfields corresponding to the custom data field as a second combination of subfields; wherein , the header identification subfield, the address subfield and the abstract data subfield are mandatory subfields in the second subfield combination.
在一个可选的实施例中,发送模块802,用于以不可连接广播的广播类型和可扫描广播的广播类型中的一种,发送广播消息。In an optional embodiment, the sending module 802 is configured to send the broadcast message in one of the broadcast type of non-connectable broadcast and the broadcast type of scannable broadcast.
在一个可选的实施例中,第一确定模块801,用于确定广播消息的数据长度;发送模块802,用于响应于数据长度不大于单个广播包支持的数据长度,以不可连接广播的广播类型发送广播消息;发送模块802,用于响应于数据长度大于单个广播包支持的数据长度,以可扫描广播的广播类型发送部分广播消息,再以扫描响应的广播类型发送剩余的广播消息。In an optional embodiment, the first determining module 801 is configured to determine the data length of the broadcast message; the sending module 802 is configured to respond that the data length is not greater than the data length supported by a single broadcast packet, with the broadcast message that cannot be connected to the broadcast. The sending module 802 is configured to send part of the broadcast message in the broadcast type that can scan broadcast in response to the data length being larger than the data length supported by a single broadcast packet, and then send the remaining broadcast message in the broadcast type of the scan response.
在一个可选的实施例中,头标识子字段包括如下标志位中的至少一种:In an optional embodiment, the header identification subfield includes at least one of the following flag bits:
家庭广播标志位,用于指示广播消息是否进行家庭广播,家庭广播指的是在家庭通信网络内进行的广播;The home broadcast flag bit is used to indicate whether the broadcast message is home broadcast, and home broadcast refers to the broadcast carried out in the home communication network;
家庭通讯需求标志位,用于指示蓝牙Beacon设备是否有家庭通讯需求,家庭通讯需求指的是蓝牙Beacon设备在家庭通信网络内存在与其他设备进行通讯的需求;The home communication demand flag is used to indicate whether the Bluetooth Beacon device has home communication needs. The home communication demand refers to the need for the Bluetooth Beacon device to communicate with other devices in the home communication network;
版本标志位,用于指示广播消息所对应的蓝牙Beacon协议的当前版本;The version flag bit is used to indicate the current version of the Bluetooth Beacon protocol corresponding to the broadcast message;
预留标志位。reserved flags.
在一个可选的实施例中,响应于广播消息的业务场景是请求校时场景,子字段组合中包括头标识子字段,头标识子字段中的家庭通讯需求标志位指示蓝牙Beacon设备有家庭通讯需求。In an optional embodiment, in response to the service scenario of the broadcast message being a time-checking scenario, the subfield combination includes a header identification subfield, and the home communication requirement flag in the header identification subfield indicates that the Bluetooth Beacon device has home communication need.
在一个可选的实施例中,发送模块802,用于以可连接广播的广播类型发送广播消息。In an optional embodiment, the sending module 802 is configured to send a broadcast message in a broadcast type that can be connected to broadcast.
在一个可选的实施例中,状态子字段包括如下标志位中的至少一种:In an optional embodiment, the status subfield includes at least one of the following flags:
配对标志位,用于指示蓝牙Beacon设备是否允许配对;Pairing flag bit, used to indicate whether the Bluetooth Beacon device allows pairing;
产品标识指示标志位,用于指示子字段组合中是否包含产品标识子字段;The product identification indication flag bit is used to indicate whether the product identification subfield is included in the subfield combination;
MAC指示标志位,用于指示子字段组合中是否包含MAC子字段;The MAC indication flag bit is used to indicate whether a MAC subfield is included in the subfield combination;
加密标志位,用于指示抽象数据子字段是否加密;Encryption flag bit, used to indicate whether the abstract data subfield is encrypted;
预留标志位。reserved flags.
在一个可选的实施例中,抽象数据子字段包括如下字节中的至少一种:In an optional embodiment, the abstract data subfield includes at least one of the following bytes:
第一字节,第一字节包括:类型标志位和服务实例标识标志位,类型标志位用于指示抽象数据子字段的类型,服务实例标志位用于指示蓝牙Beacon设备支持提供的服务;The first byte, the first byte includes: a type flag bit and a service instance identification flag bit, the type flag bit is used to indicate the type of the abstract data subfield, and the service instance flag bit is used to indicate the service provided by the Bluetooth Beacon device;
属性实例标识集字节,用于指示服务实例标志位中指示的服务对应的属性;The attribute instance identification set byte is used to indicate the attribute corresponding to the service indicated in the service instance flag bit;
长度字节,用于指示数据字节的长度;length byte, used to indicate the length of the data byte;
数据字节,用于描述与服务对应的属性。Data bytes that describe the properties corresponding to the service.
在一个可选的实施例中,子字段集合中的子字段的发送顺序依次为:头标识子字段、状态子字段、产品标识子字段、MAC子字段、地址子字段和抽象数据子字段。In an optional embodiment, the sending order of the subfields in the subfield set is: header identification subfield, status subfield, product identification subfield, MAC subfield, address subfield, and abstract data subfield.
在一个可选的实施例中,广播消息中包括服务UUID字段,服务UUID字段为固定值。In an optional embodiment, the broadcast message includes a service UUID field, and the service UUID field is a fixed value.
图9是本申请一个示例性实施例提供的广播消息的发送装置的结构框图,该装置包括:接收模块901、第二确定模块902和解析模块903;FIG. 9 is a structural block diagram of an apparatus for sending a broadcast message provided by an exemplary embodiment of the present application. The apparatus includes: a receiving module 901, a second determining module 902, and a parsing module 903;
接收模块901,用于接收蓝牙Beacon设备发送的广播消息;A receiving module 901, configured to receive a broadcast message sent by a Bluetooth Beacon device;
第二确定模块902,用于确定广播消息中的目标字段对应的子字段组合,子字段组合是蓝牙Beacon设备根据业务场景确定的,子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,子字段集合包括目标字段预定义的子字段;The second determination module 902 is configured to determine the subfield combination corresponding to the target field in the broadcast message, the subfield combination is determined by the Bluetooth Beacon device according to the service scenario, and the subfield combination is to combine at least one subfield in the subfield set The combined format of the subfield set includes the subfields predefined by the target field;
解析模块903,用于根据子字段组合,解析广播消息中的目标字段。The parsing module 903 is configured to parse the target field in the broadcast message according to the sub-field combination.
在一个可选的实施例中,目标字段包括:自定义数据字段;子字段集合包括:In an optional embodiment, the target field includes: a custom data field; the set of subfields includes:
头标识子字段,用于指示广播消息的对应的子字段组合,头标识子字段是子字段组合中的必选子字段;The header identification subfield is used to indicate the corresponding subfield combination of the broadcast message, and the header identification subfield is a required subfield in the subfield combination;
状态子字段,用于指示蓝牙Beacon设备的设备能力状态;The status subfield is used to indicate the device capability status of the Bluetooth Beacon device;
产品标识子字段,用于指示蓝牙Beacon设备对应的产品;Product identification subfield, used to indicate the product corresponding to the Bluetooth Beacon device;
MAC子字段,用于指示蓝牙Beacon设备对应的全部或部分MAC地址;The MAC subfield is used to indicate all or part of the MAC address corresponding to the Bluetooth Beacon device;
地址子字段,用于指示蓝牙Beacon设备所绑定的家庭通信网络对应的家庭地址;The address subfield is used to indicate the home address corresponding to the home communication network to which the Bluetooth Beacon device is bound;
抽象数据子字段,用于指示广播消息中携带的数据。Abstract data subfield used to indicate the data carried in the broadcast message.
在一个可选的实施例中,第二确定模块902,用于根据广播消息中的头标识子字段和状态子字段中的至少一种,确定子字段组合。In an optional embodiment, the second determining module 902 is configured to determine the subfield combination according to at least one of the header identification subfield and the status subfield in the broadcast message.
在一个可选的实施例中,头标识子字段包括家庭广播标志位,家庭广播标志位用于指示广播消息是否进行家庭广播,家庭广播指的是在家庭通信网络内进行的广播;第二确定模块902,用于响应于家庭广播标志位指示为家庭广播,确定子字段组合为第一子字段组合,头标识子字段和状态子字段是第一子字段组合中的必选子字段,产品标识子字段和MAC子字段是第一子字段组合中的可选子字段;第二确定模块902,用于根据状态子字段,确定第一子字段组合中是否还包括产品标识子字段、MAC子字段;或,第二确定模块902,用于响应于家庭广播标志位指示为非家庭广播,确定子字段组合为第二子字段组合,头标识子字段、地址子字段和抽象数据子字段是第二子字段组合中的必选子字段。In an optional embodiment, the header identification subfield includes a home broadcast flag bit, and the home broadcast flag bit is used to indicate whether the broadcast message performs home broadcast, and the home broadcast refers to the broadcast performed in the home communication network; the second determination The module 902 is used to determine that the subfield combination is the first subfield combination in response to the home broadcast flag indicating that it is home broadcast, the header identification subfield and the status subfield are mandatory subfields in the first subfield combination, and the product identification The subfield and the MAC subfield are optional subfields in the first subfield combination; the second determination module 902 is configured to determine, according to the status subfield, whether the first subfield combination also includes the product identification subfield and the MAC subfield Or, the second determination module 902 is used to determine that the subfield combination is the second subfield combination in response to the home broadcast flag bit indicating that it is a non-home broadcast, and the header identification subfield, the address subfield and the abstract data subfield are the second subfield combination. Mandatory subfield in the subfield combination.
在一个可选的实施例中,头标识子字段包括家庭广播标志位,家庭广播标志位用于指示广播消息是否进行家庭广播,家庭广播指的是在家庭通信网络内进行的广播;头标识子字段还包括如下标志位中的至少一种:In an optional embodiment, the header identifier subfield includes a home broadcast flag bit, and the home broadcast flag bit is used to indicate whether the broadcast message performs home broadcast, and the home broadcast refers to the broadcast performed in the home communication network; the header identifier subfield The field also includes at least one of the following flags:
家庭通讯需求标志位,用于指示蓝牙Beacon设备是否有家庭通讯需求,家庭通讯需求指的是蓝牙Beacon设备在家庭通信网络内存在与其他设备进行通讯的需求;The home communication demand flag is used to indicate whether the Bluetooth Beacon device has home communication needs. The home communication demand refers to the need for the Bluetooth Beacon device to communicate with other devices in the home communication network;
版本标志位,用于指示广播消息所对应的蓝牙Beacon协议的当前版本;The version flag bit is used to indicate the current version of the Bluetooth Beacon protocol corresponding to the broadcast message;
预留标志位。reserved flags.
在一个可选的实施例中,述状态子字段包括如下标志位中的至少一种:In an optional embodiment, the state subfield includes at least one of the following flags:
配对标志位,用于指示蓝牙Beacon设备是否允许配对;Pairing flag bit, used to indicate whether the Bluetooth Beacon device allows pairing;
产品标识指示标志位,用于指示子字段组合中是否包含产品标识子字段;The product identification indication flag bit is used to indicate whether the product identification subfield is included in the subfield combination;
MAC指示标志位,用于指示子字段组合中是否包含MAC子字段;The MAC indication flag bit is used to indicate whether a MAC subfield is included in the subfield combination;
加密标志位,用于指示抽象数据子字段是否加密;Encryption flag bit, used to indicate whether the abstract data subfield is encrypted;
预留标志位。reserved flags.
在一个可选的实施例中,抽象数据子字段包括如下字节中的至少一种:In an optional embodiment, the abstract data subfield includes at least one of the following bytes:
第一字节,第一字节包括:类型标志位和服务实例标识标志位,类型标志位用于指示抽象数据子字段的类型,服务实例标志位用于指示蓝牙Beacon设备支持提供的服务;The first byte, the first byte includes: a type flag bit and a service instance identification flag bit, the type flag bit is used to indicate the type of the abstract data subfield, and the service instance flag bit is used to indicate the service provided by the Bluetooth Beacon device;
属性实例标识集字节,用于指示服务实例标志位中指示的服务对应的属性;The attribute instance identification set byte is used to indicate the attribute corresponding to the service indicated in the service instance flag bit;
长度字节,用于指示数据字节的长度;length byte, used to indicate the length of the data byte;
数据字节,用于描述与服务对应的属性。Data bytes that describe the properties corresponding to the service.
在一个可选的实施例中,子字段集合中的子字段的接收顺序依次为:头标识子字段、状态子字段、产品标识子字段、MAC子字段、地址子字段和抽象数据子字段。In an optional embodiment, the receiving order of the subfields in the subfield set is: header identification subfield, status subfield, product identification subfield, MAC subfield, address subfield and abstract data subfield.
在一个可选的实施例中,广播消息中包括服务UUID字段,服务UUID字段为固定值。In an optional embodiment, the broadcast message includes a service UUID field, and the service UUID field is a fixed value.
需要说明的是:上述实施例提供的广播消息的发送装置或广播消息的接收装置,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: the apparatus for sending a broadcast message or the apparatus for receiving a broadcast message provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions may be allocated to different functions as required. Module completion means dividing the internal structure of the device into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments, which will not be repeated here.
请参考图10,其示出了本申请一个实施例提供的广播消息的发送设备1000的结构示意图,该广播消息的发送设备1000可以包括:处理器1001、接收器1002、发射器1003、存储 器1004和总线1005。Please refer to FIG. 10 , which shows a schematic structural diagram of a broadcast message sending device 1000 provided by an embodiment of the present application. The broadcast message sending device 1000 may include: a processor 1001 , a receiver 1002 , a transmitter 1003 , and a memory 1004 and bus 1005.
处理器1001包括一个或者一个以上处理核心,处理器1001通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。The processor 1001 includes one or more processing cores, and the processor 1001 executes various functional applications and information processing by running software programs and modules.
接收器1002和发射器1003可以实现为一个通信组件,该通信组件可以是一块通信芯片。The receiver 1002 and the transmitter 1003 may be implemented as a communication component, which may be a communication chip.
存储器1004通过总线1005与处理器1001相连。The memory 1004 is connected to the processor 1001 through the bus 1005 .
存储器1004可用于存储计算机程序,处理器1001用于执行该计算机程序,以实现上述方法实施例中的数据报文处理设备执行的各个步骤。The memory 1004 can be used to store a computer program, and the processor 1001 is used to execute the computer program, so as to implement various steps performed by the data packet processing device in the above method embodiments.
此外,存储器1004可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,易失性或非易失性存储设备包括但不限于:磁盘或光盘,电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM),静态随时存取存储器(Static Random Access Memory,SRAM),只读存储器(Read-Only Memory,ROM),磁存储器,快闪存储器,可编程只读存储器(Programmable Read Only Memory,PROM)。Additionally, memory 1004 may be implemented by any type or combination of volatile or non-volatile storage devices including, but not limited to, magnetic or optical disks, electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (EPROM), Static Random Access Memory (SRAM), Read-Only Memory (Read-Only Memory, ROM), magnetic memory, flash memory, programmable read-only memory (Programmable Read Only Memory, PROM).
在一个可选的实施例中,所述处理器,用于确定广播消息对应的业务场景,所述广播消息是蓝牙Beacon设备对应的广播消息;In an optional embodiment, the processor is configured to determine a service scenario corresponding to a broadcast message, where the broadcast message is a broadcast message corresponding to a Bluetooth Beacon device;
所述处理器,用于根据所述业务场景,确定所述广播消息中的目标字段对应的子字段组合,所述子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,所述子字段集合包括所述目标字段预定义的子字段;The processor is configured to determine, according to the service scenario, a subfield combination corresponding to the target field in the broadcast message, where the subfield combination is a combination format in which at least one subfield in the subfield set is combined, The subfield set includes subfields predefined by the target field;
所述收发器用于发送所述广播消息,所述广播消息中的所述目标字段采用所述子字段组合。The transceiver is configured to send the broadcast message, and the target field in the broadcast message adopts the subfield combination.
请参考图11,其示出了本申请一个实施例提供的广播消息的接收设备1100的结构示意图,该广播消息的接收设备1100可以包括:处理器1101、接收器1102、发射器1103、存储器1104和总线1105。Please refer to FIG. 11 , which shows a schematic structural diagram of a broadcast message receiving device 1100 provided by an embodiment of the present application. The broadcast message receiving device 1100 may include: a processor 1101 , a receiver 1102 , a transmitter 1103 , and a memory 1104 and bus 1105.
处理器1101包括一个或者一个以上处理核心,处理器1101通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。The processor 1101 includes one or more processing cores, and the processor 1101 executes various functional applications and information processing by running software programs and modules.
接收器1102和发射器1103可以实现为一个通信组件,该通信组件可以是一块通信芯片。The receiver 1102 and the transmitter 1103 may be implemented as a communication component, which may be a communication chip.
存储器1104通过总线1105与处理器1101相连。The memory 1104 is connected to the processor 1101 through the bus 1105 .
存储器1104可用于存储计算机程序,处理器1101用于执行该计算机程序,以实现上述方法实施例中的数据报文处理设备执行的各个步骤。The memory 1104 can be used to store a computer program, and the processor 1101 is used to execute the computer program, so as to implement various steps performed by the data packet processing device in the above method embodiments.
此外,存储器1104可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,易失性或非易失性存储设备包括但不限于:磁盘或光盘,电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM),静态随时存取存储器(Static Random Access Memory,SRAM),只读存储器(Read-Only Memory,ROM),磁存储器,快闪存储器,可编程只读存储器(Programmable Read Only Memory,PROM)。Additionally, memory 1104 may be implemented by any type or combination of volatile or non-volatile storage devices including, but not limited to, magnetic or optical disks, electrically erasable and programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (EPROM), Static Random Access Memory (SRAM), Read-Only Memory (Read-Only Memory, ROM), magnetic memory, flash memory, programmable read-only memory (Programmable Read Only Memory, PROM).
在一个可选的实施例中,所述收发器,用于接收广播消息,所述广播消息是蓝牙Beacon设备发送的广播消息;In an optional embodiment, the transceiver is configured to receive a broadcast message, where the broadcast message is a broadcast message sent by a Bluetooth Beacon device;
所述处理器,用于确定所述广播消息中的目标字段对应的子字段组合,所述子字段组合是所述蓝牙Beacon设备根据业务场景确定的,所述子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,所述子字段集合包括所述目标字段预定义的子字段;The processor is configured to determine the subfield combination corresponding to the target field in the broadcast message, the subfield combination is determined by the Bluetooth Beacon device according to the service scenario, and the subfield combination is the combination of the subfield set. A combination format in which at least one subfield is combined, and the subfield set includes the subfield predefined by the target field;
所述处理器,用于根据所述子字段组合,解析所述广播消息中的所述目标字段。The processor is configured to parse the target field in the broadcast message according to the subfield combination.
本申请还提供了一种计算机可读存储介质,所述可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现上述任意示例性实施例所提供的广播消息的发送方法、接收 方法。The present application also provides a computer-readable storage medium, where at least one instruction, at least one piece of program, code set or instruction set is stored in the readable storage medium, the at least one instruction, the at least one piece of program, the at least one piece of program, the The code set or instruction set is loaded and executed by the processor to implement the method for sending and receiving broadcast messages provided by any of the foregoing exemplary embodiments.
本申请实施例提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述可选实现方式中提供的广播消息的发送方法、接收方法。Embodiments of the present application provide a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method for sending and receiving broadcast messages provided in the foregoing optional implementation manners.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection of the present application. within the range.

Claims (27)

  1. 一种广播消息的发送方法,其特征在于,所述方法包括:A method for sending a broadcast message, characterized in that the method comprises:
    确定广播消息对应的业务场景,所述广播消息是蓝牙Beacon设备对应的广播消息;Determine a business scenario corresponding to the broadcast message, where the broadcast message is a broadcast message corresponding to a Bluetooth Beacon device;
    根据所述业务场景,确定所述广播消息中的目标字段对应的子字段组合,所述子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,所述子字段集合包括所述目标字段预定义的子字段;According to the service scenario, determine the subfield combination corresponding to the target field in the broadcast message, where the subfield combination is a combination format of combining at least one subfield in the subfield set, and the subfield set includes all the subfields. Describe the predefined subfields of the target field;
    发送所述广播消息,所述广播消息中的所述目标字段采用所述子字段组合。The broadcast message is sent, and the target field in the broadcast message adopts the subfield combination.
  2. 根据权利要求1所述的方法,其特征在于,所述目标字段包括:自定义数据字段;The method according to claim 1, wherein the target field comprises: a custom data field;
    所述子字段集合包括:The set of subfields includes:
    头标识子字段,用于指示所述广播消息的对应的子字段组合,所述头标识子字段是所述子字段组合中的必选子字段;a header identification subfield, used to indicate a corresponding subfield combination of the broadcast message, and the header identification subfield is a mandatory subfield in the subfield combination;
    状态子字段,用于指示所述蓝牙Beacon设备的设备能力状态;Status subfield, used to indicate the device capability status of the Bluetooth Beacon device;
    产品标识子字段,用于指示所述蓝牙Beacon设备对应的产品;Product identification subfield, used to indicate the product corresponding to the Bluetooth Beacon device;
    媒体访问控制MAC子字段,用于指示所述蓝牙Beacon设备对应的全部或部分MAC地址;The media access control MAC subfield is used to indicate all or part of the MAC address corresponding to the Bluetooth Beacon device;
    地址子字段,用于指示所述蓝牙Beacon设备所绑定的家庭通信网络对应的家庭地址;The address subfield is used to indicate the home address corresponding to the home communication network to which the Bluetooth Beacon device is bound;
    抽象数据子字段,用于指示所述广播消息中携带的数据。The abstract data subfield is used to indicate the data carried in the broadcast message.
  3. 根据权利要求2所述的方法,其特征在于,所述业务场景包括:设备发现场景;The method according to claim 2, wherein the service scenario comprises: a device discovery scenario;
    所述根据所述业务场景,确定所述广播消息中的目标字段对应的子字段组合,包括:Determining, according to the service scenario, the subfield combination corresponding to the target field in the broadcast message, including:
    根据所述设备发现场景,确定所述自定义数据字段对应的所述子字段组合为第一子字段组合;According to the device discovery scenario, determining that the subfield combination corresponding to the custom data field is a first subfield combination;
    其中,所述头标识子字段和所述状态子字段是所述第一子字段组合中的必选子字段,所述产品标识子字段和所述MAC子字段是所述第一子字段组合中的可选子字段。Wherein, the header identification subfield and the status subfield are mandatory subfields in the first subfield combination, and the product identification subfield and the MAC subfield are in the first subfield combination optional subfield of .
  4. 根据权利要求3所述的方法,其特征在于,所述发送所述广播消息,包括:The method according to claim 3, wherein the sending the broadcast message comprises:
    以可连接广播的广播类型发送所述广播消息。The broadcast message is sent in a broadcast-connectable broadcast type.
  5. 根据权利要求2所述的方法,其特征在于,所述业务场景包括:业务数据发送场景;The method according to claim 2, wherein the service scenario comprises: a service data sending scenario;
    所述根据所述业务场景,确定所述广播消息中的目标字段对应的子字段组合,包括:Determining, according to the service scenario, the subfield combination corresponding to the target field in the broadcast message, including:
    根据所述业务数据发送场景,确定所述自定义数据字段对应的所述子字段组合为第二子字段组合;According to the service data sending scenario, determining that the subfield combination corresponding to the custom data field is a second subfield combination;
    其中,所述头标识子字段、所述地址子字段和所述抽象数据子字段是所述第二子字段组合中的必选子字段。Wherein, the header identification subfield, the address subfield and the abstract data subfield are mandatory subfields in the second subfield combination.
  6. 根据权利要求5所述的方法,其特征在于,所述发送所述广播消息,包括:The method according to claim 5, wherein the sending the broadcast message comprises:
    以不可连接广播的广播类型和可扫描广播的广播类型中的一种,发送所述广播消息。The broadcast message is sent in one of a non-connectable broadcast broadcast type and a scannable broadcast broadcast type.
  7. 根据权利要求6所述的方法,其特征在于,所述以不可连接广播的广播类型和可扫描广播的广播类型中的一种,发送所述广播消息,包括:The method according to claim 6, wherein the sending the broadcast message in one of the broadcast type of non-connectable broadcast and the broadcast type of scannable broadcast comprises:
    确定所述广播消息的数据长度;determining the data length of the broadcast message;
    响应于所述数据长度不大于单个广播包支持的数据长度,以不可连接广播的广播类型发送所述广播消息;In response to the data length not being greater than the data length supported by a single broadcast packet, sending the broadcast message in a broadcast type that is not broadcast-connectable;
    响应于所述数据长度大于单个广播包支持的数据长度,以可扫描广播的广播类型发送部分所述广播消息,再以扫描响应的广播类型发送剩余的所述广播消息。In response to the data length being greater than the data length supported by a single broadcast packet, part of the broadcast message is sent in a broadcast type that can scan for broadcast, and the rest of the broadcast message is sent in a broadcast type of scan response.
  8. 根据权利要求2至7任一所述的方法,其特征在于,所述头标识子字段包括如下标志位中的至少一种:The method according to any one of claims 2 to 7, wherein the header identification subfield includes at least one of the following flag bits:
    家庭广播标志位,用于指示所述广播消息是否进行家庭广播,所述家庭广播指的是在所 述家庭通信网络内进行的广播;a home broadcast flag bit, used to indicate whether the broadcast message performs home broadcast, and the home broadcast refers to a broadcast performed in the home communication network;
    家庭通讯需求标志位,用于指示所述蓝牙Beacon设备是否有家庭通讯需求,所述家庭通讯需求指的是所述蓝牙Beacon设备在所述家庭通信网络内存在与其他设备进行通讯的需求;The home communication demand flag bit is used to indicate whether the Bluetooth Beacon device has a home communication demand, and the home communication demand refers to that the Bluetooth Beacon device needs to communicate with other devices in the home communication network;
    版本标志位,用于指示所述广播消息所对应的蓝牙Beacon协议的当前版本;A version flag bit, used to indicate the current version of the Bluetooth Beacon protocol corresponding to the broadcast message;
    预留标志位。reserved flags.
  9. 根据权利要求8的方法,其特征在于,The method according to claim 8, characterized in that:
    响应于所述广播消息的业务场景是请求校时场景,所述子字段组合中包括所述头标识子字段,所述头标识子字段中的所述家庭通讯需求标志位指示所述蓝牙Beacon设备有所述家庭通讯需求。In response to the service scenario of the broadcast message being a time-checking scenario, the subfield combination includes the header identification subfield, and the home communication demand flag bit in the header identification subfield indicates the Bluetooth Beacon device Have the described family communication needs.
  10. 根据权利要求9所述的方法,其特征在于,所述发送所述广播消息,包括:The method according to claim 9, wherein the sending the broadcast message comprises:
    以可连接广播的广播类型发送所述广播消息。The broadcast message is sent in a broadcast-connectable broadcast type.
  11. 根据权利要求2至10任一所述的方法,其特征在于,所述状态子字段包括如下标志位中的至少一种:The method according to any one of claims 2 to 10, wherein the status subfield includes at least one of the following flag bits:
    配对标志位,用于指示所述蓝牙Beacon设备是否允许配对;Pairing flag bit, used to indicate whether the Bluetooth Beacon device allows pairing;
    产品标识指示标志位,用于指示所述子字段组合中是否包含所述产品标识子字段;a product identification indication flag bit, used to indicate whether the product identification subfield is included in the subfield combination;
    MAC指示标志位,用于指示所述子字段组合中是否包含所述MAC子字段;MAC indication flag bit, used to indicate whether the MAC subfield is included in the subfield combination;
    加密标志位,用于指示所述抽象数据子字段是否加密;An encryption flag bit, used to indicate whether the abstract data subfield is encrypted;
    预留标志位。reserved flags.
  12. 根据权利要求2至11任一所述的方法,其特征在于,所述抽象数据子字段包括如下字节中的至少一种:The method according to any one of claims 2 to 11, wherein the abstract data subfield comprises at least one of the following bytes:
    第一字节,所述第一字节包括:类型标志位和服务实例标识标志位,所述类型标志位用于指示所述抽象数据子字段的类型,所述服务实例标志位用于指示所述蓝牙Beacon设备支持提供的服务;The first byte, the first byte includes: a type flag bit and a service instance identification flag bit, the type flag bit is used to indicate the type of the abstract data subfield, and the service instance flag bit is used to indicate the The services provided by the Bluetooth Beacon device support;
    属性实例标识集字节,用于指示所述服务实例标志位中指示的所述服务对应的属性;The attribute instance identification set byte is used to indicate the attribute corresponding to the service indicated in the service instance flag bit;
    长度字节,用于指示数据字节的长度;length byte, used to indicate the length of the data byte;
    所述数据字节,用于描述与所述服务对应的属性。The data byte is used to describe the attribute corresponding to the service.
  13. 根据权利要求2至12任一所述的方法,其特征在于,The method according to any one of claims 2 to 12, wherein,
    所述子字段集合中的子字段的发送顺序依次为:所述头标识子字段、所述状态子字段、所述产品标识子字段、所述MAC子字段、所述地址子字段和所述抽象数据子字段。The order of sending the subfields in the subfield set is: the header identification subfield, the status subfield, the product identification subfield, the MAC subfield, the address subfield and the abstraction Data subfield.
  14. 根据权利要求1至13任一所述的方法,其特征在于,The method according to any one of claims 1 to 13, wherein,
    所述广播消息中包括服务通用唯一识别码UUID字段,所述服务UUID字段为固定值。The broadcast message includes a service universal unique identifier UUID field, and the service UUID field is a fixed value.
  15. 一种广播消息的接收方法,其特征在于,所述方法包括:A method for receiving broadcast messages, characterized in that the method comprises:
    接收蓝牙Beacon设备发送的广播消息;Receive broadcast messages sent by Bluetooth Beacon devices;
    确定所述广播消息中的目标字段对应的子字段组合,所述子字段组合是所述蓝牙Beacon设备根据业务场景确定的,所述子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,所述子字段集合包括所述目标字段预定义的子字段;Determine the subfield combination corresponding to the target field in the broadcast message, the subfield combination is determined by the Bluetooth Beacon device according to the service scenario, and the subfield combination is to combine at least one subfield in the subfield set The combination format, the subfield set includes the predefined subfields of the target field;
    根据所述子字段组合,解析所述广播消息中的所述目标字段。Parse the target field in the broadcast message according to the subfield combination.
  16. 根据权利要求15所述的方法,其特征在于,所述目标字段包括:自定义数据字段;The method according to claim 15, wherein the target field comprises: a custom data field;
    所述子字段集合包括:The set of subfields includes:
    头标识子字段,用于指示所述广播消息的对应的子字段组合,所述头标识子字段是所述子字段组合中的必选子字段;a header identification subfield, used to indicate a corresponding subfield combination of the broadcast message, and the header identification subfield is a mandatory subfield in the subfield combination;
    状态子字段,用于指示所述蓝牙Beacon设备的设备能力状态;Status subfield, used to indicate the device capability status of the Bluetooth Beacon device;
    产品标识子字段,用于指示所述蓝牙Beacon设备对应的产品;Product identification subfield, used to indicate the product corresponding to the Bluetooth Beacon device;
    媒体访问控制MAC子字段,用于指示所述蓝牙Beacon设备对应的全部或部分MAC地址;The media access control MAC subfield is used to indicate all or part of the MAC address corresponding to the Bluetooth Beacon device;
    地址子字段,用于指示所述蓝牙Beacon设备所绑定的家庭通信网络对应的家庭地址;The address subfield is used to indicate the home address corresponding to the home communication network to which the Bluetooth Beacon device is bound;
    抽象数据子字段,用于指示所述广播消息中携带的数据。The abstract data subfield is used to indicate the data carried in the broadcast message.
  17. 根据权利要求16所述的方法,其特征在于,所述确定所述广播消息中的目标字段对应的子字段组合,包括:The method according to claim 16, wherein the determining the subfield combination corresponding to the target field in the broadcast message comprises:
    根据所述广播消息中的所述头标识子字段和所述状态子字段中的至少一种,确定所述子字段组合。The subfield combination is determined according to at least one of the header identification subfield and the status subfield in the broadcast message.
  18. 根据权利要求17所述的方法,其特征在于,所述头标识子字段包括家庭广播标志位,所述家庭广播标志位用于指示所述广播消息是否进行家庭广播,所述家庭广播指的是在家庭通信网络内进行的广播;The method according to claim 17, wherein the header identification subfield includes a home broadcast flag bit, the home broadcast flag bit is used to indicate whether the broadcast message is home broadcast, and the home broadcast refers to broadcasts within a home communication network;
    所述根据所述广播消息中的所述头标识子字段和所述状态子字段中的至少一种,确定所述子字段组合,包括:The determining the subfield combination according to at least one of the header identification subfield and the status subfield in the broadcast message includes:
    响应于所述家庭广播标志位指示为家庭广播,确定所述子字段组合为第一子字段组合,所述头标识子字段和所述状态子字段是所述第一子字段组合中的必选子字段,所述产品标识子字段和所述MAC子字段是所述第一子字段组合中的可选子字段;根据所述状态子字段,确定所述第一子字段组合中是否还包括所述产品标识子字段、所述MAC子字段;In response to the home broadcast flag indicating that it is home broadcast, determine that the subfield combination is the first subfield combination, and the header identification subfield and the status subfield are mandatory in the first subfield combination subfield, the product identification subfield and the MAC subfield are optional subfields in the first subfield combination; according to the status subfield, determine whether the first subfield combination also includes the the product identification subfield and the MAC subfield;
    或,响应于所述家庭广播标志位指示为非家庭广播,确定所述子字段组合为第二子字段组合,所述头标识子字段、所述地址子字段和所述抽象数据子字段是所述第二子字段组合中的必选子字段。Or, in response to the home broadcast flag indicating that it is a non-home broadcast, it is determined that the subfield combination is a second subfield combination, and the header identification subfield, the address subfield and the abstract data subfield are all Required subfields in the second subfield combination described above.
  19. 根据权利要求16至18任一所述的方法,其特征在于,所述头标识子字段包括家庭广播标志位,所述家庭广播标志位用于指示所述广播消息是否进行家庭广播,所述家庭广播指的是在家庭通信网络内进行的广播;The method according to any one of claims 16 to 18, wherein the header identification subfield includes a home broadcast flag bit, and the home broadcast flag bit is used to indicate whether the broadcast message is for home broadcast, the home broadcast broadcasting means broadcasting within a home communication network;
    所述头标识子字段还包括如下标志位中的至少一种:The header identification subfield also includes at least one of the following flags:
    家庭通讯需求标志位,用于指示所述蓝牙Beacon设备是否有家庭通讯需求,所述家庭通讯需求指的是所述蓝牙Beacon设备在所述家庭通信网络内存在与其他设备进行通讯的需求;A home communication requirement flag bit, used to indicate whether the Bluetooth Beacon device has a home communication requirement, and the home communication requirement means that the Bluetooth Beacon device needs to communicate with other devices in the home communication network;
    版本标志位,用于指示所述广播消息所对应的蓝牙Beacon协议的当前版本;A version flag bit, used to indicate the current version of the Bluetooth Beacon protocol corresponding to the broadcast message;
    预留标志位。reserved flags.
  20. 根据权利要求16至19任一所述的方法,其特征在于,所述状态子字段包括如下标志位中的至少一种:The method according to any one of claims 16 to 19, wherein the status subfield includes at least one of the following flag bits:
    配对标志位,用于指示所述蓝牙Beacon设备是否允许配对;Pairing flag bit, used to indicate whether the Bluetooth Beacon device allows pairing;
    产品标识指示标志位,用于指示所述子字段组合中是否包含所述产品标识子字段;a product identification indication flag bit, used to indicate whether the product identification subfield is included in the subfield combination;
    MAC指示标志位,用于指示所述子字段组合中是否包含所述MAC子字段;MAC indication flag bit, used to indicate whether the MAC subfield is included in the subfield combination;
    加密标志位,用于指示所述抽象数据子字段是否加密;An encryption flag bit, used to indicate whether the abstract data subfield is encrypted;
    预留标志位。reserved flags.
  21. 根据权利要求16至20任一所述的方法,其特征在于,所述抽象数据子字段包括如下字节中的至少一种:The method according to any one of claims 16 to 20, wherein the abstract data subfield comprises at least one of the following bytes:
    第一字节,所述第一字节包括:类型标志位和服务实例标识标志位,所述类型标志位用于指示所述抽象数据子字段的类型,所述服务实例标志位用于指示所述蓝牙Beacon设备支持提供的服务;The first byte, the first byte includes: a type flag bit and a service instance identification flag bit, the type flag bit is used to indicate the type of the abstract data subfield, and the service instance flag bit is used to indicate the The services provided by the Bluetooth Beacon device support;
    属性实例标识集字节,用于指示所述服务实例标志位中指示的所述服务对应的属性;The attribute instance identification set byte is used to indicate the attribute corresponding to the service indicated in the service instance flag bit;
    长度字节,用于指示数据字节的长度;length byte, used to indicate the length of the data byte;
    所述数据字节,用于描述与所述服务对应的属性。The data byte is used to describe the attribute corresponding to the service.
  22. 根据权利要求16至21任一所述的方法,其特征在于,The method according to any one of claims 16 to 21, wherein,
    所述子字段集合中的子字段的接收顺序依次为:所述头标识子字段、所述状态子字段、所述产品标识子字段、所述MAC子字段、所述地址子字段和所述抽象数据子字段。The order of receiving the subfields in the subfield set is: the header identification subfield, the status subfield, the product identification subfield, the MAC subfield, the address subfield and the abstraction Data subfield.
  23. 根据权利要求15至22任一所述的方法,其特征在于,The method according to any one of claims 15 to 22, wherein,
    所述广播消息中包括服务通用唯一识别码UUID字段,所述服务UUID字段为固定值。The broadcast message includes a service universal unique identifier UUID field, and the service UUID field is a fixed value.
  24. 一种广播消息的发送装置,其特征在于,所述装置包括:第一确定模块和发送模块;An apparatus for sending a broadcast message, characterized in that the apparatus comprises: a first determining module and a sending module;
    所述第一确定模块,用于确定广播消息对应的业务场景,所述广播消息是蓝牙Beacon设备对应的广播消息;The first determining module is configured to determine a service scenario corresponding to a broadcast message, where the broadcast message is a broadcast message corresponding to a Bluetooth Beacon device;
    所述第一确定模块,用于根据所述业务场景,确定所述广播消息中的目标字段对应的子字段组合,所述子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,所述子字段集合包括所述目标字段预定义的子字段;The first determining module is configured to determine, according to the service scenario, a subfield combination corresponding to a target field in the broadcast message, where the subfield combination is a combination of at least one subfield in the subfield set Format, the subfield set includes subfields predefined by the target field;
    所述发送模块,用于发送所述广播消息,所述广播消息中的所述目标字段采用所述子字段组合。The sending module is configured to send the broadcast message, and the target field in the broadcast message adopts the combination of the subfields.
  25. 一种广播消息的接收装置,其特征在于,所述装置包括:接收模块、第二确定模块和解析模块;An apparatus for receiving broadcast messages, characterized in that the apparatus comprises: a receiving module, a second determining module and a parsing module;
    所述接收模块,用于接收蓝牙Beacon设备发送的广播消息;The receiving module is used to receive the broadcast message sent by the Bluetooth Beacon device;
    所述第二确定模块,用于确定所述广播消息中的目标字段对应的子字段组合,所述子字段组合是所述蓝牙Beacon设备根据业务场景确定的,所述子字段组合是将子字段集合中的至少一个子字段进行组合的组合格式,所述子字段集合包括所述目标字段预定义的子字段;The second determination module is configured to determine the subfield combination corresponding to the target field in the broadcast message, the subfield combination is determined by the Bluetooth Beacon device according to the service scenario, and the subfield combination is the subfield combination. A combination format in which at least one subfield in the set is combined, and the subfield set includes subfields predefined by the target field;
    所述解析模块,用于根据所述子字段组合,解析所述广播消息中的所述目标字段。The parsing module is configured to parse the target field in the broadcast message according to the subfield combination.
  26. 一种蓝牙设备,其特征在于,所述蓝牙设备包括蓝牙芯片,所述蓝牙芯片存储有计算机指令,所述计算机指令用于执行如权利要求1至14任一所述的广播消息的发送方法,或,如权利要求15至23任一所述的广播消息的接收方法。A Bluetooth device, characterized in that the Bluetooth device comprises a Bluetooth chip, and the Bluetooth chip stores a computer instruction, and the computer instruction is used to execute the method for sending a broadcast message according to any one of claims 1 to 14, Or, the method for receiving broadcast messages according to any one of claims 15 to 23.
  27. 一种计算机可读存储介质,其特征在于,所述可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、至少一段程序、代码集或指令集由处理器加载并执行以实现如权利要求1至14任一所述的广播消息的发送方法,或,如权利要求15至23任一所述的广播消息的接收方法。A computer-readable storage medium, characterized in that the readable storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, at least one piece of program, code set or instruction set Loaded and executed by the processor to implement the method for sending a broadcast message according to any one of claims 1 to 14 , or the method for receiving a broadcast message according to any one of claims 15 to 23 .
PCT/CN2021/110875 2020-08-31 2021-08-05 Method and apparatus for sending broadcast message, method and apparatus for receiving broadcast message, and device and storage medium WO2022042254A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010899470.1 2020-08-31
CN202010899470.1A CN114125725B (en) 2020-08-31 2020-08-31 Broadcast message sending method, broadcast message receiving method, broadcast message sending device, broadcast message receiving device, and storage medium

Publications (1)

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

Family

ID=80352581

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/110875 WO2022042254A1 (en) 2020-08-31 2021-08-05 Method and apparatus for sending broadcast message, method and apparatus for receiving broadcast message, and device and storage medium

Country Status (2)

Country Link
CN (2) CN114125725B (en)
WO (1) WO2022042254A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979308B (en) * 2022-05-11 2024-04-16 北京沃东天骏信息技术有限公司 Message processing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539323A (en) * 2014-12-25 2015-04-22 惠州Tcl移动通信有限公司 Bluetooth low-power-consumption networking interconnection method and system
CN104717603A (en) * 2014-12-25 2015-06-17 惠州Tcl移动通信有限公司 Method and system for achieving Bluetooth low-power-consumption networking and supporting convenient interconnection
US20160127751A1 (en) * 2014-11-05 2016-05-05 Samsung Electronics Co., Ltd. Method and apparatus for providing a broadcasting service
CN107172580A (en) * 2017-06-23 2017-09-15 北京米萌智能科技有限公司 Intelligent hardware gathered data is transmitted to the method for data receiver based on bluetooth iBeacon Radio Broadcasting Agreements
CN110719573A (en) * 2019-10-09 2020-01-21 Oppo广东移动通信有限公司 Information transmission method and device, terminal equipment and storage medium
CN110769382A (en) * 2019-10-09 2020-02-07 Oppo广东移动通信有限公司 Message pushing method and device, terminal equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684844B (en) * 2012-06-05 2015-02-18 杭州华三通信技术有限公司 Beacon frame sending method, Beacon frame receiving method, access point (AP) and wireless client
US9763063B2 (en) * 2014-10-06 2017-09-12 Derek D. Kumar Secure broadcast beacon communications
CA2908762C (en) * 2015-10-16 2024-01-02 Imperial Parking Canada Corporation Method and system for managing parking by dual location verification
CN105744469A (en) * 2016-03-29 2016-07-06 海尔优家智能科技(北京)有限公司 Method for communication among equipment in Internet of Things based on Bluetooth and equipment in Internet of Things
CN106231634A (en) * 2016-07-15 2016-12-14 北京元心科技有限公司 Message sending and receiving method and device
CN106993261A (en) * 2016-12-12 2017-07-28 建荣半导体(深圳)有限公司 A kind of low-power consumption bluetooth data communications method, equipment and system
CN109121087A (en) * 2018-06-27 2019-01-01 努比亚技术有限公司 Communication means, terminal and computer readable storage medium
CN110380760B (en) * 2019-07-17 2021-05-25 重庆大学 General personal health equipment flag bit data transmission method based on low power consumption Bluetooth

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160127751A1 (en) * 2014-11-05 2016-05-05 Samsung Electronics Co., Ltd. Method and apparatus for providing a broadcasting service
CN104539323A (en) * 2014-12-25 2015-04-22 惠州Tcl移动通信有限公司 Bluetooth low-power-consumption networking interconnection method and system
CN104717603A (en) * 2014-12-25 2015-06-17 惠州Tcl移动通信有限公司 Method and system for achieving Bluetooth low-power-consumption networking and supporting convenient interconnection
CN107172580A (en) * 2017-06-23 2017-09-15 北京米萌智能科技有限公司 Intelligent hardware gathered data is transmitted to the method for data receiver based on bluetooth iBeacon Radio Broadcasting Agreements
CN110719573A (en) * 2019-10-09 2020-01-21 Oppo广东移动通信有限公司 Information transmission method and device, terminal equipment and storage medium
CN110769382A (en) * 2019-10-09 2020-02-07 Oppo广东移动通信有限公司 Message pushing method and device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN114125725A (en) 2022-03-01
CN114125725B (en) 2022-10-11
CN115515080A (en) 2022-12-23

Similar Documents

Publication Publication Date Title
JP6908334B2 (en) Internet of Things Communication Methods, Internet of Things Devices, and Internet of Things Systems
KR101869070B1 (en) Method and device for adjusting data transmission rate in wireless communication system
JP7163995B2 (en) Communication device, communication method, and program
EP2918140A1 (en) Proxy connection method and apparatus
EP3135053B1 (en) Data transmission
WO2017182002A1 (en) Device control method, apparatus and storage medium
US9288667B2 (en) Allocating network identifiers to access terminals
TW201904239A (en) Notification processing method
WO2016086659A1 (en) Service message transmission method, device and system
WO2015088481A1 (en) Switching to advertising locator after connection establishment
WO2022042254A1 (en) Method and apparatus for sending broadcast message, method and apparatus for receiving broadcast message, and device and storage medium
WO2021087892A1 (en) Resource subscription method and device, and storage medium
WO2020177020A1 (en) Internet of things device discovery method, apparatus, and terminal device
CN106537955B (en) Data transmission method and device
JP6880719B2 (en) Communication equipment, communication methods, electronic clocks and programs
WO2021102694A1 (en) Ble mesh device access method and apparatus, device and storage medium
JP2016538769A (en) Discovery of WI-FI direct service via discovery probe
WO2023108628A1 (en) Communication method and apparatus, and device, storage medium, chip, product and program
WO2016076950A1 (en) eMBMS MULTICAST ROUTING FOR ROUTERS
EP3232693B1 (en) Method and device for creating application notification resource
WO2022116110A1 (en) Access authentication method and apparatus, device, and storage medium
WO2024011634A1 (en) Subscription message processing method and apparatus, device, storage medium, and program product
WO2021146960A1 (en) Message endpoint discovery method and related apparatus
US11902315B2 (en) Privacy preserving vulnerability detection for devices
JP5814359B2 (en) Assigning network identifiers to access terminals

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

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

Country of ref document: EP

Kind code of ref document: A1