Communication control method and device based on BLE, control terminal and storage medium
By detecting the BLE signal strength value and dynamically adjusting the packet transmission parameters, the packet loss problem when the BLE signal is weak is solved, thereby improving communication reliability and control success rate.
Patent Information
- Application Number
- CN202210724683.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-06-24
AI Technical Summary
When the BLE signal strength is weak, the power consumption and packet transmission rate of BLE cannot be adjusted, resulting in a high packet loss rate and affecting communication reliability.
By detecting the signal strength value of the target device, the packet transmission parameters of the control terminal, including packet transmission power and packet transmission rate, are dynamically adjusted to match the current signal strength and device status, thereby reducing packet loss events.
It improves the reliability of BLE communication, reduces packet loss rate in weak signal conditions, and increases control success rate.
Smart Images

Figure CN115226194B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of communication, and particularly relates to a BLE-based communication control method and device, a control terminal and a storage medium, in particular to a method and device for adjusting power consumption and packet transmission times based on BLE, a control terminal and a storage medium. BACKGROUND
[0002] BLE (Bluetooth Low Energy) is mainly used to realize the continuous connection between a smart control terminal (such as a mobile phone system, a smart bracelet, etc.) and a peripheral device (such as an air conditioner), is a short-range wireless communication technology with extremely low power consumption, and the effective transmission distance has been increased to more than 100 meters.
[0003] Low power consumption is a relatively obvious and prominent feature of BLE, and it is also due to the low power consumption feature of BLE that BLE is often used in smart control terminals (such as mobile phone systems, smart bracelets, etc.). The requirement of low power consumption is the basic requirement of the smart control terminal (such as the mobile phone system, the smart bracelet, etc.) for BLE. On the one hand, it can improve the use time of the smart control terminal (such as the mobile phone system, the smart bracelet, etc.) for BLE, and on the other hand, it can reduce the heating degree of the smart control terminal (such as the mobile phone system, the smart bracelet, etc.) when moving in the broadcast state and the connection state.
[0004] BLE has different performances in different smart control terminals (such as mobile phone systems, smart bracelets, etc.), and the signal reception success rate also changes with the length of the distance. However, in the related scheme, in the case that the signal strength value of BLE is weak, since the packet transmission power consumption and the packet transmission rate of BLE cannot be adjusted, there is a problem of a large packet loss rate.
[0005] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0006] The present application aims to provide a BLE-based communication control method and device, a control terminal and a storage medium, to solve the problem of a large packet loss rate due to the inability to adjust the packet transmission power consumption and the packet transmission rate of BLE in the case that the signal strength value of BLE is weak, to achieve the effect of reducing or even avoiding the packet loss event in the case that the signal strength value of BLE on the controlled device is weak by detecting the signal strength value of BLE on the controlled device, dynamically adjusting the power consumption and the packet transmission rate of BLE, and improving the communication reliability based on BLE.
[0007] The application provides a BLE-based communication control method applied to BLE-based communication control between a control terminal and a target device, wherein the control terminal is provided with BLE, and the target device is also provided with BLE; the control terminal can realize communication control on the target device based on BLE; the BLE-based communication control method comprises the following steps: obtaining a signal strength value of BLE on the target device, which is recorded as a current packet receiving signal strength value; adjusting packet sending parameters of the control terminal for sending control packets to the target device according to the current packet receiving signal strength value of the target device, to obtain current packet sending parameters; and sending control packets to the target device according to the current packet sending parameters of the control terminal, so as to realize communication control on the target device based on BLE.
[0008] In some embodiments, the packet sending parameters and the packet sending parameters in the current packet sending parameters of the control terminal comprise packet sending power and / or packet sending rate; the step of adjusting the packet sending parameters of the control terminal for sending control packets to the target device according to the current packet receiving signal strength value of the target device to obtain current packet sending parameters comprises the following steps: determining a packet sending signal threshold of the control terminal itself and determining current power consumption parameters of the target device; determining whether the current packet receiving signal strength value of the target device is greater than or equal to the packet sending signal threshold of the control terminal; if the current packet receiving signal strength value of the target device is greater than or equal to the packet sending signal threshold of the control terminal, determining default packet sending parameters of the control terminal for sending control packets to the target device as the current packet sending parameters; and if the current packet receiving signal strength value of the target device is less than the packet sending signal threshold of the control terminal, adjusting the packet sending parameters of the control terminal for sending control packets to the target device according to the current power consumption parameters of the target device to obtain the current packet sending parameters.
[0009] In some embodiments, according to the current power consumption parameter of the target device, the sending parameter of the control terminal for sending the control packet to the target device is adjusted to obtain a current sending parameter, including: determining whether the current power consumption parameter of the target device is a set maximum power consumption parameter; if the current power consumption parameter of the target device is the set maximum power consumption parameter, increasing a sending rate in the default sending parameter of the control terminal for sending the control packet to the target device by a first set value based on the default sending parameter of the control terminal for sending the control packet to the target device, obtaining a current sending rate, and taking a sending power in the default sending parameter of the control terminal for sending the control packet to the target device and the current sending rate as the current sending parameter of the control terminal for sending the control packet to the target device; if the current power consumption parameter of the target device is not the set maximum power consumption parameter, increasing a sending power in the default sending parameter of the control terminal for sending the control packet to the target device by a second set value based on the default sending parameter of the control terminal for sending the control packet to the target device, obtaining a current sending power, and taking a sending frequency in the default sending parameter of the control terminal for sending the control packet to the target device and the current sending power as the current sending parameter of the control terminal for sending the control packet to the target device.
[0010] In some embodiments, further including: obtaining a model of the target device; in combination with the model of the target device, adjusting the sending parameter of the control terminal for sending the control packet to the target device according to the current received packet signal strength value of the target device to obtain a current sending parameter; wherein the model of the target device is different, and the corresponding sending parameter of the control terminal for sending the control packet to the target device is different; and sending the control packet to the target device according to the current sending parameter of the control terminal to realize communication control of the target device based on BLE.
[0011] In some embodiments, further including: obtaining a system type of the control terminal; in combination with the system type of the control terminal, adjusting the sending parameter of the control terminal for sending the control packet to the target device according to the current received packet signal strength value of the target device to obtain a current sending parameter; wherein the system type of the control terminal is different, and the corresponding sending parameter of the control terminal for sending the control packet to the target device is different; and sending the control packet to the target device according to the current sending parameter of the control terminal to realize communication control of the target device based on BLE.
[0012] According to the method, the application provides a BLE-based communication control device, which is applied to BLE-based communication control between a control terminal and a target device, the control terminal has a BLE, and the target device also has a BLE; the control terminal can control the communication of the target device based on the BLE; the BLE-based communication control device comprises: an acquisition unit configured to acquire a signal strength value of the BLE on the target device, which is recorded as a current packet receiving signal strength value; a control unit configured to adjust a packet sending parameter of the control terminal for sending a control packet to the target device according to the current packet receiving signal strength value of the target device, and obtain a current packet sending parameter; and the control unit is further configured to send a control packet to the target device according to the current packet sending parameter of the control terminal, so as to control the communication of the target device based on the BLE.
[0013] In some embodiments, the packet sending parameter and the packet sending parameter in the current packet sending parameter of the control terminal comprise a packet sending power and / or a packet sending rate; the control unit adjusts the packet sending parameter of the control terminal for sending a control packet to the target device according to the current packet receiving signal strength value of the target device, and obtains a current packet sending parameter, which comprises: determining a packet sending signal threshold of the control terminal itself and determining a current power consumption parameter of the target device; determining whether the current packet receiving signal strength value of the target device is greater than or equal to the packet sending signal threshold of the control terminal; if the current packet receiving signal strength value of the target device is greater than or equal to the packet sending signal threshold of the control terminal, a default packet sending parameter of the control terminal for sending a control packet to the target device is determined as the current packet sending parameter; and if the current packet receiving signal strength value of the target device is less than the packet sending signal threshold of the control terminal, the packet sending parameter of the control terminal for sending a control packet to the target device is adjusted according to the current power consumption parameter of the target device, and a current packet sending parameter is obtained.
[0014] In some embodiments, the control unit adjusts the packet sending parameter of the control terminal sending the control packet to the target device according to the current power consumption parameter of the target device, to obtain a current packet sending parameter, including: determining whether the current power consumption parameter of the target device is a set maximum power consumption parameter; if the current power consumption parameter of the target device is the set maximum power consumption parameter, increasing a packet sending rate in the default packet sending parameter of the control terminal sending the control packet to the target device by a first set value, to obtain a current packet sending rate, taking the packet sending power in the default packet sending parameter of the control terminal sending the control packet to the target device and the current packet sending rate as the current packet sending parameter of the control terminal sending the control packet to the target device; if the current power consumption parameter of the target device is not the set maximum power consumption parameter, increasing a packet sending power in the default packet sending parameter of the control terminal sending the control packet to the target device by a second set value, to obtain a current packet sending power, taking a packet sending frequency in the default packet sending parameter of the control terminal sending the control packet to the target device and the current packet sending power as the current packet sending parameter of the control terminal sending the control packet to the target device.
[0015] In some embodiments, the acquisition unit is further configured to acquire a model of the target device; the control unit is further configured to adjust the packet sending parameter of the control terminal sending the control packet to the target device according to the current packet receiving signal strength value of the target device, to obtain a current packet sending parameter, in combination with the model of the target device; the model of the target device is different, and the corresponding packet sending parameter of the control terminal sending the control packet to the target device is different; and the control unit is further configured to send the control packet to the target device according to the current packet sending parameter of the control terminal, to implement communication control on the target device based on BLE.
[0016] In some embodiments, the acquisition unit is further configured to acquire a system type of the control terminal; the control unit is further configured to adjust the packet sending parameter of the control terminal sending the control packet to the target device according to the current packet receiving signal strength value of the target device, to obtain a current packet sending parameter, in combination with the system type of the control terminal; the system type of the control terminal is different, and the corresponding packet sending parameter of the control terminal sending the control packet to the target device is different; and the control unit is further configured to send the control packet to the target device according to the current packet sending parameter of the control terminal, to implement communication control on the target device based on BLE.
[0017] In order to match the above device, the application further provides a control terminal, comprising: the above-mentioned BLE-based communication control device.
[0018] In order to match the above method, the application further provides a storage medium, comprising a stored program, wherein when the program runs, the device where the storage medium is located executes the above-mentioned BLE-based communication control method.
[0019] Therefore, through detecting the signal strength value of the BLE on the to-be-controlled device, and adjusting the packet sending power consumption and packet sending rate of the BLE on the control device, and / or adjusting the packet receiving power consumption of the BLE on the to-be-controlled device according to the signal strength value of the BLE on the to-be-controlled device, the model of the to-be-controlled device, and the system parameters of the control device, the application can dynamically adjust the power consumption and packet sending rate of the BLE, reduce or even avoid the packet loss event in the case that the signal strength value of the BLE on the to-be-controlled device is weak, and improve the BLE-based communication reliability.
[0020] Other features and advantages of the application will be described in the following description, and some will become apparent from the description, or will be learned through implementation of the application.
[0021] The technical solutions of the application will be further described in detail below with the aid of drawings and examples. BRIEF DESCRIPTION OF DRAWINGS
[0022] Figure 1 It is a flowchart of an embodiment of the BLE-based communication control method of the application;
[0023] Figure 2 It is a flowchart of an embodiment of adjusting the packet sending parameters of the control terminal according to the current packet receiving signal strength value of the target device in the method of the application;
[0024] Figure 3 It is a flowchart of an embodiment of adjusting the packet sending rate of the control terminal according to the current power consumption parameter of the target device in the method of the application;
[0025] Figure 4 It is a flowchart of an embodiment of adjusting the packet sending parameters of the control terminal in combination with the model of the target device in the method of the application;
[0026] Figure 5 It is a flowchart of an embodiment of adjusting the packet sending parameters of the control terminal in combination with the system type of the control terminal in the method of the application;
[0027] Figure 6 It is a structural schematic diagram of an embodiment of the BLE-based communication control device of the application;
[0028] Figure 7 Fig. 1 is a flowchart of an embodiment of a method for adjusting power consumption and the number of sending and receiving packets based on BLE.
[0029] In the embodiments of the present application, the reference signs in the drawings are as follows:
[0030] 102 - acquisition unit; 104 - control unit. DETAILED DESCRIPTION
[0031] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in conjunction with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0032] According to an embodiment of the present application, a BLE-based communication control method is provided, as shown in Figure 1 Fig. 1 is a flowchart of an embodiment of a method of the present application. The BLE-based communication control method is applied to BLE-based communication control between a control terminal and a target device. The control terminal has BLE, and the target device also has BLE. The BLE of the control terminal can be paired with the BLE of the target device. The control terminal can be a smart phone, a smart bracelet, etc. The target device can be an air conditioner, a refrigerator, etc. The control terminal can achieve communication control over the target device based on BLE. Specifically, the control terminal can send a control packet to the target device based on BLE. The target device can receive the control packet sent by the control terminal based on BLE, and execute the control instruction carried in the control packet sent by the control terminal, thereby achieving communication control of the control terminal over the target device based on BLE.
[0033] The BLE-based communication control method comprises steps S110 to S130.
[0034] At step S110, the signal strength value of BLE on the target device is acquired at the control terminal, denoted as the current packet receiving signal strength value.
[0035] At step S120, at the control terminal, the packet sending parameter of the control terminal sending the control packet to the target device is adjusted according to the current packet receiving signal strength value of the target device, to obtain a current packet sending parameter. Specifically, at the control terminal, the packet sending power of the control terminal sending the control packet to the target device is adjusted according to the current packet receiving signal strength value of the target device, to obtain a current packet sending power; and / or, at the control terminal, the packet sending rate of the control terminal sending the control packet to the target device is adjusted according to the current packet receiving signal strength value of the target device, to obtain a current packet sending rate.
[0036] In some embodiments, the packet sending parameter and the packet sending parameter in the current packet sending parameter of the control terminal include: the packet sending power and / or the packet sending rate.
[0037] The specific process of adjusting the packet sending parameter of the control terminal at the control terminal according to the current packet receiving signal strength value of the target device in step S120 is described in the following exemplary description.
[0038] The specific process of adjusting the packet sending parameter of the control terminal at the control terminal according to the current packet receiving signal strength value of the target device in step S120 is described in the following exemplary description. Figure 2 The specific process of adjusting the packet sending parameter of the control terminal at the control terminal according to the current packet receiving signal strength value of the target device in step S120 is described in the following exemplary description.
[0039] Step S210, at the control terminal, determining the packet sending signal threshold of the control terminal itself, and determining the current power consumption parameter of the target device.
[0040] Step S220, at the control terminal, determining whether the current packet receiving signal strength value of the target device is greater than or equal to the packet sending signal threshold of the control terminal.
[0041] Step S230, at the control terminal, if the current packet receiving signal strength value of the target device is greater than or equal to the packet sending signal threshold of the control terminal, the default packet sending parameter of the control terminal sending the control packet to the target device is determined as the current packet sending parameter.
[0042] Step S240, at the control terminal, if the current packet receiving signal strength value of the target device is less than the packet sending signal threshold of the control terminal, the packet sending parameter of the control terminal sending the control packet to the target device is adjusted according to the current power consumption parameter of the target device, to obtain the current packet sending parameter.
[0043] Figure 7 The flowchart of an embodiment of a method for adjusting power consumption and packet sending and receiving times based on BLE. As shown in Figure 7As shown, the scheme of the present application provides a method for adjusting power consumption and packet transmission times based on BLE, which comprises: obtaining a signal strength value of a BLE of a device to be controlled, and dynamically adjusting packet transmission times and power consumption. For details, refer to the following exemplary description.
[0044] Step 11, setting an adjusted packet transmission signal threshold x.
[0045] The packet transmission signal threshold can be understood as a reasonable or stable value of a received packet. The packet transmission signal threshold is determined according to the scene and experimental results in the development process, for example, the scene uses a distance of 3 meters, and the packet transmission signal threshold monitored by the signal between devices is set to x to achieve stable control and ensure the success rate of control.
[0046] Step 12, obtaining a signal strength scheduling value r.
[0047] There are corresponding protocols and APIs (application programming interfaces) between devices, and the signal strength scheduling value r is obtained by reading the relevant protocol content or API field.
[0048] Step 13, obtaining a current power consumption parameter m of the device.
[0049] The current power consumption parameter m of the device is a variable set in the device, which can be adjusted, and the transmission content is defined by a protocol segment, and the relevant content is added in the protocol segment.
[0050] Step 14, when the signal strength scheduling value r is greater than the packet transmission signal threshold x, a default packet transmission mode is adopted.
[0051] In some embodiments, in step S240, according to the current power consumption parameter of the target device, the packet transmission parameter of the control end for sending a control packet to the target device is adjusted to obtain a current packet transmission parameter. For details, refer to the following exemplary description.
[0052] The following will be described in combination with Figure 3 As shown, an embodiment flowchart of the method of the present application for adjusting the packet transmission parameter of the control end for sending a control packet to the target device according to the current power consumption parameter of the target device to obtain a current packet transmission parameter is further described, and the specific process of step S240 for adjusting the packet transmission parameter of the control end for sending a control packet to the target device according to the current power consumption parameter of the target device to obtain a current packet transmission parameter comprises: step S310 to step S30.
[0053] Step S310, determining whether the current power consumption parameter of the target device is a set maximum power consumption parameter in the control end.
[0054] Step S320: At the control terminal, if the current power consumption parameter of the target device is the set maximum power consumption parameter, then based on the default packet sending parameters of the control terminal sending control packets to the target device, the packet sending rate in the default packet sending parameters of the control terminal sending control packets to the target device is increased by a first set value to obtain the current packet sending rate, that is, the packet sending rate of the control terminal sending control packets to the target device is increased, which is also increasing the number of times the control terminal sends control packets to the target device. The packet sending power in the default packet sending parameters of the control terminal sending control packets to the target device and the current packet sending rate are used as the current packet sending parameters of the control terminal sending control packets to the target device.
[0055] Step S330: At the control terminal, if the current power consumption parameter of the target device is not the set maximum power consumption parameter, then based on the default packet sending parameters of the control terminal sending control packets to the target device, the packet sending power in the default packet sending parameters of the control terminal sending control packets to the target device is increased by a second set value to obtain the current packet sending power, that is, the packet sending power of the control terminal sending control packets to the target device is increased, which is also increasing the packet sending energy of the control terminal sending control packets to the target device. The number of packets sent and the current packet sending power in the default packet sending parameters of the control terminal sending control packets to the target device are used as the current packet sending parameters of the control terminal sending control packets to the target device.
[0056] like Figure 7 As shown, in the method for adjusting power consumption and packet transmission / reception frequency based on BLE provided by the present invention, the method further includes obtaining the BLE signal strength value of the device to be controlled, dynamically adjusting the packet transmission frequency and power consumption, and also includes:
[0057] In step 14, when the signal intensity value r < the packet transmission threshold x, the current power consumption parameter m of the device is obtained, and it is determined whether the current power consumption parameter m is the maximum power consumption parameter m of the device. max If the current power consumption parameter m of the device equals the maximum power consumption parameter m of the device max If the current power consumption parameter m is less than the maximum power consumption parameter m, then the number of packet transmissions will be increased (greater than the default number of packet transmissions). max If the current power consumption parameter m of the device is increased by a set value, such as +1, then the new current power consumption parameter m of the device is obtained, and the new current power consumption parameter m of the device is given to the device and reset.
[0058] The default packet sending method refers to using the default power consumption value and the default number of packet sending attempts.
[0059] For example, the applet can broadcast with the device, and the applet obtains the signal value of the target device. When the signal value of the target device is too small, the power consumption needs to be increased to enhance the signal and improve the success rate. The protocol between the applet and the device is increased, and the protocol increases the agreed header and content. After the device receives the related request, the protocol content is interpreted and the related parameters are set.
[0060] At step S130, the control end sends a control packet to the target device according to the current packet sending parameter of the control end, to realize communication control of the target device based on BLE.
[0061] The scheme of the application adjusts the packet sending mode by the signal strength value of the BLE hardware. In this way, by adjusting the signal strength value to dynamically send packets, the packet loss rate can be reduced and the control success rate can be improved. Therefore, the scheme of the application realizes dynamic adjustment of packet sending power consumption and packet sending rate by judging the signal strength value, and solves the problem of packet loss rate. The related scheme does not realize the dynamic adjustment strategy of packet sending power consumption and packet sending rate, and the low-power technology of BLE4.0 and above is not applied in mobile devices.
[0062] In some embodiments, the process of adjusting the packet sending parameter of the control end in combination with the model of the target device is further included.
[0063] The specific process of adjusting the packet sending parameter of the control end in combination with the model of the target device will be further described below with reference to the embodiment flowchart of the method of the application shown in Figure 4 The specific process of adjusting the packet sending parameter of the control end in combination with the model of the target device will be further described below with reference to the embodiment flowchart of the method of the application shown in
[0064] At step S410, the control end can obtain the model of the target device together with the signal strength value of the BLE on the target device.
[0065] At step S420, the control end adjusts the packet sending parameter of the control end for sending a control packet to the target device according to the current packet receiving signal strength value of the target device in combination with the model of the target device, to obtain the current packet sending parameter. The model of the target device is different, and the corresponding packet sending parameter of the control end for sending a control packet to the target device is different.
[0066] At step S430, the control end sends a control packet to the target device according to the current packet sending parameter of the control end, to realize communication control of the target device based on BLE.
[0067] The scheme of the present application also dynamically adjusts packet sending in combination with air conditioner models, and distinguishes between wall-mounted air conditioners and cabinet air conditioners. In this way, the packet sending frequency and signal strength are dynamically adjusted in combination with the air conditioner model or type during pairing and control, which can improve the safety of equipment use. That is, the packet sending rate is dynamically adjusted in combination with the air conditioner type or model, and different types or models of air conditioners are set to different packet sending power consumptions.
[0068] As shown in Figure 7 The scheme provided by the present application adjusts power consumption and packet sending and receiving times based on BLE, and also includes obtaining the air conditioner model, dynamically adjusting the packet sending times and power consumption. For specific exemplary descriptions, please refer to the following.
[0069] Step 21: Obtain the air conditioner equipment model during BLE pairing, and set different control interfaces and power consumptions and packet sending times for different equipment.
[0070] For example: first, assume that the hardware of each air conditioner model is known, and it is possible that the key hardware (such as BLE hardware) of different air conditioners can distinguish between cabinet air conditioners and wall-mounted air conditioners in the communication content. The shortest communication distance of the air conditioner BLE corresponding to the wall-mounted air conditioner and the cabinet air conditioner is different, which results in different BLE signal strength values at the same location. Because the parameters of each BLE hardware are different, in order to ensure the control success rate, the parameters set according to different BLE hardware can achieve the same communication effect under certain conditions. Among them, different distances have different signal values. Different power consumptions have different signal values. Different equipment also has different control parameters at the same distance.
[0071] Step 22: Enter the equipment, obtain the air conditioner model, and obtain the preset packet sending times or power consumption according to the air conditioner model.
[0072] Step 23: Obtain the signal value, judge the distance between the user and the control end according to the signal value, and dynamically adjust the packet sending times and power consumption in combination with the signal value according to the obtained preset value.
[0073] The preset value such as power consumption and packet sending times is correspondingly adjusted according to the obtained signal value and function rate.
[0074] Step 23: Obtain the equipment power consumption parameter m, and adjust the power consumption by comparing the signal value and the power consumption parameter, and set the packet sending times.
[0075] In some embodiments, the process further includes adjusting the packet sending parameters of the control end in combination with the system type of the control end.
[0076] The following will be described in combination with Figure 5An embodiment flowchart of a method of the application is shown, which further illustrates the specific process of adjusting the packet sending parameter of the control terminal according to the system type of the control terminal, including steps S510 to S530.
[0077] In step S510, the system type of the control terminal is obtained together with the signal strength value of the BLE on the target device.
[0078] In step S520, the packet sending parameter of the control terminal to the target device is adjusted according to the current packet receiving signal strength value of the target device in combination with the system type of the control terminal, to obtain the current packet sending parameter.
[0079] In step S530, the control terminal sends a control packet to the target device according to the current packet sending parameter of the control terminal, to realize communication control of the target device based on BLE.
[0080] The scheme of the application can also adjust the packet sending strategy in combination with the mobile phone system, and send control packets of different frequencies according to different mobile phone systems.
[0081] As shown in the drawings, Figure 7 The scheme of the application provides a method for adjusting power consumption and packet sending / receiving times based on BLE, which further includes:
[0082] Step 3, obtain the mobile phone system and dynamically adjust the packet sending times and power consumption.
[0083] The mobile phone system refers to a commonly used system, such as ios, android, etc., and of course other systems may appear in the future, which are also included. The applet is integrated in the mobile phone system, and the applet currently obtains the mobile phone system of the WeChat.
[0084] Step 31, according to different mobile phone systems, currently mainly android and iphone, do packet loss test (the system includes but is not limited to android and iphone system), and find that the packet loss rate of iphone is lower than that of android at a distance of 3 meters.
[0085] The packet loss test is a manual test, which records the result once for each sending, and the result is control success or failure. This test uses different mobile phones to repeatedly test and verify at different distances, so as to collect enough data.
[0086] For example, if the obtained mobile phone system is an iPhone, the packet loss rate of the iPhone is low, and the packet loss rates at 1m, 3m, 5m and 7m are 0%, 2%, 5% and 10% respectively, in order to improve the success rate, the packet sending frequency is adjusted according to the obtained signal value and function rate.
[0087] In step 32, the BLE control applet is run to obtain the mobile phone system, and if it is an Android system, N packets are added to the default packet sending frequency (here, N packets are determined according to the results in the test process), and if it is an iPhone, the default packet sending frequency is used.
[0088] Specifically, the mobile phone system is opened to enter the applet, which is a commonly used applet, but the applet has added functions, and after entering the applet, the system of the mobile phone can be obtained, and the applet adjusts the strategy according to the obtained system.
[0089] Among them, the interactive frame in unit time is dynamically set to judge whether the packet sending power and the packet sending frequency need to be adjusted. For example, the interactive frame in unit time can be dynamically set to judge whether the packet sending power and the packet sending frequency need to be adjusted. For example, the packet loss rate of an iPhone at 3m is 95%, at 5m is 92%, and at 8m is 90%, in order to improve the control success rate, 1 packet is sent at 3m, 2 packets are sent at 5m, and 3 packets are sent at 8m. Each control frame sends N packets, and N is a positive integer.
[0090] For example, the packet loss rate of an iPhone is relatively low, and only one sending can be successful, so the default packet sending frequency is 1.
[0091] In step 33, the packet sending frequency is increased in combination with the distance without distinguishing the mobile phone system.
[0092] Specifically, in order to improve the control success rate, the signal value is obtained to inversely calculate the distance between the device and the mobile control terminal, and the signal value detected by different distances is definitely more, when the distance changes, the strategy needs to be adjusted, the packet sending frequency can be increased, the packet sending power (power consumption) can be adjusted, and the packet sending frequency can be adjusted according to different mobile phone systems. Different mobile phone systems set different packet sending frequencies or different power consumptions, and these data are obtained through experiments.
[0093] The scheme of the application mainly adjusts the packet sending power and the packet sending frequency according to the signal strength, the air conditioner model and the mobile phone system. Specifically, the packet sending mode is dynamically adjusted by obtaining the signal strength value, the packet sending is dynamically adjusted in combination with the air conditioner model, the packet sending strategy is adjusted in combination with the mobile phone system, different frequency control packets are sent according to different mobile phone systems, the packet loss event in the case that the BLE signal strength value of the to-be-controlled device is weak is reduced or even avoided, and the communication reliability based on BLE is improved.
[0094] By detecting the signal strength value of the BLE on the to-be-controlled device, adjusting the packet sending power consumption and the packet sending rate of the BLE on the control device and / or adjusting the packet receiving power consumption of the BLE on the to-be-controlled device according to the signal strength value of the BLE on the to-be-controlled device and in combination with the model of the to-be-controlled device and the system parameters of the control device, the packet loss event in the case where the signal strength value of the BLE on the to-be-controlled device is weak can be reduced or even avoided, and the communication reliability based on BLE is improved.
[0095] According to the embodiments of the present application, a BLE-based communication control device corresponding to the BLE-based communication control method is also provided. Referring to Figure 6 The BLE-based communication control device is applied to the BLE-based communication control between a control terminal and a target device, the control terminal has a BLE, the target device also has a BLE, and the BLE of the control terminal can be paired with the BLE of the target device. The control terminal is, for example, a smart phone, a smart bracelet or the like, and the target device is, for example, an air conditioner, a refrigerator or the like. The control terminal can achieve communication control over the target device based on BLE. Specifically, the control terminal can send a control packet to the target device based on BLE. The target device can receive the control packet sent by the control terminal based on BLE, execute the control instruction carried in the control packet sent by the control terminal, and achieve the communication control of the control terminal over the target device based on BLE.
[0096] The BLE-based communication control device comprises an acquisition unit 102 and a control unit 104.
[0097] The acquisition unit 102 is configured to acquire, at the control terminal, the signal strength value of the BLE on the target device, denoted as the current packet receiving signal strength value. The specific functions and processes of the acquisition unit 102 are described in step S110.
[0098] The control unit 104 is configured to adjust, at the control terminal, the packet sending parameters of the control terminal for sending the control packet to the target device according to the current packet receiving signal strength value of the target device, to obtain the current packet sending parameters. Specifically, the control unit 104 adjusts, at the control terminal, the packet sending power of the control terminal for sending the control packet to the target device according to the current packet receiving signal strength value of the target device, to obtain the current packet sending power; and / or the control unit 104 adjusts, at the control terminal, the packet sending rate of the control terminal for sending the control packet to the target device according to the current packet receiving signal strength value of the target device, to obtain the current packet sending rate. The specific functions and processes of the control unit 104 are described in step S120.
[0099] In some embodiments, the packet sending parameters and the packet sending parameters in the current packet sending parameters of the control terminal include packet sending power and / or packet sending rate.
[0100] The control unit 104 adjusts the packet sending parameters of the control terminal for sending control packets to the target device according to the current packet receiving signal strength value of the target device, to obtain current packet sending parameters.
[0101] The control unit 104 is specifically further configured to determine a packet sending signal threshold value of the control terminal itself and determine a current power consumption parameter of the target device. For specific functions and processes of the control unit 104, please refer to step S210.
[0102] The control unit 104 is specifically further configured to determine whether the current packet receiving signal strength value of the target device is greater than or equal to the packet sending signal threshold value of the control terminal. For specific functions and processes of the control unit 104, please refer to step S220.
[0103] The control unit 104 is specifically further configured to, if the current packet receiving signal strength value of the target device is greater than or equal to the packet sending signal threshold value of the control terminal, determine the default packet sending parameters of the control terminal for sending control packets to the target device as the current packet sending parameters. For specific functions and processes of the control unit 104, please refer to step S230.
[0104] The control unit 104 is specifically further configured to, if the current packet receiving signal strength value of the target device is less than the packet sending signal threshold value of the control terminal, adjust the packet sending parameters of the control terminal for sending control packets to the target device according to the current power consumption parameter of the target device, to obtain the current packet sending parameters. For specific functions and processes of the control unit 104, please refer to step S240.
[0105] Figure 7 An embodiment of a flowchart of a device for adjusting power consumption and packet sending / receiving times based on BLE is shown in FIG. 10. Figure 7 As shown in FIG. 10, the device for adjusting power consumption and packet sending / receiving times based on BLE provided by the scheme of the present application includes obtaining a signal strength value of a BLE of a device to be controlled and dynamically adjusting packet sending times and power consumption. For specific examples, please refer to the following exemplary description.
[0106] Step 11, set an adjustment packet sending signal threshold value x.
[0107] The packet sending signal threshold can be understood as a reasonable or stable value of the received packet. The packet sending signal threshold is determined according to the scene and experimental results in the development process, for example, the scene uses a distance of 3 meters, and the most ideal packet sending signal threshold x is set for the signal monitored between the devices to achieve stable control and ensure the success rate of control.
[0108] Step 12, obtaining the signal strength scheduling value r.
[0109] There are corresponding protocols and APIs (application programming interfaces) between the devices, and the relevant protocol content or API field is read to obtain.
[0110] Step 13, obtaining the current power consumption parameter m of the device.
[0111] The current power consumption parameter m of the device is a variable set in the device, which can be adjusted, and the transmission content is defined by the protocol segment, and the relevant content is added in the protocol segment.
[0112] Step 14, when the signal strength scheduling value r is greater than the packet sending signal threshold x, the default packet sending mode is used.
[0113] In some embodiments, the control unit 104, at the control end, adjusts the packet sending parameter of the control end for sending the control packet to the target device according to the current power consumption parameter of the target device, to obtain the current packet sending parameter, including:
[0114] The control unit 104 is specifically further configured to determine, at the control end, whether the current power consumption parameter of the target device is a set maximum power consumption parameter. The specific functions and processes of the control unit 104 are also referred to in step S310.
[0115] The control unit 104 is specifically further configured to, at the control end, if the current power consumption parameter of the target device is the set maximum power consumption parameter, increase a packet sending rate in a default packet sending parameter of the control end for sending the control packet to the target device by a first set value based on the default packet sending parameter of the control end for sending the control packet to the target device, to obtain the current packet sending rate, that is, to increase the packet sending rate of the control end for sending the control packet to the target device, that is, to increase the packet sending times of the control end for sending the control packet to the target device, and to take the packet sending power in the default packet sending parameter of the control end for sending the control packet to the target device and the current packet sending rate as the current packet sending parameter of the control end for sending the control packet to the target device. The specific functions and processes of the control unit 104 are also referred to in step S320.
[0116] The control unit 104 is further configured to, at the control terminal, if the current power consumption parameter of the target device is not the set maximum power consumption parameter, increase the transmission power in the default transmission parameters of the control packet sent by the control terminal to the target device by a second set value to obtain the current transmission power, that is, increase the transmission power of the control packet sent by the control terminal to the target device, which is to say, increase the transmission energy of the control packet sent by the control terminal to the target device. The number of transmissions and the current transmission power in the default transmission parameters of the control packet sent by the control terminal to the target device are used as the current transmission parameters of the control packet sent by the control terminal to the target device. The specific functions and processing of this control unit 104 are further described in step S330.
[0117] like Figure 7 As shown, in the device for adjusting power consumption and packet transmission / reception frequency based on BLE provided by the present invention, the method of acquiring the BLE signal strength value of the device to be controlled and dynamically adjusting the packet transmission frequency and power consumption further includes:
[0118] In step 14, when the signal intensity value r < the packet transmission threshold x, the current power consumption parameter m of the device is obtained, and it is determined whether the current power consumption parameter m is the maximum power consumption parameter m of the device. max If the current power consumption parameter m of the device equals the maximum power consumption parameter m of the device max If the current power consumption parameter m is less than the maximum power consumption parameter m, then the number of packet transmissions will be increased (greater than the default number of packet transmissions). max If the current power consumption parameter m of the device is increased by a set value, such as +1, then the new current power consumption parameter m of the device is obtained, and the new current power consumption parameter m of the device is given to the device and reset.
[0119] The default packet sending method refers to using the default power consumption value and the default number of packet sending attempts.
[0120] For example, a mini-program can communicate with a device via broadcast. After the mini-program obtains the signal value of the target device, if the signal value is too low, the power consumption needs to be increased to strengthen the signal and improve the success rate. A protocol is added between the mini-program and the device, including agreed-upon headers and content. Upon receiving the relevant request, the device interprets the protocol content and sets the relevant parameters.
[0121] The control unit 104 is further configured to send a control packet to the target device based on the current packet sending parameters of the control terminal, so as to realize communication control of the target device based on BLE. The specific functions and processing of the control unit 104 are further described in step S130.
[0122] The scheme of the present application dynamically adjusts the packet sending mode through the signal strength value of the BLE hardware. In this way, by dynamically sending packets through the adjustment of the signal strength value, the packet loss rate can be reduced and the control success rate can be improved. Therefore, the scheme of the present application dynamically adjusts the packet sending power consumption and the packet sending rate through the judgment of the signal strength value, and solves the problem of packet loss rate. The related scheme does not realize the dynamic adjustment strategy of the packet sending power consumption and the packet sending rate, and the low-power technology of BLE4.0 and above is not applied in mobile devices.
[0123] In some embodiments, the process of adjusting the packet sending parameters of the control end in combination with the model of the target device is further included, and the specific process is as follows:
[0124] The acquisition unit 102 is further configured to acquire the model of the target device together with the signal strength value of the BLE on the target device at the control end. The specific functions and processes of the control unit 104 are also described in step S410.
[0125] The control unit 104 is further configured to adjust the packet sending parameters of the control end to the target device in combination with the model of the target device according to the current packet receiving signal strength value of the target device, to obtain the current packet sending parameters, at the control end, in the case that the model of the target device is acquired. The model of the target device is different, and the corresponding packet sending parameters of the control end to the target device are different. The specific functions and processes of the control unit 104 are also described in step S420.
[0126] The control unit 104 is further configured to send control packets to the target device according to the current packet sending parameters of the control end, to realize communication control of the target device based on BLE, at the control end. The specific functions and processes of the control unit 104 are also described in step S430.
[0127] The scheme of the present application also dynamically adjusts the packet sending in combination with the air conditioner model, and distinguishes between the wall-mounted air conditioner and the cabinet air conditioner. In this way, during pairing and control, the packet sending frequency and signal strength are dynamically adjusted in combination with the air conditioner model or type, which can improve the safety of the device. That is, the packet sending rate is dynamically adjusted in combination with the air conditioner type or model, and different types or models of air conditioners are set with different packet sending power consumptions.
[0128] As Figure 7 shown, the device for adjusting power consumption and packet sending and receiving times based on BLE provided by the scheme of the present application further includes: acquiring the air conditioner model, dynamically adjusting the packet sending times and power consumption, which can be specifically understood by referring to the following exemplary description.
[0129] Step 21: Acquire the air conditioner device model during BLE pairing, and set different control interfaces and power consumptions and packet sending times for different devices.
[0130] For example, first assume that the hardware of each air conditioner model is known, and it is possible that the key hardware (such as BLE hardware) of different air conditioners can distinguish whether the air conditioner is a cabinet or a hanging machine in the communication content. The shortest communication distance of the air conditioner BLE corresponding to the hanging machine and the cabinet is different, which may result in different BLE signal strength values at the same location. Because the parameters of each BLE hardware are different, in order to ensure the control success rate, the parameters set according to different BLE hardware can achieve the same communication effect under certain conditions. Among them, different distances, signal values are different. Different power consumption, signal values are different. Different devices, two control parameters will also be different at the same distance.
[0131] Step 22, enter the device, obtain the air conditioner model, and obtain the preset packet sending times or power consumption according to the air conditioner model.
[0132] Step 23, obtain the signal value, judge the distance between the user and the control end according to the signal value, and dynamically adjust the packet sending times and power consumption according to the obtained preset value and the signal value.
[0133] The preset value such as power consumption and packet sending times is adjusted according to the obtained signal value and the function rate.
[0134] Step 23, obtain the device power consumption parameter m, and adjust the power consumption by comparing the signal value and the power consumption parameter, and set the packet sending times.
[0135] In some embodiments, it further includes the process of adjusting the packet sending parameter of the control end in combination with the system type of the control end, which is specifically as follows:
[0136] The acquisition unit 102 is also configured to acquire the system type of the control end in the control end when acquiring the signal strength value of the BLE of the target device. The specific functions and processes of the control unit 104 are also referred to step S510.
[0137] The control unit 104 is also configured to adjust the packet sending parameter of the control end to the target device in the control end when acquiring the system type of the control end, in combination with the system type of the control end, according to the current packet receiving signal strength value of the target device, to obtain the current packet sending parameter. Wherein, the system type of the control end is different, and the corresponding packet sending parameter of the control end to the target device is different. The specific functions and processes of the control unit 104 are also referred to step S520.
[0138] The control unit 104 is further configured to send a control packet to the target device according to the current packet sending parameter of the control terminal, so as to realize communication control of the target device based on BLE. The specific functions and processes of the control unit 104 are described in step S530.
[0139] The scheme of the application can also adjust the packet sending strategy in combination with the mobile phone system, and send control packets with different frequencies according to different mobile phone systems.
[0140] As shown in Figure 7 The device for adjusting power consumption and packet sending frequency based on BLE provided by the scheme of the application further comprises:
[0141] Step 3, obtain the mobile phone system, and dynamically adjust the packet sending frequency and power consumption.
[0142] The mobile phone system refers to a commonly used system, such as ios, android, etc. Of course, other systems may appear in the future, which are also included here. The applet is integrated into the mobile phone system. At present, the applet can obtain the mobile phone system of the micro letter.
[0143] Step 31, according to different mobile phone systems, mainly android and iphone at present, do packet loss test (the system includes but is not limited to android and iphone system), and find that the packet loss rate of iphone is lower than that of android at a distance of 3 meters.
[0144] The packet loss test is a manual test, which records the result once for each sending. The result is control success or failure. This test uses different mobile phones to repeatedly test and verify at different distances, so as to collect enough data.
[0145] For example, if the obtained mobile phone system is iphone, the packet loss rate of iphone is low, and the packet loss rates at 1 meter, 3 meters, 5 meters and 7 meters are 0%, 2%, 5% and 10% respectively. In order to improve the success rate, the packet sending frequency is adjusted according to the obtained signal value and function rate.
[0146] Step 32, perform BLE control applet application, obtain the mobile phone system, if it is an android system, increase N packets (here N packets are determined according to the result in the test process) on the default packet sending frequency, if it is an iphone, use the default packet sending frequency.
[0147] Specifically, open the mobile phone system and enter the applet. The applet is a commonly used applet, but a function is added in the applet. After entering the applet, the system of the mobile phone can be obtained. The applet adjusts the strategy according to the obtained system.
[0148] Among them, the dynamic setting interaction frame in unit time is used to judge whether it is necessary to adjust the packet sending power consumption and the packet sending frequency.For example: the dynamic setting interaction frame can be set to set the interaction statistical frame in unit time to judge whether it is necessary to adjust the packet sending power consumption and the packet sending frequency.For example: the packet loss rate of iphone is 95% at 3 meters, 92% at 5 meters, and 90% at 8 meters, in order to improve the control success rate, 1 packet is sent at 3 meters, 2 packets are sent at 5 meters, and 3 packets are sent at 8 meters. Each control frame sends N packets, and N is a positive integer.
[0149] For example: the packet loss rate of iphone is relatively low, and only one sending can be successful, so the default packet sending frequency is 1.
[0150] Step 33, combined with the distance, increase the packet sending frequency without distinguishing the mobile phone system.
[0151] Specifically, in order to improve the control success rate, the distance between the device and the mobile control terminal is calculated by obtaining the signal value, and the signal value detected by different distances is more, when the distance changes, the strategy is adjusted, the packet sending frequency can be increased, the packet sending power (power consumption) can be adjusted, and the packet sending frequency can be adjusted according to different mobile phone systems. Different packet sending frequencies or different power consumptions are set for different mobile phone systems, and these data are obtained through experiments.
[0152] The scheme of the application mainly adjusts the packet sending power consumption and the packet sending frequency according to the signal strength, the air conditioner model and the mobile phone system. Specifically, the packet sending mode is dynamically adjusted by obtaining the signal strength value, the packet sending is dynamically adjusted combined with the air conditioner model, the packet sending strategy is adjusted combined with the mobile phone system, different frequency control packets are sent according to different mobile phone systems, the packet loss event in the case that the signal strength value of BLE on the controlled device is weak is reduced or even avoided, and the communication reliability based on BLE is improved.
[0153] Since the processing and functions realized by the device of the embodiment basically correspond to the embodiments, principles and examples of the foregoing method, details not described in the description of the embodiment can be referred to the related description in the foregoing embodiments, which will not be repeated here.
[0154] By detecting the signal strength value of BLE on the controlled device, adjusting the packet sending power consumption and the packet sending rate of BLE on the control device according to the signal strength value of BLE on the controlled device, and / or adjusting the packet receiving power consumption of BLE on the controlled device, the packet loss rate can be reduced and the communication success rate can be improved.
[0155] According to the embodiment of the application, a control terminal corresponding to the BLE-based communication control device is also provided. The control terminal can include the BLE-based communication control device described above.
[0156] Since the processing and functions realized by the control terminal of the embodiment basically correspond to the embodiments, principles and examples of the foregoing device, the description of the embodiment does not elaborate on the related descriptions in the foregoing embodiments, which are not repeated here.
[0157] By detecting the signal strength value of the BLE on the to-be-controlled device, adjusting the packet sending power consumption and packet sending rate of the BLE on the control device, and / or adjusting the packet receiving power consumption of the BLE on the to-be-controlled device according to the signal strength value of the BLE on the to-be-controlled device in combination with the model of the to-be-controlled device and the system parameters of the control device, the technical solution of the present application can improve the reliability of BLE-based communication control.
[0158] According to the embodiments of the present application, a storage medium corresponding to the BLE-based communication control method is also provided, which comprises a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the BLE-based communication control method described above.
[0159] Since the processing and functions realized by the storage medium of the embodiment basically correspond to the embodiments, principles and examples of the foregoing method, the description of the embodiment does not elaborate on the related descriptions in the foregoing embodiments, which are not repeated here.
[0160] By detecting the signal strength value of the BLE on the to-be-controlled device, adjusting the packet sending power consumption and packet sending rate of the BLE on the control device, and / or adjusting the packet receiving power consumption of the BLE on the to-be-controlled device according to the signal strength value of the BLE on the to-be-controlled device in combination with the model of the to-be-controlled device and the system parameters of the control device, the technical solution of the present application can improve the packet sending success rate and the reliability of control.
[0161] In summary, those skilled in the art can easily understand that the above-mentioned advantageous modes can be freely combined and superimposed without conflict.
[0162] The above only describes the embodiments of the present application and is not intended to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the scope of the claims of the present application.
Claims
1. A BLE-based communication control method, characterized by, The application is applied to control end and target device based on BLE communication control, the control end has BLE, the target device also has BLE; the control end can realize communication control to the target device based on BLE; The BLE-based communication control method comprises: Obtaining the signal strength value of BLE on the target device, denoted as the current packet receiving signal strength value; According to the current packet receiving signal strength value of the target device, the packet sending parameter of the control end to the target device is adjusted to obtain the current packet sending parameter; According to the current packet sending parameter of the control end, the control packet is sent to the target device to realize the communication control to the target device based on BLE; Wherein, determine whether the current power consumption parameter of the target device is the set maximum power consumption parameter; If the current power consumption parameter of the target device is the set maximum power consumption parameter, the packet sending rate in the default packet sending parameter of the control end to the target device is increased by a first set value, the current packet sending rate is obtained, and the packet sending power in the default packet sending parameter of the control end to the target device and the current packet sending rate are taken as the current packet sending parameter of the control end to the target device; If the current power consumption parameter of the target device is not the set maximum power consumption parameter, the packet sending power in the default packet sending parameter of the control end to the target device is increased by a second set value, the current packet sending power is obtained, and the packet sending times in the default packet sending parameter of the control end to the target device and the current packet sending power are taken as the current packet sending parameter of the control end to the target device.
2. The BLE-based communication control method according to claim 1, characterized by, The packet sending parameter and the packet sending parameter in the current packet sending parameter of the control end include packet sending power and / or packet sending rate; According to the current packet receiving signal strength value of the target device, the packet sending parameter of the control end to the target device is adjusted to obtain the current packet sending parameter, which comprises: Determine the packet sending signal threshold of the control end itself and the current power consumption parameter of the target device; Determine whether the current packet receiving signal strength value of the target device is greater than or equal to the packet sending signal threshold of the control end; If the current packet receiving signal strength value of the target device is greater than or equal to the packet sending signal threshold of the control end, the default packet sending parameter of the control end to the target device is determined as the current packet sending parameter; If the current packet receiving signal strength value of the target device is less than the packet sending signal threshold of the control end, the packet sending parameter of the control end to the target device is adjusted according to the current power consumption parameter of the target device to obtain the current packet sending parameter.
3. The BLE-based communication control method according to claim 1 or 2, characterized by, Also includes: Obtaining the model of the target device; Adjust the packet sending parameter of the control terminal sending the control packet to the target device according to the current received packet signal strength value of the target device in combination with the model of the target device, to obtain a current packet sending parameter; wherein the models of the target devices are different, and the corresponding packet sending parameters of the control terminal sending the control packet to the target devices are different; Send the control packet to the target device according to the current packet sending parameter of the control terminal, to realize the communication control of the target device based on BLE.
4. The BLE-based communication control method according to claim 1 or 2, characterized by, Further comprising: Obtain the system type of the control terminal; Adjust the packet sending parameter of the control terminal sending the control packet to the target device according to the current received packet signal strength value of the target device in combination with the system type of the control terminal, to obtain a current packet sending parameter; wherein the system types of the control terminals are different, and the corresponding packet sending parameters of the control terminal sending the control packet to the target device are different; Send the control packet to the target device according to the current packet sending parameter of the control terminal, to realize the communication control of the target device based on BLE.
5. The BLE-based communication control method according to claim 3, characterized by, Further comprising: Obtain the system type of the control terminal; Adjust the packet sending parameter of the control terminal sending the control packet to the target device according to the current received packet signal strength value of the target device in combination with the system type of the control terminal, to obtain a current packet sending parameter; wherein the system types of the control terminals are different, and the corresponding packet sending parameters of the control terminal sending the control packet to the target device are different; Send the control packet to the target device according to the current packet sending parameter of the control terminal, to realize the communication control of the target device based on BLE.
6. A BLE-based communication control device, characterized by comprising: Applied to the BLE-based communication control between a control terminal and a target device, the control terminal has BLE, and the target device also has BLE; the control terminal can realize the communication control of the target device based on BLE; The BLE-based communication control device comprises: An obtaining unit configured to obtain the signal strength value of BLE on the target device, denoted as a current received packet signal strength value; A control unit configured to adjust the packet sending parameter of the control terminal sending the control packet to the target device according to the current received packet signal strength value of the target device, to obtain a current packet sending parameter; in the control terminal, adjust the packet sending power of the control terminal sending the control packet to the target device according to the current received packet signal strength value of the target device, to obtain a current packet sending power; The control unit is further configured to send the control packet to the target device according to the current packet sending parameter of the control terminal, to realize the communication control of the target device based on BLE; The control unit determines whether the current power consumption parameter of the target device is a set maximum power consumption parameter. If the current power consumption parameter of the target device is the set maximum power consumption parameter, the sending packet parameter of the control end to the target device for sending a control packet is adjusted based on the default sending packet parameter of the control end to the target device for sending a control packet, the sending packet rate in the default sending packet parameter of the control end to the target device for sending a control packet is increased by a first set value to obtain a current sending packet rate, and the sending packet power in the default sending packet parameter of the control end to the target device for sending a control packet and the current sending packet rate are taken as the current sending packet parameter of the control end to the target device for sending a control packet. If the current power consumption parameter of the target device is not the set maximum power consumption parameter, the sending packet parameter of the control end to the target device for sending a control packet is adjusted based on the default sending packet parameter of the control end to the target device for sending a control packet, the sending packet power in the default sending packet parameter of the control end to the target device for sending a control packet is increased by a second set value to obtain a current sending packet power, and the sending packet times in the default sending packet parameter of the control end to the target device for sending a control packet and the current sending packet power are taken as the current sending packet parameter of the control end to the target device for sending a control packet. 7.The BLE-based communication control apparatus according to claim 6, The sending packet parameter in the sending packet parameter and the current sending packet parameter of the control end includes a sending packet power and / or a sending packet rate. The control unit adjusts the sending packet parameter of the control end to the target device for sending a control packet according to the current receiving packet signal strength value of the target device to obtain a current sending packet parameter, including: determining a sending packet signal threshold of the control end itself and determining a current power consumption parameter of the target device; determining whether the current receiving packet signal strength value of the target device is greater than or equal to the sending packet signal threshold of the control end; if the current receiving packet signal strength value of the target device is greater than or equal to the sending packet signal threshold of the control end, the default sending packet parameter of the control end to the target device for sending a control packet is determined as the current sending packet parameter; if the current receiving packet signal strength value of the target device is less than the sending packet signal threshold of the control end, the sending packet parameter of the control end to the target device for sending a control packet is adjusted according to the current power consumption parameter of the target device to obtain a current sending packet parameter.
8. The BLE-based communication control apparatus according to claim 6 or 7, characterized by, Further comprising: The acquisition unit is further configured to acquire the model of the target device. The control unit is further configured to adjust the sending packet parameter of the control end to the target device for sending a control packet according to the current receiving packet signal strength value of the target device in combination with the model of the target device to obtain a current sending packet parameter; wherein the model of the target device is different, and the sending packet parameter of the control end to the target device for sending a control packet is different. The control unit is further configured to send a control packet to the target device according to the current sending packet parameter of the control end to realize communication control of the target device based on BLE.
9. The BLE-based communication control apparatus according to claim 6 or 7, characterized by, Further comprising: The acquisition unit is further configured to acquire the system type of the control end. The control unit is further configured to adjust the packet sending parameter of the control terminal for sending the control packet to the target device according to the current packet receiving signal strength value of the target device in combination with the system type of the control terminal, to obtain a current packet sending parameter; wherein the system types of the control terminals are different, and the corresponding packet sending parameters of the control terminals for sending the control packet to the target device are different. The control unit is further configured to send the control packet to the target device according to the current packet sending parameter of the control terminal, to implement the communication control of the target device based on BLE. 10.The BLE-based communication control apparatus according to claim 8, wherein Further comprising: The acquisition unit is further configured to acquire the system type of the control terminal; The control unit is further configured to adjust the packet sending parameter of the control terminal for sending the control packet to the target device according to the current packet receiving signal strength value of the target device in combination with the system type of the control terminal, to obtain a current packet sending parameter; wherein the system types of the control terminals are different, and the corresponding packet sending parameters of the control terminals for sending the control packet to the target device are different. The control unit is further configured to send the control packet to the target device according to the current packet sending parameter of the control terminal, to implement the communication control of the target device based on BLE.
11. A control terminal, characterized by Comprise: The BLE-based communication control device according to any one of claims 6 to 10.
12. A computer storage medium, characterized in that, The computer storage medium comprises a stored program, wherein when the program runs on the computer, the device where the computer storage medium is located is controlled to execute the BLE-based communication control method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for automatically determining Bluetooth communication parameters, and storage medium
CN107404705A
Bluetooth communication control method and related product
CN110139262A
Bluetooth mesh network node power regulation method, Bluetooth equipment node and Bluetooth gateway
CN110493861A
Equipment control method based on Bluetooth technology and related equipment
CN111885501A