Bluetooth broadcast two-way communication method, device, electronic device and storage medium
By employing a non-connectable broadcast data packet and response data interaction method between Bluetooth Low Energy (BLE) devices, the problem of low efficiency in two-way communication between BLE devices is solved, enabling fast and reliable intermittent data interaction and expanding the scope of application.
Patent Information
- Application Number
- CN202211367059.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-11-01
AI Technical Summary
Existing Bluetooth Low Energy (BLE) devices suffer from low efficiency in one-way transmission and cumbersome connection processes during data interaction, resulting in low efficiency in two-way communication and limiting their applicability.
By sending a number of unconnectable target broadcast data packets to the scanning device via BLE and receiving target response data from the scanning device, combined with unconnectable broadcast technology, sporadic data interaction is achieved, avoiding the need to maintain a connection state when there is no data interaction.
It improves the efficiency of Bluetooth broadcast two-way communication, expands the scope of application, and enables fast and reliable intermittent data exchange between multiple BLE devices.
Smart Images

Figure CN115767446B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a Bluetooth broadcast two-way communication method, device, electronic device and storage medium. Background Art
[0002] At present, Bluetooth Low Energy (BLE) is widely used in many fields such as healthcare, sports and fitness, security, and home entertainment because of its advantages of significantly reducing power consumption and cost while maintaining the same communication range. Data transmission between multiple devices through BLE is naturally becoming more and more common. Therefore, it is particularly important for multiple devices to exchange data quickly and reliably through BLE.
[0003] In the related technology, data interaction between multiple BLE devices usually includes two situations. The first situation is that data is transmitted unidirectionally between BLE devices, and data is repeatedly transmitted unidirectionally to ensure data quality; the second situation is that BLE devices first establish a connection through scanning discovery, connection, service discovery, function activation, and secure channel establishment, and then exchange data.
[0004] However, since the one-way data transmission between BLE devices cannot achieve data interaction, the method of connecting first and then exchanging data between BLE devices can achieve two-way communication. However, for the occasional transmission and reception of small amounts of data, the cumbersome pre-connection steps have a high cost for data interaction, which leads to the efficiency and scope of application of Bluetooth broadcast two-way communication being limited. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the related art. To this end, the present invention proposes a Bluetooth broadcast two-way communication method, which can quickly and reliably perform Bluetooth two-way communication for occasional small amounts of data interaction between multiple BLE devices, and does not need to maintain a connection state when data interaction is not required, thereby effectively improving the efficiency of Bluetooth broadcast two-way communication and expanding the scope of application.
[0006] The invention also provides a Bluetooth broadcast two-way communication method.
[0007] The invention also provides a Bluetooth broadcast two-way communication system.
[0008] The invention also provides a Bluetooth broadcast two-way communication device.
[0009] The invention also provides a Bluetooth broadcast two-way communication device.
[0010] The invention also provides an electronic device.
[0011] The present invention also provides a non-transitory computer-readable storage medium.
[0012] The present invention also provides a computer program product.
[0013] The Bluetooth broadcast two-way communication method according to the first embodiment of the present invention includes:
[0014] Based on the target number of advertising packets and the target service data, a target number of unconnectable target advertising data packets are sent to the scanning device via BLE;
[0015] Based on the target receiving radio frequency on time, target response data fed back by the scanning device in response to the target broadcast data packet is received.
[0016] According to the Bluetooth broadcast two-way communication method of an embodiment of the present invention, the broadcasting device sends a target number of unconnectable target broadcast data packets to the scanning device through BLE based on the target number of broadcast packets and target business data, and receives target response data fed back by the scanning device for the target broadcast data packet based on the target receiving radio frequency on-time. In this way, the purpose of occasional data interaction between multiple BLE devices is achieved by combining BLE technology and unconnectable broadcast. When data interaction is not required, there is no need to maintain the connection state. In addition, occasional small amount of data interaction between multiple BLE devices can quickly and reliably perform Bluetooth two-way communication, thereby effectively improving the efficiency of Bluetooth broadcast two-way communication and expanding the scope of application.
[0017] According to an embodiment of the present invention, before sending a target number of unconnectable target broadcast data packets to the scanning device through BLE based on the target number of broadcast packets and the target service data, the method further includes:
[0018] Based on the preset initial number of advertising packets and target service data, an initial number of unconnectable initial advertising data packets are sent to the scanning device via BLE;
[0019] Based on the fact that no reception response result of the scanning device to the initial broadcast data packet is monitored within the preset monitoring time, the initial number of broadcast packets is updated to determine a target number of broadcast packets.
[0020] According to an embodiment of the present invention, the receiving, based on the target receiving radio frequency on-time, the target response data fed back by the scanning device in response to the target broadcast data packet includes:
[0021] Based on a preset initial receiving radio frequency on time, monitoring a reception response of the scanning device to the initial broadcast data packet within the preset monitoring time;
[0022] Based on the fact that no reception response result of the scanning device to the initial broadcast data packet is monitored within the preset monitoring time, the initial reception radio frequency activation time is updated to determine the target reception radio frequency activation time;
[0023] Based on the target receiving radio frequency on time, target response data fed back by the scanning device in response to the target broadcast data packet is received within the preset monitoring time.
[0024] According to one embodiment of the present invention, the process of determining the initial number of broadcast packets includes:
[0025] Based on the target address information of the scanning device, searching for a historical cumulative number of broadcast packets corresponding to the target address information;
[0026] Based on the successful search result of the historical cumulative number of broadcast packets, determine the historical cumulative number of broadcast packets found, and based on the historical cumulative number of broadcast packets, determine the initial number of broadcast packets;
[0027] Based on the failed search result of the historical accumulated number of broadcast packets, it is determined that the initial number of broadcast packets is a preset number of broadcast packets.
[0028] According to an embodiment of the present invention, the process of determining the initial receiving radio frequency on time length includes:
[0029] Based on the target address information of the scanning device, searching for the historical accumulated receiving radio frequency on time corresponding to the target address information;
[0030] Based on the successful result of searching the historical cumulative reception radio frequency on time, determine the found historical cumulative reception radio frequency on time, and based on the historical cumulative reception radio frequency on time, determine the initial reception radio frequency on time;
[0031] Based on the failed result of searching the historical accumulated receiving radio frequency on time, it is determined that the initial receiving radio frequency on time is the preset receiving radio frequency on time.
[0032] According to one embodiment of the present invention, the method further includes:
[0033] Determine the target number of broadcast packets corresponding to the target response data, the target receiving radio frequency on-time, and the target address information of the scanning device as the record information to be added;
[0034] Determining that the amount of pre-stored historical record information exceeds a preset amount threshold, updating the historical record information;
[0035] Based on the historical record information after the information is updated, the record information to be added is added.
[0036] According to one embodiment of the present invention, the method further includes:
[0037] Performing data analysis on the target response data to determine target application data;
[0038] Matching the quantity of the target application data with the quantity of the scanning devices;
[0039] Based on the result of successful matching between the number of the target application data and the number of the scanning devices, updating the Bluetooth broadcast state to stop the BLE unconnectable broadcast state;
[0040] Based on the result that the number of the target application data and the number of the scanning devices fail to match, the Bluetooth broadcast state is updated to a continuing BLE unconnectable broadcast state.
[0041] The Bluetooth broadcast two-way communication method according to the second aspect of the present invention includes:
[0042] Receive target broadcast data packets sent by the broadcasting device;
[0043] Based on the target broadcast data packet, determining target response data and device address information of the broadcast device;
[0044] Based on the target broadcast data packet received after a preset number of times, the target response data is sent to the broadcast device based on the device address information.
[0045] According to the Bluetooth broadcast two-way communication method of an embodiment of the present invention, the scanning device determines the corresponding target response data and the device address information of the broadcasting device for the target broadcast data sent by the broadcasting device, so that when the target broadcast data packet is received after a preset number of times, the target response data is sent to the designated broadcasting device, thereby improving the reliability and stability of the scanning device sending the target response data to the broadcasting device, and also effectively improving the efficiency of the Bluetooth broadcast two-way communication.
[0046] According to an embodiment of the present invention, determining target response data based on the target broadcast data packet includes:
[0047] Performing data analysis on the target broadcast data packet to determine target application data;
[0048] Data is packaged based on the target application data to determine target response data.
[0049] According to the third aspect of the present invention, a Bluetooth broadcast two-way communication system is provided, comprising a broadcast device and a scanning device, wherein the broadcast device executes the method described in the first aspect, and the scanning device executes the method described in the second aspect.
[0050] According to the Bluetooth broadcast two-way communication system of an embodiment of the present invention, the broadcasting device sends a target number of unconnectable target broadcast data packets to the scanning device through BLE based on the target number of broadcast packets and target business data; the scanning device determines the corresponding target response data and the device address information of the broadcasting device for the target broadcast data sent by the broadcasting device, so that when the target broadcast data packet is received after a preset number of times, the target response data is sent to the designated broadcasting device, thereby improving the reliability and stability of the scanning device sending the target response data to the broadcasting device, and also effectively improving the efficiency of the Bluetooth broadcast two-way communication; further, the broadcasting device receives the target response data fed back by the scanning device for the target broadcast data packet based on the target receiving radio frequency on-time; in this way, the purpose of occasional data interaction between multiple BLE devices is achieved by combining BLE technology and unconnectable broadcasting, and there is no need to maintain the connection state when data interaction is not required, and the occasional small amount of data interaction between multiple BLE devices can quickly and reliably perform Bluetooth two-way communication, thereby effectively improving the efficiency of Bluetooth broadcast two-way communication and expanding the scope of application.
[0051] According to a fourth aspect of the present invention, a Bluetooth broadcast two-way communication device is provided, comprising:
[0052] The first sending module is used to send a target number of unconnectable target broadcast data packets to the scanning device through BLE based on the target number of broadcast packets and target service data;
[0053] The first receiving module is used to receive target response data fed back by the scanning device in response to the target broadcast data packet based on the target receiving radio frequency on-time.
[0054] According to the Bluetooth broadcast two-way communication device of the embodiment of the present invention, based on the target number of broadcast packets and target business data, a target number of unconnectable target broadcast data packets are sent to the scanning device through BLE, and based on the target receiving radio frequency on-time, the target response data fed back by the scanning device for the target broadcast data packet is received, thereby combining BLE technology and unconnectable broadcast to achieve the purpose of occasional data interaction between multiple BLE devices, and there is no need to maintain the connection state when data interaction is not required, and the occasional small amount of data interaction between multiple BLE devices can quickly and reliably perform Bluetooth two-way communication, thereby effectively improving the efficiency of Bluetooth broadcast two-way communication and expanding the scope of application.
[0055] According to a fifth aspect of the present invention, a Bluetooth broadcast two-way communication device is provided, comprising:
[0056] A second receiving module, used for receiving a target broadcast data packet sent by a broadcasting device;
[0057] A determination module, configured to determine target response data and device address information of the broadcasting device based on the target broadcast data packet;
[0058] The second sending module is used to send the target response data to the broadcasting device based on the target broadcast data packet received after a preset number of times and based on the address information.
[0059] According to the Bluetooth broadcast two-way communication device of the embodiment of the present invention, the corresponding target response data and the device address information of the broadcasting device are determined for the target broadcast data sent by the broadcasting device, so that the target response data is sent to the designated broadcasting device when the target broadcast data packet is received after a preset number of times, thereby improving the reliability and stability of the scanning device sending the target response data to the broadcasting device, and effectively improving the efficiency of the Bluetooth broadcast two-way communication.
[0060] The above one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: the broadcasting device sends a target number of unconnectable target broadcast data packets to the scanning device through BLE based on the target number of broadcast packets and target business data, and receives target response data fed back by the scanning device for the target broadcast data packet based on the target receiving radio frequency on-time. In this way, the purpose of occasional data interaction between multiple BLE devices is achieved by combining BLE technology and unconnectable broadcast. When data interaction is not required, there is no need to maintain the connection state. In addition, occasional small amounts of data interaction between multiple BLE devices can quickly and reliably perform Bluetooth two-way communication, thereby effectively improving the efficiency of Bluetooth broadcast two-way communication and expanding the scope of application.
[0061] Furthermore, the scanning device determines the corresponding target response data and the device address information of the broadcasting device based on the target broadcast data sent by the broadcasting device, so that when the target broadcast data packet is received after a preset number of times, the target response data is sent to the designated broadcasting device, thereby improving the reliability and stability of the scanning device sending the target response data to the broadcasting device, and effectively improving the efficiency of Bluetooth broadcast two-way communication.
[0062] Furthermore, the broadcasting device determines the initial number of broadcast packets of the scanning device by searching for a historical cumulative number of broadcast packets corresponding to the target address information of the scanning device, thereby improving the convenience, speed, accuracy and reliability of determining the initial number of broadcast packets.
[0063] Furthermore, the broadcasting device determines the initial receiving radio frequency on time of the scanning device by searching for the historical accumulated receiving radio frequency on time corresponding to the target address information of the scanning device, thereby improving the convenience, speed, accuracy and reliability of determining the initial receiving radio frequency on time.
[0064] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0066] Figure 1 This is one of the flow charts of the Bluetooth broadcast two-way communication method provided by an embodiment of the present invention;
[0067] Figure 2 This is a second flow chart of the Bluetooth broadcast bidirectional communication method provided by an embodiment of the present invention;
[0068] Figure 3 It is a schematic diagram of the data interaction process of the Bluetooth broadcast two-way communication system provided by an embodiment of the present invention;
[0069] Figure 4 This is one of the structural schematic diagrams of the Bluetooth broadcast two-way communication device provided by an embodiment of the present invention;
[0070] Figure 5 This is a second structural diagram of a Bluetooth broadcast two-way communication device provided by an embodiment of the present invention;
[0071] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0073] Combine the following Figure 1-Figure 6The present invention describes the Bluetooth broadcast two-way communication method, device, electronic device and storage medium, wherein the execution subject of the Bluetooth broadcast two-way communication method can be a broadcast device or a scanning device, the broadcast device at least has the BLE unconnectable broadcast function, broadcast data packet determination function, timing function, data receiving window opening function, data update function, data recording function, data processing function and communication function, and the scanning device at least has the function of receiving and responding to the BLE unconnectable broadcast, data parsing function, monitoring function and communication function; the broadcast device and the scanning device can both be BLE Bluetooth devices. The present invention does not specifically limit the specific forms of the broadcast device and the scanning device.
[0074] Reference Figure 1 , is a flow chart of a Bluetooth broadcast two-way communication method provided by an embodiment of the present invention, and Figure 1 The execution subject of the Bluetooth broadcast two-way communication method shown is a broadcasting device; Figure 1 As shown, the Bluetooth broadcast two-way communication method includes the following steps:
[0075] Step 110: Based on the target number of broadcast packets and the target service data, a target number of unconnectable target broadcast data packets are sent to the scanning device via BLE.
[0076] The target number of broadcast packets is the number of broadcast packets to which the broadcast device can receive responses from the scanning device.
[0077] Specifically, when the broadcasting device detects that the service data has been updated, it can perform occasional data interaction between the broadcasting device and the scanning device for some of the changed service data in the broadcasting device. At this time, it can instruct the broadcasting service end to update the BLE Bluetooth broadcast data to the broadcasting Bluetooth protocol stack end through the preset update function ms_ble_start_nonconn_adv, and send the updated target service data to the broadcasting Bluetooth protocol stack end, and further instruct the broadcasting Bluetooth protocol stack end to request to send an unconnectable broadcast through the Bluetooth protocol. The unconnectable broadcast here is a high-speed broadcast with a broadcast interval of 30ms; thereby obtaining the target service data to be broadcasted by the BLE unconnectable broadcast, and recording the target address information of the scanning device that receives the response to the target service data, so as to facilitate the subsequent sending of unconnectable broadcasts based on the device address. The number of scanning devices can be 1 or more. The number of scanning devices is not specifically limited here.
[0078] Based on this, the broadcasting device can process the target service data into a target broadcast data packet based on the target number of broadcast packets, and in the broadcast interval of the unconnectable broadcast, the target broadcast data packet is continuously sent to the scanning device via BLE according to the target address information of the scanning device. It should be noted that before sending the unconnectable target number of target broadcast data packets to the scanning device via BLE, the broadcasting device can control the opening of the data receiving window so as to receive the response of the scanning device in time.
[0079] Step 120: Based on the target receiving radio frequency on-time, receiving target response data fed back by the scanning device in response to the target broadcast data packet.
[0080] The target receiving radio frequency on duration is the corresponding opening duration of the data receiving window when the broadcasting device receives the response from the scanning device, and is also the opening duration of the receiving radio frequency when the broadcasting device sends a BLE unconnectable broadcast each time. In addition, the broadcasting device can instruct the broadcasting Bluetooth protocol stack to regularly open the data receiving window according to the target receiving radio frequency on duration.
[0081] Specifically, based on the target receiving radio frequency on-time, the broadcasting device can receive the target response data fed back by the scanning device for each target broadcast data packet. The target response data can be displayed in the form of a data packet and can include a data header, the target address information of the scanning device, the device address information of the broadcasting device and the target application data. The target application data can be determined by converting the target service data in the target broadcast data packet into a type-length-value (TLV) format; the data packet structure of the target response data can be as shown in Table 1.
[0082]
[0083] It should be noted that when the broadcasting device detects that the service data needs to be controlled, it can also obtain the corresponding target service data to be broadcasted when the BLE is not connectable, and execute the process of step 120 and step 130. It will not be repeated here.
[0084] The present invention provides a Bluetooth broadcast two-way communication method. The broadcasting device sends a target number of unconnectable target broadcast data packets to a scanning device through BLE based on a target number of broadcast packets and target business data, and receives target response data fed back by the scanning device for the target broadcast data packets based on the target receiving radio frequency on-time. In this way, the purpose of occasional data interaction between multiple BLE devices is achieved by combining BLE technology and unconnectable broadcasting. When data interaction is not required, there is no need to maintain the connection state. In addition, for occasional small amounts of data interaction between multiple BLE devices, Bluetooth two-way communication can be performed quickly and reliably, thereby effectively improving the efficiency of Bluetooth broadcast two-way communication and expanding the scope of application.
[0085] It is understandable that, since the target number of broadcast packets is usually not accurately determined at one time, it can be considered to first determine the initial number of broadcast packets to send BLE unconnectable broadcasts, and then adjust the initial number of broadcast packets to the target number of broadcast packets according to the result that no response from the scanning device is received within a certain period of time. Based on this, before step 120, the Bluetooth broadcast two-way communication method can also include:
[0086] First, based on a preset initial number of broadcast packets and target business data, an initial number of unconnectable initial broadcast data packets are sent to the scanning device via BLE; further, based on the fact that no reception response result of the scanning device for the initial broadcast data packet is heard within a preset listening time, the initial number of broadcast packets is updated to determine the target number of broadcast packets.
[0087] Specifically, the broadcasting device can instruct the broadcasting Bluetooth protocol stack to first determine an initial number of broadcast packets, so that the broadcasting Bluetooth protocol stack processes the target business data into multiple initial broadcast data packets based on the initial number of broadcast packets, and instruct the broadcasting Bluetooth protocol stack to send an initial number of unconnectable initial broadcast data packets to the scanning device through BLE while starting a timer for listening to the reception response result, and the timing of the timer is a preset listening time, such as the preset listening time can be 3 seconds; based on this, if the broadcasting device does not listen to the reception response result of the scanning device for the initial broadcast data packet within the preset listening time, it can instruct the broadcasting Bluetooth protocol stack to update the initial number of broadcast packets, that is, add 5 broadcast packets on the basis of the initial number of broadcast packets, for example, when the initial number of broadcast packets is 15 broadcast packets, 5 broadcast packets can be added to the 15 broadcast packets; in this way, the target number of broadcast packets is determined, and the target number of broadcast packets is the number of broadcast packets sent at high speed when the number is updated.
[0088] It should be noted that the quantity update process can be cycled three times. For example, when the initial number of broadcast packets increases from 15 broadcast packets to 20 broadcast packets, and the receiving response result of the scanning device is not received within the preset monitoring time, the 20 broadcast packets can be increased to 25 broadcast packets. When the number of broadcast packets increases from 20 broadcast packets to 25 broadcast packets, and the receiving response result of the scanning device is not received within the preset monitoring time, the 25 broadcast packets can be increased to 30 broadcast packets. If the receiving response result of the scanning device is still not received within the preset monitoring time after three cycles, the sending of the target business data can be stopped. On the contrary, if the quantity update process is within 3 times, the receiving response result of the scanning device can be received within the preset monitoring time, and the number of broadcast packets after the first quantity update, the number of broadcast packets after the second quantity update, or the number of broadcast packets after the third quantity update can be determined as the target number of broadcast packets.
[0089] In the Bluetooth broadcast two-way communication method provided by the present invention, a broadcasting device sends an initial number of unconnectable initial broadcast data packets to a scanning device via BLE, and then updates the initial number of broadcast packets based on the fact that no reception response result of the scanning device for the initial broadcast data packets is heard within a preset monitoring time, thereby determining a target number of broadcast packets. In this way, combined with a method of gradually increasing the number of packets sent, the reliability and accuracy of the target number of broadcast packets are improved, thereby improving the stability and reliability of sending the target number of unconnectable target broadcast data packets to the scanning device via BLE, and ensuring the efficiency of Bluetooth broadcast two-way communication.
[0090] It is understandable that, similar to the idea of determining the target number of broadcast packets, the target receiving radio frequency on duration is usually not accurately determined at one time, so it can be considered to first determine the initial receiving radio frequency on duration, and then adjust the initial receiving radio frequency on duration to the target initial receiving radio frequency on duration according to the result that no response from the scanning device is received within a certain period of time. Based on this, the specific implementation process of step 130 may include:
[0091] First, based on a preset initial receiving radio frequency on-time, a receiving response of a scanning device to an initial broadcast data packet is monitored within a preset monitoring time; further, based on the fact that no receiving response result of the scanning device to the initial broadcast data packet is monitored within the preset monitoring time, the initial receiving radio frequency on-time is updated to determine a target receiving radio frequency on-time; and then, based on the target receiving radio frequency on-time, target response data fed back by the scanning device to the target broadcast data packet is received within the preset monitoring time.
[0092] Among them, the broadcasting device can instruct the broadcasting Bluetooth protocol stack end to use the initial receiving radio frequency opening time to regularly open the data receiving window.
[0093] Specifically, while instructing the broadcasting Bluetooth protocol stack to determine the initial number of broadcast packets, the broadcasting device may also instruct the broadcasting Bluetooth protocol stack to determine the initial receiving radio frequency on-time, so that the data receiving window of the broadcasting device is based on the initial receiving radio frequency on-time, and the scanning device is monitored for the receiving response of the initial broadcast data packet within the preset monitoring time, and the timer for monitoring the receiving response result is started while instructing the broadcasting Bluetooth protocol stack to send the initial number of unconnectable initial broadcast data packets to the scanning device through BLE. If the broadcasting device does not monitor the receiving response result of the scanning device for the initial broadcast data packet within the preset monitoring time, the broadcasting Bluetooth protocol stack may be instructed to update the number of the initial number of broadcast packets, and the initial receiving radio frequency on-time may also be updated, that is, 1ms is added on the basis of the initial receiving radio frequency on-time, for example, when the initial receiving radio frequency on-time is 2ms, 1ms may be added on the basis of 2ms, so as to determine the target receiving radio frequency on-time. Then, based on the target receiving radio frequency on-time, the target response data fed back by the scanning device for the target broadcast data packet is received within the preset monitoring time.
[0094] It should be noted that the duration update process is synchronized with the quantity update process, that is, the duration update process can also be cycled three times. For example, when the initial receiving radio frequency on duration is increased from 2ms to 3ms, the receiving response result of the scanning device is not received within the preset monitoring duration, then 3ms can be increased to 4ms. When the receiving radio frequency on duration is increased from 3ms to 4ms, the receiving response result of the scanning device is not received within the preset monitoring duration, then 4ms can be increased to 5ms. If the receiving response result of the scanning device is still not received within the preset monitoring duration after three cycles, the sending of the target business data can be stopped. On the contrary, if the duration update process is within 3 times, the receiving response result of the scanning device can be received within the preset monitoring duration, then the receiving radio frequency on duration after the first duration update, the receiving radio frequency on duration after the second duration update, or the receiving radio frequency on duration after the third duration update can be determined as the target receiving radio frequency on duration.
[0095] In the Bluetooth broadcast two-way communication method provided by the present invention, a broadcasting device determines a target receiving radio frequency on time by updating the initial receiving radio frequency on time based on the initial receiving radio frequency on time and failing to monitor a receiving response result of a scanning device for an initial broadcast data packet within a preset monitoring time, thereby improving the reliability and accuracy of the target receiving radio frequency on time in combination with a method of gradually increasing the receiving radio frequency on time, thereby improving the stability and reliability of receiving target response data through BLE, and ensuring the efficiency of Bluetooth broadcast two-way communication.
[0096] It is understandable that if data has been exchanged between the broadcasting device and the scanning device, the broadcasting device will record the target address information and the number of packets sent by the scanning device. At this time, the initial number of broadcasts can be determined based on the identification result of whether there is a historical number of packets sent in the broadcasting device. Based on this, the process of determining the initial number of broadcasts may include:
[0097] First, based on the target address information of the scanning device, a search is performed for a historical cumulative number of broadcast packets corresponding to the target address information; further based on the successful search result of the historical cumulative number of broadcast packets, the historical cumulative number of broadcast packets found is determined, and based on the historical cumulative number of broadcast packets, an initial number of broadcast packets is determined; based on the failed search result of the historical cumulative number of broadcast packets, the initial number of broadcast packets is determined to be a preset number of broadcast packets.
[0098] Among them, the target address information can be the address of the scanning device that needs to be sent in the broadcast service. The historical cumulative number of broadcast packets is the sum of the target number of broadcast packets corresponding to each scanning device recorded in each previous service update. For example, the three target numbers of broadcast packets corresponding to scanning device B in the previous three business update records are 16, 17 and 19 respectively, then the historical cumulative number of broadcast packets is 52.
[0099] Specifically, the broadcasting device can instruct the broadcasting Bluetooth protocol stack to scan the target address information of the device and search for the historical cumulative number of broadcast packets corresponding to the target address information of the scanning device in the pre-stored historical record information. If so, it is determined that the historical cumulative number of broadcast packets has been successfully searched. At this time, the initial number of broadcast packets for this time can be determined by first taking the average value and then rounding off the historical cumulative number of broadcast packets. For example, when the historical cumulative number of broadcast packets of scanning device B for the previous three business update records is 52, the initial number of broadcast packets for this time is 17; if not, it is determined that the historical cumulative number of broadcast packets has failed to be searched. At this time, it can be determined that the initial number of broadcast packets for this time is a preset number of broadcast packets, such as 15.
[0100] In the Bluetooth broadcast two-way communication method provided by the present invention, the broadcasting device determines the initial number of broadcast packets of the scanning device by searching whether there are historical cumulative number of broadcast packets corresponding to the target address information of the scanning device, thereby improving the convenience, speed, accuracy and reliability of determining the initial number of broadcast packets.
[0101] It is understandable that if the broadcasting device and the scanning device have exchanged data, the broadcasting device will record the receiving radio frequency on-time of the scanning device while recording the target address information and the number of packets sent by the scanning device. At this time, the initial receiving radio frequency on-time can be determined based on the identification result of whether there is a historical receiving radio frequency on-time in the broadcasting device. Based on this, the determination process of the initial receiving radio frequency on-time can include:
[0102] First, based on the target address information of the scanning device, the historical cumulative receiving radio frequency on time corresponding to the target address information is searched; then, based on the successful search result of the historical cumulative receiving radio frequency on time, the found historical cumulative receiving radio frequency on time is determined, and based on the historical cumulative receiving radio frequency on time, the initial receiving radio frequency on time is determined; or, based on the failed search result of the historical cumulative receiving radio frequency on time, the initial receiving radio frequency on time is determined to be the preset receiving radio frequency on time.
[0103] The historical cumulative receiving radio frequency on time is the cumulative sum of the target receiving radio frequency on time corresponding to each scanning device recorded in each previous service update. For example, the three target receiving radio frequency on time corresponding to the scanning device C in the previous three service update records are 2ms, 3ms and 5ms respectively, and the historical cumulative receiving radio frequency on time is 10ms.
[0104] Specifically, the broadcasting device can instruct the broadcasting Bluetooth protocol stack to scan the target address information of the device and find out whether the historical cumulative reception RF on time corresponding to the target address information of the scanning device exists in the pre-stored historical record information. If it exists, it is determined that the historical cumulative reception RF on time is successfully found. At this time, the historical cumulative reception RF on time can be determined by first taking the average value and then rounding off the average value, and the range is 0 to 5ms. For example, if the historical cumulative reception RF on time of the scanning device C for the previous three business update records is 10ms, then the initial reception RF on time of this time is 3ms; if it does not exist, it is determined that the historical cumulative reception RF on time search failed. At this time, it can be determined that the initial reception RF on time of this time is the preset reception RF on time, such as 2ms.
[0105] In the Bluetooth broadcast two-way communication method provided by the present invention, the broadcasting device determines the initial receiving radio frequency on time of the scanning device by searching whether there is a historical accumulated receiving radio frequency on time corresponding to the target address information of the scanning device, thereby improving the convenience, speed, accuracy and reliability of determining the initial receiving radio frequency on time.
[0106] It is understandable that, considering the convenience and speed of subsequently determining the initial number of broadcast packets and the initial receiving radio frequency on-time, the target number of broadcast packets and the target receiving radio frequency on-time determined for each scanning device at each service update can be recorded, and when the number of records exceeds a certain number, it can be updated and adjusted in time to facilitate recording the target number of broadcast packets and the target receiving radio frequency on-time determined at this service update. Based on this, the Bluetooth broadcast two-way communication method can also include:
[0107] First, determine the target number of broadcast packets corresponding to the target response data, the target receiving radio frequency on-time and the target address information of the scanning device as the record information to be added; then further determine that the number of pre-stored historical record information exceeds the preset number threshold, and update the historical record information; then, based on the updated historical record information, add the record information to be added.
[0108] Specifically, the broadcasting device can instruct the broadcasting Bluetooth protocol stack to receive the corresponding target response data for each scanning device, and record the target number of broadcast packets corresponding to the target response data fed back by each scanning device, the target receiving radio frequency on-time and the target address information of the corresponding scanning device, so as to generate multiple records to be added. If it is determined that the cumulative number of historical record information for each scanning device exceeds the preset number threshold, the historical record information is adjusted. For example, if there are more than 20 historical record information for scanning device A, the multiple historical record information exceeding 20 can be sorted according to the queue mode and the recording time of each historical record information, so that the historical record information at the end of the queue has the earliest recording time and the historical record information at the head of the queue has the latest recording time. At this time, the historical record information at the end of the queue can be deleted, and the record information to be added determined for scanning device A this time can be added. If it is determined that the cumulative number of historical record information for each scanning device does not exceed the preset number threshold, the record information to be added can be directly added without updating the historical record information.
[0109] The Bluetooth broadcast two-way communication method provided by the present invention records and stores the target number of broadcast packets and the target receiving radio frequency on-time determined by the scanning device during the current service update, so that the broadcast device can conveniently and reliably determine the initial number of broadcast packets and the initial receiving radio frequency on-time, thereby further ensuring the efficiency of the Bluetooth broadcast two-way communication.
[0110] It is understandable that, considering that when a broadcasting device sends a BLE unconnectable broadcast to multiple scanning devices, there is a situation where no response is received from at least one scanning device or response responses from multiple scanning devices can be received, the Bluetooth broadcast state can be adjusted according to the monitored response situation. Based on this, the Bluetooth broadcast two-way communication method can also include:
[0111] First, the target response data is parsed to determine the target application data; then the number of target application data is further matched with the number of scanning devices; based on the successful matching result of the number of target application data with the number of scanning devices, the Bluetooth broadcast state is updated to stop the BLE unconnectable broadcast state; based on the failed matching result of the number of target application data with the number of scanning devices, the Bluetooth broadcast state is updated to continue the BLE unconnectable broadcast state.
[0112] Specifically, when the broadcasting device instructs the broadcasting Bluetooth protocol stack to send a BLE unconnectable broadcast to multiple scanning devices, it can instruct the broadcasting Bluetooth protocol stack to receive target response data for each scanning device, and instruct the broadcasting Bluetooth protocol stack to perform data analysis on the received target response data to determine the target application data, and then instruct the broadcasting Bluetooth protocol stack to report the determined target response data to the broadcasting service end through the ms_link_ble_adv_cb callback function. At this time, the broadcasting device instructs the broadcasting service end to determine the Bluetooth broadcast status based on the target application data. For example, the broadcasting device sends a BLE unconnectable broadcast to three scanning devices. If the received target application data is for the three scanning devices, then it is determined that the number of target application data matches the number of scanning devices successfully, and the Bluetooth broadcast status is updated to the stop BLE unconnectable broadcast state; if the received target application data is for one or two of the three scanning devices, then it is determined that the number of target application data fails to match the number of scanning devices, and the Bluetooth broadcast status can be updated to the continue BLE unconnectable broadcast state. Then, the broadcasting device may instruct the broadcasting service end to send an update instruction of the Bluetooth broadcasting status to the broadcasting Bluetooth protocol stack end, and instruct the broadcasting Bluetooth protocol stack end to set or update relevant parameters based on the update instruction.
[0113] The Bluetooth broadcast two-way communication method provided by the present invention determines whether the Bluetooth broadcast state is updated to stop the BLE unconnectable broadcast state or to continue the BLE unconnectable broadcast state by judging the matching relationship between the target application data obtained by parsing the target response data and the number of scanning devices, thereby ensuring the flexibility and reliability of the Bluetooth broadcast two-way communication, improving the efficiency of the Bluetooth broadcast two-way communication, and expanding the scope of application.
[0114] Reference Figure 2, is a flow chart of a Bluetooth broadcast two-way communication method provided by an embodiment of the present invention, and Figure 2 The execution subject of the Bluetooth broadcast two-way communication method shown is a scanning device; Figure 2 As shown, the Bluetooth broadcast two-way communication method includes the following steps:
[0115] Step 210: Receive a target broadcast data packet sent by a broadcast device.
[0116] Step 220: Determine the target response data and the device address information of the broadcasting device based on the target broadcast data packet;
[0117] Step 230: Based on the target broadcast data packet received after a preset number of times, the target response data is sent to the broadcast device based on the device address information.
[0118] Specifically, the scanning device can instruct the scanning Bluetooth protocol stack end to receive the target broadcast data packet sent by the broadcasting device through BLE, and instruct the scanning Bluetooth protocol stack end to report the target broadcast data packet and the device address information of the broadcasting device to the scanning service end through the pre-registered ms_link_ble_scan_cb callback function; then instruct the scanning Bluetooth protocol stack end to listen to the BLE unconnectable broadcast sent by the broadcasting device, and when the target broadcast data packet sent by the broadcasting device is received after the preset number of times, the scanning Bluetooth protocol stack end can be instructed to send the target response data to the broadcasting device according to the device address information. It should be noted that when the target broadcast data packet sent by the broadcasting device is received before the preset number of times, the scanning Bluetooth protocol stack end can be instructed to send the target response data without the target application data to the broadcasting device according to the device address information, that is, the target response data at this time includes the device city information of the broadcasting device and the target address information of the scanning device. The preset number of times can be 3 times.
[0119] The Bluetooth broadcast two-way communication method provided by the present invention enables a scanning device to determine corresponding target response data and device address information of the broadcasting device for a target broadcast data packet sent by the broadcasting device, so that when the target broadcast data packet is received after a preset number of times, the target response data is sent to the designated broadcasting device, thereby improving the reliability and stability of the scanning device sending the target response data to the broadcasting device, and also effectively improving the efficiency of the Bluetooth broadcast two-way communication.
[0120] It is understandable that the scanning device can determine the target response data by first parsing and then assembling the monitored target broadcast data packets. Based on this, the specific implementation process of step 220 may include:
[0121] First, the target broadcast data packet is parsed to determine the target application data; then, the data is further packaged based on the target application data to determine the target response data.
[0122] Specifically, the scanning device instructs the scanning service end to parse the target broadcast data packet, that is, to convert the target service data in the target broadcast data packet into TLV format, determine the target application data and the device address information of the broadcasting device, and instruct the scanning service end to send the target application data and the device address information of the broadcasting device to the scanning Bluetooth protocol stack end through the ms_ble_nonconn_adv_rsp function, and further instructs the scanning Bluetooth protocol stack end to fill the target application data according to a preset format, that is, to determine the target response data by adding a data header, the target address information of the scanning device, the device address information of the broadcasting device, and the target application data.
[0123] In the Bluetooth broadcast two-way communication method provided by the present invention, a scanning device determines target response data by first parsing the target broadcast data packet and then packaging the data, thereby improving the reliability and stability of determining the target response data, thereby providing reliable guarantee for subsequent accurate feedback of the response to the broadcasting device.
[0124] Reference Figure 3 , is a schematic diagram of the data interaction flow of the Bluetooth broadcast two-way communication system provided by the present invention, such as Figure 3 As shown, the Bluetooth broadcast two-way communication system includes a broadcast device and a scanning device, the broadcast device executes the method in the aforementioned embodiment with the broadcast device as the execution subject, and the scanning device executes the method in the aforementioned embodiment with the scanning device as the execution subject.
[0125] In the Bluetooth broadcast two-way communication system provided by the present invention, the broadcasting device sends a target number of unconnectable target broadcast data packets to the scanning device through BLE based on the target number of broadcast packets and target business data; the scanning device determines the corresponding target response data and the device address information of the broadcasting device for the target broadcast data sent by the broadcasting device, so that when the target broadcast data packet is received after a preset number of times, the target response data is sent to the designated broadcasting device, thereby improving the reliability and stability of the scanning device sending the target response data to the broadcasting device, and also effectively improving the efficiency of the Bluetooth broadcast two-way communication; further, the broadcasting device receives the target response data fed back by the scanning device for the target broadcast data packet based on the target receiving radio frequency on-time; in this way, the purpose of occasional data interaction between multiple BLE devices is achieved by combining BLE technology and unconnectable broadcasting, and when data interaction is not required, the connection state does not need to be maintained, and the occasional small amount of data interaction between multiple BLE devices can quickly and reliably perform Bluetooth two-way communication, thereby effectively improving the efficiency of Bluetooth broadcast two-way communication and expanding the scope of application.
[0126] Reference Figure 4 , is a schematic diagram of the structure of the Bluetooth broadcast two-way communication device provided by the present invention, such as Figure 4 As shown, the Bluetooth broadcast two-way communication device 400 includes:
[0127] The first sending module 410 is used to send a target number of unconnectable target broadcast data packets to the scanning device through BLE based on the target number of broadcast packets and target service data;
[0128] The first receiving module 420 is configured to receive target response data fed back by the scanning device in response to a target broadcast data packet based on the target receiving radio frequency on-time.
[0129] It can be understood that the first sending module 410 can be specifically used to send an initial number of unconnectable initial broadcast data packets to the scanning device through BLE based on a preset initial number of broadcast packets and target business data; based on the fact that no receiving response result of the scanning device for the initial broadcast data packet is heard within a preset listening time, the initial number of broadcast packets is updated to determine the target number of broadcast packets.
[0130] It can be understood that the first receiving module 420 can be specifically used to monitor the reception response of the scanning device to the initial broadcast data packet within a preset monitoring time based on the preset initial reception radio frequency on-time; based on the fact that no reception response result of the scanning device to the initial broadcast data packet is heard within the preset monitoring time, the initial reception radio frequency on-time is updated to determine the target reception radio frequency on-time; based on the target reception radio frequency on-time, the target response data fed back by the scanning device to the target broadcast data packet is received within the preset monitoring time.
[0131] It can be understood that the first sending module 410 can also be used to determine an initial number of broadcast packets, that is, based on the target address information of the scanning device, search for the historical cumulative number of broadcast packets corresponding to the target address information; based on the successful search result of the historical cumulative number of broadcast packets, determine the historical cumulative number of broadcast packets found, and based on the historical cumulative number of broadcast packets, determine the initial number of broadcast packets; based on the failed search result of the historical cumulative number of broadcast packets, determine the initial number of broadcast packets to be a preset number of broadcast packets.
[0132] It can be understood that the first receiving module 420 can also be specifically used to determine the initial receiving radio frequency on time, that is, based on the target address information of the scanning device, the historical cumulative receiving radio frequency on time corresponding to the target address information is searched; based on the successful result of the search for the historical cumulative receiving radio frequency on time, the found historical cumulative receiving radio frequency on time is determined, and based on the historical cumulative receiving radio frequency on time, the initial receiving radio frequency on time is determined; based on the failed result of the search for the historical cumulative receiving radio frequency on time, the initial receiving radio frequency on time is determined to be the preset receiving radio frequency on time.
[0133] It can be understood that the Bluetooth broadcast two-way communication device can also include an update module, which can be specifically used to determine the target number of broadcast packets corresponding to the target response data, the target receiving radio frequency on-time and the target address information of the scanning device as the record information to be added; determine that the number of pre-stored historical record information exceeds a preset number threshold, and update the historical record information; based on the historical record information after the information is updated, add the record information to be added.
[0134] It can be understood that the update module can also be used to perform data analysis on the target response data to determine the target application data; match the number of target application data with the number of scanning devices; based on the successful matching result of the number of target application data with the number of scanning devices, update the Bluetooth broadcast status to stop the BLE unconnectable broadcast status; based on the failed matching result of the number of target application data with the number of scanning devices, update the Bluetooth broadcast status to continue the BLE unconnectable broadcast status.
[0135] Reference Figure 5 , is a schematic diagram of the structure of the Bluetooth broadcast two-way communication device provided by the present invention, such as Figure 5 As shown, the Bluetooth broadcast two-way communication device 500 includes:
[0136] The second receiving module 510 is used to receive a target broadcast data packet sent by a broadcast device;
[0137] A determination module 520, configured to determine target response data and device address information of the broadcasting device based on the target broadcast data packet;
[0138] The second sending module 530 is configured to send target response data to the broadcasting device based on the device address information based on the target broadcasting data packet received after a preset number of times.
[0139] It is understandable that the determination module 520 can be specifically used to perform data analysis on the target broadcast data packet to determine the target application data; perform data packaging based on the target application data to determine the target response data.
[0140] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device 600 may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the following method:
[0141] Based on the target number of advertising packets and the target service data, sending a target number of unconnectable target advertising data packets to the scanning device via BLE;
[0142] Based on the target receiving radio frequency on time, the target response data fed back by the scanning device in response to the target broadcast data packet is received. And / or,
[0143] Receive target broadcast data packets sent by the broadcasting device;
[0144] Based on the target broadcast data packet, determine the target response data and the device address information of the broadcast device;
[0145] Based on the target broadcast data packet received after a preset number of times, the target response data is sent to the broadcast device based on the device address information.
[0146] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0147] On the other hand, an embodiment of the present invention discloses a computer program product, wherein the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions. When the program instructions are executed by a computer, the computer can perform the methods provided by the above-mentioned method embodiments, for example, including:
[0148] Based on the target number of advertising packets and the target service data, sending a target number of unconnectable target advertising data packets to the scanning device via BLE;
[0149] Based on the target receiving radio frequency on time, the target response data fed back by the scanning device in response to the target broadcast data packet is received. And / or,
[0150] Receive target broadcast data packets sent by the broadcasting device;
[0151] Based on the target broadcast data packet, determine the target response data and the device address information of the broadcast device;
[0152] Based on the target broadcast data packet received after a preset number of times, the target response data is sent to the broadcast device based on the device address information.
[0153] In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the transmission method provided in the above embodiments, for example, including:
[0154] Based on the target number of advertising packets and the target service data, sending a target number of unconnectable target advertising data packets to the scanning device via BLE;
[0155] Based on the target receiving radio frequency on time, the target response data fed back by the scanning device in response to the target broadcast data packet is received. And / or,
[0156] Receive target broadcast data packets sent by the broadcasting device;
[0157] Based on the target broadcast data packet, determine the target response data and the device address information of the broadcast device;
[0158] Based on the target broadcast data packet received after a preset number of times, the target response data is sent to the broadcast device based on the device address information.
[0159] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution can be essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0161] Finally, it should be noted that the above embodiments are only used to illustrate the present invention, rather than to limit the present invention. Although the present invention is described in detail with reference to the embodiments, it should be understood by those skilled in the art that various combinations, modifications or equivalent substitutions of the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention, and should be included in the scope of the claims of the present invention.
Claims
1. A Bluetooth broadcast two-way communication method, characterized in that: include: Based on the target number of broadcast packets and the target service data, a target number of target broadcast data packets that cannot be connected are sent to the scanning device through BLE; wherein the target number of broadcast packets are obtained by first sending BLE unconnectable through an initial number of broadcast packets, and then adjusting the initial number of broadcast packets when no response from the scanning device is received within a preset monitoring time; Based on the target receiving radio frequency on-time, the target response data fed back by the scanning device in response to the target broadcast data packet is received; wherein the target receiving radio frequency on-time is the opening time of the data receiving window corresponding to when the broadcasting device receives the response from the scanning device.
2. The Bluetooth broadcast two-way communication method according to claim 1, characterized in that: Before sending the target number of unconnectable target broadcast data packets to the scanning device through BLE based on the target number of broadcast packets and the target service data, the method further includes: Based on the preset initial number of advertising packets and target service data, an initial number of unconnectable initial advertising data packets are sent to the scanning device via BLE; Based on the fact that no reception response result of the scanning device to the initial broadcast data packet is monitored within the preset monitoring time, the initial number of broadcast packets is updated to determine a target number of broadcast packets.
3. The Bluetooth broadcast two-way communication method according to claim 2, characterized in that: The receiving, based on the target receiving radio frequency on-time, the target response data fed back by the scanning device in response to the target broadcast data packet comprises: Based on a preset initial receiving radio frequency on time, monitoring a reception response of the scanning device to the initial broadcast data packet within the preset monitoring time; Based on the fact that no reception response result of the scanning device to the initial broadcast data packet is monitored within the preset monitoring time, the initial reception radio frequency activation time is updated to determine the target reception radio frequency activation time; Based on the target receiving radio frequency on time, target response data fed back by the scanning device in response to the target broadcast data packet is received within the preset monitoring time.
4. The Bluetooth broadcast two-way communication method according to claim 2, characterized in that: The process of determining the initial number of broadcast packets includes: Based on the target address information of the scanning device, searching for a historical cumulative number of broadcast packets corresponding to the target address information; Based on the successful search result of the historical cumulative number of broadcast packets, determine the historical cumulative number of broadcast packets found, and based on the historical cumulative number of broadcast packets, determine the initial number of broadcast packets; Based on the failed search result of the historical accumulated number of broadcast packets, it is determined that the initial number of broadcast packets is a preset number of broadcast packets.
5. The Bluetooth broadcast two-way communication method according to claim 3, characterized in that: The process of determining the initial receiving radio frequency on time length includes: Based on the target address information of the scanning device, searching for the historical accumulated receiving radio frequency on time corresponding to the target address information; Based on the successful result of searching the historical cumulative reception radio frequency on time, determine the found historical cumulative reception radio frequency on time, and based on the historical cumulative reception radio frequency on time, determine the initial reception radio frequency on time; Based on the failed result of searching the historical accumulated receiving radio frequency on time, it is determined that the initial receiving radio frequency on time is the preset receiving radio frequency on time.
6. The Bluetooth broadcast two-way communication method according to any one of claims 1 to 5, characterized in that: The method further comprises: Determine the target number of broadcast packets corresponding to the target response data, the target receiving radio frequency on-time, and the target address information of the scanning device as the record information to be added; Determining that the amount of pre-stored historical record information exceeds a preset amount threshold, updating the historical record information; Based on the historical record information after the information is updated, the record information to be added is added.
7. The Bluetooth broadcast two-way communication method according to any one of claims 1 to 5, characterized in that: The method further comprises: Performing data analysis on the target response data to determine target application data; Matching the quantity of the target application data with the quantity of the scanning devices; Based on the result of successful matching between the number of the target application data and the number of the scanning devices, updating the Bluetooth broadcast state to stop the BLE unconnectable broadcast state; Based on the result that the number of the target application data and the number of the scanning devices fail to match, the Bluetooth broadcast state is updated to a continuing BLE unconnectable broadcast state.
8. A Bluetooth broadcast two-way communication method, characterized in that: include: Receive target broadcast data packets sent by the broadcasting device; The broadcasting device is used to send a target number of target broadcasting data packets that cannot be connected to the scanning device through BLE based on the target number of broadcasting packets and the target service data; wherein the target number of broadcasting packets is obtained by first sending BLE unconnectable through an initial number of broadcasting packets, and then adjusting the initial number of broadcasting packets when no response from the scanning device is received within a preset monitoring time; Based on the target broadcast data packet, the target response data and the device address information of the broadcast device are determined; the broadcast device is also used to receive the target response data fed back by the scanning device for the target broadcast data packet based on the target receiving radio frequency on time; wherein the target receiving radio frequency on time is the opening time of the data receiving window corresponding to when the broadcast device receives the response of the scanning device; Based on the target broadcast data packet received after a preset number of times, the target response data is sent to the broadcast device based on the device address information.
9. The Bluetooth broadcast two-way communication method according to claim 8, characterized in that: The step of determining target response data based on the target broadcast data packet includes: Performing data analysis on the target broadcast data packet to determine target application data; Data is packaged based on the target application data to determine target response data.
10. A Bluetooth broadcast two-way communication system, characterized in that: The invention comprises a broadcasting device and a scanning device, wherein the broadcasting device executes the method according to claims 1 to 7, and the scanning device executes the method according to claim 8 or 9.
11. A Bluetooth broadcast two-way communication device, characterized in that: include: A first sending module is used to send a target number of target broadcast data packets that cannot be connected to the scanning device through BLE based on the target number of broadcast packets and the target service data; wherein the target number of broadcast packets is obtained by first sending the BLE unconnectable through an initial number of broadcast packets, and then adjusting the initial number of broadcast packets when no response from the scanning device is received within a preset monitoring time; The first receiving module is used to receive the target response data fed back by the scanning device in response to the target broadcast data packet based on the target receiving radio frequency on-time; wherein the target receiving radio frequency on-time is the on-time of the data receiving window corresponding to when the broadcasting device receives the response from the scanning device.
12. A Bluetooth broadcast two-way communication device, characterized in that: include: A second receiving module, used for receiving a target broadcast data packet sent by a broadcasting device; The broadcasting device is used to send a target number of target broadcasting data packets that cannot be connected to the scanning device through BLE based on the target number of broadcasting packets and the target service data; wherein the target number of broadcasting packets is obtained by first sending BLE unconnectable through an initial number of broadcasting packets, and then adjusting the initial number of broadcasting packets when no response from the scanning device is received within a preset monitoring time; A determination module is used to determine the target response data and the device address information of the broadcasting device based on the target broadcast data packet; the broadcasting device is also used to receive the target response data fed back by the scanning device for the target broadcast data packet based on the target receiving radio frequency opening duration; wherein the target receiving radio frequency opening duration is the opening duration of the data receiving window corresponding to when the broadcasting device receives the response of the scanning device The second sending module is used to send the target response data to the broadcasting device based on the target broadcast data packet received after a preset number of times and based on the address information.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the Bluetooth broadcast two-way communication method according to any one of claims 1 to 9 is implemented.
14. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the Bluetooth broadcast two-way communication method as claimed in any one of claims 1 to 9 is implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the Bluetooth broadcast two-way communication method according to any one of claims 1 to 9 is implemented.
