Message transmission method and related device

By directly sending messages that do not contain the target indication field in low-power Bluetooth technology, the problem of delayed processing during message interaction is solved and communication capabilities and system performance are improved.

CN118803592APending Publication Date: 2024-10-18伟光有限公司(CN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310391159.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-12
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing low-power Bluetooth technology, due to waiting for the previous message to be processed during the message interaction process, the subsequent message is delayed, which affects system performance.

Method used

Within the first period after the first message containing the target indication field is detected, a second message not containing the target indication field is directly sent to the second device to avoid waiting for the completion of processing of the first message.

Benefits of technology

It improves the communication capabilities between low-power Bluetooth devices, ensures that messages can take effect quickly, optimizes system performance, and avoids delayed message processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118803592A_ABST
    Figure CN118803592A_ABST
Patent Text Reader

Abstract

The invention provides a message transmission method and a related device, and the method is applied to first equipment, and the method comprises the steps: detecting a sending request for a second message in a first time period after a first message is sent to second equipment, and sending the second message to the second equipment; a response message is received from the second device for the second message. Thus, the first device can directly send the second message to the second device before the first message is processed, thereby avoiding excessive delay processing of the second message caused by overlong message interaction time or processing time of the first message between the low-power-consumption Bluetooth devices, ensuring that the performance of the Bluetooth system is in an excellent state, and improving the user experience. And the communication capability between the low-power-consumption Bluetooth devices is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to a message transmission method and related devices. Background Art

[0002] Bluetooth Low Energy (BLE) technology is widely used in short-distance communication of various electronic devices due to its advantages of low power consumption and long standby time. In the prior art, when the master and slave devices are interacting with each other, in order to ensure the stability of the message interaction process, the next message will not enter the interaction process before the previous message is processed. This can easily cause the subsequent messages to be processed late, affecting the performance indicators of Bluetooth. Summary of the invention

[0003] The embodiments of the present application provide a message transmission method and related devices, in order to improve the performance indicators of Bluetooth.

[0004] In a first aspect, an embodiment of the present application provides a message transmission method, which is applied to a first device, including:

[0005] Within a first time period after sending a first message to a second device, detecting a sending request for a second message, sending the second message to the second device, wherein the message type of the first message is a first type, and the message type of the second message is a second type, the first type is used to indicate that the corresponding message includes a target indication field, and the second type is used to indicate that the corresponding message includes an indication field other than the target indication field, and the first time period includes a plurality of consecutive connection interval time periods indicated by information in the target indication field according to an original protocol;

[0006] A response message to the second message is received from the second device.

[0007] In a second aspect, an embodiment of the present application provides another message transmission method, which is applied to a second device, including:

[0008] A second message from a first device is received within a second time period after a first message from a first device is received, the message type of the first message is a first type, the message type of the second message is a second type, the first type is used to characterize that the corresponding message includes a target indication field, and the second type is used to characterize that the corresponding message includes an indication field other than the target indication field, the starting time point of the second time period is the time point when the second device receives the first message, and the ending time point of the second time period is the ending time point of the last connection interval period among multiple consecutive connection interval periods characterized by the information in the target indication field according to the original protocol;

[0009] generating a response message to the second message;

[0010] Sending the response message to the second message to the first device.

[0011] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect or the second aspect of the embodiment of the present application.

[0012] In a fourth aspect, an embodiment of the present application provides a message transmission device, which is applied to a first device, including: a sending unit, which is used to detect a sending request for a second message within a first time period after sending a first message to a second device, and send the second message to the second device, wherein the message type of the first message is a first type, and the message type of the second message is a second type, the first type is used to characterize that the corresponding message includes a target indication field, and the second type is used to characterize that the corresponding message includes an indication field other than the target indication field, and the first time period includes multiple consecutive connection interval time periods characterized by the information in the target indication field according to the original protocol; a receiving unit, which is used to receive a response message from the second device to the second message.

[0013] In the fifth aspect, an embodiment of the present application provides another message transmission device, which is applied to a second device, including: a receiving unit, used to receive a second message from the first device within a second time period after receiving the first message from the first device, the message type of the first message is the first type, and the message type of the second message is the second type, the first type is used to characterize that the corresponding message contains a target indication field, and the second type is used to characterize that the corresponding message contains an indication field other than the target indication field, the starting time point of the second time period is the time point when the second device receives the first message, and the ending time point of the second time period is the ending time point of the last connection interval time period in multiple consecutive connection interval time periods represented by the information in the target indication field according to the original protocol; a generating unit, used to generate a response message to the second message; a sending unit, used to send the response message to the second message to the first device.

[0014] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps in the first aspect or the second aspect of the embodiment of the present application.

[0015] In the seventh aspect, an embodiment of the present application provides a computer program product, wherein the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the above-mentioned computer program is operable to enable a computer to execute part or all of the steps described in the first aspect or the second aspect of the embodiment of the present application.

[0016] It can be seen that in an embodiment of the present application, when the first device detects a request to send a second message of the second type that does not include a target indication field within a first time period after sending a first message of the first type that includes a target indication field to a second device, the first device can directly send the second message to the second device without waiting for the first message to be processed before sending the second message, thereby avoiding excessive delays in processing of the second message due to long message interaction time or processing time of the first message between Bluetooth devices, ensuring that the performance of the Bluetooth system is in an excellent state, and improving the communication capability between low-power Bluetooth devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 is a structural block diagram of a Bluetooth system provided in an embodiment of the present application;

[0019] Figure 2 It is a flowchart of a message transmission method provided in an embodiment of the present application;

[0020] Figure 3a This is a schematic diagram of a transmission process of a first message provided in an embodiment of the present application;

[0021] Figure 3b This is a schematic diagram of a transmission process of a first message and a second message provided in an embodiment of the present application;

[0022] Figure 4 It is a flowchart of another message transmission method provided in an embodiment of the present application;

[0023] Figure 5a It is a block diagram of the functional units of a message transmission device provided in an embodiment of the present application;

[0024] Figure 5b It is a block diagram of the functional units of another message transmission device provided in an embodiment of the present application;

[0025] Figure 6a It is a block diagram of the functional units of another message transmission device provided in an embodiment of the present application;

[0026] Figure 6b This is a block diagram of the functional units of another message transmission device provided in an embodiment of the present application;

[0027] Figure 7 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0029] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0030] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0031] Similar to traditional Bluetooth technology, low-power Bluetooth technology is also based on the Logical Link Control Protocol (LLCP) for message interaction to manage and control various operations between two low-power Bluetooth device connections. In the prior art, the master device will put the messages to be transmitted into a message transmission queue in the order in which the message sending requests are detected, and then transmit and process the messages in the order in the queue. Before the previous message is processed, the next message will not enter the interaction process to ensure that only one message is processed at a time point. For example, the master device detects that the sending request of message 1 precedes that of message 2. According to the prior art, the master device needs to transmit and process message 1 first, and the message interaction process of message 2 can only be postponed. However, if the processing time of Message 1 is too long, and Message 2 is a message that needs to be processed quickly to take effect, such as a BLE disconnection message or a ConnectedIsochronous Stream (CIS) disconnection message, then the message interaction process of Message 2 will be excessively delayed, causing the effective time of Message 2 to be excessively delayed, and causing the processing of other messages after Message 2 in the message queue to be delayed as well, directly affecting various performance indicators in the Bluetooth system.

[0032] To solve the above problems, the embodiment of the present application provides a message transmission method and related devices, which are applied to a first device, which is the master device in the Bluetooth system. In the embodiment of the present application, the first device can directly send message 2 to the second device without waiting for message 1 to be processed before sending, thereby avoiding excessive delay in processing of message 2 due to the message interaction time or processing time between Bluetooth devices being too long, ensuring the performance of the Bluetooth system in an excellent state, and improving the communication capability between low-power Bluetooth devices.

[0033] See also Figure 1 , Figure 1 is a structural block diagram of a Bluetooth system provided in an embodiment of the present application. Figure 1 As shown, the Bluetooth system 10 includes a first device 11 and a second device 12, the first device 11 and the second device 12 are connected in communication, and the first device 11 and the second device 12 are both BLE devices. In the embodiment of the present application, the first device 11 is the master device (Master) in Bluetooth technology, and the second device 12 is the slave device (Slave) in Bluetooth technology. Specifically, the first device 11 and the second device 12 can be mobile phone terminals, tablet computers, wearable smart devices and other devices that support low-power Bluetooth technology.

[0034] A message transmission method provided by an embodiment of the present application is introduced below.

[0035] See also Figure 2 , Figure 2 is a flow chart of a message transmission method provided by an embodiment of the present application, and the method is applied to Figure 1 In the first device 11 shown, as Figure 2 As shown, the method includes:

[0036] Step 201: within a first time period after a first message is sent to a second device, a request for sending a second message is detected, and the second message is sent to the second device.

[0037] Among them, the message type of the first message is the first type, and the message type of the second message is the second type. The first type is used to characterize that the corresponding message contains a target indication field, and the second type is used to characterize that the corresponding message contains an indication field other than the target indication field. The first time period includes multiple consecutive connection interval periods characterized by the information in the target indication field according to the original protocol. Among them, the original protocol may refer to the Bluetooth 4.0 protocol or the Bluetooth 5.0 protocol, and the target indication field may refer to the instant indication field. According to the content of the protocol, the instant indication field is an indication field used to constrain the message effectiveness conditions. The message containing the instant indication field needs to pass through the number of consecutive connection intervals indicated by the instant indication field before it can be processed and become effective, that is, it can be processed and become effective after the above-mentioned first time period.

[0038] like Figure 3aAs shown, at time point T1, the master device sends a message to the slave device. In the first connection interval, i.e., connection interval 1, the master and slave devices interact with each other to obtain that the message is a first message of the first type containing a target indication field, such as message 1 containing an instant indication field, wherein the value indicated by the instant indication field is 3, indicating that message 1 needs to go through three identical connection intervals (i.e., multiple continuous connection intervals represented by the information in the target indication field according to the original protocol), i.e., connection interval 2 to connection interval 4, before being processed and effective. Message 1 is processed and effective at time point T4. Wherein, M→S indicates that the master device sends a data packet corresponding to message 1 to the slave device, and S→M indicates that the slave device sends a response data packet corresponding to the above data packet to the master device. Interframe idle T_IFS (Time Inter Frame Space) indicates the time interval between two continuous data packets. According to the protocol content, T_IFS can be specifically 150 microseconds. Wherein, the starting time point of the first period is time point T1, and the ending time point is time point T4. In the prior art, if a request to send a second message of the second type that does not contain a target indication field is detected between time points T1 and T4, for example, message 2 that does not contain an instant indication field, the first device will only wait until time point T4, that is, after the first message takes effect, before sending message 2 to the second device, causing delayed processing of message 2. When message 2 is a message that needs to be processed quickly to take effect, the performance of the Bluetooth device will be affected. In an embodiment of the present application, when a request to send a second message is detected within the first time period, the first device can directly send the second message to the second device so that the second message takes effect quickly. Figure 3bAs shown, assuming that the single connection intervals of message 1 and message 2 are the same, a request to send message 1 is detected at time point T1, then the first device sends message 1 to the second device at time point T1, and through message interaction between devices for message 1 in connection interval 1, it is obtained that message 1 is a message containing a target indication domain, for example, a message containing an instant indication domain, and the value indicated by the instant indication domain of message 1 is 3; at time point T3, a request to send message 2 is detected, then the first device directly sends message 2 to the second device at time point T3, and through message interaction between devices for message 2 in connection interval 2, it is obtained that message 2 is a message containing an indication domain other than the target indication domain, for example, a message containing an indication domain other than the instant indication domain, that is, message 2 is a message that does not contain the instant indication domain, then after the time period corresponding to connection interval 2 expires, that is, at time point T4, message 2 can be processed, so that message 2 can take effect as soon as possible, and at the same time, the interaction process of message 1 is also carried out synchronously, and message 1 is processed and takes effect at time point T2. It can be understood that the first device and the second device can be electronic devices with multiple antennas to support the transmission of multiple messages between the two devices at the same time.

[0039] Step 202: Receive a response message from the second device to the second message.

[0040] It can be seen that in this example, when the first device detects a request to send a second message of the second type that does not contain a target indication field within the first time period after sending a first message of the first type that contains a target indication field to the second device, the first device can directly send the second message to the second device without waiting for the first message to be processed before sending the second message, thereby avoiding excessive delays in processing of the second message due to long message interaction time or processing time of the first message between Bluetooth devices, ensuring that the performance of the Bluetooth system is in an excellent state, and improving the communication capability between low-power Bluetooth devices.

[0041] In a possible example, after detecting the request to send the second message, the method further includes: determining that the type of the second message is the second type.

[0042] Among them, if the first device determines that the message type of the second message is the first type, that is, if the second message is also a message containing a target indication field, the first device will not send the second message directly to the second device, otherwise the two channels for synchronous message interaction are both processing messages containing the target indication field, so that the Bluetooth system still has the problem that subsequent messages may be excessively delayed. Only when the first device determines that the message type of the second message is the second type, will it directly send the second message to the second device so that the second message can be quickly processed and take effect. Among them, the second message refers to the next message detected by the first device after detecting the request to send the first message.

[0043] It can be seen that in this example, after the first device detects the request to send the second message within the first time period, it first determines that the type of the second message is the second type, and then sends the second message to the second device, thereby avoiding the first device mistakenly sending a message containing the target indication field to the second device for synchronous message interaction, which may cause further problems, and improving the stability of message transmission between low-power Bluetooth devices.

[0044] In one possible example, determining that the type of the second message is the second type includes: parsing the second message to obtain the data packet format of the second message; detecting that the data packet format of the second message contains an indication domain field other than the indication domain field corresponding to the target indication domain, and determining that the type of the second message is the second type.

[0045] The data packet format corresponding to a single message may include multiple indicator domain fields, such as an interval indicator domain field, which is used to characterize the connection interval corresponding to the message. Specifically, whether the type of the second message is the second type can be determined by detecting whether the data packet format of the second message includes an instant indicator domain field. If it is detected that the data packet format of the second message includes an indicator domain field other than the instant indicator domain field, indicating that the data packet format of the second message does not include the instant indicator domain field, the type of the second message is determined to be the second type.

[0046] It can be seen that in this example, the first device can determine the type of the second message by detecting whether the data packet format of the second message contains the indication domain field corresponding to the target indication domain, so that the second message can be sent to the second device after determining that the type of the second message is the second type, thereby avoiding the first device mistakenly sending a message containing the target indication domain to the second device for synchronous message interaction, which may cause further problems, and improving the stability of message transmission between low-power Bluetooth devices.

[0047] In one possible example, within a first time period after sending a first message to a second device, a request to send a second message is detected, and the second message is sent to the second device, including: within a first time period after sending the first message to the second device through a first sending queue, when a request to send the second message is detected, the second message is sent to the second device through a second sending queue, and the message sending processes of the first sending queue and the second sending queue do not interfere with each other.

[0048] The sending queue is used to represent the transmission channel for the first device to send a message to the second device. In the prior art, since only one message is processed at the same time, all messages in the Bluetooth system are transmitted in a group of transmission queues and processed in sequence according to the order in which they are queued. In this example, two sending queues are used to transmit the first type of message and the second type of message, respectively, so that the transmission of the message is no longer affected by the order in which it is queued, and the message that needs to be processed quickly can take effect as soon as possible.

[0049] It can be seen that in this example, the first device sends the first type of message through the first sending queue, and sends the second type of message through the second sending queue, so that the two types of messages are sent synchronously and do not affect each other. While the second message can be quickly processed and take effect, the stability of the transmission process of the first message can also be guaranteed, thereby optimizing the performance indicators of the Bluetooth system and improving the communication capabilities between low-power Bluetooth devices.

[0050] In one possible example, detecting a request to send a second message and sending the second message to the second device includes: detecting a request to send a second message, and determining whether the second message will affect the transmission link between the first device and the second device; if so, sending the second message to the second device at the end time of the first time period; if not, immediately sending the second message to the second device.

[0051] Among them, the message that affects the transmission link between the first device and the second device can be a connection parameter change message or a message that causes the link to be disconnected when a problem occurs in the transmission process. Since such messages will affect the transmission link during the interaction process, if such messages are interacted and processed in advance, the transmission process of the first message transmitted previously may be abnormally interrupted, affecting the relevant performance of the Bluetooth system. Therefore, if the second message is a message that will affect the transmission link, it is necessary to send the second message to the second device according to the traditional solution after waiting for the first message to take effect, that is, at the end time of the first time period, so as to ensure that the transmission process of the message transmitted previously will not be abnormally interrupted, thereby improving the stability of the transmission. If the second message does not affect the transmission link, the above-mentioned abnormal interruption problem does not exist. The first device can immediately send the second message to the second device when detecting the sending request of the second message, so that the second message can be quickly processed and take effect, thereby improving the communication capability between low-power Bluetooth devices.

[0052] It can be seen that in this example, the first device determines whether the second message will affect the transmission link, and further chooses to send the second message at the end time of the first time period or directly sends the second message, thereby avoiding the possibility that the message that affects the transmission link is processed in advance, resulting in the transmission process of the first message being abnormally interrupted, thereby improving the communication capability between low-power Bluetooth devices.

[0053] In a possible example, sending the second message to the second device at the end time point of the first time period includes: sending the second message to the second device through the first sending queue at the end time point of the first time period.

[0054] Among them, when the first device detects that the second message is a message that will affect the transmission link between the first device and the second device, it is necessary to send the second message to the second device at the end time of the first time period, that is, after the first message takes effect, so as to avoid the second message being processed in advance, resulting in link disconnection and then causing the transmission process of the first message to be abnormally interrupted. Therefore, in this case, the second message is placed in the same sending queue as the first message, that is, the first sending queue, which can ensure that the sending point of the second message is after the time when the first message takes effect, thereby improving system stability.

[0055] It can be seen that in this example, when the first device detects that the second message will affect the transmission link, it puts the second message into the first sending queue used by the first message, and sends it to the second device at the end time of the first time period, thereby avoiding the possibility that the transmission process of the first message will be abnormally interrupted due to the early effectiveness of the second message, and improving the communication capabilities between low-power Bluetooth devices.

[0056] Another message transmission method provided by an embodiment of the present application is introduced below.

[0057] See also Figure 4 , Figure 4 is a flow chart of another message transmission method provided in an embodiment of the present application, wherein the method is applied to Figure 1 In the second device 12 shown, Figure 4 As shown, the method includes:

[0058] Step 401: receiving a second message from a first device within a second time period after receiving a first message from the first device.

[0059] Among them, the message type of the first message is the first type, and the message type of the second message is the second type, the first type is used to characterize that the corresponding message contains a target indication field, and the second type is used to characterize that the corresponding message contains an indication field other than the target indication field, the starting time point of the second time period is the time point when the second device receives the first message, and the ending time point of the second time period is the ending time point of the last connection interval time period in a plurality of consecutive connection interval time periods characterized by the information in the target indication field according to the original protocol. For specific examples, please refer to the example description of step 201 above, which will not be repeated here. It can be understood that the time interval between the starting time point of the second time period and the starting time point of the first time period is the duration used by the first device to transmit the first message to the second device, and the ending time point of the second time period is the same as the ending time point of the first time period.

[0060] Step 402: Generate a response message to the second message.

[0061] The second device may generate a response message to the second message according to the connection environment of the current device, the Bluetooth protocol content and the content of the second message, so as to achieve a data response to the second message.

[0062] Step 403: Send the response message to the second message to the first device.

[0063] In a possible example, sending the response message to the second message to the first device includes: sending the response message to the second message to the first device through a third sending queue.

[0064] Among them, the third sending queue refers to the queue used by the second device to send a response message corresponding to the message sent by the second sending queue to the first device. Furthermore, since the first message is also synchronously transmitted between the first device and the second device, after the second device receives the first message and generates a response message to the first message according to the first message, it can send a response message to the first message to the first device through the fourth sending queue. The fourth sending queue refers to the transmission queue used by the second device to send a response message corresponding to the message sent by the first sending queue to the first device.

[0065] It can be seen that in this example, the second device sends a response message corresponding to the message sent by the second sending queue to the first device through the third sending queue, and sends a response message corresponding to the message sent by the first sending queue to the first device through the fourth sending queue, so that the two types of response messages can be sent synchronously without affecting each other, thereby optimizing the performance indicators of the Bluetooth system and improving the communication capability between low-power Bluetooth devices.

[0066] It can be seen that in this example, the second device can continue to receive the second message of the second type from the first device within the second time period after receiving the first message of the first type from the first device. There is no need to wait for the first message to take effect before receiving the second message, and generate a response message for the second message and transmit it back to the first device, thereby avoiding excessive delays in processing the second message due to the long message interaction time or processing time of the first message between Bluetooth devices, ensuring that the performance of the Bluetooth system is in an excellent state and improving the communication capabilities between low-power Bluetooth devices.

[0067] The beneficial effects of the present application are more clearly illustrated below through actual test data.

[0068] As shown in Table 1, Table 1 is the data obtained according to the message transmission scheme of the prior art:

[0069] Message Name Time of sending package Effective time LLCP ChannelMap Indication Message 1047 1061(+14) LLCP LE ChannelStatus Indication Message 1062 LLCP CIS Terminated Indication Message 1063

[0070] As can be seen from Table 1, the LLCP Channel Map Indication message is sent at time 1047, and the time interval indicated by the instant indication field is 14 (counter form), so the effective time point of the message is 1061, so the sending time points of the LLCPLE Channel Status Indication message and LLCP CIS Terminated Indication message that are queued later are both after time 1061.

[0071] As shown in Table 2, Table 2 is the data obtained according to the message transmission method provided in the embodiment of the present application:

[0072] Message Name Time of sending package Effective time LLCP ChannelMap Indication Message 180 194(+14) LLCP CIS Terminated Indication Message 185

[0073] As can be seen from Table 2, the LLCP Channel Map Indication message is sent at time point 180, and the time interval indicated by the instant indication field is 14 (in counter form), so the effective time point of the message is 194. At this time, according to the message transmission method provided in the embodiment of the present application, the LLCP CIS Terminated Indication message that is queued later can be sent at time point 185 without waiting for the LLCP Channel Map Indication message to take effect. In this way, a fast response to the LLCP CIS Terminated Indication message can be achieved, the performance indicators of the Bluetooth system are optimized, and the communication capability between low-power Bluetooth devices is improved.

[0074] In accordance with the above-mentioned embodiments, please refer to Figure 5a , Figure 5a is a functional unit block diagram of a message transmission device provided in an embodiment of the present application, wherein the device is applied to Figure 1 In the first device 11 shown, the message transmission device 50 includes: a sending unit 501, used to detect a sending request for a second message within a first time period after sending a first message to a second device, and send the second message to the second device, the message type of the first message is a first type, and the message type of the second message is a second type, the first type is used to characterize that the corresponding message contains a target indication field, and the second type is used to characterize that the corresponding message contains an indication field other than the target indication field, and the first time period includes multiple consecutive connection interval time periods characterized by the information in the target indication field according to the original protocol; a receiving unit 502, used to receive a response message from the second device to the second message.

[0075] In a possible example, after detecting the request to send the second message, the message transmission device 50 is further used to: determine that the type of the second message is the second type.

[0076] In one possible example, in terms of determining that the type of the second message is the second type, the message transmission device 50 is specifically used to: parse the second message to obtain the data packet format of the second message; detect that the data packet format of the second message contains an indication domain field other than the indication domain field corresponding to the target indication domain, and determine that the type of the second message is the second type.

[0077] In a possible example, in terms of detecting a sending request for a second message within a first time period after sending a first message to a second device, and sending the second message to the second device, the sending unit 501 is specifically used to: within the first time period after sending the first message to the second device through the first sending queue, when a sending request for the second message is detected, send the second message to the second device through the second sending queue, and the message sending processes of the first sending queue and the second sending queue do not interfere with each other.

[0078] In one possible example, in terms of detecting a request to send a second message and sending the second message to the second device, the sending unit 501 is specifically used to: detect the request to send a second message, and determine whether the second message will affect the transmission link between the first device and the second device; if so, send the second message to the second device at the end time of the first time period; if not, immediately send the second message to the second device.

[0079] In a possible example, in terms of sending the second message to the second device at the end time point of the first time period, the sending unit 501 is specifically used to: send the second message to the second device through the first sending queue at the end time point of the first time period.

[0080] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.

[0081] In the case of integrated units, such as Figure 5b As shown, Figure 5b This is a block diagram of the functional units of another message transmission device provided by an embodiment of the present application. Figure 5b In the embodiment, the message transmission device 51 includes: a processing module 512 and a communication module 511. The processing module 512 is used to control and manage the actions of the message transmission device, for example, to execute the steps of the sending unit 501 and the receiving unit 502, and / or to execute other processes of the technology described herein. The communication module 511 is used to support the interaction between the message transmission device and other devices. Figure 5b As shown, the message transmission device may further include a storage module 513, and the storage module 513 is used to store program codes and data of the message transmission device.

[0082] Among them, the processing module 512 can be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 511 can be a transceiver, an RF circuit or a communication interface, and the like. The storage module 513 can be a memory.

[0083] Among them, all relevant contents of each scenario involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here. The above message transmission device 51 can execute the above Figure 2 The message transmission method shown.

[0084] In accordance with the above-mentioned embodiments, please refer to Figure 6a , Figure 6a is a functional unit block diagram of another message transmission device provided in an embodiment of the present application, wherein the device is applied to Figure 1 In the second device 12 shown, the message transmission device 60 includes: a receiving unit 601, which is used to receive a second message from the first device within a second time period after receiving a first message from the first device, the message type of the first message is a first type, and the message type of the second message is a second type, the first type is used to characterize that the corresponding message contains a target indication field, and the second type is used to characterize that the corresponding message contains an indication field other than the target indication field, the starting time point of the second time period is the time point when the second device receives the first message, and the ending time point of the second time period is the ending time point of the last connection interval time period in multiple consecutive connection interval time periods represented by the information in the target indication field according to the original protocol; a generating unit 602, which is used to generate a response message to the second message; a sending unit 603, which is used to send the response message to the second message to the first device.

[0085] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.

[0086] In the case of an integrated unit, such as Figure 6b As shown, Figure 6bThis is a block diagram of the functional units of another message transmission device provided in an embodiment of the present application. Figure 6b In the embodiment, the message transmission device 61 includes: a processing module 612 and a communication module 611. The processing module 612 is used to control and manage the actions of the message transmission device, for example, to execute the steps of the receiving unit 601, the generating unit 602 and the sending unit 603, and / or to execute other processes of the technology described herein. The communication module 611 is used to support the interaction between the message transmission device and other devices. Figure 6b As shown, the message transmission device may further include a storage module 613, and the storage module 613 is used to store program codes and data of the message transmission device.

[0087] Among them, the processing module 612 can be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements a computing function, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 611 can be a transceiver, an RF circuit or a communication interface, and the like. The storage module 613 can be a memory.

[0088] Among them, all relevant contents of each scenario involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here. The above message transmission device 61 can execute the above Figure 4 The message transmission method shown.

[0089] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0090] Figure 7 is a structural block diagram of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 700 may include one or more of the following components: a processor 701, a memory 702 coupled to the processor 701, wherein the memory 702 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above embodiments when executed by one or more processors 701. The electronic device 700 may be the first device 11 and / or the second device 12 in the embodiments of the present application.

[0091] The processor 701 may include one or more processing cores. The processor 701 uses various interfaces and lines to connect the various parts of the entire electronic device 700, and executes various functions and processes data of the electronic device 700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 702, and calling data stored in the memory 702. Optionally, the processor 701 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 701 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 701, and can be implemented separately through a communication chip.

[0092] The memory 702 may include a random access memory (RAM) or a read-only memory (ROM). The memory 702 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device 700 during use, etc.

[0093] It is understandable that the electronic device 700 may include more or fewer structural elements than those in the above structural block diagram, which is not limited here.

[0094] An embodiment of the present application also provides a computer storage medium, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, part or all of the steps of any method recorded in the above method embodiments are implemented.

[0095] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any method recorded in the above method embodiments.

[0096] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0097] In the several embodiments provided in the present application, it should be understood that the disclosed methods, devices and systems can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0098] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0099] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0100] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a volatile memory or a non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM) and direct RAM bus random access memory (DR RAM), among other media that can store program code.

[0101] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions without departing from the spirit and scope of the present invention, and can make various changes and modifications, including the combination of the above-mentioned different functions and implementation steps, including software and hardware implementation methods, all of which are within the scope of protection of the present invention.

Claims

1. A message transmission method, characterized in that: Applied to a first device, the method includes: Within a first time period after sending a first message to a second device, detecting a sending request for a second message, sending the second message to the second device, wherein the message type of the first message is a first type, and the message type of the second message is a second type, the first type is used to indicate that the corresponding message includes a target indication field, and the second type is used to indicate that the corresponding message includes an indication field other than the target indication field, and the first time period includes a plurality of consecutive connection interval time periods indicated by information in the target indication field according to an original protocol; A response message to the second message is received from the second device.

2. The method according to claim 1, characterized in that: After the detecting of the sending request for the second message, the method further includes: It is determined that the type of the second message is the second type.

3. The method according to claim 2, characterized in that: The determining that the type of the second message is the second type includes: Parsing the second message to obtain a data packet format of the second message; It is detected that the data packet format of the second message contains an indication field field other than the indication field field corresponding to the target indication field, and it is determined that the type of the second message is the second type.

4. The method according to claim 1, characterized in that: The step of detecting a request for sending a second message within a first time period after sending the first message to the second device, and sending the second message to the second device comprises: Within a first time period after sending a first message to a second device through a first sending queue, when a sending request for a second message is detected, the second message is sent to the second device through a second sending queue, and the message sending processes of the first sending queue and the second sending queue do not interfere with each other.

5. The method according to claim 1, characterized in that: The detecting a request for sending a second message, and sending the second message to the second device, includes: detecting a request to send a second message, and determining whether the second message will affect a transmission link between the first device and the second device; If yes, sending the second message to the second device at the end time of the first time period; If not, the second message is sent to the second device immediately.

6. The method according to claim 4 or 5, characterized in that: The sending the second message to the second device at the end time point of the first time period includes: At the end time point of the first time period, the second message is sent to the second device through the first sending queue.

7. A message transmission method, characterized in that: Applied to the second device, the method includes: A second message from a first device is received within a second time period after a first message from a first device is received, the message type of the first message is a first type, the message type of the second message is a second type, the first type is used to characterize that the corresponding message includes a target indication field, and the second type is used to characterize that the corresponding message includes an indication field other than the target indication field, the starting time point of the second time period is the time point when the second device receives the first message, and the ending time point of the second time period is the ending time point of the last connection interval period among multiple consecutive connection interval periods characterized by the information in the target indication field according to the original protocol; generating a response message to the second message; Sending the response message to the second message to the first device.

8. An electronic device, characterized in that: The method comprises a processor, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 7.

9. A message transmission device, characterized in that: Applied to a first device, the apparatus comprises: a sending unit, configured to detect a sending request for a second message within a first time period after sending a first message to a second device, and send the second message to the second device, wherein the message type of the first message is a first type, and the message type of the second message is a second type, the first type is used to characterize that the corresponding message includes a target indication field, and the second type is used to characterize that the corresponding message includes an indication field other than the target indication field, and the first time period includes a plurality of consecutive connection interval time periods characterized by information in the target indication field according to an original protocol; A receiving unit is used to receive a response message from the second device to the second message.

10. A message transmission device, characterized in that: Applied to a second device, the apparatus comprises: A receiving unit, configured to receive a second message from a first device within a second time period after receiving a first message from the first device, wherein the message type of the first message is a first type, and the message type of the second message is a second type, wherein the first type is used to characterize that the corresponding message includes a target indication field, and the second type is used to characterize that the corresponding message includes an indication field other than the target indication field, wherein a starting time point of the second time period is a time point when the second device receives the first message, and an ending time point of the second time period is an ending time point of the last connection interval period among a plurality of consecutive connection interval periods characterized by the information in the target indication field according to an original protocol; A generating unit, configured to generate a response message to the second message; A sending unit, configured to send the response message to the second message to the first device.

11. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.