Synchronous communication method, electronic device and storage medium
By introducing the first offset time and the second offset time, as well as the allocation mechanism of the second channel in the Bluetooth technology, the problem of unidirectional communication between the master and slave device in the prior art is solved, bidirectional communication is realized, and interaction efficiency and channel utilization are improved.
Patent Information
- Application Number
- CN202080094515.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-15
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2040-09-15
AI Technical Summary
In the existing Bluetooth technology, connectionless synchronous communication only realizes one-way communication between the master and slave devices, and lacks the bidirectional communication capability between the master and slave devices.
By receiving the resource request from the slave device side during the first offset time after the synchronization message broadcast is completed, the master device side receives the resource request from the slave device side and in response to allocating the communication resources for interaction, including the second offset time and the second channel, thereby realizing bidirectional communication between the master and slave device side.
Based on connectionless synchronous communication, the bidirectional communication capability between the master and slave device ends is realized, the number of interactions can be increased on the slave device end and the interference to synchronous messages is reduced.
Smart Images

Figure CN114982259B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to wireless communications, and in particular to a synchronous communication method, electronic device, and storage medium. Background Art
[0002] Connectionless synchronous communication is a communication method that realizes synchronous transmission through a broadcast link in a non-connection mode, and can be applied to Bluetooth technology.
[0003] The connectionless synchronous communication implemented in Bluetooth V5.2 version (Bluetooth LE Audio V5.2) is implemented through the Broadcast Isochronous Streams (BIS) protocol. Through the BIS protocol, the sending master device sends the synchronization message in the channel in the form of broadcast, and the receiving slave device connected to the same channel receives the synchronization message by listening to the broadcast.
[0004] Therefore, when the existing technology realizes connectionless synchronous communication based on the BIS protocol, the communication between the master and slave devices is only performed by the master device broadcasting synchronization messages to the slave device, and only one-way communication is performed between the master and slave devices. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a synchronous communication method, an electronic device and a storage medium, so that when the existing Bluetooth technology realizes connectionless synchronous communication, two-way communication between the master and slave devices in the connectionless synchronous communication mode can be realized.
[0006] To solve the above technical problems, an embodiment of the present application provides a synchronous communication method, which is applied to a master device side and includes the following steps: within a first offset time after the completion of the synchronization message broadcast, receiving a resource request sent by a slave device side through a first channel for broadcasting the synchronization message; in response to the resource request, allocating communication resources for interacting with the master device side to the slave device side; the communication resources include a second offset time; sending the communication resources to the slave device side through the first channel; wherein the first offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, and the second offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages.
[0007] The embodiment of the present application also provides a synchronous communication method, which is applied to a slave device, and includes the following steps: within a first offset time after receiving a synchronization message broadcast by a master device, sending a resource request to the master device through a first channel for receiving synchronization messages; receiving communication resources for interacting with the master device from the master device through the first channel; the communication resources include a second offset time relative to the completion of the synchronization message broadcast; wherein the first offset time and the second offset time are both within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages. The embodiment of the present application also provides an electronic device, including: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that at least one processor can execute the above-mentioned synchronous communication method applied to the master device, the master device is an electronic device, or can execute the above-mentioned synchronous communication method applied to the slave device, the slave device is an electronic device.
[0008] An embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned synchronous communication method applied to the master device side, or implements the above-mentioned synchronous communication method applied to the slave device side.
[0009] Compared with the prior art, the embodiment of the present application is that, within the first offset time within the synchronization message broadcast time interval, the slave device sends a resource request to the master device through the first channel of the broadcast synchronization message, the master device receives the resource request from the slave device from the first channel, responds to the resource request, allocates communication resources including the second channel and the second offset time to the slave device for interaction, sends communication resources to the slave device through the first channel, and the slave device receives communication resources through the first channel. Since within the first offset time, the master device and the slave device complete a communication resource allocation interaction in the first channel of the broadcast synchronization message, and bidirectional communication between the master device and the slave device can be achieved by allocating the second offset time. Therefore, the master device and the slave device realize bidirectional communication on the basis of the existing connectionless synchronous communication, and bidirectional interaction between the master device and the slave device can be achieved.
[0010] In addition, the communication resources also include a second channel. In this embodiment, by adding a second channel, the master device end can allocate different channels to different slave device ends with the same second offset time, thereby increasing the number of slave device ends that can interact, and because the second channel is added, that is, the channel for the master-slave device end to interact is different from the channel for the master device end to broadcast synchronization messages, interference with synchronization messages can be minimized.
[0011] In addition, after the master device sends the communication resource to the slave device through the first channel, it also includes: accessing the second channel to interact with the slave device within the second offset time after the synchronization message broadcast is completed. In this embodiment, the master device can access the second channel within the second offset time to achieve interaction with the slave device. That is, the master device can choose to interact with the slave device by choosing to access the second channel when needed.
[0012] In addition, within the second offset time after the synchronization message broadcast is completed, the second channel is accessed to interact with the slave device end, including: within the second offset time after the synchronization message broadcast is completed, the second channel is accessed, and the slave device end is interacted in response mode or non-response mode; wherein, in response mode, the master device end receives the interaction message sent by the slave device end and responds to the interaction message; in non-response mode, the master device end only receives the interaction message sent by the slave device end. In this embodiment, in the non-response mode, the master device end does not need to respond to the interaction message of the slave device end, the power consumption of the master device end is relatively small, and more interactions of the slave devices can be completed in the same time; in the response mode, the master device end responds to the interaction message of the slave device end, and the slave device end confirms that the interaction message has been received based on the response, so there is no need to repeatedly send the same interaction message multiple times in order to increase the probability of receiving the interaction message, thereby avoiding the redundant transmission of the same interaction message causing an increase in power consumption of the slave device end.
[0013] In addition, in response to the resource request, the communication resources for interacting with the master device are allocated to the slave device, including: in response to the resource request, if it is determined that the preset resource allocation condition is established, the communication resources for interacting with the master device are allocated to the slave device; wherein the resource allocation condition includes at least one of the following conditions: the slave device is a preset device that is allowed to interact with the master device, and the number of slave devices that have been allocated communication resources has not reached the preset upper limit. In this embodiment, when the number of allocated slave devices has not reached the upper limit, it can be avoided that too many communication resources are allocated, which exceeds the range that the master device can handle; allocating communication resources to the preset devices that are allowed to interact can avoid allocating communication resources to devices that are not allowed to interact, causing non-interactive devices to occupy communication resources and waste communication resources, thereby achieving reasonable allocation of communication resources.
[0014] In addition, after the master device accesses the second channel to interact with the slave device within the second offset time after the synchronization message is broadcasted, the method further includes: if the number of failed interactions through the second channel exceeds a preset number within the second offset time after the synchronization message is broadcasted, the communication resources allocated to the slave device are recovered. In this embodiment, by recovering the communication resources of the slave device that has accessed the second channel for multiple consecutive times and failed to interact, the occupation of the communication resources by the slave device that has failed to interact can be released, thereby avoiding the long-term invalid occupation of the communication resources and improving the utilization rate of the communication resources.
[0015] In addition, the first offset time and the second offset time do not overlap; and / or, the second offset times of different slave device ends do not overlap. In this embodiment, when the first offset time and the second offset time do not overlap, between any two adjacent synchronization messages, resource requests from newly added slave device ends and messages sent from slave device ends to which resources have been allocated can be collected once, and when the second offset times of different slave device ends do not overlap, between any two adjacent synchronization messages, messages sent from all slave device ends can be collected once. Therefore, the reasonable use of the time interval between any two adjacent synchronization messages can be achieved, thereby improving the interaction efficiency between the master and slave device ends.
[0016] In addition, within the first offset time after the completion of the synchronization message broadcast, before receiving the resource request sent from the device end through the first channel of the broadcast synchronization message, it also includes: determining that the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages meets the preset time condition; the time condition includes: the difference between the time interval and the time length of the first offset time is greater than or equal to the preset time, and the difference between the time interval and the time length of the second offset time is greater than or equal to the preset time. In this embodiment, the resource request is received from the second channel only when the time interval is respectively greater than the time length of the first offset time and the time length of the second offset time, that is, the two-way communication mechanism between the master device end and the slave device end is started when it is ensured that the time interval is sufficient, thereby avoiding the problem that the normal broadcast of the synchronization message in the connectionless synchronization communication may be affected due to the insufficient time interval. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0018] Figure 1 is a flowchart of an example of a synchronous communication method provided according to the first embodiment of the present application;
[0019] Figure 2is a schematic diagram of the time interval between two adjacent synchronization message broadcasts provided according to the first embodiment of the present application;
[0020] Figure 3 is a flowchart of another example of the synchronous communication method provided according to the first embodiment of the present application;
[0021] Figure 4 It is a schematic diagram of different slave device ends allocated to overlapping second offset times for interaction according to the first embodiment of the present application;
[0022] Figure 5 is a flowchart of an example of a synchronous communication method provided according to the second embodiment of the present application;
[0023] Figure 6 is a flowchart of another example of a synchronous communication method provided according to the second embodiment of the present application;
[0024] Figure 7 is a flowchart of another example of a synchronous communication method provided according to the second embodiment of the present application;
[0025] Figure 8 is a flowchart of a synchronous communication method provided according to a third embodiment of the present application;
[0026] Fig. 9 is a flowchart of a synchronous communication method provided according to a fourth embodiment of the present application;
[0027] Fig.10 is a flowchart of an example of a synchronous communication method provided according to the fifth embodiment of the present application;
[0028] Fig.11 is a flowchart of another example of a synchronous communication method provided according to the fifth embodiment of the present application;
[0029] Fig.12 is a flowchart of a synchronous communication method provided according to a sixth embodiment of the present application;
[0030] Fig.13 This is a schematic diagram of a synchronous communication electronic device provided according to the seventh embodiment of the present application. Specific embodiments
[0031] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0032] The first embodiment of the present application relates to a synchronous communication method applied to a master device. The specific process is as follows: Figure 1 shown.
[0033] Step 101, receiving a resource request sent from a device through a first channel for broadcasting a synchronization message within a first offset time after the synchronization message is broadcast;
[0034] Step 102, in response to the resource request, allocating communication resources for interacting with the master device end to the slave device end, the communication resources including a second offset time;
[0035] Step 103: Send communication resources to the slave device through the first channel.
[0036] The first offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, and the second offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages.
[0037] Compared with the prior art, in this embodiment, the master device receives a resource request sent by the slave device through the first channel of the broadcast synchronization message within the first offset time after the completion of the synchronization message broadcast, and sends the communication resources allocated to the slave device for interacting with the master device through the first channel, and the communication resources include the second offset time; that is, the master device and the slave device can interact within the second offset time; and, since the first offset time and the second offset time are both within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, the master and slave device will not affect the normal broadcast of the synchronization message when interacting through the second channel; therefore, the embodiment of the present application can realize two-way communication between the master and slave device in a connectionless synchronous communication mode.
[0038] The implementation details of the synchronous communication method of this embodiment are described in detail below. The following content is only provided for easy understanding of the implementation details and is not necessary for implementing this solution.
[0039] The synchronous communication method in this embodiment is used to realize the interaction between the master device end and the slave device end in the connectionless synchronous communication; the existing connectionless synchronous communication usually adopts the broadcast synchronization (Broadcast Isochronous Streams, BIS) transmission mode. For example, in the Bluetooth broadcast audio technology based on low-power Bluetooth, the BIS protocol is used for synchronous transmission of audio data. Among them, the master device that sends the message in the connectionless synchronous communication can be understood as the master device end, and the slave device that receives the message in the connectionless synchronous communication can be understood as the slave device end.
[0040] For example, in the example of a multi-person conference, the master device is the conference audio playback device, and the audience and host use slave devices, such as Bluetooth headsets. The master device synchronously transmits the conference audio data to multiple slave devices. In existing multi-person conferences, the master device broadcasts audio data in a non-connected manner called BIS, and does not care about the status of each slave device; each slave device synchronously receives audio data through the BIS protocol, and then plays or uses it. When the audience or host has questions and needs to pause the conference audio or implement other controls, it is impossible to achieve this with existing technology; in the synchronous communication method of this embodiment, the master device can communicate with the slave device, so that the master device can learn about the audience's and host's intention to pause the conference audio or implement other controls, and respond.
[0041] For another example, in a classroom teaching example, the device used by the teacher is the master device, and the device used by the student is the slave device. With the existing BIS transmission method, only the teacher can speak and the students can listen, but interaction between the students and the teacher cannot be achieved. When a student wants to speak, he cannot signal the teacher. However, in the synchronous communication method of this embodiment, the master device used by the teacher can communicate with the slave device used by the student, so that the teacher can learn about the student's speaking needs and interact with the student.
[0042] In step 101, the first channel refers to a channel for broadcasting a synchronization message, such as the audio data in the above multi-person conference example, or the audio data generated by the teacher's speech in the classroom teaching example.
[0043] The first offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, that is, the first offset time is a time range, such as 0ms~2ms, 2ms~3ms; if the time interval is 10ms, then the time range of the first offset time is a range between 0 and 10ms. The first offset time can be directly stored in the form of a time range, such as 0ms~2ms above, or it can also be stored in the form of a starting time point and a duration, such as a starting time point of 0ms and a duration of 2ms; or a starting time point of 2 and a duration of 2ms.
[0044] The time interval between two adjacent synchronization message broadcasts, such as Figure 2 As shown, a synchronous message broadcast is used as a broadcast synchronous group BIG (Broadcast Isochronous Groups) event (BIG event). Each synchronous message can contain multiple BIS subevents (BIS Subevents) and a control subevent (Control Subevent). There is a time interval between two BIG events. The figure shows BIG event x, BIG event x+1, and BIS Subevent1, BIS Subevent 2, BIS Subevent3, and Control Subevent contained in BIG event x, and BIS Subevent1, BIS Subevent 2, BIS Subevent3, and Control Subevent also contained in BIG eventx+1.
[0045] The first offset time may be a fixed time, and the first offset time may be preset in advance in the master device and the slave device, or the first offset time may be preset by the master device, and the master device sends it out in a broadcast form in a synchronization message or before the slave device synchronizes with the master device. For example, a BIG Info field is included in the broadcast for synchronizing the slave device with the master device, and the field includes data required for synchronization between the slave device and the master device, and the information of the first offset time may be carried in the BIG Info to notify all slave devices of the first offset time.
[0046] For example, when both the master device and the slave device know the first offset time in advance, the slave device sends a resource request through the first channel within the first offset time, and the master device receives the resource request sent by the slave device from the first channel of the broadcast synchronization message by monitoring the broadcast. The resource request may include identification information of the slave device, and the identification information may be the address of the slave device, the unique identification code of the slave device, etc. Among them, the identification information of the slave device serves as the identity identification of this slave device in the request information. Among them, the slave device that can send a resource request in the first channel can be understood as a slave device that has received the synchronization message in the first channel, that is, a slave device that has been synchronized with the master device, so the master device can know which slave devices have synchronized with the synchronization message sent by itself.
[0047] The first offset time can also be set by the master device according to actual conditions; for example, the first offset time is set according to the network conditions of the network environment in which the master device is located, and the new first offset time is notified to the slave device, for example, in a certain synchronization message or before the slave device is synchronized with the master device, and is broadcasted. As mentioned above, the first offset time can be carried in the synchronization message, that is, carried in the control sub-event of the synchronization message, or carried in the field of BIG Info.
[0048] The duration of the first offset time can also be variable. In addition to the preset fixed time, a delay duration can be preset to delay the first offset time under special circumstances. For example, the master device is receiving a resource request, and the reception has not been completed but the first offset time has ended. If there is no delay duration, the master device will stop receiving the resource request at this time. Since only a part of the resource request is received, it can only be discarded; and if there is a delay duration, you can choose to extend the duration of the first offset time, and add a delay duration to the first offset time on the basis of the preset fixed time. If the first offset time exceeds the time interval between the synchronization message broadcasts after being extended, the first offset time will only be extended until before the synchronization message broadcast is sent.
[0049] In step 102, the second offset time is a time period within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages; that is, the second offset time is also a time range, for example, 2ms~3ms, 3ms~4ms; if the time interval is 10ms, then the time range of the second offset time is a range between 0 and 10ms. Among them, the second offset time may overlap with the first offset time, or may not overlap; the second offset times of different slave device ends may overlap or not overlap. Among them, the end time point of the previous second offset time may be the start time point of the next second offset time, or a time interval may be set between the previous second offset time and the next second offset time.
[0050] The second offset time can be a fixed time. The master device can preset the same length of second offset time for all slave devices, or it can be set by the master device according to actual conditions. For example, the master device can allocate second offset times of different lengths to slave devices according to the number of interactions. The slave devices with more interactions will be allocated a longer second offset time.
[0051] The duration of the second offset time can also be variable. In addition to the preset fixed time, a delay duration can be preset to delay the second offset time under special circumstances. For example, the master device is receiving an interactive message, but the reception has not been completed but the first offset time has ended. If there is no delay duration, the master device will stop receiving the interactive message at this time. Since only a part of the interactive message is received, it can only be discarded; if there is a delay duration, you can choose to extend the duration of the second offset time, and add a delay duration to the second offset time on the basis of the preset fixed time. If the second offset time exceeds the time interval between the synchronous message broadcasts after being extended, the second offset time will only be extended until before the synchronous message broadcast is sent.
[0052] In one example, allocating communication resources for interacting with a master device end to a slave device end includes: in response to a resource request, if it is determined that a preset resource allocation condition is met, allocating communication resources for interacting with the master device end to the slave device end; wherein the resource allocation condition includes at least one of the following conditions: the slave device end is a preset device allowed to interact with the master device end, and the number of slave devices to which communication resources have been allocated has not reached a preset upper limit. In this embodiment, by judging the resource allocation condition before responding to the resource request, communication resources are only allocated to the slave device end that meets the preset resource allocation condition, so that communication resources can be selectively allocated to the slave device end to better meet actual needs.
[0053] In step 103, the master device may send a response message of the resource request to the slave device in a broadcast form through the first channel, and the response message carries the communication resources allocated to the master device and the identification information of the slave device. The slave device will recognize the response message with its own identification information, record the communication resources carried in the response message, and use the communication resources to communicate with the master device.
[0054] When the master device receives a resource request, in addition to responding to the request and sending a reply message to the slave device, it also deduplicates the request. Before allocating communication resources to a slave device, the master device will detect whether the slave device has already been allocated communication resources and whether the communication resources still belong to the slave device. For a request sent from the same slave device, if the slave device has already been allocated communication resources, no communication resources will be allocated to the slave device. Even if the master device has previously allocated communication resources to the slave device, but now the communication resources do not belong to the slave device, the master device will still allocate another communication resource to the slave device.
[0055] In one example, the first offset time and the second offset time do not overlap and the second offset times of different slave devices do not overlap; Figure 3 As shown, after the master device sends communication resources to the slave device through the first channel, it can also include: Step 104: receiving a resource request sent by the slave device through the first channel within a first offset time within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, and interacting with different slave device ends through the first channel within a second offset time of different slave device ends within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast.
[0056] The first offset time and the second offset time of different slave devices may be time intervals continuously divided within the time interval when they do not overlap, so that the time interval can be fully utilized. For example, if the time interval is 10ms, the first offset time is 0-2ms, and there are four second offset times, 2-4ms, 4-6ms, 6-8ms, and 8-10ms, then four second offset times can be divided and allocated to four slave devices.
[0057] In step 104, after receiving the communication resources from the device end, the interactive message is sent to the master device end in the form of broadcasting through the first channel within the second offset time, and the master device end listens to the first channel to receive the interactive message sent by the slave device end. When the second offset time assigned to the slave device end ends, the slave device end no longer sends interactive messages, and the master device end stops listening to the first channel. Until the next second offset time assigned by the master device end, the master device end listens to the interactive message sent by the slave device end corresponding to the next second offset time. And because the first offset time and the second offset time are both within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, the first offset time and the second offset time do not overlap, and the second offset times of different slave devices do not overlap, the resource request and interaction process between the slave device end and the master device end and the synchronization message broadcast do not conflict with each other, and two-way communication can be achieved on the basis of the existing connectionless synchronous communication.
[0058] In other examples, the second offset times allocated to different slave devices may also overlap, but the slave devices with overlapping second offset times cannot interact with the master device in the same time interval. Figure 4 As shown, it is assumed that the Nth BIG event occurs at 20 to 30 ms, the N+1th BIG event occurs at 35 to 45 ms, and the N+2th BIG event occurs at 50 to 60 ms, so 30 to 35 ms is the time interval between the Nth and N+1th BIG events, and 45 to 50 ms is the time interval between the N+1th and N+2th BIG events. The master device can allocate a second offset time to slave device A, slave device B, and slave device C in a time interval, wherein the second offset time of slave device A and slave device C completely overlaps, so slave device A and slave device C cannot interact with the master device in the same time interval, and slave device A interacts with the master device in the time interval between the Nth and N+1th BIG events, and slave device C interacts with the master device in the time interval between the N+1th and N+2th BIG events.
[0059] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0060] The second embodiment of the present application relates to a synchronous communication method. The second embodiment is substantially the same as the first embodiment, with the main difference being that in the second embodiment of the present application, the communication resources allocated by the master device to the slave device also include a second channel, and the interaction between the master and slave devices is directly completed through the second channel.
[0061] Among them, the second channel is a dedicated channel allocated by the master device to the slave device for interaction. In order to save communication resources and control the number of channels used by the master device, one second channel can be allocated to multiple different slave devices, but one slave device can only be allocated one second channel.
[0062] In this embodiment, by adding a second channel, the master device end can allocate different channels to different slave device ends with the same second offset time, thereby increasing the number of slave device ends that can interact. Moreover, since the second channel is added, that is, the channel for interaction between the master and slave device ends is different from the channel for broadcasting synchronization messages by the master device end, interference with synchronization messages can be minimized as much as possible.
[0063] In an example, Figure 5 As shown, the synchronous communication method includes:
[0064] Step 201, receiving a resource request sent from a device through a first channel for broadcasting a synchronization message within a first offset time after the synchronization message is broadcasted;
[0065] Step 202, in response to the resource request, allocating communication resources for interacting with the master device end to the slave device end, the communication resources including a second channel and a second offset time;
[0066] Step 203, sending communication resources to the slave device via the first channel;
[0067] Step 204: Access the second channel to interact with the slave device within the second offset time after the synchronization message is broadcasted.
[0068] Steps 201, 202 and 203 in this embodiment are substantially the same as steps 101, 102 and 103 in the first embodiment, and are not described in detail. The difference is that in step 204, the master device accesses the second channel to interact with the slave device.
[0069] Accessing the second channel during the second offset time can achieve that, when the master device chooses to interact with the slave device, it can establish an interactive channel with the slave device by accessing the second channel assigned to the slave device, and interact with the slave device. When the master device chooses not to interact with the slave device, it will not receive the interactive message sent by the slave device as long as it does not access the second channel. Therefore, the master device can choose whether to interact with the slave device by choosing to access the second channel when needed, to avoid the interference of the slave device message caused by the second channel when interaction is not needed. Wherein, accessing the second channel includes: adjusting the receiving frequency band of the master device to the frequency band used by the second channel.
[0070] The master device can preset the interval between each synchronization message broadcast, and access the second channel allocated by the slave device in a preset order to receive the interaction message sent by the slave device. The preset interaction order of the slave device needs to take into account the second offset time allocated to each slave device. At the end of the second offset time allocated to the slave device, the interaction between the master device and this slave device ends, and the master device interacts with the next slave device in a preset interaction order and accesses the second channel allocated to the next slave device. If the next slave device is allocated the same second channel as the slave device that interacted this time, the master device does not change the second channel to be accessed. After completing the interaction with a slave device, the master device can also select a slave device whose second offset time is after the current time and before the start of the next synchronization message broadcast in real time, access the second channel allocated by this slave device, and interact with this slave device.
[0071] Alternatively, the interaction between the master device and the slave device may also include: the master device actively sends an interaction message to the slave device. For example, in a classroom teaching example, the teacher may call on a student to speak, and at this time, the teacher may actively send an interaction message indicating a request to speak to the slave device used by the student; or, if the teacher finds that a student is absent-minded, the teacher may actively send an interaction message indicating a classroom discipline reminder to the slave device used by the student.
[0072] In one example, step 204 specifically includes accessing the second channel to interact with the slave device in a response mode or a non-response mode within the second offset time after the synchronization message is broadcasted. In the response mode, the second channel is accessed within the second offset time after the synchronization message is broadcasted, the interactive message sent from the slave device is received, and the interactive message is responded to; in the non-response mode, the second channel is accessed within the second offset time after the synchronization message is broadcasted, and only the interactive message sent from the slave device is received.
[0073] Among them, the master device side can respond to the interactive message of the slave device side immediately after receiving the interactive message, that is, within the second offset time corresponding to the slave device side, the master device side sends a response message of the interactive message to the slave device side through the second channel corresponding to the slave device side. In the non-response mode, the master device side does not need to respond to the interactive message of the slave device side, the power consumption of the master device side is relatively small, and more interactions of the slave devices can be completed in the same time; in the response mode, the master device side responds to the interactive message of the slave device side, and the slave device side confirms that the interactive message has been received based on the response, so there is no need to repeatedly send the same interactive message multiple times in order to increase the probability of receiving the interactive message, avoiding the redundant transmission of the same interactive message causing an increase in the power consumption of the slave device side.
[0074] Furthermore, if Figure 6 , before interacting with the slave device in the response mode or the non-response mode, that is, before step 204, it also includes: step 203-1, according to at least one of the following information, determining whether to use the response mode or the non-response mode to interact with the slave device; the information includes: the network quality of the network environment where the master device is located, whether the slave device is designated to use the response mode or the non-response mode. Among them, step 203-1 although in Figure 5 It is located between step 203 and 204, but in fact step 203-1 only needs to occur before step 204. In this embodiment, the master device can select the response mode or the non-response mode to selectively respond to the interactive message sent by the slave device to better meet the actual needs and achieve better interactive effect.
[0075] In one example, based on at least one of the following information, it is determined whether to use the response mode or the non-response mode to interact with the slave device end, including: if multiple evaluation indicators of the network environment in which the master device end is located meet the preset conditions, or the slave device end is designated to use the non-response mode, it is determined to use the non-response mode to interact with the slave device end; wherein the multiple evaluation indicators include at least one of signal strength and bit error rate. In this embodiment, when multiple evaluation indicators of the network environment in which the master device end is located meet the preset conditions or the slave device end is designated to use the non-response mode, the master device end uses the non-response module to interact with the slave device end. Since in the non-response mode, the master device end does not need to respond to the interactive message of the slave device end, the master device end consumes less power and can complete more interactions with the slave device end in the same time. At the same time, the second channel only needs to transmit the interactive message sent by the slave device end, and only requires one-way transmission, and the requirements for the network are also low. Therefore, using the non-response mode can reduce the power consumption of the master device end and reduce the requirements for the second channel.
[0076] Furthermore, the master device uses the non-response mode by default to interact with the slave device. When the slave device is designated as the response mode, or the network quality of the network environment in which the master device is located is not a high-quality network environment, and / or the slave device is not designated as using the non-response mode, the master device uses the response mode to interact with the slave device.
[0077] In one example, the first offset time and the second offset time do not overlap; and / or, the second offset times of different slave device ends do not overlap. In this embodiment, when the first offset time and the second offset time do not overlap, between any two adjacent synchronization messages, resource requests from newly added slave device ends and messages sent from slave device ends to which resources have been allocated can be collected once, and when the second offset times of different slave device ends do not overlap, between any two adjacent synchronization messages, messages sent from all slave device ends can be collected once. Therefore, the reasonable use of the time interval between any two adjacent synchronization messages can be achieved, thereby improving the interaction efficiency between the master and slave device ends.
[0078] In one example, the first offset time and the second offset time may partially overlap or completely overlap, and the second offset times of different slave device ends may partially overlap or completely overlap. When the second offset time of a slave device end overlaps with the first offset time or the second offset time of another slave device end and the allocated second channel is the same, the slave device end does not interact with the master device end during the current synchronization message broadcast time interval, and waits for the second offset time of the next synchronization message broadcast time interval to interact with the master device end.
[0079] In one example, the first offset time and the second offset time do not overlap, and the first offset time is earlier than the second offset time; Figure 7 As shown, after sending the communication resources to the slave device end through the first channel, it also includes: step 205, receiving the resource request sent by the slave device end through the first channel within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, and accessing the second channel to interact with the slave device end within the second offset time within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast; wherein N is an integer greater than or equal to 1. In this embodiment, by setting the first offset time and the second offset time not to overlap and to be earlier than the second offset time, after the synchronization message broadcast is completed, the master device end first receives the resource request from the slave device end, and then accesses the second channel to interact with the slave device end. Since the channel for receiving the resource request from the slave device end is the same as the channel for broadcasting the synchronization message, the number of channel switching times can be reduced, thereby saving the power consumption of the master device end.
[0080] Further, in the case where the second offset times of different slave device ends do not overlap; step 205 may be specifically as follows: receiving a resource request sent from the slave device end through the first channel within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, and accessing the second channels of different slave device ends to interact with different slave device ends within the second offset time of different slave device ends within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast. In this embodiment, multiple interactive messages sent from the slave device end may be received within one synchronization message broadcast time interval.
[0081] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0082] The third embodiment of the present application relates to a synchronous communication method. The third embodiment is substantially the same as the second embodiment, with the main difference being that in the third embodiment of the present application, the master device reclaims the communication resources allocated to the slave device that has failed to interact for multiple consecutive times.
[0083] The specific flow chart of this embodiment is as follows Figure 8 As shown, the specific description is given below.
[0084] Step 301, receiving a resource request sent from a device through a first channel of a synchronization message within a first offset time after the synchronization message is broadcasted;
[0085] Step 302, in response to the resource request, allocating communication resources for interaction with the master device end to the slave device end, the communication resources including a second channel and a second offset time;
[0086] Step 303, sending communication resources to the slave device via the first channel;
[0087] Step 304: access the second channel to interact with the slave device within the second offset time after the synchronization message is broadcasted;
[0088] Step 305: If the number of interaction failures through the second channel exceeds a preset number within the second offset time after the synchronization message broadcast is completed, the communication resources allocated to the slave device are recovered.
[0089] Step 301 , step 302 , step 303 , and step 304 in this embodiment are substantially the same as step 201 , step 202 , step 203 , and step 204 in the second embodiment, and are not described in detail.
[0090] In step 305, the reason for the interaction failure may be that there is a problem in the transmission process of the message, the message is lost during the transmission process and cannot be received by the master device, or the slave device has no interaction demand and does not send a message to the master device, etc. It can be seen that when a slave device fails to interact after accessing the second channel for multiple times in a row within the second offset time, its communication resources have allocated an inappropriate transmission channel to the slave device, resulting in the master and slave devices being unable to interact, or the slave device without interaction demand has long-term invalid occupation of communication resources. In this embodiment, by recovering the communication resources of the slave device that has accessed the second channel for multiple times in a row and failed to interact, the occupation of communication resources by the slave device that has failed to interact can be released, thereby avoiding long-term invalid occupation of communication resources and improving the reasonable utilization rate of communication resources.
[0091] Furthermore, when the master device reclaims the communication resources allocated to the slave device, a reclaim message is sent to the slave device on the first channel to notify the slave device that the communication resources are reclaimed. In order for the reclaim message to be accurately received by the slave device, the reclaim message may include the identification information of the slave device. When the slave device needs to interact with the master device, it will send a resource request to the master again.
[0092] The master device will record the correspondence between the allocated slave devices and communication resources. When allocating communication resources to the slave devices or recovering communication resources from the slave devices, the master device will modify the correspondence between the allocated slave devices and communication resources in the record.
[0093] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0094] The fourth embodiment of the present application relates to a synchronous communication method. The fourth embodiment is substantially the same as the second embodiment, with the main difference being that in the fourth embodiment of the present application, before receiving a resource request sent by a slave device, the master device determines that the synchronization message broadcast time interval meets a preset time condition.
[0095] In this embodiment, the specific flow chart of this embodiment is as follows: Fig. 9 As shown:
[0096] Step 401-1, within the first offset time after the synchronization message broadcast is completed, determine whether the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages meets a preset time condition;
[0097] Step 401-2, receiving a resource request sent from a device through a first channel of a broadcast synchronization message within a first offset time;
[0098] Step 402, in response to the resource request, allocating communication resources for interaction with the master device end to the slave device end, the communication resources including a second channel and a second offset time relative to completion of the synchronization message broadcast;
[0099] Step 403: Send communication resources to the slave device via the first channel.
[0100] Within the first offset time after the completion of the broadcast of the synchronization message, before receiving the resource request sent from the device end through the first channel of the broadcast synchronization message, it is determined that the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages meets the preset time condition; the time condition includes: the difference between the time interval and the time length of the first offset time is greater than or equal to the preset time, and the difference between the time interval and the time length of the second offset time is greater than or equal to the preset time. In this embodiment, the resource request is received from the second channel only when the time interval is respectively greater than the time length of the first offset time and the time length of the second offset time, that is, the two-way communication mechanism between the master device end and the slave device end is started when it is ensured that the time interval is sufficient, thereby avoiding the problem that the normal broadcast of the synchronization message in the connectionless synchronization communication may be affected due to the insufficient time interval.
[0101] Preferably, the preset duration should be greater than or equal to the duration for completely receiving a resource request to ensure that at least one resource request can be completely received at the master device end within the time interval, thereby ensuring that the master device end can choose to communicate with at least one slave device end, thereby ensuring that synchronous communication can be carried out effectively.
[0102] Furthermore, the duration condition also includes: the time interval is greater than or equal to the sum of the time length of the first offset time and the time length of the second offset time. This ensures that within a time interval, the master device can both allocate communication resources to the slave device and interact with the slave device, thereby ensuring that synchronous communication can be carried out effectively.
[0103] In one example, the first offset time and the second offset time do not overlap and the second offset times of different slave device ends do not overlap; after sending communication resources to the slave device end through the first channel, it also includes: receiving a resource request sent by the slave device end through the first channel within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, and interacting with different slave device ends through the first channel within the second offset time of different slave device ends within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast. In this embodiment, by receiving a resource request sent by the slave device end through the first channel within the first offset time and completing the interaction with the slave device end within the second offset time, the interaction between the master and slave device ends in a connectionless synchronous communication mode can be achieved.
[0104] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0105] The fifth embodiment of the present application relates to a synchronous communication method, which is applied to a slave device. The specific process is as follows: Fig.10 shown.
[0106] Step 501, within a first offset time after receiving a synchronization message broadcast by the master device, a resource request is sent to the master device via a first channel for receiving synchronization messages;
[0107] Step 502: Receive communication resources for interacting with the master device from the master device via the first channel, where the communication resources include a second offset time.
[0108] The first offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, and the second offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages.
[0109] In this embodiment, the slave device receives a resource request sent to the master device through the first channel of the broadcast synchronization message within the first offset time after the completion of the synchronization message broadcast, and receives the interactive communication resources allocated by the master device through the first channel, and the communication resources include the second offset time relative to the completion of the synchronization message broadcast; that is, the master device and the slave device can interact within the second offset time; and, since the first offset time and the second offset time are both within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, the master and slave device will not affect the normal broadcast of the synchronization message when interacting through the second channel; therefore, the embodiment of the present application can realize two-way communication between the master and slave device in a connectionless synchronous communication mode.
[0110] The implementation details of the synchronous communication method of this embodiment are described in detail below. The following content is only provided for easy understanding of the implementation details and is not necessary for implementing this solution.
[0111] The execution subject in this embodiment is the slave device end in synchronous communication, which interacts with the master device end in the above-mentioned embodiment.
[0112] In step 501, the slave device sends a resource request to the master device in a broadcast form through the first channel for receiving the synchronization message within the first offset time after receiving the synchronization message broadcast by the master device. The resource request may include identification information of the slave device that sends the request. The identification information may be the address of the slave device, an identification code generated by the slave device, etc. Among them, the identification information of the slave device is used as the identity identification of the slave device in the request information. Before sending the synchronization message, the master device broadcasts a message to all slave devices to notify all slave devices of the period and the first offset time of the synchronization message sending. The slave device obtains the period and the first offset time of the synchronization message sent by the synchronization master device by listening to the broadcast.
[0113] In step 502, a communication resource for interacting with the master device is received from the master device via the first channel, and the communication resource includes a second offset time relative to the completion of the synchronization message broadcast. The first offset time and the second offset time are both within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages. After receiving the communication resource sent by the master device, the slave device saves the communication resource information and uses the communication resource in the subsequent interaction with the master device.
[0114] Preferably, the communication resources also include a second channel. In this embodiment, by adding a second channel, the master device end can allocate different channels to different slave device ends with the same second offset time, thereby increasing the number of slave device ends that can interact, and because the second channel is added, that is, the channel for the master-slave device end to interact is different from the channel for the master device end to broadcast synchronization messages, interference with synchronization messages can be minimized.
[0115] In one example, the first offset time and the second offset time do not overlap; and / or, the second offset times of different slave devices do not overlap.
[0116] In one example, after the slave device sends the communication resource to the master device through the first channel, Fig.11 As shown, it also includes:
[0117] Step 503: Access the second channel to interact with the master device within the second offset time after the synchronization message is broadcasted. In this embodiment, the slave device can access the second channel within the second offset time to interact with the master device.
[0118] In step 503, the second channel is accessed within the second offset time, so that an interaction channel with the main device end can be established by accessing the second channel allocated within the second offset time to interact with the main device end.
[0119] The slave device may choose to access the second channel during the second offset time. The slave device may also choose not to access the second channel during the second offset time when it does not need to interact with the master device. Therefore, the master device may choose whether to interact with the master device by choosing to access the second channel when needed.
[0120] In one example, the slave device can interact with the master device in a response mode, and step 503 can be specifically as follows: within the second offset time after receiving the synchronization message, access the second channel and send the interaction message; if no response message to the interaction message is received, access the second channel and resend the interaction message within the second offset time after the next synchronization message is received.
[0121] In one example, the slave device can interact with the master device in a non-response mode, and step 503 can be specifically as follows: including: accessing the second channel and sending the interaction message within the second offset time after receiving the synchronization message for multiple consecutive times; or accessing the second channel and sending the interaction message within the second offset time after receiving the synchronization message, if the response message of the interaction message is not received, accessing the second channel and resending the interaction message within the second offset time after receiving the synchronization message next time. Among them, the number of consecutive accesses to the second channel to send the interaction message within the second offset time can be a preset fixed value, or it can be a value set by the slave device according to the current network status or the importance of the interaction message. If the current network status is good or the importance of this interaction message is not high, a lower value is set, and if the current network status is poor or the importance of this interaction message is high, a higher value is set. The slave device will send the interaction message for a preset number of times. When the preset number of times is completed, the slave device will no longer send the interaction message and end the interaction with the master device.
[0122] It is not difficult to find that this embodiment is a method embodiment corresponding to the first to fourth embodiments, and this embodiment can be implemented in conjunction with the first to fourth embodiments. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.
[0123] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0124] The sixth embodiment of the present application relates to a synchronous communication method. The fifth embodiment is substantially the same as the fourth embodiment, with the main difference being that in the sixth embodiment of the present application, before the slave device sends a resource request to the master device, it is determined that no communication resources have been allocated.
[0125] The synchronous communication method of this embodiment, such as Fig.12 As shown, including:
[0126] Step 601-1, determining that communication resources for interacting with the master device have not yet been allocated;
[0127] Step 601-2, within a first offset time after receiving the synchronization message broadcast by the master device, sending a resource request to the master device through the first channel for receiving the synchronization message;
[0128] Step 602, receiving communication resources for interacting with the master device end from the master device end through the first channel, the communication resources including a second offset time relative to completion of the synchronization message broadcast;
[0129] Step 603: Access the second channel to interact with the master device within the second offset time after the synchronization message is broadcasted.
[0130] A slave device uses a communication resource. Before sending a resource request to the master device, the slave device determines whether the communication resource has been allocated before. If the communication resource has been allocated, the resource request will not be sent. If the communication resource has not been allocated, the resource request will be sent to the master device. After receiving the communication resource, the communication resource information will be stored as a basis for determining whether the communication resource has been allocated. In this embodiment, before sending a resource request to the master device on the first channel receiving the synchronization message, it is determined that the slave device has not been allocated the communication resource for interacting with the master device, thereby avoiding the situation where the communication resource is allocated to a slave device again, ensuring that a slave device is only allocated one communication resource, and ensuring the stability of the interaction process.
[0131] The seventh embodiment of the present application relates to an electronic device, such as Fig.13 As shown, it includes: at least one processor 701; and a memory 702 that is communicatively connected to the at least one processor 701; wherein the memory 702 stores instructions that can be executed by the at least one processor 701, and the instructions are executed by the at least one processor 701 so that the at least one processor 701 can execute the above-mentioned synchronous communication method applied to the master device side, or can execute the above-mentioned synchronous communication method applied to the slave device side.
[0132] The memory 702 and the processor 701 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 701 and the memory 702 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0133] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0134] The eighth embodiment of the present application relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above method embodiment is implemented.
[0135] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0136] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A synchronous communication method, characterized in that: Applied to the master device, the method includes: receiving a resource request sent from a device through a first channel broadcasting the synchronization message within a first offset time after the synchronization message is broadcast; In response to the resource request, allocating communication resources for the slave device to interact with the master device; the communication resources include a second offset time; Among them, the first offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, and the second offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, and the first offset time and the second offset time do not overlap.
2. The synchronous communication method according to claim 1, characterized in that: The communication resources also include a second channel; After allocating communication resources for the slave device to interact with the master device, the method further includes: Within the second offset time after the synchronization message broadcast is completed, access the second channel to interact with the slave device.
3. The synchronous communication method according to claim 2, characterized in that: The accessing the second channel to interact with the slave device end within the second offset time after the synchronization message broadcast is completed includes: Accessing the second channel within the second offset time after the synchronization message broadcast is completed, and interacting with the slave device in a response mode or a non-response mode; Among them, in the response mode, the master device receives the interaction message sent by the slave device and responds to the interaction message; in the non-response mode, the master device only receives the interaction message sent by the slave device.
4. The synchronous communication method according to claim 3, characterized in that: Within the second offset time after the synchronization message broadcast is completed, accessing the second channel and before interacting with the slave device in a response mode or a non-response mode, further comprising: Determine whether to adopt the response mode or the non-response mode to interact with the slave device end based on at least one of the following information; the information includes: if multiple evaluation indicators of the network environment in which the master device end is located meet preset conditions, or the slave device end is designated to adopt the non-response mode, determine to adopt the non-response mode to interact with the slave device end; wherein the multiple evaluation indicators include at least one of signal strength and bit error rate.
5. The synchronous communication method according to claim 2, characterized in that: After accessing the second channel to interact with the slave device within the second offset time after the synchronization message broadcast is completed, the method further includes: If the number of failed interactions through the second channel exceeds a preset number within the second offset time after the synchronization message broadcast is completed, the communication resources allocated to the slave device are recovered.
6. The synchronous communication method according to claim 1, characterized in that: The duration of the first offset time is a variable duration and / or a fixed duration; the duration of the second offset time is a variable duration and / or a fixed duration; The variable duration includes: In addition to the preset first offset time or the fixed time of the second offset time, a preset delay time is added; If the first offset time or the second offset time exceeds the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in the two adjacent synchronization messages after being extended, the first offset time or the second offset time is only extended to before the start of the next synchronization message broadcast.
7. The synchronous communication method according to claim 1 or 2, characterized in that: The second offset times of different slave device ends do not overlap, or, in the case where the second offset times of different slave device ends overlap, different slave device ends interact with the master device end in the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two different adjacent synchronization messages.
8. The synchronous communication method according to claim 7, characterized in that: The communication resource includes a second channel; the first offset time is earlier than the second offset time; after the communication resource for interacting with the master device end is allocated to the slave device end, the method further includes: Within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, a resource request sent from the device end is received through the first channel, and within the second offset time within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, the second channel is accessed to interact with the slave device end; wherein N is an integer greater than or equal to 1.
9. The synchronous communication method according to claim 8, characterized in that: The method includes receiving a resource request sent from a slave device through the first channel within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, and accessing the second channel to interact with the slave device within the second offset time within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, including: Within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, a resource request sent from the device end is received through the first channel, and within the second offset time of different slave device ends within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, the second channels of different slave device ends are accessed to interact with different slave device ends.
10. The synchronous communication method according to claim 1, characterized in that: In response to the resource request, allocating communication resources for the slave device to interact with the master device includes: In response to the resource request, if it is determined that a preset resource allocation condition is met, allocating communication resources for the slave device to interact with the master device; The resource allocation condition includes at least one of the following conditions: the slave device is a preset device allowed to interact with the master device, and the number of slave devices to which communication resources have been allocated has not reached a preset upper limit.
11. The synchronous communication method according to claim 1, characterized in that: Before receiving a resource request sent from a device through the first channel broadcasting the synchronization message within the first offset time after the synchronization message is broadcasted, the method further includes: Determine whether the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages meets the preset duration condition; the duration condition includes: the difference between the time interval and the first offset time is greater than or equal to the preset duration, and the difference between the time interval and the second offset time is greater than or equal to the preset duration; wherein the preset duration is greater than or equal to the duration for completely receiving the resource request.
12. The synchronous communication method according to claim 11, characterized in that: The duration condition also includes: the time interval is greater than or equal to the sum of the duration of the first offset time and the duration of the second offset time.
13. The synchronous communication method according to claim 1, characterized in that: The second offset times of different slave devices do not overlap; after allocating communication resources for the slave device to interact with the master device, the method further includes: Sending the communication resource to the slave device via the first channel; receiving the resource request sent by the slave device through the first channel within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast, and interacting with different slave device ends through the first channel within the second offset time of different slave device ends within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast; Among them, when the second offset time assigned to one of the slave device ends, the master device stops monitoring the first channel until the next second offset time assigned by the master device, and the master device listens to the interactive message sent by the slave device corresponding to the next second offset time.
14. A synchronous communication method, characterized in that: Applied to a slave device, the method includes: Sending a resource request to the master device via a first channel for receiving the synchronization message within a first offset time after receiving the synchronization message broadcast by the master device; Receiving communication resources for interacting with the master device end; the communication resources include a second offset time; Among them, the first offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, and the second offset time is within the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two adjacent synchronization messages, and the first offset time and the second offset time do not overlap.
15. The synchronous communication method according to claim 14, characterized in that: The communication resources also include a second channel; Within a second offset time after receiving the synchronization message broadcast by the master device, access the second channel to interact with the master device.
16. The synchronous communication method according to claim 15, characterized in that: The step of accessing the second channel to interact with the master device within a second offset time after receiving the synchronization message broadcast by the master device includes: Access the second channel and send interaction messages multiple times in a row within the second offset time after receiving the synchronization message; or access the second channel and send interaction messages within the second offset time after receiving the synchronization message, and if no response message to the interaction message is received, access the second channel and resend the interaction message within the second offset time after the synchronization message is received next time.
17. The synchronous communication method according to claim 16, characterized in that: Before sending a resource request to the master device via the first channel receiving the synchronization message within a first offset time after receiving the synchronization message broadcast by the master device, the method further comprises: Determine that communication resources for interacting with the master device have not yet been allocated.
18. The synchronous communication method according to claim 14 or 15, characterized in that: The second offset times of different slave device ends do not overlap, or, in the case where the second offset times of different slave device ends overlap, different slave device ends interact with the master device end in the time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in two different adjacent synchronization messages.
19. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; In which, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the synchronous communication method as described in any one of claims 1 to 13, and the master device end is the electronic device, or can execute the synchronous communication method as described in any one of claims 14 to 18, and the slave device end is the electronic device.
Citation Information
Patent Citations
Time synchronization processing method and device
CN108243396A
Bluetooth data transmission method and device
CN111491283A