Communication method and apparatus, electronic device, storage medium, computer program product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2026-08-11
AI Technical Summary
每个设备都可能存在数据发送时隙以及数据接收时隙,但是相关技术中,存在数据发送时隙无数据可发送,或数据接收时隙无法接收到数据的情况,导致通信资源利用率低
[0045] This embodiment optimizes the data transmission mechanism of the first device. When the data transmission slot of the first device arrives, it checks whether there is a demand to transmit the collected first data. If not, it transmits the data received and stored by the first device in a historical reception slot, which was transmitted by the second device. On the one hand, by transmitting the second data pre-stored in the first device during an idle data transmission slot, the second data receives additional forwarding opportunities, significantly reducing the packet loss rate of the second device during data reception. This enhances the continuity and stability of data transmission, optimizes communication quality, and provides users with a smoother and more satisfactory communication experience. On the other hand, it allows for the full utilization of communication resources in previously idle data transmission slots, improving the utilization rate of communication resources.
Smart Images

Figure CN122554890A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and in particular to a communication method and apparatus, electronic equipment, storage medium, and computer program product. Background Technology
[0002] Technologies for communication between multiple devices are rapidly developing, such as full-duplex and half-duplex communication technologies. Each device may have data transmission and reception slots, but in some technologies, there are situations where there is no data to send in the data transmission slot or no data to receive in the data reception slot, resulting in low utilization of communication resources. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides a communication method and apparatus, an electronic device, a storage medium, and a computer program product.
[0004] According to a first aspect of the present disclosure, a communication method is provided, the method comprising:
[0005] In response to the data transmission time slot arriving at the first device, determine whether the first device has collected the first data;
[0006] If the first device fails to collect the first data, the second data stored in the first device is sent; wherein the second data is data sent by the second device that was received and stored by the first device in a historical data reception time slot.
[0007] In some embodiments, the second data is associated with a survival time, and the method further includes:
[0008] Based on the data processing method of the second data after the first device receives the second data, the lifespan of the second data is reduced;
[0009] In response to the fact that the survival time of the second data after reduction is less than a preset time threshold, the second data stored in the first device is deleted.
[0010] In some embodiments, the method of reducing the lifespan of the second data based on the data processing of the second data after the first device receives the second data includes:
[0011] After storing the second data in the first device, each data transmission time slot and data reception time slot reduces the lifespan of the second data; wherein, the lifespan after the previous reduction is the initial value of the lifespan for the next reduction.
[0012] In some embodiments, the method of reducing the lifespan of the second data based on the data processing of the second data after the first device receives the second data includes:
[0013] In response to the first device receiving and storing the second data, the lifespan of the second data is reduced by a preset step size.
[0014] In some embodiments, the second data is data carried in a data packet sent by the two devices, and the data packet also carries time information indicating the lifespan of the second data.
[0015] In some embodiments, the first device and the second device are devices in a communication network. When the second data is data collected by the second device, the lifespan associated with the second data is related to the total number of devices included in the communication network.
[0016] In some embodiments, the method further includes:
[0017] In response to receiving third data, and the lifetime associated with the third data being greater than or equal to the lifetime associated with the second data, the second data stored in the first device is replaced with the third data.
[0018] In some embodiments, the data transmission time slot of the first device and the historical data time slot are time slots in the same communication event; or, the communication event to which the data transmission time slot of the first device belongs is different from the communication event to which the historical data reception time slot belongs.
[0019] In some embodiments, the first data and the second data are voice data, and the first device and the second device are Bluetooth intercom devices.
[0020] In some embodiments, the method further includes:
[0021] If the first device collects the first data, the first data is sent.
[0022] According to a second aspect of the present disclosure, a communication device is provided, the device comprising:
[0023] The determination module is configured to determine whether the first device has collected the first data in response to the data transmission time slot arriving at the first device;
[0024] The first sending module is configured to send second data stored in the first device when the first device has not collected the first data; wherein the second data is data sent by the second device that was received and stored by the first device in a historical data receiving time slot.
[0025] In some embodiments, the second data is associated with a survival time, and the apparatus further includes:
[0026] The processing module is configured to reduce the lifespan of the second data based on the data processing method of the second data received by the first device.
[0027] The deletion module is configured to delete the second data stored in the first device in response to the second data's survival time being less than a preset time threshold after reduction.
[0028] In some embodiments, the processing module is further configured to reduce the lifespan of the second data in each data transmission time slot and data reception time slot after storing the second data in the first device; wherein the lifespan after the previous reduction is the initial value of the lifespan for the next reduction.
[0029] In some embodiments, the processing module is further configured to reduce the lifespan of the second data by a preset step size in response to the first device receiving and storing the second data.
[0030] In some embodiments, the second data is data carried in a data packet sent by the two devices, and the data packet also carries time information indicating the lifespan of the second data.
[0031] In some embodiments, the first device and the second device are devices in a communication network. When the second data is data collected by the second device, the lifespan associated with the second data is related to the total number of devices included in the communication network.
[0032] In some embodiments, the apparatus further includes:
[0033] The replacement module is configured to replace the second data stored in the first device with the third data in response to receiving third data, wherein the lifetime associated with the third data is greater than or equal to the lifetime associated with the second data.
[0034] In some embodiments, the data transmission time slot of the first device and the historical data time slot are time slots in the same communication event; or, the communication event to which the data transmission time slot of the first device belongs is different from the communication event to which the historical data reception time slot belongs.
[0035] In some embodiments, the first data and the second data are voice data, and the first device and the second device are Bluetooth intercom devices.
[0036] In some embodiments, the apparatus further includes:
[0037] The second sending module is configured to send the first data when the first device collects the first data.
[0038] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0039] processor;
[0040] Memory used to store computer programs or instructions;
[0041] The processor executes the computer program or instructions to implement the steps of the method described in the first aspect above.
[0042] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, the storage medium storing a computer program or instructions which, when executed by a processor, implement the steps of the method described in the first aspect above.
[0043] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the steps of the method described in the first aspect above.
[0044] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0045] This embodiment optimizes the data transmission mechanism of the first device. When the data transmission slot of the first device arrives, it checks whether there is a demand to transmit the collected first data. If not, it transmits the data received and stored by the first device in a historical reception slot, which was transmitted by the second device. On the one hand, by transmitting the second data pre-stored in the first device during an idle data transmission slot, the second data receives additional forwarding opportunities, significantly reducing the packet loss rate of the second device during data reception. This enhances the continuity and stability of data transmission, optimizes communication quality, and provides users with a smoother and more satisfactory communication experience. On the other hand, it allows for the full utilization of communication resources in previously idle data transmission slots, improving the utilization rate of communication resources.
[0046] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0048] Figure 1 This is a flowchart illustrating a communication method according to an exemplary embodiment.
[0049] Figure 2 This is a schematic diagram illustrating a communication event timing according to an exemplary embodiment.
[0050] Figure 3 This is a schematic diagram illustrating a data packet structure according to an exemplary embodiment.
[0051] Figure 4 This is a block diagram of a communication device according to an exemplary embodiment.
[0052] Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0053] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0054] Among the many emerging communication technologies, Bluetooth 5.1 introduced a one-way broadcast audio streaming technology based on Broadcast Isochronous Stream (BIS). This technology has become a preferred solution for broadcast audio due to its low latency and high sound quality. The principle of BIS broadcasting is based on a transmitting device sending pre-arranged audio data packets to one or more receiving devices at preset time intervals. Receiving devices can synchronously listen to and receive the audio data packets from the transmitting device, achieving seamless sharing of audio content. However, BIS technology has an inherent limitation in its architectural design, strictly limiting the existence of only one sender. That is, only one device can acquire the right to speak and send audio data, while other devices only act as receivers. This means that this technology cannot be applied to scenarios requiring two-way communication.
[0055] To realize bidirectional communication applications based on BIS technology, related technologies have modified the current BIS communication scheme. Through relevant mechanisms, multiple communication time slots within a communication period are allocated to various communication devices, allowing them to take turns sending data based on different time slots, thus meeting the needs of bidirectional communication. There are two main implementation methods in these technologies: First, the master device in the communication network broadcasts network information, and other node devices join the communication network through competition and obtain fixed data transmission time slots. During communication, each device strictly follows the allocated data transmission time slots to send data sequentially and receives data sent by other devices in the data reception time slots. Second, the communication network is established by the master device, and other devices access the communication network through scanning, determining their data transmission time slots based on the access order. During communication, each device sends data packets in its corresponding data transmission time slot and receives data sent by other devices in the data reception time slot, thereby achieving bidirectional communication.
[0056] However, in both methods, each device is allocated a fixed data transmission time slot and transmits data within that slot. Since not every device needs to transmit data during its allocated time slot, even if a device has no data to transmit during its time slot, that slot will still be occupied, resulting in underutilization of bandwidth resources and unnecessary waste of communication time resources. Furthermore, in fixed-slot communication, the existence of idle time slots can lead to discontinuous data transmission, negatively impacting the smoothness of data transmission.
[0057] In response, this disclosure provides a communication method. Figure 1 This is a flowchart illustrating a communication method according to an exemplary embodiment. For example... Figure 1 As shown, the method mainly includes the following steps:
[0058] In S11, in response to the data transmission time slot arriving at the first device, it is determined whether the first device has collected the first data;
[0059] In S12, if the first device fails to collect the first data, the second data stored in the first device is sent; wherein, the second data is data sent by the second device that was received and stored by the first device in a historical data receiving time slot.
[0060] The communication method in this disclosure can be applied to full-duplex or half-duplex communication scenarios between devices, such as multi-person voice intercom, remote video conferencing, and Internet of Things (IoT) scenarios. For example, in a remote video conferencing scenario, participants using Bluetooth headsets or speakers can simultaneously hear others speaking and input voice, achieving two-way interaction and discussion; or in a multi-person voice intercom scenario, multiple participants take turns speaking and listening to the conversation. The data transmission process of this communication method can employ data transmission methods such as Bluetooth, Wi-Fi, ZigBee, LoRa, and Radio Frequency Identification (RFID). In this disclosure, the executing entity of the communication method is a first device, which can vary depending on the specific application scenario and data transmission method. For example, the first device can be a Bluetooth headset, Bluetooth speaker, laptop computer, wireless router, smart sensor, LoRa gateway, IoT gateway, and RFID reader / writer.
[0061] In step S11, during the data transmission gap of the first device, the first device determines whether it has successfully acquired the first data. A data transmission gap refers to a time window reserved for data packets or data frames during data transmission. This time window is fixed or dynamically allocated according to certain rules, ensuring that data packets or data frames can be transmitted within a predetermined time. Here, the first data is the data that the first device intends to transmit during this data transmission gap. Of course, the first data can be data acquired by the first device during the current data transmission gap, or data acquired by the first device during a period prior to the current data transmission gap.
[0062] In step S12, it is determined that the first device did not collect the first data during the current data transmission gap. Here, the failure to collect the first data may be due to two reasons: first, the first data has not yet been generated, so the first device cannot collect the first data; second, an error occurred in the process of collecting the first data, causing the first device to fail to successfully receive the first data.
[0063] In step S12, if it is determined that the first device has not collected the first data during the current data transmission gap, this indicates that there is no need for the first device to transmit the first data. Therefore, the first device directly reads the second data pre-stored in the data transmission gap and transmits it. Here, the second data refers to the data received by the first device from the second device during a historical data reception time slot and stored locally on the first device. As mentioned above, since both the first and second devices are allocated data transmission time slots, they will take turns transmitting data in their respective corresponding data transmission time slots according to a predetermined schedule. However, since there is not a need to transmit data in every data transmission time slot, there may be a situation where the first device has no first data to transmit in a corresponding transmission time slot. Here, transmitting the pre-stored second data during the data transmission time slot ensures that even if no new data is collected in the current data transmission time slot, the time slot is occupied by transmitting the second data, preventing the time resources occupied by the first device in that data transmission time slot from being wasted.
[0064] In this embodiment of the disclosure, the first data and the second data can be different types of data such as audio, images, and text. In some embodiments, the first data and the second data are image data, and the first device and the second device are devices that support image data transmission, such as mobile phones and computers.
[0065] In other embodiments, the first data and the second data are voice data, and the first device and the second device are Bluetooth intercom devices.
[0066] In this embodiment, the first data and the second data are voice data, and the first device and the second device are Bluetooth intercom devices. In a multi-person Bluetooth intercom scenario, the first device and the second device take turns communicating according to a preset data transmission time slot. If the first device does not have a need to transmit the first data within its data transmission time slot, for example, if the first data is not collected, then it transmits the second data stored in the first device. The second data is pre-stored voice data transmitted by the second device in historical data reception time slots. Therefore, the first device can transmit historical voice data when its data transmission time slot is idle, increasing the chance of re-forwarding historical voice data and thus reducing the probability of packet loss of historical voice data.
[0067] In some embodiments, the method further includes:
[0068] If the first device collects the first data, the first data is sent.
[0069] In this embodiment, if it is determined that the first device has collected first data during the current transmission gap, this indicates that the first device has a need to transmit the first data. Therefore, the first device immediately executes a data transmission operation, prioritizing the transmission of the first data. Even if the first device stores second data, when the first data is collected and transmission is required, the first data is prioritized for transmission during that transmission gap. This achieves real-time transmission of the collected first data, ensuring that the more important first data reaches the receiving end in a timely manner to participate in the business process.
[0070] It is understandable that, compared to related technologies where each device has a fixed data transmission time slot, even if there is no need to transmit the first data, the first device will still occupy that data transmission time slot, resulting in unnecessary waste of communication resources. This embodiment optimizes the data transmission mechanism of the first device. When the data transmission time slot of the first device is reached, it checks whether there is a need to transmit the collected first data. If not, it transmits the data received and stored by the first device in a historical reception time slot, which was transmitted by the second device. On one hand, by transmitting the second data pre-stored in the first device during an idle data transmission time slot, the second data receives additional forwarding opportunities, significantly reducing the packet loss rate of the second device during data reception, thereby enhancing the continuity and stability of data transmission, optimizing communication quality, and providing users with a smoother and more satisfactory communication experience. On the other hand, it enables the full utilization of communication resources in previously idle data transmission time slots, improving the utilization rate of communication resources.
[0071] In some embodiments, the second data is associated with a survival time, and the method further includes:
[0072] Based on the data processing method of the second data after the first device receives the second data, the lifespan of the second data is reduced;
[0073] In response to the fact that the survival time of the second data after reduction is less than a preset time threshold, the second data stored in the first device is deleted.
[0074] In this embodiment of the disclosure, the second data is associated with a lifetime, where lifetime refers to the lifespan of the second data in the communication network. This lifetime is used to limit the length of time the second data remains in the communication network to prevent it from circulating indefinitely. In some embodiments, during the historical data reception time slots of the first device, the second device sends the second data to the first device in the form of data frames. That is, the second data is the data carried within the data frame, placed in the data field of the data frame. Furthermore, the frame header or trailer of the data frame also carries time information indicating the lifetime of the second data, thus enabling the second data to be associated with a lifetime.
[0075] In other embodiments, the second data is data carried in a data packet sent by the second device, the data packet also carrying time information indicating the lifespan of the second data.
[0076] In this embodiment of the disclosure, during a historical data reception time slot, the second device sends second data to the first device in the form of a data packet, i.e., the second data is the data carried in the data packet. The data packet can be a Bluetooth data packet or a Wi-Fi data packet, etc. For example, the data packet is in the form of a Bluetooth data packet, and the second data is the information included in the payload field of that Bluetooth data packet. Furthermore, the data packet also carries time information indicating the lifespan of the second data, which can be placed in the header of the data packet.
[0077] In this embodiment of the disclosure, during the communication process, based on the data processing method of the first device after receiving the second data, the first device reduces the lifespan of the second data.
[0078] In some embodiments, the method of reducing the lifespan of the second data based on the data processing of the second data after the first device receives the second data includes:
[0079] After storing the second data in the first device, each data transmission time slot and data reception time slot reduces the lifespan of the second data; wherein, the lifespan after the previous reduction is the initial value of the lifespan for the next reduction.
[0080] In this embodiment, after storing the second data, the first device reduces the lifespan of the locally stored second data during each data transmission and reception time slot. Here, the lifespan after the previous reduction is used as the initial value before the next adjustment. Furthermore, when reducing the lifespan, the previous reduction is used as the initial value before the next adjustment, and further reductions are made based on this initial value. In this embodiment, the lifespan of the second data in the communication network is gradually shortened by reducing the lifespan.
[0081] In other embodiments, the method of reducing the lifespan of the second data based on the data processing of the second data after the first device receives the second data includes:
[0082] In response to the first device receiving and storing the second data, the lifespan of the second data is reduced by a preset step size.
[0083] In this embodiment of the disclosure, the lifespan of the second data is immediately reduced upon the first device receiving and storing the second data. Here, the process of the first device receiving and storing the second data is equivalent to the second data experiencing a time slot; therefore, the lifespan of the second data is also reduced. This allows for a more accurate update of the second data's lifespan, enabling it to more accurately represent the communication sub-events that the second data will experience, thereby facilitating accurate management of the second data's lifecycle.
[0084] In this embodiment of the disclosure, when the first device reduces the lifespan of the second data, it can first set a preset step size, and then reduce the lifespan associated with the second data by the preset step size every time the first device stores the second data or after storage, for each working time slot. For example, the preset step size is set to 1, and the lifespan associated with the second data is reduced by 1 every time the first device experiences a working time slot, that is, the lifespan is reduced by one step size unit.
[0085] In this embodiment, the first device further performs targeted processing on the second data stored in the first device based on the reduced lifespan of the second data. If the reduced lifespan of the second data is less than a preset time threshold, the second data stored in the first device is deleted. Here, the preset time threshold can be set based on user needs; for example, the preset time threshold can be 0. In this case, as long as the lifespan of the second time is greater than 0, the second data can be forwarded. If the lifespan of the second data is less than the preset time threshold, it can be considered that the second time can no longer be forwarded, and there is no need for the second time to be stored in the first device, so the second data is deleted from the first device. If the reduced lifespan of the second data is greater than or equal to the preset time threshold, the second data stored in the first device is retained and continues to experience subsequent time slots.
[0086] It is understood that, in this embodiment of the disclosure, by dynamically updating the lifespan of the second data and quickly removing outdated second data when its lifespan drops below a preset time threshold, the second data stored in the first device always maintains a high degree of timeliness and effectiveness.
[0087] In some embodiments, the first device and the second device are devices in a communication network. When the second data is data collected by the second device, the lifespan associated with the second data is related to the total number of devices included in the communication network.
[0088] In this embodiment of the disclosure, the communication network consists of at least a first device and a second device. In the communication network, after the second device collects the second data in the historical data reception time slot, it sends the second data to the first device, and the first device receives and stores the second data.
[0089] In this embodiment of the disclosure, the second data is data collected by the second device. Before sending the second data, the second device sets an associated time-to-live (TTL) for the second data. Here, the TTL associated with the second data is related to the total number of devices in the communication network. In some embodiments, the TTL associated with the second data can be directly set to a value smaller than the total number of devices.
[0090] In other embodiments, the lifetime of the second data association can be set by combining the total number of devices with a preset time threshold. For example, if the total number of devices is N and the preset time threshold is 0, the lifetime of the second data association can be set to <= N-1; if the total number of devices is N and the preset time threshold is 1, the lifetime of the second data association can be set to <= N. And so on, the range of lifetime values under various combinations of the total number of devices and preset time thresholds can be obtained. Here, it is only necessary to ensure that the lifetime of the second data is less than the total time slots experienced by the devices in the communication network.
[0091] It is understood that by dynamically associating the lifespan of the second data with the total number of devices in the communication network in this embodiment of the disclosure, the second device can more accurately set the lifespan associated with the second data, so as to more accurately and effectively control the storage time of the second data on the first device.
[0092] In some embodiments, the method further includes:
[0093] In response to receiving third data, and the lifetime associated with the third data being greater than or equal to the lifetime associated with the second data, the second data stored in the first device is replaced with the third data.
[0094] In this embodiment, after the first device stores the data sent by the second device, if it receives third data (which also has its own time-to-live), the time-to-live associated with the third data is compared with the time-to-live associated with the previously stored second data. If the time-to-live associated with the third data is greater than or equal to the time-to-live associated with the previously stored second data, the third data is considered to have a longer lifespan than the second data and may be more suitable for forwarding in subsequent time slots. In this case, a data replacement process is triggered, replacing the previously stored second data in the first device with the third data. If the time-to-live associated with the third data is less than the time-to-live associated with the previously stored second data, the first device continues to store the second data without data replacement.
[0095] It is understood that in the embodiments of this disclosure, when the lifespan of the second data association is less than or equal to the lifespan of the newly received third data association, the third data is used to replace the second data with a shorter lifespan in the first device, so that the data stored in the first device remains up-to-date, which helps to improve the timeliness and effectiveness of the data stored in the first device.
[0096] In some embodiments, the data transmission time slot of the first device and the historical data time slot are time slots in the same communication event; or, the communication event to which the data transmission time slot of the first device belongs is different from the communication event to which the historical data reception time slot belongs.
[0097] In this embodiment of the disclosure, the data transmission time slot of the first device and the historical data reception time slot are determined to be time slots within the same communication event. Here, the data transmission time slot of the first device and the historical data reception time slot can be time slots within the same communication event. In this case, the first device receives and stores the second data in the historical data reception time slot within the same communication event, and in the subsequent data transmission time slot within the same communication event, if it is determined that the first device has not collected the first data, then the second data is transmitted.
[0098] In this embodiment of the disclosure, the data transmission time slot of the first device and the historical data reception time slot can also be time slots in different communication events. For example, if the historical data reception time slot is the last time slot in the previous communication event, and the data transmission time slot of the first device is a certain data transmission time slot in the next communication event, then the first device can receive and store the second data in the previous communication event, and in a certain data transmission time slot of the next communication event, if it is determined that the first device has not collected the first data, then it will transmit the second data.
[0099] It is understood that, in this embodiment of the present disclosure, after storing the second data in the first device, the second data can be sent in the same communication event or the next communication event, which can make more efficient use of time resources during the communication process.
[0100] Figure 2 This is a schematic diagram illustrating a communication event timing according to an exemplary embodiment. For example... Figure 2 As shown, a communication network includes multiple devices, such as the master device, the first slave device, and the second slave device in the figure. Each device corresponds to one communication sub-event. T1 is the interval of a communication sub-event, where T1 refers to the interval during which the master device is in a data transmission time slot in this embodiment of the disclosure; T2 is the interval of a communication event, where the interval of a communication event is composed of the intervals of multiple communication sub-times; T3 is the total communication time of the communication network, which is composed of the intervals of multiple communication events.
[0101] Figure 3 This is a schematic diagram illustrating a data packet structure according to an exemplary embodiment. For example... Figure 3 As shown, the data packet includes an L31 header, an L32 data body, an L34 cyclic redundancy check (CRC) code, and possibly an L33 message integrity check code. Here, the L32 data body includes the actual data transmitted in the data packet; it contains the information that the communicating parties need to exchange and is the main content of the data packet. The L34 CRC code is used to check the accuracy of the data during transmission. The L33 message integrity check code is used to detect whether the data has been altered or corrupted during transmission. The L31 header of the data packet typically contains metadata for routing and control. In this embodiment, the L31 header includes a logical link identifier L311, a connection sequence start identifier L312, a connection sequence end identifier L313, a data body length L314, a data source identifier L315, and time information L316. Among them, the logical link identifier L311 is used to identify the type and destination of the data packet; the connection sequence termination flag L313 is used to identify the starting point at the sending end; the data body length L314 is used to indicate the end of a connection sequence or session; the data body length L314 refers to the length of the data body L32 carried by the data packet; the data source identifier L315 indicates which device first sent the data packet; and the time information L316 indicates the lifespan of the data included in the data body L32.
[0102] Figure 4 This is a block diagram illustrating a communication device according to an exemplary embodiment. Figure 4 As shown, the device mainly includes:
[0103] The determination module 401 is configured to determine whether the first device has collected the first data in response to the data transmission time slot arriving at the first device.
[0104] The first sending module 402 is configured to send second data stored in the first device when the first device has not collected the first data; wherein the second data is data sent by the second device that was received and stored by the first device in a historical data receiving time slot.
[0105] In some embodiments, the second data is associated with a survival time, and the apparatus further includes:
[0106] The processing module is configured to reduce the lifespan of the second data based on the data processing method of the second data received by the first device.
[0107] The deletion module is configured to delete the second data stored in the first device in response to the second data's survival time being less than a preset time threshold after reduction.
[0108] In some embodiments, the processing module is further configured to reduce the lifespan of the second data in each data transmission time slot and data reception time slot after storing the second data in the first device; wherein the lifespan after the previous reduction is the initial value of the lifespan for the next reduction.
[0109] In some embodiments, the processing module is further configured to reduce the lifespan of the second data by a preset step size in response to the first device receiving and storing the second data.
[0110] In some embodiments, the second data is data carried in a data packet sent by the two devices, and the data packet also carries time information indicating the lifespan of the second data.
[0111] In some embodiments, the first device and the second device are devices in a communication network. When the second data is data collected by the second device, the lifespan associated with the second data is related to the total number of devices included in the communication network.
[0112] In some embodiments, the apparatus further includes:
[0113] The replacement module is configured to replace the second data stored in the first device with the third data in response to receiving third data, wherein the lifetime associated with the third data is greater than or equal to the lifetime associated with the second data.
[0114] In some embodiments, the data transmission time slot of the first device and the historical data time slot are time slots in the same communication event; or, the communication event to which the data transmission time slot of the first device belongs is different from the communication event to which the historical data reception time slot belongs.
[0115] In some embodiments, the first data and the second data are voice data, and the first device and the second device are Bluetooth intercom devices.
[0116] In some embodiments, the apparatus further includes:
[0117] The second sending module is configured to send the first data when the first device collects the first data.
[0118] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0119] Figure 5This is a structural block diagram of an electronic device 500 according to an exemplary embodiment. For example, the electronic device 500 may be a Bluetooth headset, a Bluetooth speaker, a laptop computer, a wireless router, a smart sensor, a LoRa gateway, an IoT gateway, and an RFID reader, etc.
[0120] Reference Figure 5 The electronic device 500 may include one or more of the following components: processing component 502, memory 504, power supply component 506, multimedia component 508, audio component 510, input / output (I / O) interface 512, sensor component 514, and communication component 516.
[0121] Processing component 502 typically controls the overall operation of electronic device 500, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
[0122] Memory 504 is configured to store various types of data to support operation on electronic device 500. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 500, contact data, phonebook data, messages, pictures, and videos. Memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0123] Power supply component 506 provides power to various components of electronic device 500. Power supply component 506 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 500.
[0124] Multimedia component 508 includes a screen that provides an output interface between electronic device 500 and user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When electronic device 500 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0125] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when electronic device 500 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.
[0126] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0127] Sensor assembly 514 includes one or more sensors for providing state assessments of various aspects of electronic device 500. For example, sensor assembly 514 may detect the on / off state of electronic device 500, the relative positioning of components such as the display and keypad of electronic device 500, changes in position of electronic device 500 or one of its components, the presence or absence of user contact with electronic device 500, orientation or acceleration / deceleration of electronic device 500, and temperature changes of electronic device 500. Sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.
[0128] Communication component 516 is configured to facilitate wired or wireless communication between electronic device 500 and other devices. Electronic device 500 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.
[0129] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0130] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including executable instructions or a computer program, which can be executed by a processor 520 of an electronic device 500 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0131] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of a mobile terminal, enables the mobile terminal to perform any of the communication methods described in the embodiments of this disclosure.
[0132] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the communication methods described in this disclosure.
[0133] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0134] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A communication method characterized by comprising: The method includes: In response to the data transmission time slot arriving at the first device, determine whether the first device has collected the first data; If the first device fails to collect the first data, the second data stored in the first device is sent; wherein the second data is data sent by the second device that was received and stored by the first device in a historical data reception time slot.
2. The method of claim 1, wherein, The second data is associated with a survival time, and the method further includes: Based on the data processing method of the second data after the first device receives the second data, the lifespan of the second data is reduced; In response to the fact that the survival time of the second data after reduction is less than a preset time threshold, the second data stored in the first device is deleted.
3. The method according to claim 2, characterized in that, The method of processing the second data after the first device receives the second data, thereby reducing the lifespan of the second data, includes: After storing the second data in the first device, each data transmission time slot and data reception time slot reduces the lifespan of the second data; wherein, the lifespan after the previous reduction is the initial value of the lifespan for the next reduction.
4. The method according to claim 3, characterized in that, The data processing method for the second data after the first device receives the second data, reducing the lifespan of the second data, includes: In response to the first device receiving and storing the second data, the lifespan of the second data is reduced by a preset step size.
5. The method according to claim 2, characterized in that, The second data is the data carried in the data packet sent by the two devices, and the data packet also carries time information indicating the lifespan of the second data.
6. The method according to claim 2, characterized in that, The first device and the second device are devices in a communication network. When the second data is data collected by the second device, the lifespan associated with the second data is related to the total number of devices included in the communication network.
7. The method according to any one of claims 2 to 6, characterized in that, The method further includes: In response to receiving third data, and the lifetime associated with the third data being greater than or equal to the lifetime associated with the second data, the second data stored in the first device is replaced with the third data.
8. The method according to any one of claims 1 to 6, characterized in that, The data transmission time slot of the first device and the historical data time slot are time slots in the same communication event; or, the communication event to which the data transmission time slot of the first device belongs is different from the communication event to which the historical data reception time slot belongs.
9. The method according to any one of claims 1 to 6, characterized in that, The first data and the second data are voice data, and the first device and the second device are Bluetooth intercom devices.
10. The method according to any one of claims 1 to 6, characterized in that, The method further includes: If the first device collects the first data, the first data is sent.
11. A communication device, characterized in that, The device includes: The determination module is configured to determine whether the first device has collected the first data in response to the data transmission time slot arriving at the first device; The first sending module is configured to send second data stored in the first device when the first device has not collected the first data; wherein the second data is data sent by the second device that was received and stored by the first device in a historical data receiving time slot.
12. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 10.
13. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
14. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 10.