WO2022056682A1 - Synchronous communication method, electronic device and storage medium - Google Patents

Synchronous communication method, electronic device and storage medium Download PDF

Info

Publication number
WO2022056682A1
WO2022056682A1 PCT/CN2020/115369 CN2020115369W WO2022056682A1 WO 2022056682 A1 WO2022056682 A1 WO 2022056682A1 CN 2020115369 W CN2020115369 W CN 2020115369W WO 2022056682 A1 WO2022056682 A1 WO 2022056682A1
Authority
WO
WIPO (PCT)
Prior art keywords
channel
offset time
synchronization message
slave device
broadcast
Prior art date
Application number
PCT/CN2020/115369
Other languages
French (fr)
Chinese (zh)
Inventor
蒲川
Original Assignee
深圳市汇顶科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to CN202080094515.6A priority Critical patent/CN114982259A/en
Priority to PCT/CN2020/115369 priority patent/WO2022056682A1/en
Publication of WO2022056682A1 publication Critical patent/WO2022056682A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Definitions

  • the embodiments of the present application relate to wireless communication, and in particular, to a synchronous communication method, an electronic device, and a storage medium.
  • Connectionless synchronous communication is a communication method that realizes synchronous transmission through a broadcast link in a connectionless mode, and can be applied to Bluetooth technology.
  • connectionless synchronous communication implemented in the Bluetooth V5.2 version (Bluetooth LE Audio V5.2) is realized through the Broadcast Isochronous Streams (BIS) protocol, and the sending end master device sends the broadcast in the channel through the BIS protocol. Synchronization message, the receiver and slave device connected to the same channel receive the synchronization message by listening to the broadcast.
  • BIS Broadcast Isochronous Streams
  • the communication between the master and slave devices only broadcasts a synchronization message to the slave devices, and only one-way communication is performed between the master and slave devices.
  • the purpose of the embodiments of the present application is to provide a synchronous communication method, electronic device and 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. .
  • the embodiments of the present application provide a synchronization communication method, which is applied to a master device and includes the following steps: within a first offset time after the synchronization message broadcast is completed, broadcast the first synchronization message through the first offset time.
  • the channel receives the resource request sent by the slave device; in response to the resource request, the slave device is allocated communication resources for interacting with the master device; the communication resource includes the second offset time; the communication resource is sent to the slave device through the first channel Resource; wherein, the first offset time is within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, and the second offset time in the two adjacent synchronization messages The time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast.
  • 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 the master device, The channel sends a resource request to the master device; the communication resource for interacting with the master device is received from the master device through the first channel; the communication resource includes a second offset time relative to the completion of the synchronization message broadcast; wherein, the first offset
  • the shift time and the second shift time are both within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages.
  • Embodiments of the present application further provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor.
  • the processor executes, so that at least one processor can execute the above-mentioned synchronous communication method applied to the master device end, the master device end is an electronic device, or can execute the above-mentioned synchronous communication method applied to the slave device end, and the slave device end is an electronic device. equipment.
  • Embodiments of the present application further provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned synchronous communication method applied to the master device side is implemented, or the above-mentioned method applied to the slave device side is implemented. Synchronous communication method.
  • the slave device within the first offset time within the broadcast time interval of the synchronization message, the slave device sends a resource request to the master device through the first channel for broadcasting the synchronization message, and the master device sends a resource request to the master device.
  • Receive the resource request from the slave device from the first channel respond to the resource request, allocate the communication resource including the second channel and the second offset time to the slave device for interaction, send the communication resource to the slave device through the first channel, and send the communication resource to the slave device through the first channel.
  • the device end receives the communication resource through the first channel.
  • the master device and the slave device Because 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 by allocating the second offset time, the master device and the slave device can be realized Two-way communication between peers. Therefore, the master device end and the slave device end realize two-way communication on the basis of the existing connectionless synchronous communication, and the two-way interaction between the master device end and the slave device end can be realized.
  • the communication resource further includes a second channel.
  • the master device can allocate different channels to different slave devices with the same second offset time, thereby increasing the number of interactable slave devices, and due to the addition of the second channel, That is, the channel through which the master-slave device interacts is different from the channel through which the master device broadcasts the synchronization message, so that the interference to the synchronization message can be reduced as much as possible.
  • the method further includes: accessing the second channel to interact with the slave device within the second offset time after the synchronization message broadcast is completed.
  • the master device end may access the second channel within the second offset time to implement interaction with the slave device end. That is, the master device side can choose to interact with the slave device side by selecting to access the second channel when needed.
  • accessing the second channel to interact with the slave device includes: accessing the second channel within the second offset time after the synchronization message broadcast is completed , and interact with the slave device in response mode or non-reply mode; in which, in the response mode, the master device receives the interactive message sent by the slave device and responds to the interactive message; in the non-reply mode, the master device The device side only receives interactive messages sent from the device side.
  • the master device in the non-response mode, the master device does not need to respond to the interactive messages from the slave device, the power consumption of the master device is small, and more interactions between the slave devices can be completed in the same time; in the response mode, the master device The terminal responds to the interactive message from the slave device, and the slave device confirms that the interactive message has been received based on the response, so there is no need to repeatedly send the same interactive message in order to improve the reception probability of the interactive message, and the redundant transmission of the same interactive message is avoided.
  • 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 satisfied, allocating the slave device for communication with the master device.
  • the master device accesses the second channel to interact with the slave device within the second offset time after the synchronization message broadcast is completed, it further includes: if within the second offset time after the synchronization message broadcast is completed , the communication resources allocated to the slave device are recovered when the number of failures of interaction through the second channel exceeds the preset number of times.
  • the occupation of the communication resources by the slave devices that fail to interact can be released, so that the communication resources are prevented from being occupied for a long time and the communication resources are not occupied for a long time. Utilization of communication resources.
  • first offset time and the second offset time do not overlap; and/or, the second offset times of different slave devices do not overlap.
  • first offset time and the second offset time do not overlap, between any two adjacent synchronization messages, a request for resources from a newly added slave device and a request for resources from a slave device that has allocated resources are sent. All messages can be collected once.
  • second offset times of different slaves do not overlap, between any two adjacent synchronization messages, all messages sent by the slaves can be collected once. Therefore, the rational use of the time interval between any two adjacent synchronization messages can be realized, and the interaction efficiency between the master and slave devices can be improved.
  • the method further includes: determining the broadcast of the previous synchronization message in the two adjacent synchronization messages The time interval between the completion and the start of the next synchronization message broadcast satisfies the preset time length condition; the time length 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 length, and the time interval and the first The difference between the time lengths of the two offset times is greater than or equal to the preset time length.
  • the resource request is only received from the second channel when the time interval is greater than the time length of the first offset time and the time length of the second offset time, that is, the master channel is activated only when the time interval is sufficient.
  • the two-way communication mechanism between the device end and the slave device end avoids the problem that the time interval is not long enough, which may affect the normal broadcast of synchronization messages in connectionless synchronous communication.
  • FIG. 1 is a flowchart of an example of a synchronous communication method provided according to a first embodiment of the present application
  • FIG. 2 is a schematic diagram of a time interval between two adjacent synchronization message broadcasts provided according to the first embodiment of the present application
  • FIG. 3 is a flowchart of another example of a synchronous communication method provided according to the first embodiment of the present application.
  • FIG. 4 is a schematic diagram of interaction between different slave device assignments and overlapping second offset times provided according to the first embodiment of the present application;
  • FIG. 5 is a flowchart of an example of a synchronous communication method provided according to the second embodiment of the present application.
  • FIG. 6 is a flowchart of another example of a synchronous communication method provided according to the second embodiment of the present application.
  • FIG. 7 is a flowchart of another example of a synchronous communication method provided according to the second embodiment of the present application.
  • FIG. 8 is a flowchart of a synchronous communication method provided according to a third embodiment of the present application.
  • FIG. 9 is a flowchart of a synchronous communication method provided according to a fourth embodiment of the present application.
  • FIG. 10 is a flowchart of an example of a synchronous communication method provided according to the fifth embodiment of the present application.
  • FIG. 11 is a flowchart of another example of a synchronous communication method provided according to the fifth embodiment of the present application.
  • FIG. 12 is a flowchart of a synchronous communication method provided according to a sixth embodiment of the present application.
  • FIG. 13 is a schematic diagram of a synchronous communication electronic device provided according to a seventh embodiment of the present application.
  • the first embodiment of the present application relates to a synchronous communication method, which is applied to a master device, and the specific process is shown in FIG. 1 .
  • Step 101 within the first offset time after the broadcast of the synchronization message is completed, receive a resource request sent from the device through the first channel for broadcasting the synchronization message;
  • Step 102 in response to the resource request, allocate communication resources for the slave device to interact with the master device, and the communication resources include a second offset time;
  • Step 103 Send communication resources to the slave device through the first channel.
  • the first offset time is within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, and the second offset time is in the previous synchronization message in the two adjacent synchronization messages.
  • the master device receives the resource request sent by the slave device through the first channel that broadcasts the synchronization message within the first offset time after the synchronization message is broadcast, and sends it through the first channel.
  • a channel transmission is a communication resource allocated by the slave device to interact with the master device, and the communication resource includes the second offset time; that is, the interaction between the master device and the slave device can be realized within the second offset time;
  • the master and slave devices are passing The interaction of the second channel will not affect the normal broadcast of the synchronization message; therefore, the embodiment of the present application can realize bidirectional communication between the master and slave devices in the connectionless synchronization communication mode.
  • the synchronous communication method in the present 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.
  • BIS broadcast synchronization
  • the BIS protocol is used for synchronous transmission of audio data.
  • the master device that sends messages in the connectionless synchronous communication can be understood as the master device side
  • the slave device that receives messages in the connectionless synchronous communication can be understood as the slave device side.
  • the master device is the conference audio playback device, and the listener and the host respectively use the slave device, such as a Bluetooth headset.
  • the master device transmits conference audio data synchronously to multiple slave devices.
  • the master device broadcasts the audio data in the non-connected way of BIS, regardless of the status of each slave device; each slave device receives the audio data synchronously through the BIS protocol, and then plays or use.
  • the master device can exchange messages with the slave device, so that the master device can communicate with each other. Listeners, hosts' willingness to pause meeting audio or implement other controls can be informed and reacted to.
  • the device used by the teacher is used as the master device, and the device used by the students is used as the slave device.
  • the master device used by the teacher can exchange messages with the slave device used by the student, so that the teacher can know Students' speaking needs, to achieve interaction with students.
  • the first channel refers to a channel for broadcasting a synchronization message, for example, the synchronization message is 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.
  • the first offset time is within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, that is, the first offset time is a time range, for example, 0ms ⁇ 2ms, 2ms ⁇ 3ms; if the time interval is 10ms, then the time range of the first offset time is a certain range between 0 ⁇ 10ms.
  • the first offset time can be directly stored in the form of a time range, such as 0ms to 2ms above, or can also be stored in the form of a starting time point and a duration, such as the starting time point is 0ms, and the duration is 2ms; or, the starting time point is 2 and the duration is 2ms.
  • the time interval between two adjacent synchronization message broadcasts takes one synchronization message broadcast as a broadcast synchronization group BIG (Broadcast Isochronous Groups) event (BIG event), and each synchronization message can contain multiple BIS sub-events (BIS Subevent), and a Control Subevent (Control Subevent), there is a time interval between the two BIG events.
  • BIG event Broadcast Isochronous Groups
  • BIS Subevent BIS sub-event
  • Control Subevent Control Subevent
  • the first offset time may be a fixed time, and the first offset time may be preset in the master device end and the slave device end in advance, or the first offset time may be preset by the master device end, and the master device end In a certain synchronization message or before the slave device is synchronized to the master device, it is sent in the form of broadcast.
  • a BIG Info field is included in the broadcast used for synchronization between the slave device and the master device, and the field contains the data required for synchronization between the slave device and the master device.
  • the first offset can be The time information is carried in BIG Info to notify all slave devices of the first offset time.
  • the slave device sends a resource request through the first channel within the first offset time, and the master device listens to the broadcast by means of , and receive the resource request sent from the device from the first channel that broadcasts the synchronization message.
  • 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, and the like. Wherein, the identification information of the slave device is used as the identification of the slave device in the request information.
  • the slave device that can send the resource request in the first channel can be understood as the slave device that has received the synchronization message in the first channel, that is, the slave device that has been synchronized with the master device. Therefore, the master device can know which slave devices have synchronized the synchronization messages sent by itself.
  • the first offset time can also be set by the master device according to the actual situation; for example, according to the network conditions of the network environment where the master device is located, the first offset time is set, and the new first offset time is notified to the slave.
  • the device side for example, in a synchronization message or before the slave device side synchronizes to the master device side, broadcast and send it out.
  • the first offset time can be carried in the synchronization message, that is, carried in the synchronization message.
  • the control sub-event, or, is carried in the field of BIG Info.
  • the duration of the first offset time may also be variable.
  • a delay duration is preset to delay the first offset time under special circumstances. For example, the master device is receiving a resource request, but the first offset time has not been completed yet. If there is no delay time, the master device will stop receiving the resource request at this time, because the resource request only receives When a part is reached, it can only be discarded; and if there is a delay time, you can choose to extend the length of the first offset time, and add a delay time to the first offset time on the basis of the preset fixed time. . If the extended first offset time exceeds the time interval between synchronization message broadcasts, the first offset time is only extended until the synchronization message broadcast is sent.
  • the second offset time is a time period within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages; that is, the second offset time is also a time period
  • the range is, for example, 2ms ⁇ 3ms, 3ms ⁇ 4ms; if the time interval is 10ms, then the time range of the second offset time is a certain range between 0 ⁇ 10ms.
  • the second offset time may or may not overlap with the first offset time; the second offset times of different slave devices may or may not overlap.
  • the termination time point of the previous second offset time may be the start time point of the next second offset time, or it may be set that there is a time between the previous second offset time and the next second offset time interval.
  • the second offset time can be a fixed time, the master device can preset the second offset time of the same length for all slave devices, or it can be set by the master device according to the actual situation; According to the number of interactions, the second offset time of different lengths is allocated to the slave device side, and the second offset time allocated to the slave device side with a greater number of interactions is longer.
  • the duration of the second offset time may also be variable.
  • a delay duration is 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 expired. If there is no delay time, the master device will stop receiving the interactive message at this time, because the interactive message only receives When a part is reached, it can only be discarded; and if there is a delay time, you can choose to extend the duration of the second offset time. On the basis of the preset fixed time, add a delay time to the second offset time. . If the extended second offset time exceeds the time interval between synchronization message broadcasts, the second offset time is only extended until the synchronization message broadcast is sent.
  • 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 the preset resource allocation condition is satisfied, allocating the slave device to interact with the master device.
  • the communication resources can be selectively allocated to the slaves, so as to improve the meet the actual needs well.
  • the master device may send a response message of the requested resource to the slave device through the first channel in the form of broadcast, and the response message carries the communication resource allocated for 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.
  • the master device When the master device receives a resource request, in addition to sending a response message to the slave device to respond to the request, it also deduplicates the request. Before allocating communication resources to the slave device, the master device will check whether the slave device has 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 allocated communication resources belonging to it, the slave device will no longer allocate communication resources to the slave device. Even if the master device has previously allocated communication resources to the slave device, but now the communication resource does not belong to the slave device, the master device will still allocate another communication resource to the slave device.
  • the master device sends communication to the slave device through the first channel After the resource, it may further include: Step 104: within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the N+1th synchronization message broadcast start, receive the slave device through the first channel The resource request sent by the terminal, and within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast within the second offset time of the different slave devices, through the first channel and different Interact from the device side.
  • first offset time and the second offset time of different slave devices may also be consecutively divided time intervals within the time interval, so that the time interval can be fully utilized.
  • the time interval is 10ms
  • the first offset time is 0 ⁇ 2ms
  • step 104 after receiving the communication resource from the device, it sends an interactive message to the master through the first channel within the second offset time, and the master monitors the first channel during the second offset. Receive interactive messages sent from the device side.
  • the slave device end no longer sends interactive messages, and the master device end stops monitoring the first channel.
  • the master device end monitors the interaction message sent by the slave device end corresponding to the next second offset time.
  • 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 The offset time does not overlap and the second offset time of different slave devices does not overlap.
  • the resource request and interaction process between the slave device and the master device and the synchronization message broadcast do not conflict with each other. Two-way communication is realized.
  • the second offset times allocated by 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.
  • the Nth BIG event occurs from 20 to 30ms
  • the N+1th BIG event occurs from 35 to 45ms
  • the N+2th BIG event occurs from 50 to 60ms
  • 30 to 35ms is the Nth BIG event.
  • the time interval between the N+1th 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 for the slave device A, the slave device B, and the slave device C in a time interval, wherein the second offset time between the slave device A and the slave device C Completely overlapping, so slave A and slave C cannot interact with the master in the same time interval, and the time interval between slave A's Nth and N+1th BIG events is the same as
  • the master device interacts, and the slave device C interacts with the master device at the time interval between the N+1th and N+2th BIG events.
  • the second embodiment of the present application relates to a synchronous communication method.
  • the second embodiment is roughly the same as the first embodiment, and the main difference is that in the second embodiment of the present application, the communication resources allocated by the master device to the slave devices also include a second channel, and the interaction between the master and slave devices directly passes through The second channel is complete.
  • the second channel is a dedicated channel allocated by the master device to the slave device to realize interaction.
  • a second channel can be assigned to multiple different slave devices. , but a slave side can only be assigned one second channel.
  • the master device can allocate different channels to different slave devices with the same second offset time, thereby increasing the number of interactable slave devices, and due to the addition of the second channel, That is, the channel through which the master-slave device interacts is different from the channel through which the master device broadcasts the synchronization message, so that the interference to the synchronization message can be reduced as much as possible.
  • the synchronous communication method includes:
  • Step 201 within the first offset time after the broadcast of the synchronization message is completed, receive the resource request sent from the device side through the first channel for broadcasting the synchronization message;
  • Step 202 in response to the resource request, allocate communication resources for the slave device to interact with the master device, and the communication resources include a second channel and a second offset time;
  • Step 203 sending communication resources to the slave device through the first channel
  • Step 204 within the second offset time after the broadcast of the synchronization message is completed, access the second channel to interact with the slave device.
  • Steps 201, 202, and 203 in this embodiment are substantially the same as steps 101, 102, and 103 in the first embodiment, and will not be repeated here. The difference is that in step 204, the master device will access the second channel to interact with the slave device.
  • accessing the second channel can realize that during the second offset time, when the master device chooses to interact with the slave device, it can be established by accessing the second channel assigned to the slave device.
  • the interaction channel with the slave device is used to interact with the slave device.
  • the master device can choose whether to interact with the slave device by selecting to access the second channel when needed, so as to avoid message interference from the slave device caused by the second channel when no interaction is required.
  • accessing the second channel includes: adjusting the receiving frequency band of the master device to the frequency band used by the second channel.
  • the master device can preset the slave device that needs to interact this time for the interval between each synchronization message broadcast, and access the second channel allocated by the slave device in the preset order to receive the transmission from the slave device. interactive message.
  • the preset interaction sequence at the slave device side needs to consider the second offset time allocated by each slave device side.
  • the master device interacts with the next slave device according to the preset interaction sequence, and accesses the next slave device.
  • the master device can also select a slave device whose second offset time is after the current time and before the next synchronization message broadcast starts in real time after completing the interaction with a slave device, and access the second slave device allocated by the slave device. Channel to interact with this slave.
  • the interaction between the master device and the slave device may further include: the master device actively sends an interaction message to the slave device.
  • the master device actively sends an interaction message to the slave device.
  • the teacher can name a student to speak, and at this time, he can actively send interactive information to the slave device used by the student indicating the request to speak; or, the teacher finds that a student is deserting, and can take the initiative at this time. Send interactive information representing classroom discipline reminders to the slave device used by the student.
  • step 204 is specifically, within the second offset time after the broadcast of the synchronization message is completed, accessing the second channel and interacting with the slave device in an answering mode or a non-answering mode.
  • the response mode within the second offset time after the broadcast of the synchronization message is completed, access the second channel, receive the interaction message sent from the device side, and respond to the interaction message; in the non-reply mode, in the Within the second offset time after the broadcast of the synchronization message is completed, the second channel is accessed, and only the interaction message sent from the device side is received.
  • the response of the master device to the interactive message from the slave device may be performed immediately after receiving the interactive message, that is, within the second offset time corresponding to the slave device, through the second channel corresponding to the slave device. Send the response message of the interactive message to the slave device.
  • the master device does not need to respond to the interactive messages from the slave device, the power consumption of the master device is small, and more interactions from the slave device can be completed in the same time; in the response mode, the master device can The slave device responds to the interaction message, and the slave device confirms that the interaction message has been received based on the response, so that it is not necessary to repeatedly send the same interaction message multiple times in order to improve the reception probability of the interaction message, and avoid redundant transmission of the same interaction message.
  • the power consumption on the device side increases.
  • step 203-1 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, determine to adopt the response mode or 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, and whether the slave device is designated to use the response mode or the non-response mode.
  • step 203-1 is located between steps 203 and 204 in FIG. 5, in fact, step 203-1 only needs to occur before step 204.
  • the master device can select a response mode or a non-reply mode, and selectively respond to the interactive message sent by the slave device, so as to better meet actual needs and achieve better interaction effects.
  • determining to use the response mode or the non-response mode to interact with the slave device includes: if multiple evaluation indicators of the network environment where the master device is located satisfies a preset condition, or , the slave device is designated to use the non-response mode, and it is determined to use the non-response mode to interact with the slave device; wherein the multiple evaluation indicators include at least one of signal strength and bit error rate.
  • the master device uses the non-response module to interact with the slave device.
  • the master device does not need to respond to the interactive messages from the slave device.
  • the power consumption of the master device is small, and more interactions from the slave device can be completed in the same time.
  • the second channel only needs to transmit the data sent by the slave device.
  • the interactive messages only need to be transmitted in one direction, and the requirements for the network are also low. Therefore, using the non-response mode can reduce the power consumption of the master device and reduce the requirements for the second channel.
  • the master device side uses the non-response mode to interact with the slave device side by default, when the slave device side is designated as the response mode, or, the network quality of the network environment where the master device side is located belongs to a non-high-quality network environment, and/or , when the slave device is not designated to use the non-response mode, the master device uses the response mode to interact with the slave device.
  • 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.
  • the first offset time and the second offset time do not overlap between any two adjacent synchronization messages, a request for resources from a newly added slave device and a slave device that has allocated resources are sent. All messages can be collected once.
  • the second offset times of different slaves do not overlap, between any two adjacent synchronization messages, all messages sent by the slaves can be collected once. Therefore, the rational use of the time interval between any two adjacent synchronization messages can be realized, and the interaction efficiency between the master and slave devices can be improved.
  • the first offset time and the second offset time may partially or completely overlap, and the second offset times of different slave devices may partially or completely overlap.
  • the slave device will broadcast the synchronization message within the time interval of this synchronization message. Do not interact with the master device, and wait for the second offset time of the next synchronization message broadcast interval before interacting with the master device.
  • the method further includes: Step 205, within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the N+1th synchronization message broadcast start, receiving the transmission from the device side 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, access the second channel to interact with the slave device ; where N is an integer greater than or equal to 1.
  • the master device by setting the first offset time and the second offset time to be non-overlapping and earlier than the second offset time, after the synchronization message broadcast is completed, the master device first receives the resource request from the slave device, and then receives Enter the second channel to interact with the slave device. Since the channel for receiving the resource request from the slave device is the same as the channel for broadcasting the synchronization message, the number of channel switching can be reduced, thereby saving the power consumption of the master device.
  • step 205 may be specifically, within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast.
  • the resource request sent from the device is received through the first channel, and the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast can vary from
  • the second offset time of the device side access the second channel of the different slave device side to interact with the different slave device side.
  • multiple interaction messages sent from the device side may be received in one synchronization message broadcast time interval.
  • the third embodiment of the present application relates to a synchronous communication method.
  • the third embodiment is substantially the same as the second embodiment, and the main difference lies in that: in the third embodiment of the present application, the master device reclaims the communication resources allocated by the slave device that fail to interact for many times in a row.
  • FIG. 8 A specific flow chart of this embodiment is shown in FIG. 8 , which will be described in detail below.
  • Step 301 within the first offset time after the broadcast of the synchronization message is completed, receive the resource request sent from the device side through the first channel of the synchronization message;
  • Step 302 in response to the resource request, allocate communication resources for the slave device to interact with the master, the communication resources include a second channel and a second offset time;
  • Step 303 sending communication resources to the slave device through the first channel
  • Step 304 within the second offset time after the broadcast of the synchronization message is completed, access the second channel to interact with the slave device;
  • Step 305 if the number of interaction failures exceeds the preset number of times through the second channel within the second offset time after the broadcast of the synchronization message is completed, the communication resources allocated to the slave device are recovered.
  • Steps 301 , 302 , 303 , and 304 in this embodiment are substantially the same as steps 201 , 202 , 203 , and 204 in the second embodiment, and will not be described again.
  • the reason for the failure of the interaction may be that there is a problem in the transmission process of the message, the message is lost in the transmission process and cannot be received by the master device, or the slave device has no interaction requirement and does not send a message to the master device, etc.
  • the slave device fails to interact with the second channel during the second offset time for many times in a row, its communication resources exist to allocate an inappropriate transmission channel to the slave device, causing the master and slave devices to be unable to interact.
  • the long-term invalid occupation of communication resources by the slave device without interaction requirements in this embodiment, by recycling the communication resources of the slave device that has continuously accessed the second channel for multiple times and the interaction fails, the slave device that fails to interact can be released. End-to-end occupation of communication resources, avoid long-term invalid occupation of communication resources, and improve the rational utilization of communication resources.
  • the master device recycles the communication resources allocated to the slave device, it sends a recovery message to the slave device on the first channel to notify the slave device that this communication resource is recovered, so that the recovery message can be accurately received from the device.
  • the recovery message can contain the identification information of the slave device.
  • the slave device needs to interact with the master device, it will send a resource request to the master device again.
  • the master device will record the corresponding relationship between the allocated slave device and communication resources.
  • the master device will record the allocated slave device and communication resources. The corresponding relationship of communication resources is modified.
  • the fourth embodiment of the present application relates to a synchronous communication method.
  • the fourth embodiment is roughly the same as the second embodiment, and the main difference is that: in the fourth embodiment of the present application, before receiving the resource request sent by the slave device, the master device determines that the broadcast time interval of the synchronization message satisfies the preset time interval. duration condition.
  • FIG. 9 the specific flowchart of this embodiment is shown in FIG. 9 :
  • Step 401-1 within the first offset time after the broadcast of the synchronization message is completed, determine that the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages satisfies a preset duration condition;
  • Step 401-2 within the first offset time, receive the resource request sent from the device through the first channel of the broadcast synchronization message;
  • Step 402 in response to the resource request, allocate communication resources for interacting with the master device end for the slave device end, the communication resources including the second channel and the second offset time completed with respect to the synchronization message broadcast;
  • Step 403 Send communication resources to the slave device through the first channel.
  • the duration 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 duration, and the difference between the time interval and the second offset time is greater than or equal to the preset duration.
  • the difference in time length is greater than or equal to the preset time length.
  • the resource request is received from the second channel only when the time interval is greater than the time length of the first offset time and the time length of the second offset time respectively, that is, the start is made when the time interval is guaranteed to be sufficient.
  • the two-way communication mechanism between the master device and the slave device avoids the problem that the time interval is not long enough, which may affect the normal broadcast of synchronization messages in connectionless synchronization communication.
  • the preset duration should be greater than or equal to the duration of completely receiving the resource request, so as to ensure that at least one resource request can be completely received by the master device within the time interval, so as to ensure that the master device can choose to communicate with at least one slave device. communication, so as to ensure that synchronous communication can be carried out effectively.
  • the time length condition further 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. Therefore, it is ensured that the master device can not only allocate communication resources to the slave device, but also interact with the slave device within a time interval, thereby ensuring that the synchronous communication can be carried out effectively.
  • the method further includes: at the Nth During the first offset time within the time interval between the completion of the second synchronization message broadcast and the start of the N+1th synchronization message broadcast, the resource request sent from the device is received through the first channel, and the Nth synchronization message is received within the first offset time. Interact with different slave devices through the first channel within the second offset time of different slave devices within the time interval between the completion of the broadcast and the start of the N+1th synchronization message broadcast.
  • the connectionless synchronous communication mode can be realized. The interaction between the master and slave devices.
  • the fifth embodiment of the present application relates to a synchronous communication method, which is applied to a slave device, and the specific process is shown in FIG. 10 .
  • Step 501 within the first offset time after receiving the synchronization message broadcast by the master device, send a resource request to the master device through the first channel for receiving the synchronization message;
  • Step 502 Receive communication resources from the master device for interaction with the master device through the first channel, where the communication resources include the second offset time.
  • the first offset time is within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, and the second offset time is in the previous synchronization message in the two adjacent synchronization messages.
  • the slave device within the first offset time after the broadcast of the synchronization message is completed, receives the resource request sent to the master device through the first channel for broadcasting the synchronization message, and receives the allocation from the master device through the first channel.
  • the communication resources of the interaction include the second offset time relative to the completion of the synchronization message broadcast; that is, the interaction between the master device and the slave device can be realized within the second offset time; and, due to the first
  • the offset time and the second offset time are both within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, so the master and slave devices are interacting through the second channel. It will not affect the normal broadcast of the synchronization message; therefore, the embodiment of the present application can realize the two-way communication between the master and slave devices in the connectionless synchronization communication mode.
  • 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.
  • the slave device sends a resource request to the master device in the form of broadcasting through the first channel for receiving the synchronization message.
  • the identification information can be the address of the slave device, the identification code generated by the slave device, etc.
  • the identification information of the slave device is used as the identification of the slave device in the request information.
  • the master device Before the master device sends a synchronization message, it will broadcast a message to all slave devices to notify all slave devices of the period and first offset time of the synchronization message sent. period and first offset time.
  • a communication resource for interacting with the master device is received from the master device through 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 broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages.
  • the communication resource further includes a second channel.
  • the master device can allocate different channels to different slave devices with the same second offset time, thereby increasing the number of interactable slave devices, and due to the addition of the second channel, That is, the channel through which the master-slave device interacts is different from the channel through which the master device broadcasts the synchronization message, so that the interference to the synchronization message can be reduced as much as possible.
  • 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.
  • the slave device after the slave device sends the communication resources to the master device through the first channel, as shown in FIG. 11 , it further includes:
  • Step 503 Access the second channel to interact with the master device within the second offset time after the broadcast of the synchronization message is completed.
  • the slave device can access the second channel within the second offset time to realize interaction with the master device.
  • step 503 during the second offset time, the second channel is accessed, so that within the second offset time, an interaction channel with the master device can be established by accessing the assigned second channel, and an interaction channel with the master device can be established.
  • an interaction channel with the master device can be established by accessing the assigned second channel, and an interaction channel with the master device can be established.
  • the slave device can choose to access the second channel within the second offset time.
  • the slave device can 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 can choose whether to interact with the master device by selecting to access the second channel when needed.
  • the slave device can interact with the master device in the response mode, and step 503 can be specifically: within the second offset time after receiving the synchronization message, access the second channel and send the interaction message, If the response message of the interaction message is not received, within the second offset time after the next synchronization message is received, the second channel is accessed and the interaction message is resent.
  • the slave device may interact with the master device in a non-response mode, and step 503 may specifically include: including: consecutively within the second offset time after receiving the synchronization message, accessing the second channel and send the interaction message; or, within the second offset time after receiving the synchronization message, access the second channel and send the interaction message, if the response message of the interaction message is not received, the next time after receiving the synchronization message During the second offset time, the second channel is accessed and the interactive message is resent.
  • the number of times that the second channel is connected to the second channel to send the interactive message continuously within the second offset time may be a preset fixed value, or may be set by the device according to the current network condition or the importance of the interactive message. numerical value.
  • the slave device will send the interaction message a preset number of times. After the preset number of times is sent, the slave device will no longer send the interaction message, ending the interaction with the master device.
  • this embodiment is a method embodiment corresponding to the first to fourth embodiments, and this embodiment can be implemented in cooperation with the first to fourth embodiments.
  • the related technical details mentioned in the first embodiment are still valid in this embodiment, and are not repeated here in order to reduce repetition.
  • the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.
  • the sixth embodiment of the present application relates to a synchronous communication method.
  • the fifth embodiment is roughly the same as the fourth embodiment, and the main difference is 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.
  • the synchronous communication method of this embodiment includes:
  • Step 601-1 determining that the communication resources that have not been allocated to interact with the master device end;
  • Step 601-2 within the first offset time after receiving the synchronization message broadcast by the master device, send a resource request to the master device through the first channel for receiving the synchronization message;
  • Step 602 receiving communication resources for interacting with the main device end from the main device end through the first channel, the communication resources including the second offset time relative to the synchronization message broadcast completion;
  • Step 603 within the second offset time after the broadcast of the synchronization message is completed, access the second channel to interact with the master device.
  • a slave device uses a communication resource.
  • the slave device sends a resource request to the master device, it will judge whether the communication resource has been allocated before. If the communication resource has been allocated, it will not send the resource request. communication resources, send a resource request to the master device.
  • the communication resource information will be stored as the basis for judging that the communication resource has been allocated.
  • the slave device before the first channel that receives the synchronization message sends the resource request to the master device, it is determined that the slave device has not been allocated the communication resources for interacting with the master device, so as to avoid re-allocating communication resources to a slave device It ensures that only one communication resource is allocated to a slave device, ensuring the stability of the interaction process.
  • the seventh embodiment of the present application relates to an electronic device, as shown in FIG. 13 , comprising: at least one processor 701 ; and a memory 702 communicatively connected to the at least one processor 701 ; wherein the memory 702 stores data that can be processed by the at least one processor 701 .
  • the instructions are executed by the processor 701, and the instructions are executed by 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, or can execute the above-mentioned synchronous communication method applied to the slave device.
  • the memory 702 and the processor 701 are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors 701 and various circuits of the memory 702 together.
  • the bus may also connect together various other circuits, such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein.
  • the bus interface provides the interface between the bus and the transceiver.
  • a transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other devices over a transmission medium.
  • the data processed by the processor is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor.
  • the processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Instead, memory may be used to store data used by the processor in performing operations.
  • the eighth embodiment of the present application relates to a computer-readable storage medium storing a computer program.
  • the above method embodiments are implemented when the computer program is executed by the processor.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

Abstract

The embodiments of the present application relate to wireless communication. Disclosed are a synchronous communication method, an electronic device and a storage medium. The synchronous communication method comprises: within a first offset time after the broadcasting of a synchronous message is completed, receiving, by means of a first channel which broadcasts the synchronous message, a resource request sent by a slave device end (101); in response to the resource request, allocating, to the slave device end, a communication resource used for interacting with a master device end, wherein the communication resource comprises a second offset time (102); and sending the communication resource to the slave device end by means of the first channel (103), wherein the first offset time and the second offset time are both within a time interval between the completion of the former broadcasting of the synchronous message and the start of the latter broadcasting of the synchronous message in two adjacent instances of broadcasting of the synchronous message. According to the synchronous communication method of the embodiments of the present application, bidirectional communication between a master device end and a slave device end can be realized on the basis of existing connectionless synchronous communication.

Description

同步通信方法、电子设备及存储介质Synchronous communication method, electronic device and storage medium 技术领域technical field
本申请实施例涉及无线通信,特别涉及一种同步通信方法、电子设备及存储介质。The embodiments of the present application relate to wireless communication, and in particular, to a synchronous communication method, an electronic device, and a storage medium.
背景技术Background technique
无连接同步通信是通过非连接模式的广播链路实现同步传输的通信方法,可以应用于蓝牙技术中。Connectionless synchronous communication is a communication method that realizes synchronous transmission through a broadcast link in a connectionless mode, and can be applied to Bluetooth technology.
在蓝牙V5.2版本(Bluetooth LE Audio V5.2)实现的无连接同步通信是通过广播同步(Broadcast Isochronous Streams,BIS)协议实现的,通过BIS协议发送端主设备以广播的形式在信道中发送同步消息,接入同一信道的接收端从设备通过监听广播接收同步消息。The connectionless synchronous communication implemented in the Bluetooth V5.2 version (Bluetooth LE Audio V5.2) is realized through the Broadcast Isochronous Streams (BIS) protocol, and the sending end master device sends the broadcast in the channel through the BIS protocol. Synchronization message, the receiver and slave device connected to the same channel receive the synchronization message by listening to the broadcast.
因此,现有的技术基于BIS协议实现无连接同步通信时,主从设备间的通信只由主设备向从设备广播同步消息,主从设备之间只进行单向通信。Therefore, when the prior art implements connectionless synchronous communication based on the BIS protocol, the communication between the master and slave devices only broadcasts a synchronization message to the slave devices, and only one-way communication is performed between the master and slave devices.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的在于提供一种同步通信方法、电子设备及存储介质,使得现有的蓝牙技术实现无连接同步通信时,可以实现无连接同步通信方式中主从设备端之间的双向通信。The purpose of the embodiments of the present application is to provide a synchronous communication method, electronic device and 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. .
为解决上述技术问题,本申请的实施例提供了一种同步通信方法,应用于主设备端,包括以下步骤:在同步消息广播完成后的第一偏移时间内,通过广播同步消息的第一信道接收从设备端发送的资源请求;响应于资源请求,为从设备端分配用于与主设备端交互的通信资源;通信资源包括第二偏移时间;通过第一信道向从设备端发送通信资源;其中,第一偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔 内,第二偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内。In order to solve the above technical problems, the embodiments of the present application provide a synchronization communication method, which is applied to a master device and includes the following steps: within a first offset time after the synchronization message broadcast is completed, broadcast the first synchronization message through the first offset time. The channel receives the resource request sent by the slave device; in response to the resource request, the slave device is allocated communication resources for interacting with the master device; the communication resource includes the second offset time; the communication resource is sent to the slave device through the first channel Resource; wherein, the first offset time is within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, and the second offset time in the two adjacent synchronization messages The time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast.
本申请的实施例还提供了一种同步通信方法,应用于从设备端,包括以下步骤:在接收到主设备端广播的同步消息后的第一偏移时间内,通过接收同步消息的第一信道向主设备端发送资源请求;通过第一信道从主设备端接收用于与主设备端交互的通信资源;通信资源包括相对于同步消息广播完成的第二偏移时间;其中,第一偏移时间、第二偏移时间均在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内。本申请的实施例还提供了一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述的应用于主设备端的同步通信方法,主设备端为电子设备,或者,能够执行上述的应用于从设备端的同步通信方法,从设备端为电子设备。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 the master device, The channel sends a resource request to the master device; the communication resource for interacting with the master device is received from the master device through the first channel; the communication resource includes a second offset time relative to the completion of the synchronization message broadcast; wherein, the first offset The shift time and the second shift time are both within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages. Embodiments of the present application further provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor. The processor executes, so that at least one processor can execute the above-mentioned synchronous communication method applied to the master device end, the master device end is an electronic device, or can execute the above-mentioned synchronous communication method applied to the slave device end, and the slave device end is an electronic device. equipment.
本申请的实施例还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现上述的应用于主设备端的同步通信方法,或者,实现上述的应用于从设备端的同步通信方法。Embodiments of the present application further provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned synchronous communication method applied to the master device side is implemented, or the above-mentioned method applied to the slave device side is implemented. Synchronous communication method.
本申请实施例相对于现有技术而言,通过在同步消息广播时间间隔内的第一偏移时间内,从设备端通过广播同步消息的第一信道向主设备端发送资源请求,主设备端从第一信道接收从设备端的资源请求,响应资源请求,为从设备端分配包括第二信道和第二偏移时间的通信资源用于交互,通过第一信道向从设备端发送通信资源,从设备端通过第一信道接收通信资源。由于在第一偏移时间内,主设备端与从设备端在广播同步消息的第一信道中完成一次通信资源分配的交互,并通过分配第二偏移时间内可以实现主设备端与从设备端之间的双向通信。因此,主设备端与从设备端在现有的无连接同步通信的基础上实现了双向通信,可以实现主设备端与从设备端的双向交互。Compared with the prior art, in the embodiment of the present application, within the first offset time within the broadcast time interval of the synchronization message, the slave device sends a resource request to the master device through the first channel for broadcasting the synchronization message, and the master device sends a resource request to the master device. Receive the resource request from the slave device from the first channel, respond to the resource request, allocate the communication resource including the second channel and the second offset time to the slave device for interaction, send the communication resource to the slave device through the first channel, and send the communication resource to the slave device through the first channel. The device end receives the communication resource through the first channel. Because 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 by allocating the second offset time, the master device and the slave device can be realized Two-way communication between peers. Therefore, the master device end and the slave device end realize two-way communication on the basis of the existing connectionless synchronous communication, and the two-way interaction between the master device end and the slave device end can be realized.
另外,通信资源还包括第二信道。本实施例中,通过增加了第二信道, 主设备端可以为相同的第二偏移时间的不同从设备端分配不同信道,增加可交互的从设备端数量,且由于增加了第二信道,即主从设备端交互的信道与主设备端广播同步消息的信道不同,从而可以尽可能地减小对同步消息的干扰。In addition, the communication resource further includes a second channel. In this embodiment, by adding the second channel, the master device can allocate different channels to different slave devices with the same second offset time, thereby increasing the number of interactable slave devices, and due to the addition of the second channel, That is, the channel through which the master-slave device interacts is different from the channel through which the master device broadcasts the synchronization message, so that the interference to the synchronization message can be reduced as much as possible.
另外,主设备端通过第一信道向从设备端发送通信资源之后,还包括:在同步消息广播完成后的第二偏移时间内,接入第二信道以与从设备端进行交互。本实施例中,主设备端可以在在第二偏移时间内接入第二信道,来实现与从设备端的交互。即,主设备端可以通过选择在需要时接入第二信道,来选择与从设备端进行交互。In addition, after the master device sends the communication resources to the slave device through the first channel, the method further 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 end may access the second channel within the second offset time to implement interaction with the slave device end. That is, the master device side can choose to interact with the slave device side by selecting to access the second channel when needed.
另外,在同步消息广播完成后的第二偏移时间内,接入第二信道以与从设备端进行交互,包括:在同步消息广播完成后的第二偏移时间内,接入第二信道,并在应答模式或非应答模式下与从设备端进行交互;其中,在应答模式下,主设备端接收从设备端发送的交互消息,并对交互消息进行应答;在非应答模式下,主设备端仅接收从设备端发送的交互消息。本实施例中,非应答模式中,主设备端无需对从设备端的交互消息进行应答,主设备端功耗较小,可以在相同时间内完成更多从设备端的交互;应答模式中,主设备端对从设备端的交互消息进行应答,从设备端基于应答确认该交互消息已被接收到,从而无需为了提高交互消息的接收概率而多次重复发送同一交互消息,避免了同一交互消息的多余传输造成从设备端的功耗增加。In addition, within the second offset time after the synchronization message broadcast is completed, accessing the second channel to interact with the slave device includes: accessing the second channel within the second offset time after the synchronization message broadcast is completed , and interact with the slave device in response mode or non-reply mode; in which, in the response mode, the master device receives the interactive message sent by the slave device and responds to the interactive message; in the non-reply mode, the master device The device side only receives interactive messages sent from the device side. In this embodiment, in the non-response mode, the master device does not need to respond to the interactive messages from the slave device, the power consumption of the master device is small, and more interactions between the slave devices can be completed in the same time; in the response mode, the master device The terminal responds to the interactive message from the slave device, and the slave device confirms that the interactive message has been received based on the response, so there is no need to repeatedly send the same interactive message in order to improve the reception probability of the interactive message, and the redundant transmission of the same interactive message is avoided. Causes the power consumption of the slave device to increase.
另外,响应于资源请求,为从设备端分配用于与主设备端交互的通信资源,包括:响应于资源请求,若确定预设的资源分配条件成立,为从设备端分配用于与主设备端交互的通信资源;其中,资源分配条件包括以下条件的至少其中之一:从设备端为预设的允许与主设备端交互的设备、已被分配通信资源的从设备端数量未达到预设的上限值。本实施例中,在已分配的从设备端数量未达上限值时,可以避免分配的通信资源过多,超出主设备端可以处理的范围;对预设的允许交互的设备分配通信资源,可以避免对不允许交互的设备分配通信资源,造成不交互的设备占用通信资源,造成通信资源的浪费,因此,可以 实现合理分配通信资源。In addition, 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 satisfied, allocating the slave device for communication with the master device. Communication resources for terminal interaction; wherein, the resource allocation conditions include at least one of the following conditions: the slave device is a preset device that allows interaction with the master device, and the number of slave devices that have been allocated communication resources does not reach the preset number upper limit of . In this embodiment, when the number of allocated slave devices does not reach the upper limit, it is possible to avoid too many allocated communication resources, which exceeds the range that can be handled by the master device; It can avoid allocating communication resources to devices that are not allowed to interact, causing non-interacting devices to occupy communication resources and causing waste of communication resources. Therefore, reasonable allocation of communication resources can be achieved.
另外,主设备端在同步消息广播完成后的第二偏移时间内,接入第二信道以与从设备端进行交互之后,还包括:若在同步消息广播完成后的第二偏移时间内,通过第二信道交互失败的次数超过预设次数,回收分配给从设备端的通信资源。在本实施例中,通过回收对连续多次接入第二信道且交互失败的从设备端的通信资源,可以解除交互失败的从设备端对通信资源的占用,避免通信资源被长期无效占用,提高通信资源的利用率。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 broadcast is completed, it further includes: if within the second offset time after the synchronization message broadcast is completed , the communication resources allocated to the slave device are recovered when the number of failures of interaction through the second channel exceeds the preset number of times. In this embodiment, by recycling the communication resources of the slave devices that access the second channel several times in a row and the interaction fails, the occupation of the communication resources by the slave devices that fail to interact can be released, so that the communication resources are prevented from being occupied for a long time and the communication resources are not occupied for a long time. Utilization of communication resources.
另外,第一偏移时间和第二偏移时间不重叠;和/或,不同从设备端的第二偏移时间不重叠。本实施例中,当第一偏移时间和第二偏移时间不重叠时,在任意相邻两次同步消息之间,对新增从设备端的资源请求和已分配资源的从设备端发出的消息都能做一次收集,当不同从设备端的第二偏移时间不重叠,在任意相邻两次同步消息之间,可以对所有从设备端发送的消息做一次收集。因此,可以实现对任意相邻两次同步消息之间的时间间隔的合理利用,提高主从设备端间的交互效率。In addition, 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. In this embodiment, when the first offset time and the second offset time do not overlap, between any two adjacent synchronization messages, a request for resources from a newly added slave device and a request for resources from a slave device that has allocated resources are sent. All messages can be collected once. When the second offset times of different slaves do not overlap, between any two adjacent synchronization messages, all messages sent by the slaves can be collected once. Therefore, the rational use of the time interval between any two adjacent synchronization messages can be realized, and the interaction efficiency between the master and slave devices can be improved.
另外,在同步消息广播完成后的第一偏移时间内,通过广播同步消息的第一信道接收从设备端发送的资源请求之前,还包括:确定相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔满足预设的时长条件;时长条件包括:时间间隔与第一偏移时间的时间长度的差值大于或等于预设时长,且时间间隔与第二偏移时间的时间长度的差值大于或等于预设时长。本实施例中,通过只在时间间隔分别大于第一偏移时间的时间长度和第二偏移时间的时间长度时才会从第二信道接收资源请求,即在确保时间间隔足够时才启动主设备端和从设备端的双向通信机制,避免由于时间间隔不够长而可能影响无连接同步通信中的同步消息正常广播的问题。In addition, within the first offset time after the broadcast of the synchronization message is completed, before receiving the resource request sent from the device side through the first channel for broadcasting the synchronization message, the method further includes: determining the broadcast of the previous synchronization message in the two adjacent synchronization messages The time interval between the completion and the start of the next synchronization message broadcast satisfies the preset time length condition; the time length 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 length, and the time interval and the first The difference between the time lengths of the two offset times is greater than or equal to the preset time length. In this embodiment, the resource request is only received from the second channel when the time interval is greater than the time length of the first offset time and the time length of the second offset time, that is, the master channel is activated only when the time interval is sufficient. The two-way communication mechanism between the device end and the slave device end avoids the problem that the time interval is not long enough, which may affect the normal broadcast of synchronization messages in connectionless synchronous communication.
附图说明Description of drawings
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些 示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。One or more embodiments are exemplified by the pictures in the corresponding drawings, and these exemplifications do not constitute limitations of the embodiments, and elements with the same reference numerals in the drawings are denoted as similar elements, Unless otherwise stated, the figures in the accompanying drawings do not constitute a scale limitation.
图1是根据本申请第一实施例提供的同步通信方法的一个例子的流程图;FIG. 1 is a flowchart of an example of a synchronous communication method provided according to a first embodiment of the present application;
图2是根据本申请第一实施例提供的相邻两次同步消息广播的时间间隔的示意图;2 is a schematic diagram of a time interval between two adjacent synchronization message broadcasts provided according to the first embodiment of the present application;
图3是根据本申请第一实施例提供的同步通信方法的另一个例子的流程图;3 is a flowchart of another example of a synchronous communication method provided according to the first embodiment of the present application;
图4是根据本申请第一实施例提供的不同从设备端分配到重叠第二偏移时间进行交互的示意图;FIG. 4 is a schematic diagram of interaction between different slave device assignments and overlapping second offset times provided according to the first embodiment of the present application;
图5是根据本申请第二实施例提供的同步通信方法的一个例子的流程图;5 is a flowchart of an example of a synchronous communication method provided according to the second embodiment of the present application;
图6是根据本申请第二实施例提供的同步通信方法的另一个例子的流程图;6 is a flowchart of another example of a synchronous communication method provided according to the second embodiment of the present application;
图7是根据本申请第二实施例提供的同步通信方法的又一个例子的流程图;FIG. 7 is a flowchart of another example of a synchronous communication method provided according to the second embodiment of the present application;
图8是根据本申请第三实施例提供的同步通信方法的流程图;FIG. 8 is a flowchart of a synchronous communication method provided according to a third embodiment of the present application;
图9是根据本申请第四实施例提供的同步通信方法的流程图;FIG. 9 is a flowchart of a synchronous communication method provided according to a fourth embodiment of the present application;
图10是根据本申请第五实施例提供的同步通信方法的一个例子的流程图;FIG. 10 is a flowchart of an example of a synchronous communication method provided according to the fifth embodiment of the present application;
图11是根据本申请第五实施例提供的同步通信方法的另一个例子的流程图;11 is a flowchart of another example of a synchronous communication method provided according to the fifth embodiment of the present application;
图12是根据本申请第六实施例提供的同步通信方法的流程图;12 is a flowchart of a synchronous communication method provided according to a sixth embodiment of the present application;
图13是根据本申请第七实施例提供的同步通信电子设备示意图。FIG. 13 is a schematic diagram of a synchronous communication electronic device provided according to a seventh embodiment of the present application.
具体实施例specific embodiment
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施例进行详细的阐述。然而,本领域的普通技术人员可以理解, 在本申请各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本申请的具体实现方式构成任何限定,各个实施例在不矛盾的前提下可以相互结合相互引用。In order to make the objectives, technical solutions and advantages of the embodiments of the present application more clear, each embodiment of the present application will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that, in each embodiment of the present application, many technical details are provided for readers to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can be realized. The following divisions of the various embodiments are for the convenience of description, and should not constitute any limitation on the specific implementation of the present application, and the various embodiments may be combined with each other and referred to each other on the premise of not contradicting each other.
本申请的第一实施例涉及一种同步通信方法,应用于主设备端,具体流程如图1所示。The first embodiment of the present application relates to a synchronous communication method, which is applied to a master device, and the specific process is shown in FIG. 1 .
步骤101,在同步消息广播完成后的第一偏移时间内,通过广播同步消息的第一信道接收从设备端发送的资源请求; Step 101, within the first offset time after the broadcast of the synchronization message is completed, receive a resource request sent from the device through the first channel for broadcasting the synchronization message;
步骤102,响应于资源请求,为从设备端分配用于与主设备端交互的通信资源,通信资源包括第二偏移时间; Step 102, in response to the resource request, allocate communication resources for the slave device to interact with the master device, and the communication resources include a second offset time;
步骤103,通过第一信道向从设备端发送通信资源。Step 103: Send communication resources to the slave device through the first channel.
其中,第一偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内,第二偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内。The first offset time is within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, and the second offset time is in the previous synchronization message in the two adjacent synchronization messages. The time interval between the completion of the synchronization message broadcast and the start of the next synchronization message broadcast.
相对于现有技而言,本实施例中,主设备端在同步消息广播完成后的第一偏移时间内,通过广播同步消息的第一信道接收从设备端发送的资源请求,并通过第一信道发送为从设备端分配的与主设备端交互的通信资源,通信资源包括第二偏移时间;即,主设备端和从设备端之间,可以在第二偏移时间内实现交互;并且,由于第一偏移时间、第二偏移时间均在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内,故主从设备端在通过第二信道进行交互时不会影响到同步消息的正常广播;因此,本申请实施例可以实现无连接同步通信方式中主从设备端之间的双向通信。Compared with the prior art, in this embodiment, the master device receives the resource request sent by the slave device through the first channel that broadcasts the synchronization message within the first offset time after the synchronization message is broadcast, and sends it through the first channel. A channel transmission is a communication resource allocated by the slave device to interact with the master device, and the communication resource includes the second offset time; that is, the interaction between the master device and the slave device can be realized within the second offset time; Moreover, since the first offset time and the second offset time are both within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, the master and slave devices are passing The interaction of the second channel will not affect the normal broadcast of the synchronization message; therefore, the embodiment of the present application can realize bidirectional communication between the master and slave devices in the connectionless synchronization communication mode.
下面对本实施例的同步通信方法的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须。The implementation details of the synchronous communication method in this embodiment will be specifically described below, and the following contents are only provided for the convenience of understanding, and are not necessary for implementing this solution.
本实施例中的同步通信方法用于在无连接同步通信中实现主设备端与从 设备端的交互;现有的无连接同步通信通常采用广播同步(Broadcast Isochronous Streams,BIS)传输方式。例如,基于低功耗蓝牙实现的蓝牙广播音频技术中,使用BIS协议进行音频数据的同步传输。其中,无连接同步通信中发送消息的主设备即可以理解为主设备端,无连接同步通信中接收消息的从设备即可以理解为从设备端。The synchronous communication method in the present 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 implemented based on Bluetooth low energy consumption, the BIS protocol is used for synchronous transmission of audio data. The master device that sends messages in the connectionless synchronous communication can be understood as the master device side, and the slave device that receives messages in the connectionless synchronous communication can be understood as the slave device side.
比如,在多人会议的例子中,主设备端为会议音频播放设备,听众、主持人分别使用从设备端,例如蓝牙耳机。主设备端将会议音频数据同步传输给多个从设备端。现有的多人会议中,主设备端以BIS这个非连接的方式来将音频数据广播出去,不会理会各个从设备端的状态;各个从设备端通过BIS协议同步接收音频数据,然后进行播放或使用。当听众、主持人有疑问需要暂停会议音频或实现其他控制时,以现有的技术无法实现;而本实施例的同步通信方法中,主设备端可以与从设备端互通消息,从而主设备端可以获知听众、主持人想要暂停会议音频或实现其他控制的意愿,并作出反应。For example, in the example of a multi-person conference, the master device is the conference audio playback device, and the listener and the host respectively use the slave device, such as a Bluetooth headset. The master device transmits conference audio data synchronously to multiple slave devices. In the existing multi-person conference, the master device broadcasts the audio data in the non-connected way of BIS, regardless of the status of each slave device; each slave device receives the audio data synchronously through the BIS protocol, and then plays or use. When the audience and the host have doubts and need to suspend the conference audio or implement other controls, it cannot be achieved with the existing technology; and in the synchronous communication method of this embodiment, the master device can exchange messages with the slave device, so that the master device can communicate with each other. Listeners, hosts' willingness to pause meeting audio or implement other controls can be informed and reacted to.
再比如,在课堂教学的例子中,老师使用的设备作为主设备端,学生使用的设备作为从设备端,以现有的采用BIS的传输方式,只能实现老师发言,学生听讲,无法实现学生与老师的互动,当某个学生想要发言时,无法向老师示意;而本实施例的同步通信方法中,老师使用的主设备端可以与学生使用的从设备端互通消息,从而老师可以获知学生的发言需求,与学生实现互动。For another example, in the example of classroom teaching, the device used by the teacher is used as the master device, and the device used by the students is used as the slave device. With the existing transmission method using BIS, only the teacher can speak and the students can listen, but the students cannot. In the interaction with the teacher, when a student wants to speak, he cannot signal to the teacher; in the synchronous communication method of this embodiment, the master device used by the teacher can exchange messages with the slave device used by the student, so that the teacher can know Students' speaking needs, to achieve interaction with students.
在步骤101中,第一信道是指广播同步消息的信道,该同步消息例如为上面多人会议例子中的音频数据,或者,课堂教学例子中的老师发言生成的音频数据。In step 101, the first channel refers to a channel for broadcasting a synchronization message, for example, the synchronization message is 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.
第一偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内,即,该第一偏移时间是一个时间范围,比如,0ms~2ms,2ms~3ms;如果时间间隔是10ms,那么,第一偏移时间的时间范围是0~10ms之间的某个范围。其中,第一偏移时间可以直接以时间范围的形式存储,如上面的0ms~2ms,或者,也可以以起始时间点与持续时长的形 式存储,如起始时间点为0ms,持续时长为2ms;或者,起始时间点为2,持续时长为2ms。The first offset time is within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, that is, the first offset time is a time range, for example, 0ms~ 2ms, 2ms~3ms; if the time interval is 10ms, then the time range of the first offset time is a certain range between 0~10ms. The first offset time can be directly stored in the form of a time range, such as 0ms to 2ms above, or can also be stored in the form of a starting time point and a duration, such as the starting time point is 0ms, and the duration is 2ms; or, the starting time point is 2 and the duration is 2ms.
相邻两次同步消息广播的时间间隔,如图2所示,以一次同步消息广播作为一次广播同步组BIG(Broadcast Isochronous Groups)事件(BIG event),每个同步消息可以包含多个BIS子事件(BIS Subevent),和一个控制子事件(Control Subevent),两个BIG事件之间存在一个时间间隔。其中,图中展示了BIG event x、BIG event x+1,以及,BIG event x中包含的BIS Subevent1、BIS Subevent 2、BIS Subevent3、Control Subevent,BIG event x+1中也包含的BIS Subevent1、BIS Subevent 2、BIS Subevent3、Control SubeventThe time interval between two adjacent synchronization message broadcasts, as shown in Figure 2, takes one synchronization message broadcast as a broadcast synchronization group BIG (Broadcast Isochronous Groups) event (BIG event), and each synchronization message can contain multiple BIS sub-events (BIS Subevent), and a Control Subevent (Control Subevent), there is a time interval between the two BIG events. Among them, the figure shows BIG event x, BIG event x+1, and BIS Subevent1, BIS Subevent 2, BIS Subevent3, and Control Subevent included in BIG event x, and BIS Subevent1, BIS included in BIG event x+1. Subevent 2, BIS Subevent3, Control Subevent
第一偏移时间可以是一个固定时间,该第一偏移时间可以在主设备端和从设备端中提前预设,或者,该第一偏移时间可以由主设备端预设,主设备端在某次同步消息中或者在从设备端同步上主设备端之前,以广播形式发送出去。例如,在用于从设备端与主设备端进行同步的广播中包含一个BIG Info的字段,该字段中包含从设备端与主设备端之间进行同步所需的数据,可以将第一偏移时间的信息携带在BIG Info中,以通知所有从设备端第一偏移时间。The first offset time may be a fixed time, and the first offset time may be preset in the master device end and the slave device end in advance, or the first offset time may be preset by the master device end, and the master device end In a certain synchronization message or before the slave device is synchronized to the master device, it is sent in the form of broadcast. For example, a BIG Info field is included in the broadcast used for synchronization between the slave device and the master device, and the field contains the data required for synchronization between the slave device and the master device. The first offset can be The time information is carried in BIG Info to notify all slave devices of the first offset time.
例如,在主设备端和从设备端都预先知晓该第一偏移时间的情况下,从设备端在该第一偏移时间内通过第一信道发送资源请求,主设备端通过监听广播的方式,从广播同步消息的第一信道接收从设备端发送的资源请求。资源请求中可以包含从设备端的标识信息,标识信息可以是从设备端的地址、从设备端的唯一识别码等。其中,从设备端的标识信息作为请求信息中此从设备端的身份识别。其中,能够在第一信道中发送资源请求的从设备端,可以理解为是已经在第一信道中接收到同步消息的从设备端,即,是已经与主设备端进行同步的从设备端,因此主设备端可以知道有哪些从设备端已经同步上了自己发送的同步消息。For example, in the case where 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 listens to the broadcast by means of , and receive the resource request sent from the device from the first channel that broadcasts the synchronization message. 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, and the like. Wherein, the identification information of the slave device is used as the identification of the slave device in the request information. Among them, the slave device that can send the resource request in the first channel can be understood as the slave device that has received the synchronization message in the first channel, that is, the slave device that has been synchronized with the master device. Therefore, the master device can know which slave devices have synchronized the synchronization messages sent by itself.
第一偏移时间也可以由主设备端根据实际情况设定;比如,根据主设备端所处网络环境的网络状况,设定第一偏移时间,并将新的第一偏移时间告知 从设备端,例如在某次同步消息中或者在从设备端同步上主设备端之前,广播发送出去,如上述的,可以将该第一偏移时间携带在同步消息中,即携带在同步消息的控制子事件,或者,携带在BIG Info的字段中。The first offset time can also be set by the master device according to the actual situation; for example, according to the network conditions of the network environment where the master device is located, the first offset time is set, and the new first offset time is notified to the slave. The device side, for example, in a synchronization message or before the slave device side synchronizes to the master device side, broadcast and send it out. As mentioned above, the first offset time can be carried in the synchronization message, that is, carried in the synchronization message. The control sub-event, or, is carried in the field of BIG Info.
第一偏移时间的时长也可以是可变的,在预设的固定时间外,再预设一个延时时长,以在特殊情况下对该第一偏移时间进行延时。例如,主设备端正在接收一个资源请求,还没有接收完成但第一偏移时间已经结束了,如果没有延时时长,那么主设备端此时会停止接收该资源请求,由于该资源请求只接收到了一部分,只能丢弃掉;而如果有延时时长,那么可以选择延长第一偏移时间的时长,在预设的固定时间的基础上,再为第一偏移时间加上一个延时时长。若第一偏移时间经过延长后超出同步消息广播之间的时间间隔,则只将第一偏移时间延长至同步消息广播发送之前。The duration of the first offset time may also be variable. In addition to the preset fixed time, a delay duration is preset to delay the first offset time under special circumstances. For example, the master device is receiving a resource request, but the first offset time has not been completed yet. If there is no delay time, the master device will stop receiving the resource request at this time, because the resource request only receives When a part is reached, it can only be discarded; and if there is a delay time, you can choose to extend the length of the first offset time, and add a delay time to the first offset time on the basis of the preset fixed time. . If the extended first offset time exceeds the time interval between synchronization message broadcasts, the first offset time is only extended until the synchronization message broadcast is sent.
在步骤102中,第二偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内一个时间段;即第二偏移时间也是一个时间范围,比如,2ms~3ms、3ms~4ms;如果时间间隔是10ms,那么,第二偏移时间的时间范围是0~10ms之间的某个范围。其中,第二偏移时间可以和第一偏移时间重叠,也可以不重叠;不同从设备端的第二偏移时间可以重叠,也可以不重叠。其中,前一个第二偏移时间的终止时间点可以是下一个第二偏移时间的起始时间点,也可以设定前一个第二偏移时间与下一个第二偏移时间存在一个时间间隔。In step 102, the second offset time is a time period within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages; that is, the second offset time is also a time period The range is, for example, 2ms~3ms, 3ms~4ms; if the time interval is 10ms, then the time range of the second offset time is a certain range between 0~10ms. The second offset time may or may not overlap with the first offset time; the second offset times of different slave devices may or may not overlap. The termination time point of the previous second offset time may be the start time point of the next second offset time, or it may be set that there is a time between the previous second offset time and the next second offset time interval.
第二偏移时间可以是一个固定时间,主设备端可以对所有从设备端都预设相同长度的第二偏移时间,也可以由主设备端根据实际情况设定;比如,由主设备端根据交互次数多少,为从设备端分不同长度的第二偏移时间,交互次数越多的从设备端分配到的第二偏移时间就更长。The second offset time can be a fixed time, the master device can preset the second offset time of the same length for all slave devices, or it can be set by the master device according to the actual situation; According to the number of interactions, the second offset time of different lengths is allocated to the slave device side, and the second offset time allocated to the slave device side with a greater number of interactions is longer.
第二偏移时间的时长也可以是可变的,在预设的固定时间外,再预设一个延时时长,以在特殊情况下对该第二偏移时间进行延时。例如,主设备端正在接收一个交互消息,还没有接收完成但第一偏移时间已经结束了,如果没有 延时时长,那么主设备端此时会停止接收该交互消息,由于该交互消息只接收到了一部分,只能丢弃掉;而如果有延时时长,那么可以选择延长第二偏移时间的时长,在预设的固定时间的基础上,再为第二偏移时间加上一个延时时长。若第二偏移时间经过延长后超出同步消息广播之间的时间间隔,则只将第二偏移时间延长至同步消息广播发送之前。The duration of the second offset time may also be variable. In addition to the preset fixed time, a delay duration is 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 expired. If there is no delay time, the master device will stop receiving the interactive message at this time, because the interactive message only receives When a part is reached, it can only be discarded; and if there is a delay time, you can choose to extend the duration of the second offset time. On the basis of the preset fixed time, add a delay time to the second offset time. . If the extended second offset time exceeds the time interval between synchronization message broadcasts, the second offset time is only extended until the synchronization message broadcast is sent.
在一个例子中,为从设备端分配用于与主设备端交互的通信资源,包括:响应于资源请求,若确定预设的资源分配条件成立,为从设备端分配用于与主设备端交互的通信资源;其中,资源分配条件包括以下条件的至少其中之一:从设备端为预设的允许与主设备端交互的设备、已被分配通信资源的从设备端数量未达到预设的上限值。在本实施例中,通过在响应资源请求前,进行资源分配条件的判断,只为满足预设资源分配条件的从设备端分配通信资源,可以选择性地为从设备端分配通信资源,以更好地满足实际需求。In one example, 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 the preset resource allocation condition is satisfied, allocating the slave device to interact with the master device. The communication resources; wherein, the resource allocation conditions include at least one of the following conditions: the slave device is a preset device that allows interaction with the master device, and the number of slave devices that have been allocated communication resources does not reach the preset upper limit limit. In this embodiment, by judging the resource allocation conditions before responding to the resource request, and only allocating communication resources to the slaves that meet the preset resource allocation conditions, the communication resources can be selectively allocated to the slaves, so as to improve the meet the actual needs well.
在步骤103中,主设备端可以通过第一信道以广播形式向从设备端发送该请求资源的应答消息,该应答消息中携带为该主设备端分配的通信资源和该从设备端的标识信息。从设备端会识别出带有自己的标识信息的应答消息,并将该应答消息中携带的通信资源记录下来,并利用该通信资源与主设备端通信。In step 103, the master device may send a response message of the requested resource to the slave device through the first channel in the form of broadcast, and the response message carries the communication resource allocated for 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.
主设备端在收到资源请求时,除了对响应请求,向从设备端发送应答消息,还对请求进行去重处理。在为从设备端分配通信资源前,主设备端会检测此从设备端是否已经分配过通信资源,此通信资源是否仍属于此从设备端。对同一个从设备端发来的请求,若此从设备端已经分配有属于它的通信资源,则不再为此从设备端分配通信资源。即使主设备端在之前为此从设备端分配过通信资源,但现在此通信资源不属于此从设备端时,主设备端仍然会再次为此从设备端分配另一通信资源。When the master device receives a resource request, in addition to sending a response message to the slave device to respond to the request, it also deduplicates the request. Before allocating communication resources to the slave device, the master device will check whether the slave device has 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 allocated communication resources belonging to it, the slave device will no longer allocate communication resources to the slave device. Even if the master device has previously allocated communication resources to the slave device, but now the communication resource does not belong to the slave device, the master device will still allocate another communication resource to the slave device.
在一个例子中,第一偏移时间和第二偏移时间不重叠且不同从设备端的第二偏移时间不重叠;如图3所示,主设备端通过第一信道向从设备端发送通信资源之后,还可以包括:步骤104:在第N次同步消息广播完成后到第N+1 次同步消息广播开始之间的时间间隔内的第一偏移时间内,通过第一信道接收从设备端发送的资源请求,且在第N次同步消息广播完成后到第N+1次同步消息广播开始之间的时间间隔内的不同从设备端的第二偏移时间内,通过第一信道与不同从设备端进行交互。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; as shown in FIG. 3 , the master device sends communication to the slave device through the first channel After the resource, it may further include: Step 104: within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the N+1th synchronization message broadcast start, receive the slave device through the first channel The resource request sent by the terminal, and within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast within the second offset time of the different slave devices, through the first channel and different Interact from the device side.
第一偏移时间和不同从设备端的第二偏移时间在不重叠的情况下,还可以是时间间隔内连续划分的时间区间,这样可以充分利用该时间间隔。比如,时间间隔为10ms,第一偏移时间是0~2ms,第二偏移时间有4个,2~4ms、4~6ms、6~8ms、8~10ms,此时可以划分出四个第二偏移时间,分配给四个从设备端。If the first offset time and the second offset time of different slave devices do not overlap, they may also be consecutively divided time intervals within the time interval, so that the time interval can be fully utilized. For example, the time interval is 10ms, the first offset time is 0~2ms, and there are 4 second offset times, 2~4ms, 4~6ms, 6~8ms, 8~10ms, at this time, four Two offset times, allocated to the four slave sides.
在步骤104中,从设备端接收到通信资源后,在第二偏移时间内通过第一信道以广播形式向主设备端发送交互消息,主设备端在第二偏移时间内监听第一信道接收从设备端发送的交互消息。当分配给该从设备端的第二偏移时间结束后,此该从设备端不再发送交互消息,主设备端停止监听第一信道。直到主设备端分配的下一个第二偏移时间中,主设备端监听该下一个第二偏移时间对应的从设备端发送的交互消息。且由于第一偏移时间、第二偏移时间均在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内,第一偏移时间和第二偏移时间不重叠且不同从设备端的第二偏移时间不重叠,从设备端与主设备端的资源请求与交互过程与同步消息广播三者互不冲突,可以在现有的无连接同步通信基础上实现双向通信。In step 104, after receiving the communication resource from the device, it sends an interactive message to the master through the first channel within the second offset time, and the master monitors the first channel during the second offset. Receive interactive messages sent from the device side. When the second offset time allocated to the slave device ends, the slave device end no longer sends interactive messages, and the master device end stops monitoring the first channel. Until the next second offset time allocated by the master device end, the master device end monitors the interaction 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 The offset time does not overlap and the second offset time of different slave devices does not overlap. The resource request and interaction process between the slave device and the master device and the synchronization message broadcast do not conflict with each other. Two-way communication is realized.
在其他例子中,不同从设备端分配到的第二偏移时间也可以有重叠,但是,第二偏移时间有重叠的从设备端不能在同一个时间间隔中与主设备端进行交互。例如,如图4所示,设20至30ms发生第N次BIG事件,35至45ms发生第N+1次BIG事件,50至60ms发生第N+2次BIG事件,因此30至35ms是第N次与第N+1次BIG事件之间的时间间隔,45至50ms是第N+1次与第N+2次BIG事件之间的时间间隔。其中,主设备端可以在一个时间间隔中为从设备端A、从设备端B、从设备端C分配第二偏移时间,其中,从设备端A与从设备端C的第二偏移时间完全重叠,因此从设备端A与从设备端C不能在同 一个时间间隔中与主设备端进行交互,从设备端A在第N次与第N+1次的BIG事件之间的时间间隔与主设备端进行交互,从设备端C在第N+1次与第N+2次的BIG事件之间的时间间隔与主设备端进行交互。In other examples, the second offset times allocated by 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. For example, as shown in Figure 4, suppose that the Nth BIG event occurs from 20 to 30ms, the N+1th BIG event occurs from 35 to 45ms, and the N+2th BIG event occurs from 50 to 60ms, so 30 to 35ms is the Nth BIG event. The time interval between the N+1th 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 for the slave device A, the slave device B, and the slave device C in a time interval, wherein the second offset time between the slave device A and the slave device C Completely overlapping, so slave A and slave C cannot interact with the master in the same time interval, and the time interval between slave A's Nth and N+1th BIG events is the same as The master device interacts, and the slave device C interacts with the master device at the time interval between the N+1th and N+2th BIG events.
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The steps of the above various methods are divided only for the purpose of describing clearly. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as the same logical relationship is included, they are all within the protection scope of this patent. ;Adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of the algorithm and process are all within the scope of protection of this patent.
本申请的第二实施例涉及一种同步通信方法。第二实施例与第一实施例大致相同,主要区别之处在于:本申请第二实施例中,主设备端为从设备端分配的通信资源还包括第二信道,主从设备端的交互直接通过第二信道完成。The second embodiment of the present application relates to a synchronous communication method. The second embodiment is roughly the same as the first embodiment, and the main difference is that in the second embodiment of the present application, the communication resources allocated by the master device to the slave devices also include a second channel, and the interaction between the master and slave devices directly passes through The second channel is complete.
其中,第二信道是主设备端分配给从设备端的用于实现交互的专用信道,为了节省通信资源,控制主设备端使用的信道数量,一个第二信道可以分给多个不同的从设备端,但一个从设备端只能被分配一个第二信道。Among them, the second channel is a dedicated channel allocated by the master device to the slave device to realize interaction. In order to save communication resources and control the number of channels used by the master device, a second channel can be assigned to multiple different slave devices. , but a slave side can only be assigned one second channel.
本实施例中,通过增加了第二信道,主设备端可以为相同的第二偏移时间的不同从设备端分配不同信道,增加可交互的从设备端数量,且由于增加了第二信道,即主从设备端交互的信道与主设备端广播同步消息的信道不同,从而可以尽可能地减小对同步消息的干扰。In this embodiment, by adding the second channel, the master device can allocate different channels to different slave devices with the same second offset time, thereby increasing the number of interactable slave devices, and due to the addition of the second channel, That is, the channel through which the master-slave device interacts is different from the channel through which the master device broadcasts the synchronization message, so that the interference to the synchronization message can be reduced as much as possible.
在一个例子中,如图5所示,同步通信方法包括:In one example, as shown in Figure 5, the synchronous communication method includes:
步骤201,在同步消息广播完成后的第一偏移时间内,通过广播同步消息的第一信道接收从设备端发送的资源请求; Step 201, within the first offset time after the broadcast of the synchronization message is completed, receive the resource request sent from the device side through the first channel for broadcasting the synchronization message;
步骤202,响应于资源请求,为从设备端分配用于与主设备端交互的通信资源,通信资源包括第二信道和第二偏移时间; Step 202, in response to the resource request, allocate communication resources for the slave device to interact with the master device, and the communication resources include a second channel and a second offset time;
步骤203,通过第一信道向从设备端发送通信资源; Step 203, sending communication resources to the slave device through the first channel;
步骤204,在同步消息广播完成后的第二偏移时间内,接入第二信道以与从设备端进行交互。 Step 204, within the second offset time after the broadcast of the synchronization message is completed, access the second channel to interact with the slave device.
本实施例中的步骤201、步骤202、步骤203与第一实施例中的步骤101、 步骤102、步骤103大致相同,不再赘述。不同之处在于步骤204,主设备端会接入第二信道与从设备端交互。 Steps 201, 202, and 203 in this embodiment are substantially the same as steps 101, 102, and 103 in the first embodiment, and will not be repeated here. The difference is that in step 204, the master device will access the second channel to interact with the slave device.
在第二偏移时间内,接入第二信道,可以实现在第二偏移时间内,当主设备端选择与从设备端进行交互时,通过接入分配给从设备端的第二信道即可建立与从设备端的交互通道,进行与从设备端的交互,当主设备端选择不与从设备端进行交互,只要不接入第二信道,就不会接到从设备端发送的交互消息。因此,主设备端可以通过选择在需要时接入第二信道,来选择是否与从设备端进行交互,避免不需要交互时,第二信道带来的从设备端的消息干扰。其中,接入第二信道包括:将主设备端的接收频段调整至第二信道使用的频段。During the second offset time, accessing the second channel can realize that during the second offset time, when the master device chooses to interact with the slave device, it can be established by accessing the second channel assigned to the slave device. The interaction channel with the slave device is used to interact with the slave device. When the master device chooses not to interact with the slave device, as long as it does not access the second channel, it will not receive the interaction message sent by the slave device. Therefore, the master device can choose whether to interact with the slave device by selecting to access the second channel when needed, so as to avoid message interference from the slave device caused by the second channel when no interaction is required. Wherein, accessing the second channel includes: adjusting the receiving frequency band of the master device to the frequency band used by the second channel.
主设备端可以为每次同步消息广播之间的间隔时间预设好此次需要进行交互的从设备端,并按预设顺序接入从设备端分配的第二信道,以接收从设备端发送的交互消息。其中预设的从设备端交互顺序需要考虑各个从设备端分配的第二偏移时间。在从设备端分配到的第二偏移时间结束时,主设备端与此从设备端的交互结束,主设备端按预设的交互顺序与下一个从设备端进行交互,接入下一个从设备端分配到的第二信道。若下一个从设备端与本次交互的从设备端分配到的是同一个第二信道,则主设备端不更改接入的第二信道。主设备端也可在完成与一个从设备端的交互后,实时选择一个第二偏移时间在当前时间后且在下次同步消息广播开始前的从设备端,接入此从设备端分配的第二信道,与此从设备端进行交互。The master device can preset the slave device that needs to interact this time for the interval between each synchronization message broadcast, and access the second channel allocated by the slave device in the preset order to receive the transmission from the slave device. interactive message. The preset interaction sequence at the slave device side needs to consider the second offset time allocated by each slave device side. At the end of the second offset time allocated by the slave device, the interaction between the master device and the slave device ends, the master device interacts with the next slave device according to the preset interaction sequence, and accesses the next slave device. The second channel assigned to the terminal. If the next slave device end and the slave device end of this interaction are allocated the same second channel, the master device end does not change the accessed second channel. The master device can also select a slave device whose second offset time is after the current time and before the next synchronization message broadcast starts in real time after completing the interaction with a slave device, and access the second slave device allocated by the slave device. Channel to interact with this slave.
或者,主设备端与从设备端进行交互还可以包括:主设备端主动给从设备端发送交互消息。比如在课堂教学的例子中,老师可以点名某个学生发言,此时可以主动给该学生使用的从设备端发送表示要求发言的交互信息;或者,老师发现某个学生正在开小差,此时可以主动给该学生使用的从设备端发送表示课堂纪律提醒的交互信息。Alternatively, the interaction between the master device and the slave device may further include: the master device actively sends an interaction message to the slave device. For example, in the example of classroom teaching, the teacher can name a student to speak, and at this time, he can actively send interactive information to the slave device used by the student indicating the request to speak; or, the teacher finds that a student is deserting, and can take the initiative at this time. Send interactive information representing classroom discipline reminders to the slave device used by the student.
在一个例子中,步骤204具体为,在同步消息广播完成后的第二偏移时间内,接入第二信道在应答模式或非应答模式下与从设备端进行交互。其中, 在应答模式下,在同步消息广播完成后的第二偏移时间内,接入第二信道,接收从设备端发送的交互消息,并对交互消息进行应答;在非应答模式下,在同步消息广播完成后的第二偏移时间内,接入第二信道,仅接收从设备端发送的交互消息。In an example, step 204 is specifically, within the second offset time after the broadcast of the synchronization message is completed, accessing the second channel and interacting with the slave device in an answering mode or a non-answering mode. Among them, in the response mode, within the second offset time after the broadcast of the synchronization message is completed, access the second channel, receive the interaction message sent from the device side, and respond to the interaction message; in the non-reply mode, in the Within the second offset time after the broadcast of the synchronization message is completed, the second channel is accessed, and only the interaction message sent from the device side is received.
其中,主设备端对从设备端的交互消息的应答,可以是在接收到交互消息后马上进行,即在该从设备端对应的第二偏移时间内,通过该从设备端对应的第二信道向从设备端发送交互消息的应答消息。在非应答模式下,主设备端无需对从设备端的交互消息进行应答,主设备端功耗较小,可以在相同时间内,完成更多从设备端的交互;在应答模式下,主设备端对从设备端的交互消息进行应答,从设备端基于应答确认该交互消息已被接收到,从而无需为了提高交互消息的接收概率而多次重复发送同一交互消息,避免了同一交互消息的多余传输造成从设备端的功耗增加。The response of the master device to the interactive message from the slave device may be performed immediately after receiving the interactive message, that is, within the second offset time corresponding to the slave device, through the second channel corresponding to the slave device. Send the response message of the interactive message to the slave device. In the non-response mode, the master device does not need to respond to the interactive messages from the slave device, the power consumption of the master device is small, and more interactions from the slave device can be completed in the same time; in the response mode, the master device can The slave device responds to the interaction message, and the slave device confirms that the interaction message has been received based on the response, so that it is not necessary to repeatedly send the same interaction message multiple times in order to improve the reception probability of the interaction message, and avoid redundant transmission of the same interaction message. The power consumption on the device side increases.
进一步地,如图6,在应答模式或非应答模式下与从设备端进行交互之前,即在步骤204之前,还包括:步骤203-1,根据以下信息的至少其中一种,确定采用应答模式或非应答模式与从设备端进行交互;信息包括:主设备端所处网络环境的网络质量、从设备端是否被指定为采用应答模式或非应答模式。其中,步骤203-1虽然在图5中位于步骤203与204之间,但实际上步骤203-1只需要发生步骤204前即可。本实施例中,主设备端可以选择应答模式或非应答模式,对从设备端发送的交互消息进行选择性应答,以更好地满足实际需求,达到更好的交互效果。Further, as shown in FIG. 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, determine to adopt the response mode or 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, and whether the slave device is designated to use the response mode or the non-response mode. Wherein, although step 203-1 is located between steps 203 and 204 in FIG. 5, in fact, step 203-1 only needs to occur before step 204. In this embodiment, the master device can select a response mode or a non-reply mode, and selectively respond to the interactive message sent by the slave device, so as to better meet actual needs and achieve better interaction effects.
在一个例子中,根据以下信息的至少其中一种,确定采用应答模式或非应答模式与从设备端进行交互,包括:若主设备端所处网络环境的多个评估指标满足预设条件,或者,从设备端被指定为采用非应答模式,确定采用非应答模式与从设备端进行交互;其中,所处多个评估指标包括信号强度、误码率的至少其中之一。本实施例中,主设备端所处网络环境的多个评估指标满足预设条件或从设备端被指定使用非答应模式时,主设备端采用非应答模块与从设备 端进行交互,由于在非应答模式中,主设备端无需对从设备端的交互消息进行应答,主设备端功耗较小,可以在相同时间内,完成更多从设备端的交互,同时第二信道只需传输从设备端发送的交互消息,只需要单方向传输,对网络的要求也较低,因此,使用非应答模式可以降低主设备端的功耗、降低对第二信道的要求In one example, according to at least one of the following information, determining to use the response mode or the non-response mode to interact with the slave device includes: if multiple evaluation indicators of the network environment where the master device is located satisfies a preset condition, or , the slave device is designated to use the non-response mode, and it is determined to use the non-response mode to interact with the slave device; 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 where the master device is located satisfies the preset conditions or the slave device is designated to use the non-permissive mode, the master device uses the non-response module to interact with the slave device. In the response mode, the master device does not need to respond to the interactive messages from the slave device. The power consumption of the master device is small, and more interactions from the slave device can be completed in the same time. At the same time, the second channel only needs to transmit the data sent by the slave device. The interactive messages only need to be transmitted in one direction, and the requirements for the network are also low. Therefore, using the non-response mode can reduce the power consumption of the master device and reduce the requirements for the second channel.
进一步地,主设备端默认使用非应答模式与从设备端进行交互,当从设备端被指定为应答模式,或者,主设备端所处网络环境的网络质量属于非高质量网络环境,和/或,从设备端未被指定为采用非应答模式时,主设备端采用应答模式与从设备端进行交互。Further, the master device side uses the non-response mode to interact with the slave device side by default, when the slave device side is designated as the response mode, or, the network quality of the network environment where the master device side is located belongs to a non-high-quality network environment, and/or , when the slave device is not designated to use the non-response mode, the master device uses the response mode to interact with the slave device.
在一个例子中,第一偏移时间和第二偏移时间不重叠;和/或,不同从设备端的第二偏移时间不重叠。在本实施例中,当第一偏移时间和第二偏移时间不重叠时,在任意相邻两次同步消息之间,对新增从设备端的资源请求和已分配资源的从设备端发出的消息都能做一次收集,当不同从设备端的第二偏移时间不重叠,在任意相邻两次同步消息之间,可以对所有从设备端发送的消息做一次收集。因此,可以实现对任意相邻两次同步消息之间的时间间隔的合理利用,提高主从设备端间的交互效率。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. In this embodiment, when the first offset time and the second offset time do not overlap, between any two adjacent synchronization messages, a request for resources from a newly added slave device and a slave device that has allocated resources are sent. All messages can be collected once. When the second offset times of different slaves do not overlap, between any two adjacent synchronization messages, all messages sent by the slaves can be collected once. Therefore, the rational use of the time interval between any two adjacent synchronization messages can be realized, and the interaction efficiency between the master and slave devices can be improved.
在一个例子中,第一偏移时间和第二偏移时间可以部分重叠或者全部重叠,不同从设备端的第二偏移时间可以部分重叠或者全部重叠。当一个从设备端的第二偏移时间与第一偏移时间或另一个从设备端的第二偏移时间重叠且分配的第二信道相同时,此从设备端在此次同步消息广播时间间隔内不与主设备端进行交互,等待下一次同步消息广播时间间隔的第二偏移时间再进行与主设备端的交互。In one example, the first offset time and the second offset time may partially or completely overlap, and the second offset times of different slave devices may partially or completely overlap. When the second offset time of one slave device overlaps with the first offset time or the second offset time of another slave device and the allocated second channel is the same, the slave device will broadcast the synchronization message within the time interval of this synchronization message. Do not interact with the master device, and wait for the second offset time of the next synchronization message broadcast interval before interacting with the master device.
在一个例子中,第一偏移时间和第二偏移时间不重叠,且第一偏移时间早于第二偏移时间;如图7所示,通过第一信道向从设备端发送通信资源之后,还包括:步骤205,在第N次同步消息广播完成后到第N+1次同步消息广播开始之间的时间间隔内的第一偏移时间内,通过第一信道接收从设备端发送的资 源请求,且在第N次同步消息广播完成后到第N+1次同步消息广播开始之间的时间间隔内的第二偏移时间内,接入第二信道以与从设备端进行交互;其中,N为大于或等于1的整数。本实施例中,通过设定第一偏移时间与第二偏移时间不重叠且早于第二偏移时间,在同步消息广播完成后,主设备端先接收从设备端的资源请求,再接入第二信道与从设备端交互,由于接收从设备端的资源请求的信道与广播同步消息的信道相同,可以减少信道切换次数,从而可以节省主设备端的功耗。In an 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; as shown in FIG. 7 , the communication resource is sent to the slave device through the first channel After that, the method further includes: Step 205, within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the N+1th synchronization message broadcast start, receiving the transmission from the device side 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, access the second channel to interact with the slave device ; where N is an integer greater than or equal to 1. In this embodiment, by setting the first offset time and the second offset time to be non-overlapping and earlier than the second offset time, after the synchronization message broadcast is completed, the master device first receives the resource request from the slave device, and then receives Enter the second channel to interact with the slave device. Since the channel for receiving the resource request from the slave device is the same as the channel for broadcasting the synchronization message, the number of channel switching can be reduced, thereby saving the power consumption of the master device.
进一步地,在不同从设备端的第二偏移时间不重叠的情况下;步骤205可以具体为,在第N次同步消息广播完成后到第N+1次同步消息广播开始之间的时间间隔内的第一偏移时间内,通过第一信道接收从设备端发送的资源请求,可以在第N次同步消息广播完成后到第N+1次同步消息广播开始之间的时间间隔内的不同从设备端的第二偏移时间内,接入不同从设备端的第二信道以与不同从设备端进行交互。本实施例中,可以在一个同步消息广播时间间隔中收到多个从设备端发送的交互消息。Further, in the case where the second offset times of different slave devices do not overlap; step 205 may be specifically, within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast. Within the first offset time, the resource request sent from the device is received through the first channel, and the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast can vary from During the second offset time of the device side, access the second channel of the different slave device side to interact with the different slave device side. In this embodiment, multiple interaction messages sent from the device side may be received in one synchronization message broadcast time interval.
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The steps of the above various methods are divided only for the purpose of describing clearly. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as the same logical relationship is included, they are all within the protection scope of this patent. ;Adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of the algorithm and process are all within the scope of protection of this patent.
本申请的第三实施例涉及一种同步通信方法。第三实施例与第二实施例大致相同,主要区别之处在于:本申请第三实施例中,主设备端对连续多次交互失败的从设备端分配到的通信资源进行回收。The third embodiment of the present application relates to a synchronous communication method. The third embodiment is substantially the same as the second embodiment, and the main difference lies in that: in the third embodiment of the present application, the master device reclaims the communication resources allocated by the slave device that fail to interact for many times in a row.
本实施例的具体流程图如图8所示,下面进行具体说明。A specific flow chart of this embodiment is shown in FIG. 8 , which will be described in detail below.
步骤301,在同步消息广播完成后的第一偏移时间内,通过同步消息的第一信道接收从设备端发送的资源请求; Step 301, within the first offset time after the broadcast of the synchronization message is completed, receive the resource request sent from the device side through the first channel of the synchronization message;
步骤302,响应于资源请求,为从设备端分配用于与主设备端交互的通信资源,通信资源包括第二信道和第二偏移时间; Step 302, in response to the resource request, allocate communication resources for the slave device to interact with the master, the communication resources include a second channel and a second offset time;
步骤303,通过第一信道向从设备端发送通信资源; Step 303, sending communication resources to the slave device through the first channel;
步骤304,同步消息广播完成后的第二偏移时间内,接入第二信道与从设备端进行交互; Step 304, within the second offset time after the broadcast of the synchronization message is completed, access the second channel to interact with the slave device;
步骤305,若在同步消息广播完成后的第二偏移时间内,通过第二信道,交互失败的次数超过预设次数,回收分配给从设备端的通信资源。 Step 305 , if the number of interaction failures exceeds the preset number of times through the second channel within the second offset time after the broadcast of the synchronization message is completed, the communication resources allocated to the slave device are recovered.
在本实施例中的步骤301、步骤302、步骤303、步骤304与第二实施例中的步骤201、步骤202、步骤203、步骤204大致相同,不再赘述。 Steps 301 , 302 , 303 , and 304 in this embodiment are substantially the same as steps 201 , 202 , 203 , and 204 in the second embodiment, and will not be described again.
在步骤305中,交互失败的原因可以是消息的传输过程存在问题,消息在传输过程中丢失,无法被主设备端接收,或是从设备端没有交互需求,未向主设备端发送消息等,可见当出现连续多次在第二偏移时间内接入第二信道都交互失败的从设备端,其通信资源存在为从设备端分配了不合适的传输信道,造成主从设备端无法进行交互,或没有交互需求的从设备端长期无效占用通信资源的情况,本实施例中,通过回收对连续多次接入第二信道且交互失败的从设备端的通信资源,可以解除交互失败的从设备端对通信资源的占用,避免通信资源被长期无效占用,提高通信资源的合理利用率。In step 305, the reason for the failure of the interaction may be that there is a problem in the transmission process of the message, the message is lost in the transmission process and cannot be received by the master device, or the slave device has no interaction requirement and does not send a message to the master device, etc. It can be seen that when there is a slave device that fails to interact with the second channel during the second offset time for many times in a row, its communication resources exist to allocate an inappropriate transmission channel to the slave device, causing the master and slave devices to be unable to interact. , or the long-term invalid occupation of communication resources by the slave device without interaction requirements, in this embodiment, by recycling the communication resources of the slave device that has continuously accessed the second channel for multiple times and the interaction fails, the slave device that fails to interact can be released. End-to-end occupation of communication resources, avoid long-term invalid occupation of communication resources, and improve the rational utilization of communication resources.
进一步地,当主设备端回收分配给从设备端的通信资源时,在第一信道向此从设备端发送回收消息以通知从设备端此通信资源被回收,为了此回收消息能被从设备端准确接收,回收消息内可以包含此从设备端的标识信息。当从设备端需要与主设备端进行交互时,会再次向主设备端发送资源请求。Further, when the master device recycles the communication resources allocated to the slave device, it sends a recovery message to the slave device on the first channel to notify the slave device that this communication resource is recovered, so that the recovery message can be accurately received from the device. , the recovery message can contain 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 device again.
主设备端会记录已分配的从设备端和通信资源的对应关系,当发生为从设备端分配通信资源、回收从设备端的通信资源时,主设备端会对记录中已分配的从设备端和通信资源的对应关系做修改。The master device will record the corresponding relationship between the allocated slave device and communication resources. When the communication resources are allocated to the slave device and the communication resources of the slave device are recovered, the master device will record the allocated slave device and communication resources. The corresponding relationship of communication resources is modified.
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The steps of the above various methods are divided only for the purpose of describing clearly. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as the same logical relationship is included, they are all within the protection scope of this patent. ;Adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of the algorithm and process are all within the scope of protection of this patent.
本申请的第四实施例涉及一种同步通信方法。第四实施例与第二实施例大致相同,主要区别之处在于:本申请第四实施例中,主设备端在接收从设备端发送的资源请求之前,确定同步消息广播时间间隔满足预设的时长条件。The fourth embodiment of the present application relates to a synchronous communication method. The fourth embodiment is roughly the same as the second embodiment, and the main difference is that: in the fourth embodiment of the present application, before receiving the resource request sent by the slave device, the master device determines that the broadcast time interval of the synchronization message satisfies the preset time interval. duration condition.
在本实施例中,本实施例的具体流程图如图9所示:In this embodiment, the specific flowchart of this embodiment is shown in FIG. 9 :
步骤401-1,在同步消息广播完成后的第一偏移时间内,确定相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔满足预设的时长条件;Step 401-1, within the first offset time after the broadcast of the synchronization message is completed, determine that the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages satisfies a preset duration condition;
步骤401-2,在第一偏移时间内,通过广播同步消息的第一信道接收从设备端发送的资源请求;Step 401-2, within the first offset time, receive the resource request sent from the device through the first channel of the broadcast synchronization message;
步骤402,响应于资源请求,为从设备端分配用于与主设备端交互的通信资源,通信资源包括第二信道和相对于同步消息广播完成的第二偏移时间; Step 402, in response to the resource request, allocate communication resources for interacting with the master device end for the slave device end, the communication resources including the second channel and the second offset time completed with respect to the synchronization message broadcast;
步骤403,通过第一信道向从设备端发送通信资源。Step 403: Send communication resources to the slave device through the first channel.
在同步消息广播完成后的第一偏移时间内,通过广播同步消息的第一信道接收从设备端发送的资源请求之前,确定相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔满足预设的时长条件;时长条件包括:时间间隔与第一偏移时间的时间长度的差值大于或等于预设时长,且时间间隔与第二偏移时间的时间长度的差值大于或等于预设时长。在本实施例中,通过只在时间间隔分别大于第一偏移时间的时间长度和第二偏移时间的时间长度时才会从第二信道接收资源请求,即在确保时间间隔足够时才启动主设备端和从设备端的双向通信机制,避免由于时间间隔不够长而可能影响无连接同步通信中的同步消息正常广播的问题。Within the first offset time after the broadcast of the synchronization message is completed, before the resource request sent from the device is received through the first channel of the broadcast synchronization message, it is determined that the broadcast of the previous synchronization message in the two adjacent synchronization messages is completed to the next synchronization. The time interval between the start of message broadcasting satisfies the preset duration condition; the duration 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 duration, and the difference between the time interval and the second offset time is greater than or equal to the preset duration. The difference in time length is greater than or equal to the preset time length. In this embodiment, the resource request is received from the second channel only when the time interval is greater than the time length of the first offset time and the time length of the second offset time respectively, that is, the start is made when the time interval is guaranteed to be sufficient. The two-way communication mechanism between the master device and the slave device avoids the problem that the time interval is not long enough, which may affect the normal broadcast of synchronization messages in connectionless synchronization communication.
优选地,预设时长应该大于或等于完整接收资源请求的时长,以保证在主设备端在时间间隔内至少可以完整地接收一个资源请求,从而保证主设备端至少能选择与一个从设备端进行通信,从而保证同步通信能够有效进行。Preferably, the preset duration should be greater than or equal to the duration of completely receiving the resource request, so as to ensure that at least one resource request can be completely received by the master device within the time interval, so as to ensure that the master device can choose to communicate with at least one slave device. communication, so as to ensure that synchronous communication can be carried out effectively.
进一步地,时长条件还包括:时间间隔大于等于第一偏移时间的时间长度与第二偏移时间的时间长度之和。从而保证在一个时间间隔内主设备端既可 以为从设备端分配通信资源,又可以和从设备端进行交互,从而保证同步通信能够有效进行。Further, the time length condition further 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. Therefore, it is ensured that the master device can not only allocate communication resources to the slave device, but also interact with the slave device within a time interval, thereby ensuring that the synchronous communication can be carried out effectively.
在一个例子中,第一偏移时间和第二偏移时间不重叠且不同从设备端的第二偏移时间不重叠;通过第一信道向从设备端发送通信资源之后,还包括:在第N次同步消息广播完成后到第N+1次同步消息广播开始之间的时间间隔内的第一偏移时间内,通过第一信道接收从设备端发送的资源请求,且在第N次同步消息广播完成后到第N+1次同步消息广播开始之间的时间间隔内的不同所述从设备端的第二偏移时间内,通过第一信道与不同从设备端进行交互。本实施例中,通过在与第一偏移时间内通过第一信道接收从设备端发送的资源请求,并在第二偏移时间内完成与从设备端的交互,可以实现在无连接同步通信方式中主从设备端之间的交互。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; after sending the communication resources to the slave device through the first channel, the method further includes: at the Nth During the first offset time within the time interval between the completion of the second synchronization message broadcast and the start of the N+1th synchronization message broadcast, the resource request sent from the device is received through the first channel, and the Nth synchronization message is received within the first offset time. Interact with different slave devices through the first channel within the second offset time of different slave devices within the time interval between the completion of the broadcast and the start of the N+1th synchronization message broadcast. In this embodiment, by receiving the resource request sent by the slave device through the first channel within the first offset time, and completing the interaction with the slave device within the second offset time, the connectionless synchronous communication mode can be realized. The interaction between the master and slave devices.
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The steps of the above various methods are divided only for the purpose of describing clearly. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as the same logical relationship is included, they are all within the protection scope of this patent. ;Adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of the algorithm and process are all within the scope of protection of this patent.
本申请的第五实施例涉及一种同步通信方法,应用于从设备端,具体流程如图10所示。The fifth embodiment of the present application relates to a synchronous communication method, which is applied to a slave device, and the specific process is shown in FIG. 10 .
步骤501,在接收到主设备端广播的同步消息后的第一偏移时间内,通过接收同步消息的第一信道向主设备端发送资源请求; Step 501, within the first offset time after receiving the synchronization message broadcast by the master device, send a resource request to the master device through the first channel for receiving the synchronization message;
步骤502,通过第一信道从主设备端接收用于与主设备端交互的通信资源,通信资源包括第二偏移时间。Step 502: Receive communication resources from the master device for interaction with the master device through the first channel, where the communication resources include the second offset time.
其中,第一偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内,第二偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内。The first offset time is within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, and the second offset time is in the previous synchronization message in the two adjacent synchronization messages. The time interval between the completion of the synchronization message broadcast and the start of the next synchronization message broadcast.
本实施例中,从设备端在同步消息广播完成后的第一偏移时间内,通过广播同步消息的第一信道接收向主设备端发送的资源请求,并通过第一信道接 收主设备端分配的交互的通信资源,通信资源包括相对于同步消息广播完成的第二偏移时间;即,主设备端和从设备端之间,可以在第二偏移时间内实现交互;并且,由于第一偏移时间、第二偏移时间均在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内,故主从设备端在通过第二信道进行交互时不会影响到同步消息的正常广播;因此,本申请实施例可以实现无连接同步通信方式中主从设备端之间的双向通信。In this embodiment, within the first offset time after the broadcast of the synchronization message is completed, the slave device receives the resource request sent to the master device through the first channel for broadcasting the synchronization message, and receives the allocation from the master device through the first channel. The communication resources of the interaction include the second offset time relative to the completion of the synchronization message broadcast; that is, the interaction between the master device and the slave device can be realized within the second offset time; and, due to the first The offset time and the second offset time are both within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, so the master and slave devices are interacting through the second channel. It will not affect the normal broadcast of the synchronization message; therefore, the embodiment of the present application can realize the two-way communication between the master and slave devices in the connectionless synchronization communication mode.
下面对本实施例的同步通信方法的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须。The implementation details of the synchronous communication method in this embodiment will be specifically described below, and the following contents are only provided for the convenience of understanding, and are not necessary for implementing this solution.
本实施例中的执行主体是同步通信中的从设备端,与上述实施例中的主设备端进行交互。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.
在步骤501中,从设备端在接收到主设备端广播的同步消息后的第一偏移时间内,通过接收同步消息的第一信道向主设备端以广播形式发送资源请求,资源请求中可以包含发送请求的从设备端的标识信息,标识信息可以是从设备端的地址、从设备端生成的识别码等。其中,从设备端的标识信息作为请求信息中此从设备端的身份识别。主设备端在发送同步消息前,会向所有从设备端广播消息,通知所有从设备端同步消息发送的周期、第一偏移时间,从设备端通过监听广播获取同步主设备端发送同步消息的周期和第一偏移时间。In step 501, within the first offset time after receiving the synchronization message broadcast by the master device, the slave device sends a resource request to the master device in the form of broadcasting through the first channel for receiving the synchronization message. Contains the identification information of the slave device that sends the request. The identification information can be the address of the slave device, the identification code generated by the slave device, etc. Wherein, the identification information of the slave device is used as the identification of the slave device in the request information. Before the master device sends a synchronization message, it will broadcast a message to all slave devices to notify all slave devices of the period and first offset time of the synchronization message sent. period and first offset time.
在步骤502中,通过第一信道从主设备端接收用于与主设备端交互的通信资源,通信资源包括相对于同步消息广播完成的第二偏移时间。其中,第一偏移时间、第二偏移时间均在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内。从设备端收到主设备端发送的通信资源后,会保存通信资源信息,在之后与主设备端交互的过程中,都使用此通信资源。In step 502, a communication resource for interacting with the master device is received from the master device through 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 broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages. After the slave device receives the communication resource sent by the master device, it will save the communication resource information, and use this communication resource in the subsequent interaction with the master device.
较佳的,通信资源还包括第二信道。本实施例中,通过增加了第二信道,主设备端可以为相同的第二偏移时间的不同从设备端分配不同信道,增加可交互的从设备端数量,且由于增加了第二信道,即主从设备端交互的信道与主设 备端广播同步消息的信道不同,从而可以尽可能地减小对同步消息的干扰。Preferably, the communication resource further includes a second channel. In this embodiment, by adding the second channel, the master device can allocate different channels to different slave devices with the same second offset time, thereby increasing the number of interactable slave devices, and due to the addition of the second channel, That is, the channel through which the master-slave device interacts is different from the channel through which the master device broadcasts the synchronization message, so that the interference to the synchronization message can be reduced as much as possible.
在一个例子中,第一偏移时间和第二偏移时间不重叠;和/或,不同从设备端的第二偏移时间不重叠。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.
在一个例子中,从设备端通过第一信道向主设备端发送通信资源之后,如图11所示,还包括:In an example, after the slave device sends the communication resources to the master device through the first channel, as shown in FIG. 11 , it further includes:
步骤503,在同步消息广播完成后的第二偏移时间内,接入第二信道以与主设备端进行交互。本实施例中,从设备端可以在第二偏移时间内接入第二信道,来实现与主设备端的交互。Step 503: Access the second channel to interact with the master device within the second offset time after the broadcast of the synchronization message is completed. In this embodiment, the slave device can access the second channel within the second offset time to realize interaction with the master device.
在步骤503中,在第二偏移时间内,接入第二信道,可以实现在第二偏移时间内,通过接入分配给的第二信道即可建立与主设备端的交互通道,进行与主设备端的交互,In step 503, during the second offset time, the second channel is accessed, so that within the second offset time, an interaction channel with the master device can be established by accessing the assigned second channel, and an interaction channel with the master device can be established. The interaction on the main device side,
其中,从设备端可以在第二偏移时间内都选择接入第二信道。从设备端也可以在不需要与主设备端进行交互时,可以选择在第二偏移时间内也不接入第二信道。因此,主设备端可以通过选择在需要时接入第二信道,来选择是否与主设备端进行交互。Wherein, the slave device can choose to access the second channel within the second offset time. The slave device can 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 can choose whether to interact with the master device by selecting to access the second channel when needed.
在一个例子中,从设备端可以在应答模式下与主设备端进行交互,步骤503可以具体为:在接收到同步消息后的第二偏移时间内,接入第二信道并发送交互消息,若未接收到交互消息的应答消息,在下次接收到同步消息后的第二偏移时间内,接入第二信道并重新发送交互消息。In an example, the slave device can interact with the master device in the response mode, and step 503 can be specifically: within the second offset time after receiving the synchronization message, access the second channel and send the interaction message, If the response message of the interaction message is not received, within the second offset time after the next synchronization message is received, the second channel is accessed and the interaction message is resent.
在一个例子中,从设备端可以在非应答模式下与主设备端进行交互,步骤503可以具体为:包括:连续多次在接收到同步消息后的第二偏移时间内,接入第二信道并发送交互消息;或者,在接收到同步消息后的第二偏移时间内,接入第二信道并发送交互消息,若未接收到交互消息的应答消息,在下次接收到同步消息后的第二偏移时间内,接入第二信道并重新发送交互消息。其中,连续多次在第二偏移时间内接入第二信道发送交互消息的次数可以是一个预设的固定数值,也可以是从设备端根据当前网络状况或交互消息的重要程度设定 的数值。若当前网络状况良好或此交互消息重要程度不高则设定一个较低的数值,若当前网络状况差或此交互消息重要程度高则设定一个较高的数值。从设备端会将交互消息发送预设次数,当预设次数发完后,从设备端不再发送此交互消息,结束此次与主设备端的交互。In an example, the slave device may interact with the master device in a non-response mode, and step 503 may specifically include: including: consecutively within the second offset time after receiving the synchronization message, accessing the second channel and send the interaction message; or, within the second offset time after receiving the synchronization message, access the second channel and send the interaction message, if the response message of the interaction message is not received, the next time after receiving the synchronization message During the second offset time, the second channel is accessed and the interactive message is resent. The number of times that the second channel is connected to the second channel to send the interactive message continuously within the second offset time may be a preset fixed value, or may be set by the device according to the current network condition or the importance of the interactive message. numerical value. If the current network condition is good or the importance of the interaction message is not high, a lower value is set, and if the current network condition is poor or the importance of the interaction message is high, a higher value is set. The slave device will send the interaction message a preset number of times. After the preset number of times is sent, the slave device will no longer send the interaction message, ending the interaction with the master device.
不难发现,本实施例为与第一至第四施方式相对应的方法实施例,本实施例可与第一至第四实施例互相配合实施。第一实施例中提到的相关技术细节在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在第一实施例中。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 cooperation with the first to fourth embodiments. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not repeated here in order to reduce repetition. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The steps of the above various methods are divided only for the purpose of describing clearly, and can be combined into one step or split into some steps during implementation, and decomposed into multiple steps, as long as the same logical relationship is included, all are within the protection scope of this patent. ;Adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of the algorithm and process are all within the scope of protection of this patent.
本申请的第六实施例涉及一种同步通信方法。第五实施例与第四实施例大致相同,主要区别之处在于:本申请第六实施例中,从设备端向主设备端发送资源请求前会确定之前确定尚未分配有通信资源。The sixth embodiment of the present application relates to a synchronous communication method. The fifth embodiment is roughly the same as the fourth embodiment, and the main difference is 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.
本实施例的同步通信方法,如图12所示,包括:The synchronous communication method of this embodiment, as shown in FIG. 12 , includes:
步骤601-1,确定尚未分配到与所述主设备端交互的通信资源;Step 601-1, determining that the communication resources that have not been allocated to interact with the master device end;
步骤601-2,在接收到主设备端广播的同步消息后的第一偏移时间内,通过接收同步消息的第一信道向主设备端发送资源请求;Step 601-2, within the first offset time after receiving the synchronization message broadcast by the master device, send a resource request to the master device through the first channel for receiving the synchronization message;
步骤602,通过第一信道从主设备端接收用于与主设备端交互的通信资源,通信资源包括相对于同步消息广播完成的第二偏移时间; Step 602, receiving communication resources for interacting with the main device end from the main device end through the first channel, the communication resources including the second offset time relative to the synchronization message broadcast completion;
步骤603,在同步消息广播完成后的第二偏移时间内,接入第二信道以与主设备端进行交互。 Step 603, within the second offset time after the broadcast of the synchronization message is completed, access the second channel to interact with the master device.
一个从设备端使用一份通信资源,当从设备端向主设备端发送资源请求前会判断之前是否已经分配有通信资源,若已经分配过通信资源则不再发送资源请求,若还没分配到通信资源,则向主设备端发送资源请求。当从设备端收 到通信资源后,会将通信资源信息储存,作为判断已经分配有通信资源的依据。本实施例中,通过在接收同步消息的第一信道向主设备端发送资源请求之前,确定从设备端尚未分配到与主设备端交互的通信资源,避免了对一个从设备端再次分配通信资源的情况,确保了一个从设备端只被分配到一份通信资源,保证交互过程的稳定性。A slave device uses a communication resource. When the slave device sends a resource request to the master device, it will judge whether the communication resource has been allocated before. If the communication resource has been allocated, it will not send the resource request. communication resources, send a resource request to the master device. When the communication resource is received from the device, the communication resource information will be stored as the basis for judging that the communication resource has been allocated. In this embodiment, before the first channel that receives the synchronization message sends the resource request to the master device, it is determined that the slave device has not been allocated the communication resources for interacting with the master device, so as to avoid re-allocating communication resources to a slave device It ensures that only one communication resource is allocated to a slave device, ensuring the stability of the interaction process.
本申请第七实施例涉及一种电子设备,如图13所示,包括:至少一个处理器701;以及与至少一个处理器701通信连接的存储器702;其中,存储器702存储有可被至少一个处理器701执行的指令,指令被至少一个处理器701执行,以使至少一个处理器701能够执行上述的应用于主设备端的同步通信方法,或者,能够执行上述的应用于从设备端的同步通信方法。The seventh embodiment of the present application relates to an electronic device, as shown in FIG. 13 , comprising: at least one processor 701 ; and a memory 702 communicatively connected to the at least one processor 701 ; wherein the memory 702 stores data that can be processed by the at least one processor 701 . The instructions are executed by the processor 701, and the instructions are executed by 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, or can execute the above-mentioned synchronous communication method applied to the slave device.
其中,存储器702和处理器701采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器701和存储器702的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器。The memory 702 and the processor 701 are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors 701 and various circuits of the memory 702 together. The bus may also connect together various other circuits, such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides the interface between the bus and the transceiver. A transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other devices over a transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor.
处理器负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器可以被用于存储处理器在执行操作时所使用的数据。The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Instead, memory may be used to store data used by the processor in performing operations.
本申请第八实施例涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。The eighth embodiment of the present application relates to a computer-readable storage medium storing a computer program. The above method embodiments are implemented when the computer program is executed by the processor.
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor) 执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium and includes several instructions to make a device ( It may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments 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), magnetic disk or optical disk and other media that can store program codes .
本领域的普通技术人员可以理解,上述各实施例是实现本申请的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。Those of ordinary skill in the art can understand that the above-mentioned embodiments are specific embodiments for realizing the present application, and in practical applications, various changes in form and details can be made without departing from the spirit and the spirit of the present application. Scope.

Claims (23)

  1. 一种同步通信方法,其特征在于,应用于主设备端,所述方法包括:A synchronous communication method, characterized in that it is applied to a master device, the method comprising:
    在同步消息广播完成后的第一偏移时间内,通过广播所述同步消息的第一信道接收从设备端发送的资源请求;Within the first offset time after the synchronization message broadcast is completed, receive the resource request sent from the device through the first channel that broadcasts the synchronization message;
    响应于所述资源请求,为所述从设备端分配用于与所述主设备端交互的通信资源;所述通信资源包括第二偏移时间;In response to the resource request, allocate communication resources for the slave device to interact with the master device; the communication resources include a second offset time;
    通过所述第一信道向所述从设备端发送所述通信资源;Send the communication resource to the slave device through the first channel;
    其中,所述第一偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内,所述第二偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内。The first offset time is within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, and the second offset time is between the two adjacent synchronization messages. The time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in the message.
  2. 根据权利要求1所述的同步通信方法,其特征在于,所述通信资源还包括第二信道。The synchronous communication method according to claim 1, wherein the communication resource further comprises a second channel.
  3. 根据权利要求2所述的同步通信方法,其特征在于,所述通过所述第一信道向所述从设备端发送所述通信资源之后,还包括:The synchronous communication method according to claim 2, wherein after the sending the communication resource to the slave device through the first channel, the method further comprises:
    在所述同步消息广播完成后的所述第二偏移时间内,接入所述第二信道以与所述从设备端进行交互。During the second offset time after the broadcast of the synchronization message is completed, the second channel is accessed to interact with the slave device.
  4. 根据权利要求3所述的同步通信方法,其特征在于,所述在所述同步消息广播完成后的所述第二偏移时间内,接入所述第二信道以与所述从设备端进行交互,包括:The synchronous communication method according to claim 3, wherein, within the second offset time after the broadcast of the synchronization message is completed, the second channel is accessed to communicate with the slave device. interactions, including:
    在所述同步消息广播完成后的所述第二偏移时间内,接入所述第二信道,并在应答模式或非应答模式下与所述从设备端进行交互;Access the second channel within the second offset time after the synchronization message broadcast is completed, and interact with the slave device in response mode or non-reply mode;
    其中,在所述应答模式下,所述主设备端接收所述从设备端发送的交互消息,并对所述交互消息进行应答;在所述非应答模式下,所述主设备端仅接收所述从设备端发送的交互消息。Wherein, in the response mode, the master device receives the interactive message sent by the slave device, and responds to the interactive message; in the non-reply mode, the master device only receives the Describe the interactive message sent from the device.
  5. 根据权利要求4所述的同步通信方法,其特征在于,在所述同步消息广播完成后的所述第二偏移时间内,接入所述第二信道,并在应答模式或非应答模式下与所述从设备端进行交互之前,还包括:The synchronous communication method according to claim 4, characterized in that, within the second offset time after the broadcast of the synchronization message is completed, the second channel is accessed, and in the response mode or the non-response mode Before interacting with the slave device, it also includes:
    根据以下信息的至少其中一种,确定采用所述应答模式或所述非应答模式与所述从设备端进行交互;所述信息包括:所述主设备端所处网络环境的网络质量、所述从设备端是否被指定为采用所述应答模式或所述非应答模式。According to at least one of the following information, it is determined 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, the Whether the slave side is designated to use the acknowledgment mode or the non-acknowledgment mode.
  6. 根据权利要求5所述的同步通信方法,其特征在于,所述根据以下信息的至少其中一种,确定采用所述应答模式或所述非应答模式与所述从设备端进行交互,包括:The synchronous communication method according to claim 5, wherein the determining to use the response mode or the non-response mode to interact with the slave device according to at least one of the following information includes:
    若所述主设备端所处网络环境的多个评估指标满足预设条件,或者,所述从设备端被指定为采用所述非应答模式,确定采用所述非应答模式与所述从设备端进行交互;其中,所处多个评估指标包括信号强度、误码率的至少其中之一。If multiple evaluation indicators of the network environment where the master device is located meet the preset conditions, or if the slave device is designated to use the non-response mode, it is determined to use the non-response mode and the slave device end. Perform interaction; wherein, the multiple evaluation indicators include at least one of signal strength and bit error rate.
  7. 根据权利要求3所述的同步通信方法,其特征在于,所述在所述同步消息广播完成后的所述第二偏移时间内,接入所述第二信道以与所述从设备端进行交互之后,还包括:The synchronous communication method according to claim 3, wherein, within the second offset time after the broadcast of the synchronization message is completed, the second channel is accessed to communicate with the slave device. After the interaction, it also includes:
    若在所述同步消息广播完成后的所述第二偏移时间内,通过所述第二信道交互失败的次数超过预设次数,回收分配给所述从设备端的所述通信资源。If, within the second offset time after the broadcast of the synchronization message is completed, the number of times of failure of interaction through the second channel exceeds a preset number of times, the communication resource allocated to the slave device is recovered.
  8. 根据权利要求1或2所述的同步通信方法,其特征在于,所述第一偏移时间和所述第二偏移时间不重叠;和/或,不同所述从设备端的所述第二偏移时间不重叠。The synchronous communication method according to claim 1 or 2, wherein the first offset time and the second offset time do not overlap; and/or the second offset time is different from the slave device side. The shift times do not overlap.
  9. 根据权利要求8所述的同步通信方法,其特征在于,所述通信资源包括第二信道;所述第一偏移时间和所述第二偏移时间不重叠,且所述第一偏移时间早于所述第二偏移时间;所述通过所述第一信道向所述从设备端发送所述通信资源之后,还包括:在第N次同步消息广播完成后到第N+1次同步消息广播开始之间的时间间隔内的所述第一偏移时间内,通过所述第一信道接收从设备 端发送的资源请求,且在所述第N次同步消息广播完成后到所述第N+1次同步消息广播开始之间的时间间隔内的所述第二偏移时间内,接入所述第二信道以与所述从设备端进行交互;其中,N为大于或等于1的整数。The synchronous communication method according to claim 8, wherein the communication resource comprises a second channel; the first offset time and the second offset time do not overlap, and the first offset time earlier than the second offset time; after the sending the communication resource to the slave device through the first channel, further includes: after the Nth synchronization message broadcast is completed to the N+1th synchronization During the first offset time in the time interval between the start of message broadcasting, the resource request sent from the device end is received through the first channel, and after the Nth synchronization message broadcasting is completed, the During the second offset time within the time interval between the start of N+1 synchronization message broadcasts, access the second channel to interact with the slave device; wherein, N is greater than or equal to 1 Integer.
  10. 根据权利要求9所述的同步通信方法,其特征在于,在不同所述从设备端的所述第二偏移时间不重叠的情况下;所述在第N次同步消息广播完成后到第N+1次同步消息广播开始之间的时间间隔内的所述第一偏移时间内,通过所述第一信道接收从设备端发送的资源请求,且在所述第N次同步消息广播完成后到所述第N+1次同步消息广播开始之间的时间间隔内的所述第二偏移时间内,接入所述第二信道以与所述从设备端进行交互,包括:The synchronous communication method according to claim 9, wherein, in the case that the second offset times of different slave devices do not overlap; Within the first offset time within the time interval between the start of one synchronization message broadcast, the resource request sent from the device is received through the first channel, and the resource request is received after the Nth synchronization message broadcast is completed. During the second offset time within the time interval between the start of the N+1th synchronization message broadcast, accessing the second channel to interact with the slave device includes:
    在所述第N次所述同步消息广播完成后到所述第N+1次同步消息广播开始之间的时间间隔内的所述第一偏移时间内,通过所述第一信道接收从设备端发送的资源请求,且在所述第N次同步消息广播完成后到所述第N+1次同步消息广播开始之间的时间间隔内的不同所述从设备端的所述第二偏移时间内,接入不同所述从设备端的所述第二信道以与不同所述从设备端进行交互。Within the first offset time within the time interval between the completion of the Nth synchronization message broadcast and the N+1th synchronization message broadcast start, the slave device is received through the first channel The resource request sent by the slave device, and the second offset time of the different slave devices within the time interval between the completion of the Nth synchronization message broadcast and the start of the N+1th synchronization message broadcast Inside, access the second channel of the different slave devices to interact with the different slave devices.
  11. 根据权利要求1所述的同步通信方法,其特征在于,所述响应于所述资源请求,为所述从设备端分配用于与所述主设备端交互的通信资源,包括:The synchronous communication method according to claim 1, wherein, 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 established, allocate 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 that is allowed to interact with the master device, and the number of slave devices that have been allocated communication resources does not reach the preset number upper limit of .
  12. 根据权利要求1所述的同步通信方法,其特征在于,在所述在同步消息广播完成后的第一偏移时间内,通过广播所述同步消息的第一信道接收从设备端发送的资源请求之前,还包括:The synchronous communication method according to claim 1, wherein, within the first offset time after the broadcast of the synchronization message is completed, the resource request sent from the device is received through the first channel that broadcasts the synchronization message Before, also included:
    确定相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔满足预设的时长条件;所述时长条件包括:所述时间间隔 与所述第一偏移时间的时间长度的差值大于或等于预设时长,且所述时间间隔与所述第二偏移时间的时间长度的差值大于或等于所述预设时长。It is determined that the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages satisfies a preset duration condition; the duration condition includes: the time interval and the first offset The difference between the time lengths of time is greater than or equal to the preset time length, 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 length.
  13. 根据权利要求12所述的同步通信方法,其特征在于,所述预设时长大于或等于完整接收所述资源请求的时长。The synchronous communication method according to claim 12, wherein the preset duration is greater than or equal to the duration of completely receiving the resource request.
  14. 根据权利要求12所述的同步通信方法,其特征在于,所述时长条件还包括:所述时间间隔大于等于所述第一偏移时间的时间长度与所述第二偏移时间的时间长度之和。The synchronous communication method according to claim 12, wherein the time length condition further comprises: the time interval is greater than or equal to the time length of the first offset time and the time length of the second offset time and.
  15. 根据权利要求1所述的同步通信方法,其特征在于,所述第一偏移时间和所述第二偏移时间不重叠且不同所述从设备端的所述第二偏移时间不重叠;所述通过所述第一信道向所述从设备端发送所述通信资源之后,还包括:The synchronous communication method according to claim 1, wherein the first offset time and the second offset time do not overlap, and the second offset time of the different slave devices does not overlap; the After the sending of the communication resource to the slave device through the first channel, the method further includes:
    在第N次所述同步消息广播完成后到第N+1次同步消息广播开始之间的时间间隔内的所述第一偏移时间内,通过所述第一信道接收从设备端发送的所述资源请求,且在所述第N次同步消息广播完成后到所述第N+1次同步消息广播开始之间的时间间隔内的不同所述从设备端的所述第二偏移时间内,通过所述第一信道与不同所述从设备端进行交互。During the first offset time within the time interval between the completion of the Nth broadcast of the synchronization message and the start of the N+1th synchronization message broadcast, the data sent from the device side is received through the first channel. the resource request, and 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 offset time of the slave device side is different, Interact with different slave devices through the first channel.
  16. 一种同步通信方法,其特征在于,应用于从设备端,所述方法包括:A synchronous communication method, characterized in that it is applied to a slave device, the method comprising:
    在接收到主设备端广播的同步消息后的第一偏移时间内,通过接收所述同步消息的第一信道向所述主设备端发送资源请求;Within the first offset time after receiving the synchronization message broadcast by the master device, send a resource request to the master device through the first channel for receiving the synchronization message;
    通过所述第一信道从所述主设备端接收用于与所述主设备端交互的通信资源;所述通信资源包括第二偏移时间;Receive communication resources for interacting with the master device from the master device through the first channel; the communication resources include a second offset time;
    其中,所述第一偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内,所述第二偏移时间在相邻两次同步消息中前一次同步消息广播完成到后一次同步消息广播开始之间的时间间隔内。The first offset time is within the time interval between the completion of the broadcast of the previous synchronization message and the start of the broadcast of the next synchronization message in two adjacent synchronization messages, and the second offset time is between the two adjacent synchronization messages. The time interval between the completion of the previous synchronization message broadcast and the start of the next synchronization message broadcast in the message.
  17. 根据权利要求16所述的同步通信方法,其特征在于,所述通信资源还包括第二信道。The synchronous communication method according to claim 16, wherein the communication resource further comprises a second channel.
  18. 根据权利要求17所述的同步通信方法,其特征在于,所述通过所述第一信道接收用于与所述主设备端通信的资源之后,还包括:The synchronous communication method according to claim 17, wherein after receiving the resource for communicating with the master device through the first channel, the method further comprises:
    在接收到所述主设备端广播的同步消息后的第二偏移时间内,接入所述第二信道以与所述主设备端进行交互。Access the second channel to interact with the master device within a second offset time after receiving the synchronization message broadcast by the master device.
  19. 根据权利要求18所述的同步通信方法,其特征在于,所述在接收到所述主设备端广播的同步消息后的第二偏移时间内,接入所述第二信道以与所述主设备端进行交互,包括:The synchronous communication method according to claim 18, wherein, within a second offset time after receiving the synchronization message broadcast by the master device, accessing the second channel to communicate with the master Interaction on the device side, including:
    连续多次在接收到所述同步消息后的第二偏移时间内,接入所述第二信道并发送交互消息;或者,在接收到所述同步消息后的第二偏移时间内,接入所述第二信道并发送交互消息,若未接收到所述交互消息的应答消息,在下次接收到所述同步消息后的第二偏移时间内,接入所述第二信道并重新发送所述交互消息。Access the second channel and send interactive messages within the second offset time after receiving the synchronization message for multiple consecutive times; or, within the second offset time after receiving the synchronization message, receive Enter the second channel and send the interactive message, if the response message of the interactive message is not received, within the second offset time after the next time the synchronization message is received, access the second channel and re-send the interactive message.
  20. 根据权利要求19所述的同步通信方法,其特征在于,所述在接收到主设备端广播的同步消息后的第一偏移时间内,通过接收所述同步消息的第一信道向所述主设备端发送资源请求之前,还包括:The synchronous communication method according to claim 19, wherein, within a first offset time after receiving the synchronization message broadcasted by the master device, send the message to the master device through the first channel on which the synchronization message is received. Before the device sends the resource request, it also includes:
    确定尚未分配到与所述主设备端交互的通信资源。It is determined that communication resources that have not been allocated to interact with the master device end.
  21. 根据权利要求16或17所述的同步通信方法,其特征在于,所述第一偏移时间和所述第二偏移时间不重叠;和/或,不同所述从设备端的所述第二偏移时间不重叠。The synchronous communication method according to claim 16 or 17, wherein the first offset time and the second offset time do not overlap; and/or the second offset time on the slave device side is different The shift times do not overlap.
  22. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    至少一个处理器;at least one processor;
    以及,与所述至少一个处理器通信连接的存储器;and, a memory communicatively coupled to the at least one processor;
    其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至15中任一所述的同步通信方法,所述主设备端为所述电子设备,或者,能够执行如权利要求16至21中任一所述的同步通信方法,所述从设备端为所述电 子设备。wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute any one of claims 1 to 15 In the synchronous communication method, the master device end is the electronic device, or, the synchronous communication method according to any one of claims 16 to 21 can be executed, and the slave device end is the electronic device.
  23. 一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至15中任一项所述的同步通信方法,或者,能够执行如权利要求16至21中任一所述的同步通信方法。A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the synchronous communication method described in any one of claims 1 to 15 is implemented, or, the computer program can be executed as claimed in claims The synchronous communication method described in any one of 16 to 21.
PCT/CN2020/115369 2020-09-15 2020-09-15 Synchronous communication method, electronic device and storage medium WO2022056682A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080094515.6A CN114982259A (en) 2020-09-15 2020-09-15 Synchronous communication method, electronic device, and storage medium
PCT/CN2020/115369 WO2022056682A1 (en) 2020-09-15 2020-09-15 Synchronous communication method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/115369 WO2022056682A1 (en) 2020-09-15 2020-09-15 Synchronous communication method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
WO2022056682A1 true WO2022056682A1 (en) 2022-03-24

Family

ID=80777484

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/115369 WO2022056682A1 (en) 2020-09-15 2020-09-15 Synchronous communication method, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN114982259A (en)
WO (1) WO2022056682A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115103317A (en) * 2022-05-19 2022-09-23 恒玄科技(上海)股份有限公司 Wireless communication method and assembly for audio sharing to a destination device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170353944A1 (en) * 2016-06-01 2017-12-07 Lg Electronics Inc. Method for broadcasting to unspecified entity in wireless communication system and device for the same
CN108055703A (en) * 2017-12-27 2018-05-18 京信通信系统(中国)有限公司 A kind of channel occupancy method, main equipment and slave device
US20180220384A1 (en) * 2017-01-31 2018-08-02 Dialog Semiconductor B.V. System and Method for Clock Synchonisation on a Wireless Network
CN108616818A (en) * 2018-03-23 2018-10-02 南京中感微电子有限公司 A kind of data repeating method, Bluetooth slave devices and wireless communication system
CN109429206A (en) * 2018-05-30 2019-03-05 展讯通信(上海)有限公司 A kind of Bluetooth data transfer method, apparatus and user equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170353944A1 (en) * 2016-06-01 2017-12-07 Lg Electronics Inc. Method for broadcasting to unspecified entity in wireless communication system and device for the same
US20180220384A1 (en) * 2017-01-31 2018-08-02 Dialog Semiconductor B.V. System and Method for Clock Synchonisation on a Wireless Network
CN108055703A (en) * 2017-12-27 2018-05-18 京信通信系统(中国)有限公司 A kind of channel occupancy method, main equipment and slave device
CN108616818A (en) * 2018-03-23 2018-10-02 南京中感微电子有限公司 A kind of data repeating method, Bluetooth slave devices and wireless communication system
CN109429206A (en) * 2018-05-30 2019-03-05 展讯通信(上海)有限公司 A kind of Bluetooth data transfer method, apparatus and user equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115103317A (en) * 2022-05-19 2022-09-23 恒玄科技(上海)股份有限公司 Wireless communication method and assembly for audio sharing to a destination device

Also Published As

Publication number Publication date
CN114982259A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
CN111935815B (en) Synchronous communication method, electronic device, and storage medium
CN110149726B (en) Information transmission method and terminal
WO2021018185A1 (en) Uplink transmission resource determination method, apparatus and system
CN111107526B (en) Master-slave switching method, device and system for standard time slot dual-wireless Bluetooth device
WO2020221111A1 (en) Scheduling switching method and apparatus
EP2060017A2 (en) Method for managing the power in the wireless network
US8259618B2 (en) Method for managing the power in the wireless network
JP3836075B2 (en) Method for increasing data throughput in a communication system
WO2022056682A1 (en) Synchronous communication method, electronic device and storage medium
CN112188415B (en) Low-power-consumption Bluetooth synchronous data streaming transmission method and device
EP4012961A1 (en) Uci transmission method, device, terminal and base station
CN105165082A (en) Resource scheduling method, apparatus and system
JP7216745B2 (en) Method for specifying length of ambiguous period, terminal and network side equipment
CN111757286A (en) Body area network emergency data time slot distribution method based on interception mechanism
CN105141483A (en) Multi-node network minimum communication interval measurement method based on CAN bus
WO2022094813A1 (en) Synchronous communication method, electronic device, and storage medium
CN106254349B (en) Method for field real-time communication on bus
KR100918003B1 (en) Reliable SYSTEM for Broadcast Communication Applying ACK Message and Method thereof
CN113260029A (en) Terminal device, network side device and communication method
CN114503721A (en) Hybrid automatic repeat request feedback method and device
WO2023279359A1 (en) Communication method and apparatus
US11937276B1 (en) Method and device for sidelink communication
WO2016178343A1 (en) Intra-body communication device, intra-body communication method, and program
WO2024007882A1 (en) Communication method and communication apparatus
CN117693031A (en) Wireless communication scheduling method, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20953543

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20953543

Country of ref document: EP

Kind code of ref document: A1