WO2021226974A1 - Data broadcasting method, method and apparatus for receiving broadcast data and terminal device - Google Patents

Data broadcasting method, method and apparatus for receiving broadcast data and terminal device Download PDF

Info

Publication number
WO2021226974A1
WO2021226974A1 PCT/CN2020/090389 CN2020090389W WO2021226974A1 WO 2021226974 A1 WO2021226974 A1 WO 2021226974A1 CN 2020090389 W CN2020090389 W CN 2020090389W WO 2021226974 A1 WO2021226974 A1 WO 2021226974A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
channel
designated
broadcast
channels
Prior art date
Application number
PCT/CN2020/090389
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 PCT/CN2020/090389 priority Critical patent/WO2021226974A1/en
Publication of WO2021226974A1 publication Critical patent/WO2021226974A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/04Error control

Definitions

  • the designated data is formed into data packets, and the data packets are broadcasted in turn through a plurality of different designated broadcast channels, wherein different designated broadcast channels correspond to different channel numbers, and the designated broadcast channels pass through each designated broadcast channel.
  • the broadcasted data packets respectively carry different synchronization information, and each of the synchronization information respectively includes the channel sequence number of the designated broadcast channel for the next transmission of the data packet, and the data packet is used to be received by the receiving end.
  • the receiving end is enabled to switch the current receiving channel to a channel with the same sequence number as the channel through the synchronization information of the data packet.
  • An embodiment of the present invention also provides a device for receiving broadcast data, and the device includes:
  • the transmitting end in the broadcasting equipment, the transmitting end (TX end) first obtains the designated data.
  • the designated data is the effective data for broadcast communication between the broadcasting equipment and the receiving device. These effective data may include control commands, audio And other data.
  • the valid data is formed into a data packet that can be transmitted in the channel, for example, the valid data and synchronization information are packaged together to form the above-mentioned data packet; each time a data packet is formed, the sending end broadcasts the data packet through a designated broadcast channel Out, broadcast and send in this way until each different designated broadcast channel is broadcast once.
  • the above-mentioned round broadcast transmission can be broadcast one by one in the specified order until each designated broadcast channel is broadcast once, or it can be broadcast one by one at random until each The designated broadcast channels are broadcast once.
  • the above-mentioned designated broadcast channel is a preset broadcast channel, and different broadcast channels correspond to different channel serial numbers.
  • the aforementioned synchronization information may also include the sequence numbers of multiple designated broadcast channels and the channel sequence of the alternate broadcast.
  • the synchronization information is parsed to obtain the designated broadcast channel that will broadcast the data next time. Sequence number, as well as the number and order of the designated broadcast channels of the broadcast in turn, the calculator starts timing.
  • the receiving end switches the receiving channel to the next receiving channel, if no new data packet is received within the specified time, it will be parsed according to the The above-mentioned turn-by-turn broadcast channel sequence automatically switches the current receiving channel to the next receiving channel, so that the receiving channel of the receiving end corresponds to the designated broadcast channel of the transmitting end, so that new data packets can be received continuously.
  • Step S02 Determine whether the data amount of the data to be sent is greater than a second preset value
  • the acquiring data unit 100 is used to acquire designated data
  • the broadcast data unit 200 is used to form the designated data into data packets, and broadcast the data packets through a plurality of different designated broadcast channels in turn, wherein different designated broadcast channels correspond to different channel sequence numbers,
  • the data packets broadcast through each of the designated broadcast channels respectively carry different synchronization information, and each of the synchronization information respectively includes the channel sequence number of the designated broadcast channel for transmitting the data packet next time, and the data packet is used for At the receiving end, so that the receiving end switches the current receiving channel to the channel with the same channel sequence number through the synchronization information of the data packet.
  • data packets are broadcast in turn through multiple different designated broadcast channels, and in the process of broadcast in turn through different designated broadcast channels, the order of each designated broadcast channel can be set or randomly determined, specifically ,
  • the above specified data and the first synchronization information are packaged together to form the first data packet, and then broadcast through the first specified broadcast channel.
  • the first synchronization information includes the channel number of the second specified broadcast channel. For example, the channel number of the second designated broadcast channel is "6".
  • the preset time can be consistent with the time when the broadcasting device switches the designated broadcast channel, and then the receiving end switches the current receiving channel to the next receiving channel, and the next receiving channel is synchronized with the above-obtained synchronization information
  • the channel sequence number in is the same, that is, it is switched to the same receiving channel as the designated broadcast channel for sending the data packet next time.
  • the receiving device may have multiple, that is, multiple receiving devices can simultaneously receive the broadcast broadcast from the broadcast device. Packets.
  • the present invention also proposes a terminal device, which includes a memory, a processor, and at least one application program stored in the memory and configured to be executed by the processor, the application program being configured to execute a data broadcasting method, or The method of receiving broadcast data.
  • the data broadcasting method includes the following steps: acquiring designated data; forming the designated data into data packets, and broadcasting the data packets through a plurality of different designated broadcast channels in turn, wherein the different designated broadcast channels Corresponding to different channel sequence numbers, the data packets broadcast through each of the designated broadcast channels respectively carry different synchronization information, and each of the synchronization information respectively includes the channel sequence number of the designated broadcast channel for sending the data packet next time
  • the data packet is used to be received by the receiving end, so that the receiving end switches the current receiving channel to the channel with the same channel sequence number through the synchronization information of the data packet.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Disclosed in the present invention are a data broadcasting method, a method and apparatus for receiving broadcast data and a terminal device. The data broadcasting method comprises: acquiring designated data to form data packets; and broadcasting same in turn by means of different designated broadcasting channels, wherein the data packets broadcast by means of each channel carrying different synchronization information respectively, each synchronization information comprises a channel sequence number to be sent next time, and the data packets are received by a receiving end, so that the receiving end switches a current receiving channel to a channel with the same channel sequence number.

Description

数据广播方法、接收广播数据的方法、装置及终端设备Data broadcasting method, method, device and terminal equipment for receiving broadcasting data 技术领域Technical field
本发明涉及通信广播技术领域,具体涉及一种数据广播方法、接收广播数据的方法、装置及终端设备。The present invention relates to the technical field of communication and broadcasting, and in particular to a data broadcasting method, a method, device and terminal equipment for receiving broadcasting data.
背景技术Background technique
现如今飞速发展的物联网行业,越来越多的应用场景需要广播技术。在一个物联网应用场景中,当需要用到一个设备要发送数据信息或者控制命令给周围的多个设备,并要求接收设备能够快速实现响应动作,且不需要接收设备回复确认信息时,这时候通常会选择广播的通信方式来实现。Nowadays, in the rapidly developing Internet of Things industry, more and more application scenarios require broadcasting technology. In an IoT application scenario, when a device is needed to send data information or control commands to multiple surrounding devices, and the receiving device is required to quickly implement response actions, and the receiving device does not need to reply confirmation information, this time Usually choose the broadcast communication method to achieve.
无线局域网WLAN中有很多标准的通信协议,而帧广播(Broadcast)通信方式是IEEE802.11协议簇中的一种。但该协议是一种单向单频率的相对不可靠的通信协议,而基于IEEE802.11协议的传统广播技术,通常可靠性比较低,无线广播时容易受到周围环境的影响,广播成功率极低,难以应用于一些短距离、数据量大和快速通信的场景。There are many standard communication protocols in the wireless local area network WLAN, and the frame broadcast (Broadcast) communication method is one of the IEEE802.11 protocol suites. However, this protocol is a relatively unreliable communication protocol with one-way and one-frequency. The traditional broadcasting technology based on IEEE802.11 protocol usually has relatively low reliability and is easily affected by the surrounding environment during wireless broadcasting, and the broadcasting success rate is extremely low. , It is difficult to apply to some short-distance, large data volume and fast communication scenarios.
技术问题technical problem
本发明的主要目的为提供一种数据广播方法、接收广播数据的方法、装置及终端设备,旨在解决现有技术中单频的广播通信方式可靠性低的技术问题。The main purpose of the present invention is to provide a data broadcasting method, a method, a device and a terminal device for receiving broadcast data, and aims to solve the technical problem of low reliability of single-frequency broadcast communication methods in the prior art.
技术解决方案Technical solutions
为达以上目的,本发明实施例提出一种数据广播方法,所述方法包括以下步骤:To achieve the above objective, an embodiment of the present invention provides a data broadcasting method, which includes the following steps:
获取指定数据;Obtain specified data;
将所述指定数据形成数据包,并将所述数据包分别通过多个不同的指定广播信道轮流广播出去,其中,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包的指定广播信道的信道序号,所述数据包用于被接收端接收,以使得所述接收端通过所述数据包的同步信息将当前的接收信道切换成与所述信道序号相同的信道。The designated data is formed into data packets, and the data packets are broadcasted in turn through a plurality of different designated broadcast channels, wherein different designated broadcast channels correspond to different channel numbers, and the designated broadcast channels pass through each designated broadcast channel. The broadcasted data packets respectively carry different synchronization information, and each of the synchronization information respectively includes the channel sequence number of the designated broadcast channel for the next transmission of the data packet, and the data packet is used to be received by the receiving end. The receiving end is enabled to switch the current receiving channel to a channel with the same sequence number as the channel through the synchronization information of the data packet.
本发明实施例同时提出一种接收广播数据的方法,包括:The embodiment of the present invention also proposes a method for receiving broadcast data, including:
接收发送端通过指定广播信道所广播发出的数据包,其中,当前的接收信道与所述指定广播信道的信道序号相同,所述数据包由所述发送端对指定数据处理后获得,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包时的指定广播信道的信道序号;Receive a data packet broadcasted by the sending end through a designated broadcast channel, where the current receiving channel is the same as the channel sequence number of the designated broadcast channel, and the data packet is obtained by the sending end after processing the designated data. The designated broadcast channels correspond to different channel sequence numbers, the data packets broadcast through each of the designated broadcast channels carry different synchronization information, and each of the synchronization information includes the designation when the data packet is sent next time. The channel number of the broadcast channel;
解析所述数据包得到所述指定数据以及所述同步信息,并启动计时器开始计时;Parse the data packet to obtain the designated data and the synchronization information, and start a timer to start timing;
当所述计时器达到预设时间,依据所述同步信息将当前的接收信道切换成与所述同步信息中的信道序号相同的信道。When the timer reaches a preset time, the current receiving channel is switched to a channel with the same channel sequence number in the synchronization information according to the synchronization information.
本发明实施例同时提出一种数据广播装置,所述装置包括:The embodiment of the present invention also proposes a data broadcasting device, and the device includes:
获取数据单元,用于获取指定数据;Get data unit, used to get specified data;
广播数据单元,用于将所述指定数据形成数据包,并将所述数据包分别通过多个不同的指定广播信道轮流广播出去,其中,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包的指定广播信道的信道序号,所述数据包用于被接收端接收,以使得所述接收端通过所述数据包的同步信息将当前的接收信道切换成与所述信道序号相同的信道。The broadcast data unit is used to form the designated data into a data packet, and broadcast the data packets through a plurality of different designated broadcast channels in turn, wherein different designated broadcast channels correspond to different channel sequence numbers. The data packets broadcast by each of the designated broadcast channels respectively carry different synchronization information, and each of the synchronization information respectively includes the channel sequence number of the designated broadcast channel for sending the data packet next time, and the data packet is used for Received by the receiving end, so that the receiving end switches the current receiving channel to a channel with the same channel sequence number through the synchronization information of the data packet.
本发明实施例还提出一种接收广播数据的装置,所述装置包括:An embodiment of the present invention also provides a device for receiving broadcast data, and the device includes:
接收数据单元,用于接收发送端通过指定广播信道所广播发出的数据包,其中,当前的接收信道与所述指定广播信道的信道序号相同,所述数据包由所述发送端对指定数据处理后获得,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包时的指定广播信道的信道序号;The receiving data unit is used to receive a data packet broadcasted by the sending end through a designated broadcast channel, wherein the current receiving channel is the same as the channel sequence number of the designated broadcast channel, and the data packet is processed by the sending end on the designated data It is obtained later that the different designated broadcast channels correspond to different channel sequence numbers, the data packets broadcast through each designated broadcast channel carry different synchronization information, and each of the synchronization information includes the next transmission station. The channel sequence number of the designated broadcast channel when describing the data packet;
解析数据单元,用于解析所述数据包得到所述指定数据以及所述同步信息,并启动计时器开始计时;A parsing data unit, configured to parse the data packet to obtain the designated data and the synchronization information, and start a timer to start timing;
切换信道单元,用于当所述计时器达到预设时间,依据所述同步信息将当前的接收信道切换成与所述同步信息中的信道序号相同的信道。The channel switching unit is configured to switch the current receiving channel to the channel with the same channel sequence number in the synchronization information according to the synchronization information when the timer reaches a preset time.
本发明实施例还提出一种终端设备,其包括存储器、处理器和至少一个被存储在所述存储器中并被配置为由所述处理器执行的应用程序,所述应用程序被配置为用于执行前述数据广播方法,或接收广播数据的方法。An embodiment of the present invention also provides a terminal device, which includes a memory, a processor, and at least one application program stored in the memory and configured to be executed by the processor, and the application program is configured for Perform the aforementioned data broadcasting method, or a method of receiving broadcast data.
有益效果Beneficial effect
本发明提出了一种数据广播方法、接收广播数据的方法、装置及终端设备,该方法中,通过切换信道轮流将数据包进行广播,并通过接收端对应切换至相应的信道来接收数据包,这样将传统的单频率发送增加成多个频率发送,通过发送端与接收端多次对应切换至相同频率来实现通信传输,进而大大提高通信传输的可靠性以及有效性,避免由于单频率一次发送产生撞包丢包而造成传输不成功,从而没法完成广播通信的情况。The present invention provides a data broadcasting method, a method, device and terminal equipment for receiving broadcast data. In the method, data packets are broadcast in turn by switching channels, and the receiving end is correspondingly switched to the corresponding channel to receive the data packets, In this way, the traditional single-frequency transmission is increased to multiple frequency transmissions, and the communication transmission is realized by switching to the same frequency multiple times by the transmitting end and the receiving end, thereby greatly improving the reliability and effectiveness of communication transmission, and avoiding one-time transmission due to a single frequency. A situation in which packet collision and packet loss result in unsuccessful transmission and thus unable to complete broadcast communication.
附图说明Description of the drawings
图1 是本发明一实施例的数据广播方法的流程示意图;FIG. 1 is a schematic flowchart of a data broadcasting method according to an embodiment of the present invention;
图2 是本发明一实施例的接收广播数据的方法的流程示意图Figure 2 is a schematic flowchart of a method for receiving broadcast data according to an embodiment of the present invention
图3是本发明一实施例的数据广播装置的结构示意框图;3 is a schematic block diagram of the structure of a data broadcasting device according to an embodiment of the present invention;
图4是本发明一实施例的接收广播数据的装置的结构示意框图;4 is a schematic block diagram of the structure of an apparatus for receiving broadcast data according to an embodiment of the present invention;
图5 是本发明的存储介质的一实施例的结构示意框图;5 is a schematic block diagram of the structure of an embodiment of a storage medium of the present invention;
图6 是本发明的计算机设备的一实施例的结构示意框图。Fig. 6 is a schematic structural block diagram of an embodiment of a computer device of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the objectives, functional characteristics and advantages of the present invention will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的最佳实施方式The best mode of the present invention
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
本发明实施例的数据广播方法及接受广播数据的方法,可以应用于各种电子设备,包括终端设备(如手机、平板、计算机等)、智能家居设备(如音响设备、智能电视等)、机器人设备、安监设备(如监控装置等)等。以下以应用于终端设备为例进行详细说明。The data broadcast method and the method for receiving broadcast data in the embodiments of the present invention can be applied to various electronic devices, including terminal devices (such as mobile phones, tablets, computers, etc.), smart home devices (such as audio equipment, smart TVs, etc.), and robots. Equipment, safety monitoring equipment (such as monitoring devices, etc.), etc. The following takes the application to the terminal device as an example for detailed description.
参照图1,提出本发明的数据广播方法一实施例,所述方法包括以下步骤:1, an embodiment of the data broadcasting method of the present invention is proposed. The method includes the following steps:
步骤S1:获取指定数据;Step S1: Obtain designated data;
步骤S2:将所述指定数据形成数据包,并将所述数据包分别通过多个不同的指定广播信道轮流广播出去,其中,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包的指定广播信道的信道序号,所述数据包用于被接收端接收,以使得所述接收端通过所述数据包的同步信息将当前的接收信道切换成与所述信道序号相同的信道。Step S2: Form the designated data into data packets, and broadcast the data packets through a plurality of different designated broadcast channels in turn, wherein different designated broadcast channels correspond to different channel sequence numbers, and the designated broadcast channels correspond to different channel sequence numbers. The data packets broadcast by the designated broadcast channel respectively carry different synchronization information, and each of the synchronization information respectively includes the channel sequence number of the designated broadcast channel for sending the data packet next time, and the data packet is used by the receiving end Receiving, so that the receiving end switches the current receiving channel to a channel with the same channel sequence number through the synchronization information of the data packet.
本实施例中,上述数据广播方法可用于各种IoT物联网应用场景,例如智能灯控、多媒体广播等场景,具体通过基于无线局域网的通信协议的广播技术实现。In this embodiment, the above-mentioned data broadcasting method can be used in various IoT application scenarios, such as scenarios such as smart light control, multimedia broadcasting, etc., and is specifically implemented by broadcasting technology based on a communication protocol of a wireless local area network.
如上述步骤S1-S2所述,在广播设备中,发送端(TX端)首先获取指定数据,上述指定数据为广播设备与接收设备进行广播通信的有效数据,这些有效数据可包括控制命令、音频等数据。然后将这些有效数据形成可在信道中进行传输的数据包,例如将有效数据与同步信息一起打包形成上述数据包;每形成一数据包,发送端即通过一个指定广播信道将该数据包广播发送出去,如此轮流广播发送直至每个不同的指定广播信道均广播发送一次,上述轮流广播发送可以为按指定顺序依次逐个广播直至每个指定广播信道均广播一次,也可以为随机逐个广播直至每个指定广播信道均广播一次。本实施例中,上述指定广播信道为预先设定的广播信道,不同的广播信道对应不同的信道序号,例如序号1~13的广播信道分别为1信道、2信道、3信道、4信道、5信道、6信道、7信道、8信道、9信道、10信道、11信道、12信道、13信道,则上述多个不同的指定广播信道可以为1信道、6信道以及11信道,不同的指定广播信道采用不同的频率发送数据,如1信道、6信道以及11信道分别对应低中高频率2.412GHz 、2.437GHz、2.462GHz。上述每个同步信息均分别包括轮流发送中下一次用于发送数据包的指定广播信道的信道序号,上述数据包用于被接收设备的接收端(RX端)接收,在广播设备将数据包进行广播后,接收设备可通过与指定广播信道相同的接收信道接收数据包,然后解析该数据包,得到同步信息,再依据同步信息将当前接收信道切换成与广播设备下一次将要切换的指定广播信道一致的信道,以便在广播设备下一次广播出数据包时可接收到该数据包。As mentioned in the above steps S1-S2, in the broadcasting equipment, the transmitting end (TX end) first obtains the designated data. The designated data is the effective data for broadcast communication between the broadcasting equipment and the receiving device. These effective data may include control commands, audio And other data. Then the valid data is formed into a data packet that can be transmitted in the channel, for example, the valid data and synchronization information are packaged together to form the above-mentioned data packet; each time a data packet is formed, the sending end broadcasts the data packet through a designated broadcast channel Out, broadcast and send in this way until each different designated broadcast channel is broadcast once. The above-mentioned round broadcast transmission can be broadcast one by one in the specified order until each designated broadcast channel is broadcast once, or it can be broadcast one by one at random until each The designated broadcast channels are broadcast once. In this embodiment, the above-mentioned designated broadcast channel is a preset broadcast channel, and different broadcast channels correspond to different channel serial numbers. For example, broadcast channels with serial numbers 1 to 13 are 1 channel, 2 channel, 3 channel, 4 channel, and 5 Channel, 6 channel, 7 channel, 8 channel, 9 channel, 10 channel, 11 channel, 12 channel, 13 channel, the above multiple different designated broadcast channels can be 1 channel, 6 channel and 11 channel, different designated broadcast Channels use different frequencies to send data, such as channel 1, channel 6, and channel 11 corresponding to low, medium and high frequencies of 2.412GHz, 2.437GHz, and 2.462GHz, respectively. Each of the above synchronization information includes the channel sequence number of the designated broadcast channel used to send the data packet next time in the round robin transmission. The above data packet is used to be received by the receiving end (RX end) of the receiving device. After broadcasting, the receiving device can receive the data packet through the same receiving channel as the designated broadcasting channel, and then parse the data packet to obtain synchronization information, and then switch the current receiving channel to the designated broadcasting channel that the broadcasting equipment will switch to next based on the synchronization information A consistent channel so that the data packet can be received the next time the broadcast device broadcasts the data packet.
这样通过切换信道轮流将数据包进行广播,并通过接收端对应切换至相应的信道来接收广播的数据包,将传统的单频率发送增加成多个频率发送,通过发送端与接收端多次对应切换至相同频率来实现通信传输,进而大大提高通信传输的可靠性,避免由于单频率一次发送产生撞包而造成传输不成功,没法完成广播通信的情况。In this way, the data packets are broadcast in turn by switching channels, and the receiving end is correspondingly switched to the corresponding channel to receive the broadcast data packets. The traditional single frequency transmission is increased to multiple frequency transmissions, and the transmitting end and the receiving end correspond multiple times. Switch to the same frequency to achieve communication transmission, thereby greatly improving the reliability of communication transmission, and avoiding unsuccessful transmission and failure to complete broadcast communication due to packet collision caused by a single frequency transmission.
在一个实施例中,上述步骤S2,包括:In an embodiment, the above step S2 includes:
步骤S21:将所述指定数据与第一个所述同步信息打包形成第一个所述数据包,将第一个所述数据包通过第一个所述指定广播信道广播出去,所述第一个同步信息中包括有第二个所述指定广播信道的信道序号,使得所述接收端在接收所述数据包后将当前的所述接收信道切换至与所述信道序号一致的信道;Step S21: Pack the designated data and the first synchronization information to form the first data packet, and broadcast the first data packet through the first designated broadcast channel. The synchronization information includes the second channel sequence number of the designated broadcast channel, so that the receiving end switches the current receiving channel to a channel consistent with the channel sequence number after receiving the data packet;
步骤S22:在预设时间段内将第一个所述指定广播信道切换至第二个所述指定广播信道,再次将所述指定数据与第二个所述同步信息打包形成第二个所述数据包,并将第二个所述数据包通过第二个所述指定广播信道广播出去,重复切换所述指定广播信道并发送所述数据包直至遍历所有的所述指定广播信道。Step S22: Switch the first designated broadcast channel to the second designated broadcast channel within a preset time period, and pack the designated data and the second synchronization information again to form the second designated broadcast channel. Data packet, and broadcast the second said data packet through the second said designated broadcast channel, repeatedly switch said designated broadcast channel and send said data packet until all the designated broadcast channels are traversed.
本实施例中,通过多个不同的指定广播信道轮流将数据包进行广播,且在通过不同指定广播信道轮流广播的过程中,各个指定广播信道的顺序可设定也可以随机确定,具体而言,先将上述指定数据与第一个同步信息一起打包形成第一个数据包,然后通过第一个指定广播信道广播出去,第一个同步信息中包括有第二个指定广播信道的信道序号,例如第二个指定广播信道的信道序号为“6”,接收端接收到第一个数据包后,解析该数据包,然后获取上述指定数据以及同步信息,得到第二个指定广播信道的信道序号“6”,同时通过定时器计算,在预设时间段内将当前的接收信道切换成信道序号为“6”的信道;与此同时,在预设时间段内,发送端将第一个指定广播信道切换成第二个指定广播信道,再次将上述指定数据与第二个同步信息一起打包形成第二个数据包,第二个同步信息包括有第三个指定广播信道的信道序号,然后将第二个数据包通过第二指定广播信道进行广播,由于发送端与接收端均切换至同一种信道,使得接收端可接收到第二个指定广播信道发出的数据包。如此重复上述步骤,直到将数据包遍历所有的指定广播信道广播发出,上述预设时间段可设置为较小时间长度,这样切换信道的时间几近于无,使得接收端相当于同时接收到不同信道发送来的数据包,通过切换不同信道发送,避免信道干扰,且即便在发送过程中个别指定广播信道中的数据包丢失使得接收端接收不到,也可以通过其余指定广播信道接收到数据包,从而在效率较高的情况下保证了发送端与接收端的通信,大大提高了通信的可靠性。In this embodiment, data packets are broadcast in turn through multiple different designated broadcast channels, and in the process of broadcast in turn through different designated broadcast channels, the order of each designated broadcast channel can be set or randomly determined, specifically , The above specified data and the first synchronization information are packaged together to form the first data packet, and then broadcast through the first specified broadcast channel. The first synchronization information includes the channel number of the second specified broadcast channel. For example, the channel number of the second designated broadcast channel is "6". After receiving the first data packet, the receiving end parses the data packet, and then obtains the above-mentioned designated data and synchronization information to obtain the channel number of the second designated broadcast channel "6", at the same time calculated by the timer, the current receiving channel will be switched to the channel numbered "6" within the preset time period; at the same time, within the preset time period, the sender will specify the first one The broadcast channel is switched to the second designated broadcast channel, and the above designated data and the second synchronization information are packaged together to form a second data packet. The second synchronization information includes the channel number of the third designated broadcast channel, and then The second data packet is broadcast through the second designated broadcast channel. Since both the sender and the receiver switch to the same channel, the receiver can receive the data packet sent by the second designated broadcast channel. Repeat the above steps in this way until the data packet is broadcast through all the designated broadcast channels. The above preset time period can be set to a smaller time length, so that the time for switching channels is almost zero, making the receiving end equivalent to receiving different channels at the same time. Data packets sent from the channel are sent by switching between different channels to avoid channel interference, and even if the data packets in the individual designated broadcast channels are lost during the sending process so that the receiving end cannot receive them, the data packets can also be received through the other designated broadcast channels Therefore, the communication between the sending end and the receiving end is ensured under the condition of high efficiency, and the reliability of the communication is greatly improved.
举例地,多个不同的指定广播信道分别为1信道、6信道以及11信道,轮流发送的指定广播信道顺序依次为1信道、6信道、11信道,上述预设时间段为3ms,也即每隔3ms接收端即切换信道广播一次,在第一次广播时,将上述指定数据与第二次发送的的信道序号“6”的信息打包得到数据包,并通过1信道进行广播,并在3ms内将1信道切换至6信道,以待下次广播数据,接收端持续监听,当监听到通过1信道接收到上述数据包,则将该数据包解析得到指定数据以及将要切换的信道序号“6”,并开始通过定时器计时,该定时器可精确至μs,在3ms内将1信道切换至6信道,使得发送端与接收端切换信道的时间尽量接近同步。第二次广播时,发送端再次将指定数据与第三次广播的信道序号“11”的信息一起打包得到数据包,然后通过6信道广播出去,接收端持续监听,在监听到接收端通过6信道接收到数据包后开始计时,同时接收端解析上述数据包,得到指定数据以及将要切换的信道序号“11”,在3ms内将6信道切换至11信道;第三次广播时,在发送端在3ms内将6信道切换至11信道后,将指定数据与下次发送的信道序号“1”信息打包得到数据包通过11信道进行广播,接收端通过11信道接收上述数据包,并解析得到指定数据以及将要切换的信道序号“1”,当然若此时指定数据已遍历上述每个指定广播信道广播发出,则不再进行广播,当发送端与接收端均将从11信道切换至1信道后,发送端可再次获取新的指定数据,重复上述步骤,每一次新的指定数据均依次通过1信道、6信道、11信道广播出去。For example, multiple different designated broadcast channels are 1 channel, 6 channel, and 11 channels. The order of the designated broadcast channels sent in turn is 1 channel, 6 channel, and 11 channel. The above-mentioned preset time period is 3 ms, that is, every The receiving end switches channels and broadcasts once every 3ms. In the first broadcast, the specified data and the information of the channel number "6" sent for the second time are packaged to obtain a data packet, and broadcast through 1 channel, and in 3ms Switch from channel 1 to channel 6 in order to wait for the next broadcast of data, and the receiving end will continue to monitor. When it detects that the above data packet is received through channel 1, it will parse the data packet to obtain the specified data and the channel number to be switched "6 ”And start counting by a timer, which can be accurate to μs, and switch 1 channel to 6 channels within 3ms, so that the time for the transmitter and receiver to switch channels is as close to synchronization as possible. In the second broadcast, the sender again packs the designated data with the channel number "11" information of the third broadcast to obtain the data packet, and then broadcasts it through 6 channels. The receiving end continues to monitor, and the receiving end passes 6 The channel starts timing after receiving the data packet. At the same time, the receiving end parses the above data packet to obtain the specified data and the channel number "11" to be switched, and switch 6 channels to 11 channels within 3ms; in the third broadcast, at the sending end After switching from channel 6 to channel 11 within 3ms, package the designated data with the channel sequence number "1" information to be sent next time to get the data packet to be broadcast on channel 11, and the receiving end receives the above data packet through channel 11, and parses it to obtain the designated The data and the channel number "1" to be switched. Of course, if the designated data has been broadcast through each of the above designated broadcast channels at this time, the broadcast will not be carried out. When the sender and receiver both switch from channel 11 to channel 1 , The sender can obtain new designated data again, repeat the above steps, and each new designated data will be broadcasted through channel 1, channel 6, and channel 11 in turn.
在另一实施例中,上述同步信息还可以包括多个指定广播信道的序号以及轮流广播的信道顺序,在接收端接收到数据包时解析出同步信息,得到下次将要广播数据的指定广播信道序号,以及轮流广播的指定广播信道个数以及顺序,计算器开始计时,当接收端将接收信道切换到下一接收信道后,在指定时间内没有接收到新的数据包,则按照解析出的上述轮流广播的信道顺序,自动将当前的接收信道切换到下一接收信道,以使接收端的接收信道与发送端的指定广播信道对应,从而可以继续接收新的数据包。In another embodiment, the aforementioned synchronization information may also include the sequence numbers of multiple designated broadcast channels and the channel sequence of the alternate broadcast. When the receiving end receives the data packet, the synchronization information is parsed to obtain the designated broadcast channel that will broadcast the data next time. Sequence number, as well as the number and order of the designated broadcast channels of the broadcast in turn, the calculator starts timing. When the receiving end switches the receiving channel to the next receiving channel, if no new data packet is received within the specified time, it will be parsed according to the The above-mentioned turn-by-turn broadcast channel sequence automatically switches the current receiving channel to the next receiving channel, so that the receiving channel of the receiving end corresponds to the designated broadcast channel of the transmitting end, so that new data packets can be received continuously.
优选地,发送端与接收端所设置间隔时间可不一致,且接收端的切换时间比发送端的切换时间短,例如发送端在时间t内切换信道,接收端在时间j内切换信道,则t>j,这样在加上传输时间的前提下,使得接收端与发送端的切换信道时间尽量趋向于一致,使得数据包在传输送到至接收端之前,接收端已切换好信道。Preferably, the interval time set between the sending end and the receiving end may be inconsistent, and the switching time of the receiving end is shorter than the switching time of the sending end. For example, the sending end switches channels in time t, and the receiving end switches channels in time j, then t>j In this way, with the addition of the transmission time, the channel switching time between the receiving end and the sending end tends to be as consistent as possible, so that the receiving end has switched channels before the data packet is transmitted to the receiving end.
进一步地,上述多个不同的指定广播信道为相互干扰最小的信道,例如频率相差较远的信道,一般而言,每个信道对应20MHz带宽,范围不重叠的信道相互干扰最小,这样采用多个相互干扰最小信道发送,避免发送数据时邻频干扰,例如上述指定广播信道可以为相互干扰最小的1信道、6信道、11信道以及13信道等。Further, the above-mentioned multiple different designated broadcast channels are the channels with the least mutual interference, such as channels with far apart frequencies. Generally speaking, each channel corresponds to a 20MHz bandwidth, and channels with non-overlapping ranges have the least mutual interference. In this way, multiple channels are used. The channel with the least mutual interference is sent to avoid adjacent channel interference when sending data. For example, the above-mentioned designated broadcast channel may be 1 channel, 6 channel, 11 channel, and 13 channel with the least mutual interference.
在一个实施例中,在IEEE802.11标准协议规定可使用的信道中,假定用于广播数据的信道具有N个,且各所述信道均具有一一对应的信道序号,上述步骤S2之前,包括:In one embodiment, among the usable channels specified in the IEEE 802.11 standard protocol, it is assumed that there are N channels used for broadcasting data, and each of the channels has a one-to-one corresponding channel sequence number. Before the above step S2, it includes :
步骤S23:判断所述数据包的数据量是否大于第一预设值;Step S23: Determine whether the data amount of the data packet is greater than a first preset value;
步骤S24:若是,则从N个所述信道中选取M个指定的所述信道作为所述指定广播信道;Step S24: if yes, select M designated channels from the N channels as the designated broadcast channels;
步骤S25:若否,则从N个所述信道中选取K个指定的所述信道作为所述指定广播信道,N、M、K为正整数,且K>M。Step S25: If not, select K designated channels from the N channels as the designated broadcast channels, where N, M, and K are positive integers, and K>M.
本实施例中,可通过广播发出数据的数据量大小来确定指定广播信道的个数以及信道序号。已知用于广播数据的信道具有N个,且各个信道均具有一一对应的信道序号,但并不是所有信道均用于轮流广播上述数据包,对于不同大小数据量的数据,可通过不同的指定广播信道发送,首先判断数据包的数据量是否大于第一预设值,该第一预设值为用户设定,若数据包大于第一预设值,即说明数据量较大,则从N个信道中选取M个指定的信道作为指定广播信道,例如从1~13个信道中选择2个作为指定广播信道,若数据包不大于第一预设值,即说明数据量较小,则从N个信道中选取K个指定的信道作为指定广播信道,例如从1~13个信道中选择3个作为指定广播信道,K>M,进一步地,N个信道可均为相互干扰最小的信道,例如1信道、6信道、11信道以及13信道,然后从这个4个信道中随机选择,或者针对不同的频率,从这4个信道中设定优先选择顺序,然后按顺序选择。通常数据量小的数据,例如开关控制等信息的数据,对应的,发送速度快,效率高,可以选择较多个信道进行广播发送,而数据量较大的数据,例如音频数据,每秒至少传800个bytes,其发送速度较慢,可以选择较少个信道进行发送,这样可以均衡整体的发送速度,提高传输效率。In this embodiment, the number of designated broadcast channels and the channel sequence number can be determined by the size of the data volume of the broadcast data. It is known that there are N channels used to broadcast data, and each channel has a one-to-one corresponding channel sequence number, but not all channels are used to broadcast the above-mentioned data packets in turn. For data of different sizes, different To send on a designated broadcast channel, first determine whether the data volume of the data packet is greater than the first preset value. The first preset value is set by the user. If the data packet is greater than the first preset value, it means that the data volume is larger. Select M designated channels from N channels as designated broadcast channels, for example, select 2 from 1 to 13 channels as designated broadcast channels. If the data packet is not larger than the first preset value, it means that the amount of data is small, then Select K designated channels from N channels as designated broadcast channels, for example, select 3 from 1 to 13 channels as designated broadcast channels, K>M, and further, N channels can all be channels with the least mutual interference For example, 1 channel, 6 channels, 11 channels and 13 channels, and then randomly select from these 4 channels, or for different frequencies, set the priority order from these 4 channels, and then select them in order. Generally, data with a small amount of data, such as switch control and other information data, corresponds to fast transmission speed and high efficiency, and more channels can be selected for broadcast transmission, while data with a larger amount of data, such as audio data, is at least Transmission of 800 bytes, the transmission speed is slower, you can select fewer channels for transmission, so that the overall transmission speed can be balanced and the transmission efficiency can be improved.
在另一个实施例中,上述步骤S1之前,首先获取待发送的数据,再依据这些待发送的数据来确定信道个数以及序号,统计待发送的数据的数据量,然后根据数据量的大小来确定用于发送的信道的个数,而数据量大的数据,由于信道容量的限制,可能轮流广播一次无法完成,需要分成多份轮流广播,这时由于分成多份且数据量大,传输效率慢,故可选择较少个信道进行广播,而数据量较小的数据,传输效率较快,故可选择较多个信道进行广播。In another embodiment, before the above step S1, first obtain the data to be sent, and then determine the number of channels and sequence numbers based on the data to be sent, count the data volume of the data to be sent, and then calculate the data volume according to the size of the data. Determine the number of channels to be used for transmission. Data with a large amount of data may not be completed at one time due to the limitation of channel capacity. It needs to be divided into multiple copies and the amount of data is large, so the transmission efficiency is It is slow, so fewer channels can be selected for broadcasting, and data with a smaller amount of data has faster transmission efficiency, so more channels can be selected for broadcasting.
在一个实施例中,上述步骤S1之前,包括:In one embodiment, before the above step S1, it includes:
步骤S01:获取待广播的待发数据;Step S01: Obtain the data to be sent to be broadcast;
步骤S02:判断所述待发数据的数据量是否大于第二预设值;Step S02: Determine whether the data amount of the data to be sent is greater than a second preset value;
步骤S03:若是,将所述待发数据进行分割得到超过一份所述指定数据,且每份所述指定数据的数据量最大值不超过所述第二预设值;Step S03: If yes, divide the to-be-sent data to obtain more than one piece of the designated data, and the maximum data amount of each piece of the designated data does not exceed the second preset value;
步骤S04:若否,将所述待发数据默认为所述指定数据。Step S04: If not, the data to be sent is defaulted to the designated data.
本实施例中,每次发送的容量为一固定值,而上述指定数据与同步信息组合打包后的数据量大于该固定值时,则需要分成多份进行广播,同步信息的数据量也可设定为另一固定值,那么可通过需要进行广播的数据的大小,来确定是否将数据分成多份发送,例如上述固定值为2320bytes,可私有协定20bytes用来做同步信息,那剩下2300bytes即是需要发送的有效数据,也即上述第二预设值,具体而言,首先获取待广播的待发数据,然后判断待发数据的数据量是否大于第二预设值,若大于,则说明数据量较大,这时可将待发数据进行分割,得到超过一份的指定数据,且每份指定数据的数据量最大值不超过第二预设值,若不大于,则直接将待发数据默认为指定数据,例如待发数据的数据量为8000bytes,判断大于2300bytes,这时可将待发数据按字节顺序分为4份,每份数据量依次分别为2300 bytes、2300bytes、2300 bytes以及1100 bytes,且每份均对应一个数据序号,然后逐份按照上述步骤S1-S2发送,此处并不限制每份数据的数据量,只要不超过上述第二预设值即可,为了提高速度,可以参考上述例子,每份分割的数据量为第二预设值,直至分割完毕,这样使得分割份数尽量小,相对的,发送次数也会减小,这样即便数据量远超发送容量的数据,也可快速地通过分份的方式按照上述步骤发送。In this embodiment, the capacity of each transmission is a fixed value, and when the data volume after the combination of the specified data and the synchronization information is greater than the fixed value, it needs to be divided into multiple parts for broadcasting, and the data volume of the synchronization information can also be set. Set it to another fixed value, then you can determine whether to divide the data into multiple parts and send it by the size of the data that needs to be broadcast. For example, the above fixed value is 2320bytes, and the private agreement 20bytes can be used for synchronization information, and the remaining 2300bytes is that It is the valid data that needs to be sent, that is, the above-mentioned second preset value. Specifically, first obtain the data to be sent to be broadcast, and then determine whether the data volume of the data to be sent is greater than the second preset value. The amount of data is large. At this time, the data to be sent can be divided to obtain more than one set of designated data, and the maximum data amount of each designated data does not exceed the second preset value. The data defaults to the specified data. For example, the amount of data to be sent is 8000bytes, and the judgment is greater than 2300bytes. At this time, the data to be sent can be divided into 4 parts in byte order, and the data volume of each part is 2300 bytes, 2300bytes, and 2300 bytes respectively. And 1100 bytes, and each copy corresponds to a data serial number, and then send it according to the above steps S1-S2 one by one. There is no limit to the data volume of each data here, as long as it does not exceed the second preset value mentioned above. In order to improve the speed, You can refer to the above example. The amount of data for each split is the second preset value until the split is completed, so that the number of splits is as small as possible, and relatively, the number of transmissions will be reduced, so that even if the amount of data far exceeds the transmission capacity of the data , You can also quickly send it in portions by following the above steps.
在一个实施例中,上述步骤S2,包括:In an embodiment, the above step S2 includes:
步骤S26:获取所述同步信息;Step S26: Obtain the synchronization information;
步骤S27:将所述同步信息加至所述指定数据的通信协议中的帧主体,并打包形成所述数据包。Step S27: Add the synchronization information to the frame body in the communication protocol of the designated data, and pack it to form the data packet.
本实施例中,通过自定义私有协议来实现携带同步信息,具体而言,将上述指定数据形成上述数据包的过程包括:首先获取同步信息,上述同步信息包括下次将要切换的信道的信息,然后将上述同步信息加入至指定数据的通信协议中,上述方法可基于IEEE802.11协议簇中的帧广播(Broadcast)通信方式来实现,也即通过广播帧数据的方式来实现,上述指定数据的帧结构中,包括有帧主体(Framebody),可通过将上述同步信息加入帧主体的VendorSpecific中,然后打包形成上述数据包。In this embodiment, the synchronization information is carried by a custom private protocol. Specifically, the process of forming the specified data into the data packet includes: first obtaining synchronization information, and the synchronization information includes the information of the channel to be switched next time. Then add the above synchronization information to the communication protocol of the specified data. The above method can be implemented based on the frame broadcast (Broadcast) communication method in the IEEE802.11 protocol suite, that is, by broadcasting frame data. The frame structure includes a frame body (Framebody), and the above-mentioned synchronization information can be added to the VendorSpecific of the frame body, and then packaged to form the above-mentioned data packet.
参照图2,提出本发明的接受广播数据的方法一实施例,该方法包括:Referring to FIG. 2, an embodiment of a method for receiving broadcast data of the present invention is proposed, and the method includes:
步骤S1’:接收发送端通过指定广播信道所广播发出的数据包,其中,当前的接收信道与所述指定广播信道的信道序号相同,所述数据包由所述发送端对指定数据处理后获得,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包时的指定广播信道的信道序号;Step S1': Receive a data packet broadcasted by the sender through a designated broadcast channel, where the current receiving channel is the same as the channel sequence number of the designated broadcast channel, and the data packet is obtained by the sender after processing the designated data , The different designated broadcast channels correspond to different channel sequence numbers, the data packets broadcast through each of the designated broadcast channels carry different synchronization information, and each of the synchronization information respectively includes the next transmission of the data The channel sequence number of the designated broadcast channel during the packet;
步骤S2’:解析所述数据包得到所述指定数据以及所述同步信息,并启动计时器开始计时;Step S2': Parse the data packet to obtain the designated data and the synchronization information, and start a timer to start timing;
步骤S3’:当所述计时器达到预设时间,依据所述同步信息将当前的接收信道切换成与所述同步信息中的信道序号相同的信道。Step S3': When the timer reaches the preset time, switch the current receiving channel to the channel with the same channel sequence number in the synchronization information according to the synchronization information.
本实施例中,上述接收广播数据的方法应用于接收设备,此处的接收设备为可以与广播设备通信连接的设备,接收设备处于待接收数据状态,且当前的接收信道与广播设备的指定广播信道一致,接收设备的接收端通过接收信道接收数据包,该数据包由发送端对指定数据处理后获得,并通过指定广播信道广播发出,上述指定数据为控制指令或音频视频等数据,不同的指定广播信道对应不同的信道序号,通过各指定广播信道广播的数据包分别携带有不同的同步信息,且每个同步信息分别包括下一次发送该数据包时的指定广播信道的信道序号,发送端的具体打包以及广播过程参照上述数据广播方法,此处不再赘述。解析上述数据包得到同步信息以及指定数据,通过同步信息可知下一次用于发送数据包的指定广播信道的信道序号,也即知道下次轮到哪个指定广播信道进行发送,同时启动计时器开始计时,当计时器达到预设时间,该预设时间可与广播设备切换指定广播信道的时间一致,然后接收端将当前的接收信道切换至下一个接收信道,下一个接收信道与上述获得的同步信息中的信道序号相同,即切换至与上述下一次发送数据包的指定广播信道相同的接收信道,进一步地,上述接收设备可具有多个,也即多个接收设备可同时接收上述广播设备广播出的数据包。In this embodiment, the above method for receiving broadcast data is applied to a receiving device, where the receiving device is a device that can be connected to the broadcasting device in communication, the receiving device is in a state to receive data, and the current receiving channel is the same as the specified broadcast of the broadcasting device. The channel is the same. The receiving end of the receiving device receives the data packet through the receiving channel. The data packet is obtained by the sending end after processing the designated data, and broadcasted through the designated broadcast channel. The above designated data is data such as control instructions or audio and video. The designated broadcast channel corresponds to different channel sequence numbers. The data packets broadcast through each designated broadcast channel carry different synchronization information, and each synchronization information includes the channel number of the designated broadcast channel when the data packet is sent next time. For the specific packaging and broadcasting process, refer to the above-mentioned data broadcasting method, which will not be repeated here. Analyze the above data packets to obtain synchronization information and designated data. Through the synchronization information, we can know the channel number of the designated broadcast channel used to send the data packet next time, that is, know which designated broadcast channel will be sent next time, and start the timer to start timing. , When the timer reaches the preset time, the preset time can be consistent with the time when the broadcasting device switches the designated broadcast channel, and then the receiving end switches the current receiving channel to the next receiving channel, and the next receiving channel is synchronized with the above-obtained synchronization information The channel sequence number in is the same, that is, it is switched to the same receiving channel as the designated broadcast channel for sending the data packet next time. Further, the receiving device may have multiple, that is, multiple receiving devices can simultaneously receive the broadcast broadcast from the broadcast device. Packets.
在一个实施例中,上述步骤S2之后,包括:In an embodiment, after the above step S2, the method includes:
步骤S4’:从各数据序号一致的所述数据包中,选择其中一个所述数据包作为与所述发送端通信的数据包。Step S4': Select one of the data packets from the data packets with the same data sequence number as the data packet for communication with the sending end.
本实施例中,上述同步信息中包括数据序号,上述待发数据可能可分一个轮流周期即可广播完毕,也可能需分多个轮流周期才可广播发送完毕,当一个轮流周期即可广播发送完毕时,也即待发数据为一份指定数据,接收端在接收各指定广播信道轮流发送的数据包后,每次均解析出上述指定数据,且每个指定数据的数据序号均一致,这时只需中选择其中一个数据包作为发送端通信的数据包即可,当待发数据可分为多份指定数据时,每一周期发送的数据均对应不同的数据序号,解析出上述对应每个数据序号的指定数据,并从各相同数据序号对应的指定数据中分别随机获取一份,然后将选取出的指定数据按数据序号拼接得到上述待发数据,也即得到接收端需要使用的数据。In this embodiment, the above synchronization information includes the data sequence number. The above data to be sent may be broadcast in one rotation period, or it may be broadcast in multiple rotation periods. When one rotation period, it can be broadcast and sent. When it is finished, that is, the data to be sent is a piece of designated data. After receiving the data packets sent by each designated broadcast channel in turn, the receiving end parses out the designated data every time, and the data sequence number of each designated data is the same. At this time, you only need to select one of the data packets as the data packet for the sending end communication. When the data to be sent can be divided into multiple specified data, the data sent in each cycle corresponds to a different data sequence number, and the above corresponding data packets are analyzed. The designated data of a data serial number, and randomly obtain a copy from the designated data corresponding to the same data serial number, and then splice the selected designated data according to the data serial number to obtain the above-mentioned data to be sent, that is, the data that the receiving end needs to use .
参照图3,提出本发明的数据广播装置一实施例,所述装置用于执行上述数据传输方法,数据传输装置具体可通过软件或硬件的形式实现。该装置包括:3, an embodiment of the data broadcasting device of the present invention is proposed. The device is used to execute the above-mentioned data transmission method, and the data transmission device can be implemented in the form of software or hardware. The device includes:
获取数据单元100,用于获取指定数据;The acquiring data unit 100 is used to acquire designated data;
广播数据单元200,用于将所述指定数据形成数据包,并将所述数据包分别通过多个不同的指定广播信道轮流广播出去,其中,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包的指定广播信道的信道序号,所述数据包用于被接收端接收,以使得所述接收端通过所述数据包的同步信息将当前的接收信道切换成与所述信道序号相同的信道。The broadcast data unit 200 is used to form the designated data into data packets, and broadcast the data packets through a plurality of different designated broadcast channels in turn, wherein different designated broadcast channels correspond to different channel sequence numbers, The data packets broadcast through each of the designated broadcast channels respectively carry different synchronization information, and each of the synchronization information respectively includes the channel sequence number of the designated broadcast channel for transmitting the data packet next time, and the data packet is used for At the receiving end, so that the receiving end switches the current receiving channel to the channel with the same channel sequence number through the synchronization information of the data packet.
本实施例中,上述数据广播装置可用于各种IoT物联网应用场景,例如智能灯控、多媒体广播等场景,具体通过基于无线局域网的通信协议的广播技术实现。In this embodiment, the above-mentioned data broadcasting device can be used in various IoT application scenarios, such as scenarios such as smart light control, multimedia broadcasting, etc., which are specifically implemented by broadcasting technology based on the communication protocol of the wireless local area network.
如上述获取数据单元100以及广播数据单元200所述,在广播设备中,发送端(TX端)首先获取指定数据,上述指定数据为广播设备与接收设备进行广播通信的有效数据,这些有效数据可包括控制命令、音频等数据。然后将这些有效数据形成可在信道中进行传输的数据包,例如将有效数据与同步信息一起打包形成上述数据包;每形成一数据包,发送端即通过一个指定广播信道将该数据包广播发送出去,如此轮流广播发送直至每个不同的指定广播信道均广播发送一次,上述轮流广播发送可以为按指定顺序依次逐个广播直至每个指定广播信道均广播一次,也可以为随机逐个广播直至每个指定广播信道均广播一次。本实施例中,上述指定广播信道为预先指定的广播信道,不同的广播信道对应不同的信道序号,例如序号1~13的广播信道分别为1信道、2信道、3信道、4信道、5信道、6信道、7信道、8信道、9信道、10信道、11信道、12信道、13信道,则上述多个不同的指定广播信道可以为1信道、6信道以及11信道,不同的指定广播信道采用不同的频率发送数据,如1信道、6信道以及11信道分别对应低中高频率2.412GHz 、2.437GHz、2.462GHz。上述每个同步信息均分别包括轮流发送中下一次用于发送数据包的指定广播信道的信道序号,上述数据包用于被接收设备的接收端(RX端)接收,在广播设备将数据包进行广播后,接收设备可通过与指定广播信道相同的接收信道接收数据包,然后解析该数据包,得到同步信息,再依据同步信息将当前接收信道切换成与广播设备下一次将要切换的指定广播信道一致的信道,以便在广播设备下一次广播出数据包时可接收到该数据包。As described above for the data acquisition unit 100 and the broadcast data unit 200, in the broadcast device, the transmitting end (TX end) first acquires designated data. The designated data is valid data for broadcast communication between the broadcast device and the receiving device. These valid data can be Including control commands, audio and other data. Then the valid data is formed into a data packet that can be transmitted in the channel, for example, the valid data and synchronization information are packaged together to form the above-mentioned data packet; each time a data packet is formed, the sending end broadcasts the data packet through a designated broadcast channel Out, broadcast and send in this way until each different designated broadcast channel is broadcast once. The above-mentioned round broadcast transmission can be broadcast one by one in the specified order until each designated broadcast channel is broadcast once, or it can be broadcast one by one at random until each The designated broadcast channels are broadcast once. In this embodiment, the above-mentioned designated broadcast channel is a pre-designated broadcast channel, and different broadcast channels correspond to different channel serial numbers. For example, broadcast channels with serial numbers 1 to 13 are 1 channel, 2 channel, 3 channel, 4 channel, and 5 channel respectively. , 6 channels, 7 channels, 8 channels, 9 channels, 10 channels, 11 channels, 12 channels, 13 channels, the above multiple different designated broadcast channels can be 1, 6 and 11 channels, different designated broadcast channels Use different frequencies to send data, such as channel 1, channel 6, and channel 11 corresponding to low, medium and high frequencies 2.412GHz, 2.437GHz, 2.462GHz, respectively. Each of the above synchronization information includes the channel sequence number of the designated broadcast channel used to send the data packet next time in the round robin transmission. The above data packet is used to be received by the receiving end (RX end) of the receiving device. After broadcasting, the receiving device can receive the data packet through the same receiving channel as the designated broadcasting channel, and then parse the data packet to obtain synchronization information, and then switch the current receiving channel to the designated broadcasting channel that the broadcasting equipment will switch to next based on the synchronization information A consistent channel so that the data packet can be received the next time the broadcast device broadcasts the data packet.
这样通过切换信道轮流将数据包进行广播,并通过接收端对应切换至相应的信道来接收广播的数据包,将传统的单频率发送增加成多个频率发送,通过发送端与接收端多次对应切换至相同频率来实现通信传输,进而大大提高通信传输的可靠性,避免由于单频率一次发送产生撞包的而造成传输不成功,没法完成广播通信的情况。In this way, the data packets are broadcast in turn by switching channels, and the receiving end is correspondingly switched to the corresponding channel to receive the broadcast data packets. The traditional single frequency transmission is increased to multiple frequency transmissions, and the transmitting end and the receiving end correspond multiple times. Switch to the same frequency to achieve communication transmission, thereby greatly improving the reliability of communication transmission, and avoiding unsuccessful transmission and failure to complete broadcast communication due to packet collision caused by a single frequency transmission.
在一个实施例中,上述广播数据单元200,包括:In an embodiment, the above-mentioned broadcast data unit 200 includes:
第一广播子单元,用于将所述指定数据与第一个所述同步信息一起打包形成第一个所述数据包,将第一个所述数据包通过第一个所述指定广播信道广播出去,所述第一个同步信息中包括有第二个所述指定广播信道的信道序号,使得所述接收端在接收所述数据包后将当前的所述接收信道切换至与所述信道序号一致的信道;The first broadcast subunit is configured to pack the designated data and the first said synchronization information together to form the first said data packet, and broadcast the first said data packet through the first said designated broadcast channel Out, the first synchronization information includes the second channel sequence number of the designated broadcast channel, so that the receiving end switches the current receiving channel to the channel sequence number after receiving the data packet Consistent channel
第二广播子单元,用于在预设时间段内将第一个所述指定广播信道切换至第二个所述指定广播信道,再次将所述指定数据与第二个所述同步信息一起打包形成第二个所述数据包,并将第二个所述数据包通过第二个所述指定广播信道广播出去,重复切换所述指定广播信道并发送所述数据包直至遍历所有的所述指定广播信道。The second broadcast subunit is configured to switch the first designated broadcast channel to the second designated broadcast channel within a preset time period, and pack the designated data and the second synchronization information together again Form the second said data packet, and broadcast the second said data packet through the second said designated broadcast channel, repeatedly switch the designated broadcast channel and send the said data packet until all the designated ones are traversed Broadcast channel.
本实施例中,通过多个不同的指定广播信道轮流将数据包进行广播,且在通过不同指定广播信道轮流广播的过程中,各个指定广播信道的顺序可设定也可以随机确定,具体而言,先将上述指定数据与第一个同步信息一起打包形成第一个数据包,然后通过第一个指定广播信道广播出去,第一个同步信息中包括有第二个指定广播信道的信道序号,例如第二个指定广播信道的信道序号为“6”,接收端接收到第一个数据包后,解析该数据包,然后获取上述指定数据以及同步信息,得到第二个指定广播信道的信道序号“6”,同时通过定时器计算,在预设时间段内将当前的接收信道切换成信道序号为“6”的信道;与此同时,在预设时间段内,发送端将第一个指定广播信道切换成第二个指定广播信道,再次将上述指定数据与第二个同步信息一起打包形成第二个数据包,第二个同步信息包括有第三个指定广播信道的信道序号,然后将第二个数据包通过第二指定广播信道进行广播,由于发送端与接收端均切换至同一种信道,使得接收端可接收到第二个指定广播信道发出的数据包。如此重复上述步骤,直到将数据包遍历所有的指定广播信道广播发出,上述预设时间段可设置为较小时间长度,这样切换信道的时间几近于无,使得接收端相当于同时接收到不同信道发送来的数据包,通过切换不同信道发送,避免信道干扰,且即便在发送过程中个别指定广播信道中的数据包丢失使得接收端接收不到,也可以通过其余指定广播信道接收到数据包,从而在效率较高的情况下保证了发送端与接收端的通信,大大提高了通信的可靠性。In this embodiment, data packets are broadcast in turn through multiple different designated broadcast channels, and in the process of broadcast in turn through different designated broadcast channels, the order of each designated broadcast channel can be set or randomly determined, specifically , The above specified data and the first synchronization information are packaged together to form the first data packet, and then broadcast through the first specified broadcast channel. The first synchronization information includes the channel number of the second specified broadcast channel. For example, the channel number of the second designated broadcast channel is "6". After receiving the first data packet, the receiving end parses the data packet, and then obtains the above-mentioned designated data and synchronization information to obtain the channel number of the second designated broadcast channel "6", at the same time calculated by the timer, the current receiving channel will be switched to the channel numbered "6" within the preset time period; at the same time, within the preset time period, the sender will specify the first one The broadcast channel is switched to the second designated broadcast channel, and the above designated data and the second synchronization information are packaged together to form a second data packet. The second synchronization information includes the channel number of the third designated broadcast channel, and then The second data packet is broadcast through the second designated broadcast channel. Since both the sender and the receiver switch to the same channel, the receiver can receive the data packet sent by the second designated broadcast channel. Repeat the above steps in this way until the data packet is broadcast through all the designated broadcast channels. The above preset time period can be set to a smaller time length, so that the time for switching channels is almost zero, making the receiving end equivalent to receiving different channels at the same time. Data packets sent from the channel are sent by switching between different channels to avoid channel interference, and even if the data packets in the individual designated broadcast channels are lost during the sending process so that the receiving end cannot receive them, the data packets can also be received through the other designated broadcast channels Therefore, the communication between the sending end and the receiving end is ensured under the condition of high efficiency, and the reliability of the communication is greatly improved.
举例地,多个不同的指定广播信道分别为1信道、6信道以及11信道,轮流发送的指定广播信道顺序依次为1信道、6信道、11信道,上述预设时间段为3ms,也即每隔3ms接收端即切换信道广播一次,在第一次广播时,将上述指定数据与第二次发送的的信道序号“6”的信息打包得到数据包,并通过1信道进行广播,并在3ms内将1信道切换至6信道,以待下次广播数据,接收端持续监听,当监听到通过1信道接收到上述数据包,则将该数据包解析得到指定数据以及将要切换的信道序号“6”,并开始通过定时器计时,该定时器可精确至μs,在3ms内将1信道切换至6信道,使得发送端与接收端切换信道的时间尽量接近同步。第二次广播时,发送端再次将指定数据与第三次广播的信道序号“11”的信息一起打包得到数据包,然后通过6信道广播出去,接收端持续监听,在监听到接收端通过6信道接收到数据包后开始计时,同时接收端解析上述数据包,得到指定数据以及将要切换的信道序号“11”,在3ms内将6信道切换至11信道;第三次广播时,在发送端在3ms内将6信道切换至11信道后,将指定数据与下次发送的信道序号“1”信息打包得到数据包通过11信道进行广播,接收端通过11信道接收上述数据包,并解析得到指定数据以及将要切换的信道序号“1”,当然若此时指定数据已通过遍历上述每个指定广播信道广播发出,则不再进行广播,当发送端与接收端均将从11信道切换至1信道后,发送端可再次获取新的指定数据,重复上述步骤,每一次新的指定数据均依次通过1信道、6信道、11信道广播出去。For example, multiple different designated broadcast channels are 1 channel, 6 channel, and 11 channels. The order of the designated broadcast channels sent in turn is 1 channel, 6 channel, and 11 channel. The above-mentioned preset time period is 3 ms, that is, every The receiving end switches channels and broadcasts once every 3ms. In the first broadcast, the specified data and the information of the channel number "6" sent for the second time are packaged to obtain a data packet, and broadcast through 1 channel, and in 3ms Switch from channel 1 to channel 6 in order to wait for the next broadcast of data, and the receiving end will continue to monitor. When it detects that the above data packet is received through channel 1, it will parse the data packet to obtain the specified data and the channel number to be switched "6 ”And start counting by a timer, which can be accurate to μs, and switch 1 channel to 6 channels within 3ms, so that the time for the transmitter and receiver to switch channels is as close to synchronization as possible. In the second broadcast, the sender again packs the designated data with the channel number "11" information of the third broadcast to obtain the data packet, and then broadcasts it through 6 channels. The receiving end continues to monitor, and the receiving end passes 6 The channel starts timing after receiving the data packet. At the same time, the receiving end parses the above data packet to obtain the specified data and the channel number "11" to be switched, and switch 6 channels to 11 channels within 3ms; in the third broadcast, at the sending end After switching from channel 6 to channel 11 within 3ms, package the designated data with the channel sequence number "1" information to be sent next time to get the data packet to be broadcast on channel 11, and the receiving end receives the above data packet through channel 11, and parses it to obtain the designated The data and the channel sequence number "1" to be switched. Of course, if the designated data has been broadcast by traversing each of the above designated broadcast channels at this time, the broadcast will not be carried out. When the sender and receiver both switch from channel 11 to channel 1 After that, the sender can obtain new designated data again, repeat the above steps, and each new designated data will be broadcasted through channel 1, channel 6, and channel 11 in turn.
在另一实施例中,上述同步信息还可以包括多个指定广播信道的序号以及轮流广播的信道顺序,在接收端接收到数据包时解析出同步信息,得到下次将要广播数据的指定广播信道序号,以及轮流广播的指定广播信道个数以及顺序,计算器开始计时,当接收端将接收信道切换到下一接收信道后,在指定时间内没有接收到新的数据包,则按照解析出的上述轮流广播的信道顺序,自动将当前的接收信道切换到下一接收信道,以使接收端的接收信道与发送端的指定广播信道对应,从而可以继续接收新的数据包。In another embodiment, the aforementioned synchronization information may also include the sequence numbers of multiple designated broadcast channels and the channel sequence of the alternate broadcast. When the receiving end receives the data packet, the synchronization information is parsed to obtain the designated broadcast channel that will broadcast the data next time. Sequence number, as well as the number and order of the designated broadcast channels of the broadcast in turn, the calculator starts timing. When the receiving end switches the receiving channel to the next receiving channel, if no new data packet is received within the specified time, it will be parsed according to the The above-mentioned turn-by-turn broadcast channel sequence automatically switches the current receiving channel to the next receiving channel, so that the receiving channel of the receiving end corresponds to the designated broadcast channel of the transmitting end, so that new data packets can be received continuously.
优选地,发送端与接收端所设置间隔时间可不一致,且接收端的切换时间比发送端的切换时间短,例如发送端在时间t内切换信道,接收端在时间j内切换信道,则t>j,这样在加上传输时间的前提下,使得接收端与发送端的切换信道时间尽量趋向于一致,使得数据包在传输送到至接收端之前,接收端已切换好信道。Preferably, the interval time set between the sending end and the receiving end may be inconsistent, and the switching time of the receiving end is shorter than the switching time of the sending end. For example, the sending end switches channels in time t, and the receiving end switches channels in time j, then t>j In this way, with the addition of the transmission time, the channel switching time between the receiving end and the sending end tends to be as consistent as possible, so that the receiving end has switched channels before the data packet is transmitted to the receiving end.
进一步地,上述多个不同的指定广播信道为相互干扰最小的信道,例如频率相差较远的信道,一般而言,每个信道对应20MHz带宽,范围不重叠的信道相互干扰最小,这样采用多个相互干扰最小信道发送,避免发送数据时邻频干扰,例如上述指定广播信道可以为相互干扰最小的1信道、6信道、11信道以及13信道等。Further, the above-mentioned multiple different designated broadcast channels are the channels with the least mutual interference, such as channels with far apart frequencies. Generally speaking, each channel corresponds to a 20MHz bandwidth, and channels with non-overlapping ranges have the least mutual interference. In this way, multiple channels are used. The channel with the least mutual interference is sent to avoid adjacent channel interference when sending data. For example, the above-mentioned designated broadcast channel may be 1 channel, 6 channel, 11 channel, and 13 channel with the least mutual interference.
在一个实施例中,在IEEE802.11标准协议规定可使用的信道中,假定用于广播数据的信道具有N个,且各所述信道均具有一一对应的信道序号,上述数据广播装置,包括:In one embodiment, among the usable channels specified in the IEEE 802.11 standard protocol, it is assumed that there are N channels used for broadcasting data, and each of the channels has a one-to-one corresponding channel sequence number. The above-mentioned data broadcasting device includes :
判断数据单元,用于判断所述数据包的数据量是否大于第一预设值;The judging data unit is used to judge whether the data amount of the data packet is greater than a first preset value;
第一选取单元,用于判定所述数据包的数据量大于第一预设值时,则从N个所述信道中选取M个指定的所述信道作为所述指定广播信道;The first selecting unit is configured to determine that the data amount of the data packet is greater than a first preset value, select M designated channels from the N channels as the designated broadcast channels;
第二选取单元,用于判定所述数据包的数据量不大于第一预设值时,则从N个所述信道中选取K个指定的所述信道作为所述指定广播信道,N、M、K为正整数,且K>M。The second selection unit is used to determine that the data volume of the data packet is not greater than the first preset value, select K designated channels from the N channels as the designated broadcast channels, N, M , K is a positive integer, and K>M.
本实施例中,可通过广播发出数据的数据量大小来确定指定广播信道的个数以及信道序号。已知用于广播数据的信道具有N个,且各个信道均具有一一对应的信道序号,但并不是所有信道均用于轮流广播上述数据包,对于不同大小数据量的数据,可通过不同的指定广播信道发送,首先判断数据包的数据量是否大于第一预设值,该第一预设值为用户设定,若数据包大于第一预设值,即说明数据量较大,则从N个信道中选取M个指定的信道作为指定广播信道,例如从1~13个信道中选择2个作为指定广播信道,若数据包不大于第一预设值,即说明数据量较小,则从N个信道中选取K个指定的信道作为指定广播信道,例如从1~13个信道中选择3个作为指定广播信道,K>M,进一步地,N个信道可均为相互干扰最小的信道,例如1信道、6信道、11信道以及13信道,然后从这个4个信道中随机选择,或者针对不同的频率,从这4个信道中设定优先选择顺序,然后按顺序选择。通常数据量小的数据,例如开关控制等信息的数据,对应的,发送速度快,效率高,可以选择较多个信道进行广播发送,而数据量较大的数据,例如音频数据,每秒至少传800个bytes,其发送速度较慢,可以选择较少个信道进行发送,这样可以均衡整体的发送速度,提高传输效率。In this embodiment, the number of designated broadcast channels and the channel sequence number can be determined by the size of the data volume of the broadcast data. It is known that there are N channels used to broadcast data, and each channel has a one-to-one corresponding channel sequence number, but not all channels are used to broadcast the above-mentioned data packets in turn. For data of different sizes, different To send on a designated broadcast channel, first determine whether the data volume of the data packet is greater than the first preset value. The first preset value is set by the user. If the data packet is greater than the first preset value, it means that the data volume is larger. Select M designated channels from N channels as designated broadcast channels, for example, select 2 from 1 to 13 channels as designated broadcast channels. If the data packet is not larger than the first preset value, it means that the amount of data is small, then Select K designated channels from N channels as designated broadcast channels, for example, select 3 from 1 to 13 channels as designated broadcast channels, K>M, and further, N channels can all be channels with the least mutual interference For example, 1 channel, 6 channels, 11 channels and 13 channels, and then randomly select from these 4 channels, or for different frequencies, set the priority order from these 4 channels, and then select them in order. Generally, data with a small amount of data, such as switch control and other information data, corresponds to a fast transmission speed and high efficiency. You can select more channels for broadcast transmission, while data with a larger amount of data, such as audio data, is at least per second. Transmission of 800 bytes, the transmission speed is slower, you can select fewer channels for transmission, so that the overall transmission speed can be balanced and the transmission efficiency can be improved.
在另一个实施例中,上述步骤S1之前,首先获取待发送的数据,再依据这些待发送的数据来确定信道个数以及序号,首先统计待发送的数据的数据量,然后根据数据量的大小来确定用于发送的信道的个数,而数据量大的数据,由于信道容量的限制,可能轮流广播一次无法完成,需要分成多份轮流广播,这时由于分成多份且数据量大,传输效率慢,故可选择较少个信道进行广播,而数据量较小的数据,传输效率较快,故可选择较多个信道进行广播。In another embodiment, before the above step S1, first obtain the data to be sent, and then determine the number of channels and the sequence number according to the data to be sent, firstly count the data volume of the data to be sent, and then according to the size of the data volume To determine the number of channels used for transmission, and data with a large amount of data, due to the limitation of channel capacity, may not be completed at one time in turn, and needs to be divided into multiple copies. The efficiency is slow, so fewer channels can be selected for broadcasting, and data with a smaller amount of data has faster transmission efficiency, so more channels can be selected for broadcasting.
在一个实施例中,上述数据广播装置,包括:In one embodiment, the above-mentioned data broadcasting device includes:
获取待发单元,用于获取待广播的待发数据;Obtain the pending unit, which is used to obtain the pending data to be broadcast;
判断数量单元,用于判断所述待发数据的数据量是否大于第二预设值;A judging quantity unit for judging whether the data amount of the data to be sent is greater than a second preset value;
分割数据单元,用于判定所述待发数据的数据量大于第二预设值,将所述待发数据进行分割得到超过一份所述指定数据,且每份所述指定数据的数据量最大值不超过所述第二预设值;The data segmentation unit is used to determine that the data volume of the data to be sent is greater than a second preset value, and divide the data to be sent to obtain more than one copy of the designated data, and the data volume of each designated data is the largest The value does not exceed the second preset value;
默认数据单元,用于判定所述待发数据的数据量不大于第二预设值,将所述待发数据默认为所述指定数据。The default data unit is used to determine that the data volume of the data to be sent is not greater than a second preset value, and to default the data to be sent as the designated data.
本实施例中,每次发送的容量为一固定值,而上述指定数据与同步信息组合打包后的数据量大于该固定值时,则需要分成多份进行广播,同步信息的数据量也可设定为另一固定值,那么可通过需要进行广播的数据的大小,来确定是否将数据分成多份发送,例如上述固定值为2320bytes,可私有协定20bytes用来做同步信息,那剩下2300bytes即是需要发送的有效数据,也即上述第二预设值,具体而言,首先获取待广播的待发数据,然后判断待发数据的数据量是否大于第二预设值,若大于,则说明数据量较大,这时可将待发数据进行分割,得到超过一份的指定数据,且每份指定数据的数据量最大值不超过第二预设值,若不大于,则直接将待发数据默认为指定数据,例如待发数据的数据量为8000bytes,判断大于2300bytes,这时可将待发数据按字节顺序分为4份,每份数据量依次分别为2300 bytes、2300bytes、2300 bytes以及1100 bytes,且每份均对应一个数据序号,然后逐份按照上述步骤发送,此处并不限制每份数据的数据量,只要不超过上述第二预设值即可,为了提高速度,可以参考上述例子,每份分割的数据量为第二预设值,直至分割完毕,这样使得分割份数尽量小,相对的,发送次数也会减小,这样即便数据量远超发送容量的数据,也可快速地通过分份的方式按照上述步骤发送。In this embodiment, the capacity of each transmission is a fixed value, and when the data volume after the combination of the specified data and the synchronization information is greater than the fixed value, it needs to be divided into multiple parts for broadcasting, and the data volume of the synchronization information can also be set. Set it to another fixed value, then you can determine whether to divide the data into multiple parts and send it by the size of the data that needs to be broadcast. For example, the above fixed value is 2320bytes, and the private agreement 20bytes can be used for synchronization information, and the remaining 2300bytes is that It is the valid data that needs to be sent, that is, the above-mentioned second preset value. Specifically, first obtain the data to be sent to be broadcast, and then determine whether the data volume of the data to be sent is greater than the second preset value. The amount of data is large. At this time, the data to be sent can be divided to obtain more than one set of designated data, and the maximum data amount of each designated data does not exceed the second preset value. The data defaults to the specified data. For example, the amount of data to be sent is 8000bytes, and the judgment is greater than 2300bytes. At this time, the data to be sent can be divided into 4 parts in byte order, and the data volume of each part is 2300 bytes, 2300bytes, and 2300 bytes respectively. And 1100 bytes, and each copy corresponds to a data serial number, and then send it in accordance with the above steps one by one. There is no limit to the data volume of each data here, as long as it does not exceed the second preset value mentioned above. In order to improve the speed, you can refer to the above For example, the amount of data for each split is the second preset value until the split is completed, so that the number of splits is as small as possible. Relatively, the number of transmissions will also be reduced, so that even if the amount of data far exceeds the transmission capacity of data, it can be Quickly send in portions by following the above steps.
在一个实施例中,上述广播数据单元200,包括:In an embodiment, the above-mentioned broadcast data unit 200 includes:
获取信息子单元,用于获取所述同步信息;The obtaining information subunit is used to obtain the synchronization information;
打包数据子单元,用于将所述同步信息加至所述指定数据的通信协议中的帧主体,并打包形成所述数据包。The packed data subunit is used to add the synchronization information to the frame body in the communication protocol of the specified data, and pack it to form the data packet.
本实施例中,通过自定义私有协议来实现携带同步信息,具体而言,将上述指定数据形成上述数据包的过程包括:首先获取同步信息,上述同步信息包括下次将要切换的信道的信息,然后将上述同步信息加入至指定数据的通信协议中,上述方法可基于IEEE802.11协议簇中的帧广播(Broadcast)通信方式来实现,也即通过广播帧数据的方式来实现,上述指定数据的帧结构中,包括有帧主体(Framebody),可通过将上述同步信息加入帧主体的VendorSpecific中,然后打包形成上述数据包。In this embodiment, the synchronization information is carried by a custom private protocol. Specifically, the process of forming the specified data into the data packet includes: first obtaining synchronization information, and the synchronization information includes the information of the channel to be switched next time. Then add the above synchronization information to the communication protocol of the specified data. The above method can be implemented based on the frame broadcast (Broadcast) communication method in the IEEE802.11 protocol suite, that is, by broadcasting frame data. The frame structure includes a frame body (Framebody), and the above-mentioned synchronization information can be added to the VendorSpecific of the frame body, and then packaged to form the above-mentioned data packet.
参照图4,提出本发明的接收广播数据的装置一实施例,所述装置用于执行上述接收广播数据的方法,接收广播数据的装置具体可通过软件或硬件的形式实现。该装置包括:Referring to FIG. 4, an embodiment of the apparatus for receiving broadcast data of the present invention is proposed. The apparatus is used to execute the above method for receiving broadcast data. The apparatus for receiving broadcast data may be implemented in the form of software or hardware. The device includes:
接收数据单元10,用于接收发送端通过指定广播信道所广播发出的数据包,其中,当前的接收信道与所述指定广播信道的信道序号相同,所述数据包由所述发送端对指定数据处理后获得,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包时的指定广播信道的信道序号;The receiving data unit 10 is configured to receive a data packet broadcasted by a sending end through a designated broadcast channel, wherein the current receiving channel is the same as the channel sequence number of the designated broadcast channel, and the data packet is assigned to the designated data by the sending end. After processing, it is obtained that different designated broadcast channels correspond to different channel sequence numbers, the data packets broadcast through each designated broadcast channel carry different synchronization information, and each of the synchronization information includes the next transmission The channel sequence number of the designated broadcast channel in the data packet;
解析数据单元20,用于解析所述数据包得到所述指定数据以及所述同步信息,并启动计时器开始计时;The data parsing unit 20 is configured to parse the data packet to obtain the designated data and the synchronization information, and start a timer to start timing;
切换信道单元30,用于当所述计时器达到预设时间,依据所述同步信息将当前的接收信道切换成与所述同步信息中的信道序号相同的信道。The channel switching unit 30 is configured to switch the current receiving channel to a channel with the same channel sequence number in the synchronization information according to the synchronization information when the timer reaches a preset time.
本实施例中,上述接收广播数据的方法应用于接收设备,此处的接收设备为可以与广播设备通信连接的设备,接收设备处于待接收数据状态,且当前的接收信道与广播设备的指定广播信道一致,接收设备的接收端通过接收信道接收数据包,该数据包由发送端对指定数据处理后获得,并通过指定广播信道广播发出,上述指定数据为控制指令或音频视频等数据,不同的指定广播信道对应不同的信道序号,通过各指定广播信道广播的数据包分别携带有不同的同步信息,且每个同步信息分别包括下一次发送该数据包时的指定广播信道的信道序号,发送端的具体打包以及广播过程参照上述数据广播方法,此处不再赘述。解析该数据包得到同步信息以及指定数据,通过同步信息可知下一次用于发送数据包的指定广播信道的信道序号,也即知道下次轮到哪个指定广播信道进行发送,同时启动计时器开始计时,当计时器达到预设时间,该预设时间可与广播设备切换指定广播信道的时间一致,然后接收端将当前的接收信道切换至下一个接收信道,下一个接收信道与上述获得的同步信息中的信道序号相同,即切换至与上述下一次发送数据包的指定广播信道相同的接收信道,进一步地,上述接收设备可具有多个,也即多个接收设备可同时接收上述广播设备广播出的数据包。In this embodiment, the above method for receiving broadcast data is applied to a receiving device, where the receiving device is a device that can be connected to the broadcasting device in communication, the receiving device is in a state to receive data, and the current receiving channel is the same as the specified broadcast of the broadcasting device. The channel is the same. The receiving end of the receiving device receives the data packet through the receiving channel. The data packet is obtained by the sending end after processing the designated data, and broadcasted through the designated broadcast channel. The above designated data is data such as control instructions or audio and video. The designated broadcast channel corresponds to different channel sequence numbers. The data packets broadcast through each designated broadcast channel carry different synchronization information, and each synchronization information includes the channel number of the designated broadcast channel when the data packet is sent next time. For the specific packaging and broadcasting process, refer to the above-mentioned data broadcasting method, which will not be repeated here. Analyze the data packet to obtain synchronization information and designated data. Through the synchronization information, we can know the channel number of the designated broadcast channel used to send the data packet next time, that is, know which designated broadcast channel will be sent next time, and start a timer to start timing. , When the timer reaches the preset time, the preset time can be consistent with the time when the broadcasting device switches the designated broadcast channel, and then the receiving end switches the current receiving channel to the next receiving channel, and the next receiving channel is synchronized with the above-obtained synchronization information The channel sequence number in is the same, that is, it is switched to the same receiving channel as the designated broadcast channel for sending the data packet next time. Further, the receiving device may have multiple, that is, multiple receiving devices can simultaneously receive the broadcast broadcast from the broadcast device. Packets.
在一个实施例中,上述接收广播数据的装置,还包括:In an embodiment, the foregoing apparatus for receiving broadcast data further includes:
选择数据单元,用于从各数据序号一致的所述数据包中,选择其中一个所述数据包作为与所述发送端通信的数据包。The data selection unit is used to select one of the data packets from the data packets with the same data sequence numbers as the data packet for communication with the sending end.
本实施例中,上述同步信息中包括数据序号,上述待发数据可能可分一个轮流周期即可广播完毕,也可能需分多个轮流周期才可广播发送完毕,当一个轮流周期即可广播发送完毕时,也即待发数据为一份指定数据,接收端在接收各指定广播信道轮流发送的数据包后,每次均解析出上述指定数据,且每个指定数据的数据序号均一致,这时只需中选择其中一个数据包作为发送端通信的数据包即可,当待发数据可分为多份指定数据时,每一周期发送的数据均对应不同的数据序号,解析出上述对应每个数据序号的指定数据,并从各相同数据序号对应的指定数据中分别随机获取一份,然后将选取出的指定数据按数据序号拼接得到上述待发数据,也即得到接收端需要使用的数据。In this embodiment, the above synchronization information includes the data sequence number. The above data to be sent may be broadcast in one rotation period, or it may be broadcast in multiple rotation periods. When one rotation period, it can be broadcast and sent. When it is finished, that is, the data to be sent is a piece of designated data. After receiving the data packets sent by each designated broadcast channel in turn, the receiving end parses out the designated data every time, and the data sequence number of each designated data is the same. At this time, you only need to select one of the data packets as the data packet for the sending end communication. When the data to be sent can be divided into multiple specified data, the data sent in each cycle corresponds to a different data sequence number, and the above corresponding data packets are analyzed. The designated data of a data serial number, and randomly obtain a copy from the designated data corresponding to the same data serial number, and then splice the selected designated data according to the data serial number to obtain the above-mentioned data to be sent, that is, the data that the receiving end needs to use .
本发明同时提出一种终端设备,其包括存储器、处理器和至少一个被存储在存储器中并被配置为由处理器执行的应用程序,所述应用程序被配置为用于执行数据广播方法,或接收广播数据的方法。所述数据广播方法包括以下步骤:获取指定数据;将所述指定数据形成数据包,并将所述数据包分别通过多个不同的指定广播信道轮流广播出去,其中,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包的指定广播信道的信道序号,所述数据包用于被接收端接收,以使得所述接收端通过所述数据包的同步信息将当前的接收信道切换成与所述信道序号相同的信道。The present invention also proposes a terminal device, which includes a memory, a processor, and at least one application program stored in the memory and configured to be executed by the processor, the application program being configured to execute a data broadcasting method, or The method of receiving broadcast data. The data broadcasting method includes the following steps: acquiring designated data; forming the designated data into data packets, and broadcasting the data packets through a plurality of different designated broadcast channels in turn, wherein the different designated broadcast channels Corresponding to different channel sequence numbers, the data packets broadcast through each of the designated broadcast channels respectively carry different synchronization information, and each of the synchronization information respectively includes the channel sequence number of the designated broadcast channel for sending the data packet next time The data packet is used to be received by the receiving end, so that the receiving end switches the current receiving channel to the channel with the same channel sequence number through the synchronization information of the data packet.
本实施例中所描述的数据广播方法,或接收广播数据的方法为本发明中上述实施例所涉及的数据广播方法或接收广播数据的方法,在此不再赘述。The data broadcasting method or the method for receiving broadcast data described in this embodiment is the data broadcasting method or the method for receiving broadcast data involved in the foregoing embodiment of the present invention, and will not be repeated here.
参考图5,本申请还提供了一种计算机可读的存储介质21,存储介质21中存储有计算机程序22,当其在计算机上运行时,使得计算机执行以上实施例所描述的数据广播方法以及上述接收广播数据的方法。Referring to FIG. 5, the present application also provides a computer-readable storage medium 21. The storage medium 21 stores a computer program 22. When it runs on a computer, the computer executes the data broadcasting method described in the above embodiment and The above method of receiving broadcast data.
参考图6,本申请还提供了一种包含指令的计算机设备34,计算机设备包括存储器31和处理器33,存储器31存储有计算机程序22,处理器33执行计算机程序22时实现以上实施例所描述的数据广播方法以及上述接收广播数据的方法。6, the present application also provides a computer device 34 containing instructions. The computer device includes a memory 31 and a processor 33. The memory 31 stores a computer program 22. When the processor 33 executes the computer program 22, the description in the above embodiment is implemented. The data broadcasting method and the above-mentioned method of receiving broadcasting data.
本领域技术人员可以理解,本发明包括涉及用于执行本发明中所述操作中的一项或多项的设备。这些设备可以为所需的目的而专门设计和制造,或者也可以包括通用计算机中的已知设备。这些设备具有存储在其内的计算机程序,这些计算机程序选择性地激活或重构。这样的计算机程序可以被存储在设备(例如,计算机)可读介质中或者存储在适于存储电子指令并分别耦联到总线的任何类型的介质中,所述计算机可读介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随机存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,可读介质包括由设备(例如,计算机)以能够读的形式存储或传输信息的任何介质。Those skilled in the art can understand that the present invention includes devices related to performing one or more of the operations described in the present invention. These devices may be specially designed and manufactured for the required purpose, or may also include known devices in general-purpose computers. These devices have computer programs stored in them, which are selectively activated or reconfigured. Such a computer program may be stored in a device (for example, computer) readable medium or in any type of medium suitable for storing electronic instructions and respectively coupled to a bus. The computer readable medium includes but is not limited to any Types of disks (including floppy disks, hard disks, CD-ROMs, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access) Memory, random access memory), EPROM (Erasable Programmable Read-Only Memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the readable medium includes any medium that stores or transmits information in a readable form by a device (for example, a computer).
以上参照附图说明了本发明的优选实施例,并非因此局限本发明的权利范围。本领域技术人员不脱离本发明的范围和实质,可以有多种变型方案实现本发明,比如作为一个实施例的特征可用于另一实施例而得到又一实施例。凡在运用本发明的技术构思之内所作的任何修改、等同替换和改进,均应在本发明的权利范围之内。The preferred embodiments of the present invention are described above with reference to the accompanying drawings, and the scope of rights of the present invention is not limited thereby. Those skilled in the art can implement the present invention in many variations without departing from the scope and essence of the present invention. For example, the features of one embodiment can be used in another embodiment to obtain another embodiment. Any modification, equivalent replacement and improvement made within the technical concept of using the present invention shall fall within the scope of the rights of the present invention.

Claims (15)

  1. 一种数据广播方法,其特征在于,包括:A data broadcasting method, characterized in that it comprises:
    获取指定数据;Obtain specified data;
    将所述指定数据形成数据包,并将所述数据包分别通过多个不同的指定广播信道轮流广播出去,其中,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包的指定广播信道的信道序号,所述数据包用于被接收端接收,以使得所述接收端通过所述数据包的同步信息将当前的接收信道切换成与所述信道序号相同的信道。The designated data is formed into data packets, and the data packets are broadcasted in turn through a plurality of different designated broadcast channels, wherein different designated broadcast channels correspond to different channel numbers, and the designated broadcast channels pass through each designated broadcast channel. The broadcasted data packets respectively carry different synchronization information, and each of the synchronization information respectively includes the channel sequence number of the designated broadcast channel for the next transmission of the data packet, and the data packet is used to be received by the receiving end. The receiving end is enabled to switch the current receiving channel to a channel with the same sequence number as the channel through the synchronization information of the data packet.
  2. 如权利要求1所述的数据广播方法,其特征在于,所述将所述指定数据形成数据包,并将所述数据包分别通过多个不同的指定广播信道轮流广播出去的步骤,包括:3. The data broadcasting method according to claim 1, wherein the step of forming the designated data into data packets, and broadcasting the data packets through a plurality of different designated broadcast channels in turn, comprises:
    将所述指定数据与第一个所述同步信息打包形成第一个所述数据包,将第一个所述数据包通过第一个所述指定广播信道广播出去,所述第一个同步信息中包括有第二个所述指定广播信道的信道序号,使得所述接收端在接收所述数据包后将当前的所述接收信道切换至与所述信道序号一致的信道;Pack the designated data and the first synchronization information to form the first data packet, broadcast the first data packet through the first designated broadcast channel, and the first synchronization information Includes the second channel sequence number of the designated broadcast channel, so that the receiving end switches the current receiving channel to a channel consistent with the channel sequence number after receiving the data packet;
    在预设时间段内将第一个所述指定广播信道切换至第二个所述指定广播信道,再次将所述指定数据与第二个所述同步信息打包形成第二个所述数据包,并将第二个所述数据包通过第二个所述指定广播信道广播出去,重复切换所述指定广播信道并发送所述数据包直至遍历所有的所述指定广播信道。Switch the first designated broadcast channel to the second designated broadcast channel within a preset time period, and pack the designated data and the second synchronization information again to form the second data packet, And broadcast the second said data packet through the second said designated broadcast channel, repeatedly switch said designated broadcast channel and send said data packet until all said designated broadcast channels are traversed.
  3. 如权利要求1所述的数据广播方法,其特征在于,用于广播数据的信道具有N个,且各所述信道均具有一一对应的信道序号,所述将所述数据包分别通过多个不同的指定广播信道轮流广播出去的步骤之前,包括:The data broadcasting method of claim 1, wherein there are N channels used for broadcasting data, and each of the channels has a one-to-one corresponding channel sequence number, and the data packets are passed through a plurality of channels respectively. Before the steps to broadcast different designated broadcast channels in turn, include:
    判断所述数据包的数据量是否大于第一预设值;Judging whether the data amount of the data packet is greater than a first preset value;
    若是,则从N个所述信道中选取M个指定的所述信道作为所述指定广播信道;If yes, select M designated channels from the N channels as the designated broadcast channels;
    若否,则从N个所述信道中选取K个指定的所述信道作为所述指定广播信道,N、M、K为正整数,且K>M。If not, select K designated channels from the N channels as the designated broadcast channels, where N, M, and K are positive integers, and K>M.
  4. 如权利要求1所述的数据广播方法,其特征在于,所述获取指定数据的步骤之前,包括:3. The data broadcasting method according to claim 1, wherein before the step of obtaining designated data, the method comprises:
    获取待广播的待发数据;Obtain the data to be sent to be broadcast;
    判断所述待发数据的数据量是否大于第二预设值;Judging whether the data amount of the data to be sent is greater than a second preset value;
    若是,将所述待发数据进行分割得到超过一份所述指定数据,且每份所述指定数据的数据量最大值不超过所述第二预设值;If so, dividing the to-be-sent data to obtain more than one piece of the designated data, and the maximum data amount of each piece of the designated data does not exceed the second preset value;
    若否,将所述待发数据默认为所述指定数据。If not, the data to be sent is defaulted to the designated data.
  5. 如权利要求1所述的数据广播方法,其特征在于,所述多个不同的指定广播信道为相互干扰最小的信道。The data broadcasting method according to claim 1, wherein the multiple different designated broadcasting channels are channels with the least mutual interference.
  6. 一种接收广播数据的方法,其特征在于,包括:A method for receiving broadcast data, characterized in that it comprises:
    接收发送端通过指定广播信道所广播发出的数据包,其中,当前的接收信道与所述指定广播信道的信道序号相同,所述数据包由所述发送端对指定数据处理后获得,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包时的指定广播信道的信道序号;Receive a data packet broadcasted by the sending end through a designated broadcast channel, where the current receiving channel is the same as the channel sequence number of the designated broadcast channel, and the data packet is obtained by the sending end after processing the designated data. The designated broadcast channels correspond to different channel sequence numbers, the data packets broadcast through each of the designated broadcast channels carry different synchronization information, and each of the synchronization information includes the designation when the data packet is sent next time. The channel number of the broadcast channel;
    解析所述数据包得到所述指定数据以及所述同步信息,并启动计时器开始计时;Parse the data packet to obtain the designated data and the synchronization information, and start a timer to start timing;
    当所述计时器达到预设时间,依据所述同步信息将当前的接收信道切换成与所述同步信息中的信道序号相同的信道。When the timer reaches a preset time, the current receiving channel is switched to a channel with the same channel sequence number in the synchronization information according to the synchronization information.
  7. 如权利要求6所述的接收广播数据的方法,其特征在于,所述同步信息包括所述指定数据的数据序号,依据所述同步信息将当前的接收信道切换成与所述同步信息中的信道序号相同的信道的步骤之后,包括:The method for receiving broadcast data according to claim 6, wherein the synchronization information includes the data sequence number of the designated data, and the current receiving channel is switched to the channel in the synchronization information according to the synchronization information. After the steps for channels with the same sequence number, include:
    从各所述数据序号一致的所述数据包中,选择其中一个所述数据包作为与所述发送端通信的数据包。From the data packets with the same data sequence numbers, one of the data packets is selected as the data packet for communication with the sending end.
  8. 一种数据广播装置,其特征在于,包括:A data broadcasting device, characterized in that it comprises:
    获取数据单元,用于获取指定数据;Get data unit, used to get specified data;
    广播数据单元,用于将所述指定数据形成数据包,并将所述数据包分别通过多个不同的指定广播信道轮流广播出去,其中,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包的指定广播信道的信道序号,所述数据包用于被接收端接收,以使得所述接收端通过所述数据包的同步信息将当前的接收信道切换成与所述信道序号相同的信道。The broadcast data unit is used to form the designated data into a data packet, and broadcast the data packets through a plurality of different designated broadcast channels in turn, wherein different designated broadcast channels correspond to different channel sequence numbers. The data packets broadcast by each of the designated broadcast channels respectively carry different synchronization information, and each of the synchronization information respectively includes the channel sequence number of the designated broadcast channel for sending the data packet next time, and the data packet is used for Received by the receiving end, so that the receiving end switches the current receiving channel to a channel with the same channel sequence number through the synchronization information of the data packet.
  9. 根据权利要求8所述的数据广播装置,其特征在于,所述广播数据单元,包括:The data broadcasting device according to claim 8, wherein the broadcasting data unit comprises:
    第一广播子单元,用于将所述指定数据与第一个所述同步信息一起打包形成第一个所述数据包,将第一个所述数据包通过第一个所述指定广播信道广播出去,所述第一个同步信息中包括有第二个所述指定广播信道的信道序号,使得所述接收端在接收所述数据包后将当前的所述接收信道切换至与所述信道序号一致的信道;The first broadcast subunit is configured to pack the designated data and the first said synchronization information together to form the first said data packet, and broadcast the first said data packet through the first said designated broadcast channel Out, the first synchronization information includes the second channel sequence number of the designated broadcast channel, so that the receiving end switches the current receiving channel to the channel sequence number after receiving the data packet Consistent channel
    第二广播子单元,用于在预设时间段内将第一个所述指定广播信道切换至第二个所述指定广播信道,再次将所述指定数据与第二个所述同步信息一起打包形成第二个所述数据包,并将第二个所述数据包通过第二个所述指定广播信道广播出去,重复切换所述指定广播信道并发送所述数据包直至遍历所有的所述指定广播信道。The second broadcast subunit is configured to switch the first designated broadcast channel to the second designated broadcast channel within a preset time period, and pack the designated data and the second synchronization information together again Form the second said data packet, and broadcast the second said data packet through the second said designated broadcast channel, repeatedly switch the designated broadcast channel and send the said data packet until all the designated ones are traversed Broadcast channel.
  10. 根据权利要求8所述的数据广播装置,其特征在于,用于广播数据的信道具有N个,且各所述信道均具有一一对应的信道序号,所述数据广播装置,包括:8. The data broadcasting device according to claim 8, wherein there are N channels used for broadcasting data, and each of the channels has a one-to-one corresponding channel sequence number, and the data broadcasting device comprises:
    判断数据单元,用于判断所述数据包的数据量是否大于第一预设值;The judging data unit is used to judge whether the data amount of the data packet is greater than a first preset value;
    第一选取单元,用于判定所述数据包的数据量大于第一预设值时,则从N个所述信道中选取M个指定的所述信道作为所述指定广播信道;The first selecting unit is configured to determine that the data amount of the data packet is greater than a first preset value, select M designated channels from the N channels as the designated broadcast channels;
    第二选取单元,用于判定所述数据包的数据量不大于第一预设值时,则从N个所述信道中选取K个指定的所述信道作为所述指定广播信道,N、M、K为正整数,且K>M。The second selection unit is used to determine that the data volume of the data packet is not greater than the first preset value, select K designated channels from the N channels as the designated broadcast channels, N, M , K is a positive integer, and K>M.
  11. 根据权利要求8所述的数据广播装置,其特征在于,所述数据广播装置,包括:The data broadcasting device according to claim 8, wherein the data broadcasting device comprises:
    获取待发单元,用于获取待广播的待发数据;Obtain the pending unit, which is used to obtain the pending data to be broadcast;
    判断数量单元,用于判断所述待发数据的数据量是否大于第二预设值;A judging quantity unit for judging whether the data amount of the data to be sent is greater than a second preset value;
    分割数据单元,用于判定所述待发数据的数据量大于第二预设值,将所述待发数据进行分割得到超过一份所述指定数据,且每份所述指定数据的数据量最大值不超过所述第二预设值;The data segmentation unit is used to determine that the data volume of the data to be sent is greater than a second preset value, and divide the data to be sent to obtain more than one copy of the designated data, and the data volume of each designated data is the largest The value does not exceed the second preset value;
    默认数据单元,用于判定所述待发数据的数据量不大于第二预设值,将所述待发数据默认为所述指定数据。The default data unit is used to determine that the data volume of the data to be sent is not greater than a second preset value, and to default the data to be sent as the designated data.
  12. 根据权利要求8所述的数据广播装置,其特征在于,所述多个不同的指定广播信道为相互干扰最小的信道。8. The data broadcasting device according to claim 8, wherein the plurality of different designated broadcasting channels are channels with the least mutual interference.
  13. 一种接收广播数据的装置,其特征在于,包括:A device for receiving broadcast data, characterized in that it comprises:
    接收数据单元,用于接收发送端通过指定广播信道所广播发出的数据包,其中,当前的接收信道与所述指定广播信道的信道序号相同,所述数据包由所述发送端对指定数据处理后获得,不同的所述指定广播信道对应不同的信道序号,通过各所述指定广播信道广播的所述数据包分别携带有不同的同步信息,且每个所述同步信息分别包括下一次发送所述数据包时的指定广播信道的信道序号;The receiving data unit is used to receive a data packet broadcasted by the sending end through a designated broadcast channel, wherein the current receiving channel is the same as the channel sequence number of the designated broadcast channel, and the data packet is processed by the sending end on the designated data It is obtained later that the different designated broadcast channels correspond to different channel sequence numbers, the data packets broadcast through each designated broadcast channel carry different synchronization information, and each of the synchronization information includes the next transmission station. The channel sequence number of the designated broadcast channel when describing the data packet;
    解析数据单元,用于解析所述数据包得到所述指定数据以及所述同步信息,并启动计时器开始计时;A parsing data unit, configured to parse the data packet to obtain the designated data and the synchronization information, and start a timer to start timing;
    切换信道单元,用于当所述计时器达到预设时间,依据所述同步信息将当前的接收信道切换成与所述同步信息中的信道序号相同的信道。The channel switching unit is configured to switch the current receiving channel to the channel with the same channel sequence number in the synchronization information according to the synchronization information when the timer reaches a preset time.
  14. 根据权利要求13所述的接收广播数据的装置,其特征在于,还包括:The apparatus for receiving broadcast data according to claim 13, further comprising:
    选择数据单元,用于从各数据序号一致的所述数据包中,选择其中一个所述数据包作为与所述发送端通信的数据包。The data selection unit is used to select one of the data packets from the data packets with the same data sequence numbers as the data packet for communication with the sending end.
  15. 一种终端设备,其特征在于,包括存储器、处理器和至少一个被存储在所述存储器中并被配置为由所述处理器执行的应用程序,所述应用程序被配置为用于执行如权利要求1-5任一项所述的数据广播方法,或如权利要求6-7任一项所述的接收广播数据的方法。A terminal device, characterized by comprising a memory, a processor, and at least one application program stored in the memory and configured to be executed by the processor, the application program being configured to execute The data broadcasting method according to any one of claims 1-5, or the method for receiving broadcast data according to any one of claims 6-7.
PCT/CN2020/090389 2020-05-15 2020-05-15 Data broadcasting method, method and apparatus for receiving broadcast data and terminal device WO2021226974A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/090389 WO2021226974A1 (en) 2020-05-15 2020-05-15 Data broadcasting method, method and apparatus for receiving broadcast data and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/090389 WO2021226974A1 (en) 2020-05-15 2020-05-15 Data broadcasting method, method and apparatus for receiving broadcast data and terminal device

Publications (1)

Publication Number Publication Date
WO2021226974A1 true WO2021226974A1 (en) 2021-11-18

Family

ID=78526300

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/090389 WO2021226974A1 (en) 2020-05-15 2020-05-15 Data broadcasting method, method and apparatus for receiving broadcast data and terminal device

Country Status (1)

Country Link
WO (1) WO2021226974A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101779454A (en) * 2007-08-01 2010-07-14 松下电器产业株式会社 Digital broadcast transmission device and digital broadcast reception device
JP2013026858A (en) * 2011-07-21 2013-02-04 Toshiba Corp Program data processing device and method
CN107113020A (en) * 2014-10-13 2017-08-29 麦拉普斯有限责任公司 Quick radio communication for moving timing application
WO2019099279A1 (en) * 2017-11-14 2019-05-23 Sinclair Broadcast Group, Inc. Broadcast relaying via cooperative multi-channel transmission
CN110050433A (en) * 2017-01-09 2019-07-23 英特尔Ip公司 Bandwidth self-adaption for wireless communication system
CN110167201A (en) * 2018-09-30 2019-08-23 腾讯科技(深圳)有限公司 A kind of method, relevant apparatus and the system of data transmission
CN111314962A (en) * 2020-05-15 2020-06-19 深圳市南方硅谷半导体有限公司 Data broadcasting method, apparatus, storage medium and method for receiving broadcast data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101779454A (en) * 2007-08-01 2010-07-14 松下电器产业株式会社 Digital broadcast transmission device and digital broadcast reception device
JP2013026858A (en) * 2011-07-21 2013-02-04 Toshiba Corp Program data processing device and method
CN107113020A (en) * 2014-10-13 2017-08-29 麦拉普斯有限责任公司 Quick radio communication for moving timing application
CN110050433A (en) * 2017-01-09 2019-07-23 英特尔Ip公司 Bandwidth self-adaption for wireless communication system
WO2019099279A1 (en) * 2017-11-14 2019-05-23 Sinclair Broadcast Group, Inc. Broadcast relaying via cooperative multi-channel transmission
CN110167201A (en) * 2018-09-30 2019-08-23 腾讯科技(深圳)有限公司 A kind of method, relevant apparatus and the system of data transmission
CN111314962A (en) * 2020-05-15 2020-06-19 深圳市南方硅谷半导体有限公司 Data broadcasting method, apparatus, storage medium and method for receiving broadcast data

Similar Documents

Publication Publication Date Title
CN113411313B (en) Data transmission method, device and system
CN103888818B (en) A kind of television program playing method, equipment and system
EP3768027A1 (en) Random access processing method and related device
RU2019133658A (en) DATA TRANSMISSION METHOD, ACCESS NETWORK DEVICE, TERMINAL AND COMMUNICATION SYSTEM
WO2019029363A1 (en) Random access response method and device, base station and terminal
CN107925629B (en) Method and device for sending data message in IPv6 network
EP4002926A1 (en) Data transmission method, terminal, and ran device
RU2015128625A (en) WIRELESS MULTIMEDIA COMMUNICATION IN REAL TIME BY USING MULTIPLE MULTIMEDIA STREAMS
CN106464581A (en) Data transmission method and system and data receiving device
US10980043B2 (en) Data transmission method and device, and base station
CN106549737A (en) A kind of data transmission method and device
US11246169B2 (en) Communication method, related device, and system
CN112055315B (en) Bluetooth broadcast communication method, system and master device and slave device thereof
JP6038922B2 (en) Systems and methods for resetting network stations
CN111314962B (en) Data broadcasting method, apparatus, storage medium and method for receiving broadcast data
TWI513354B (en) Synchronization of transmission intervals in wi-fi
US11129119B2 (en) Data synchronization method, device and storage medium
WO2021226974A1 (en) Data broadcasting method, method and apparatus for receiving broadcast data and terminal device
CN111435871A (en) Method and equipment for determining feedback resources in sidelink
TWI764458B (en) Bluetooth-based data transmission method and data reception method, communicating apparatus and computer storage medium
CN109286476A (en) A kind of method, receiving end and transmitting terminal transmitting data
JP6001724B1 (en) Communications system
CN105264942B (en) Data transmission transmitting terminal equipment, receiving terminal equipment and method
CN113647171B (en) Method and apparatus for wireless communication
CN113890859A (en) Data transmission method, device, medium and product

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: 20935533

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: 20935533

Country of ref document: EP

Kind code of ref document: A1