Communication method and device based on time slot variable protocol in half-duplex communication mode
In the half-duplex communication system, the master device adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent feedback from the slave device, and solves the problem of inconsistent data bandwidth of the half-duplex communication in the prior art and improves communication efficiency.
Patent Information
- Application Number
- CN202411649106.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-19
AI Technical Summary
The existing half-duplex communication has inconsistent data bandwidth in both directions, resulting in low communication efficiency.
By establishing a communication connection between the master and the slave device, the master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent feedback by the slave device, including the main device sending time slot, the first protection interval slot, the slave device sending time slot and the second protection interval slot.
Effectively adjusting the bandwidth of bidirectional communication improves bandwidth utilization and improves communication efficiency.
Smart Images

Figure CN119172812B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technology, and in particular to a time slot variable protocol communication method and device based on a half-duplex communication mode. Background Art
[0002] With the rapid development of wireless communication technology, the application of communication technology has gradually divided into two directions: one is to spend more software and hardware resources to pursue high-rate data transmission with extreme transmission rate; the other is to save resources as much as possible while meeting the actual application needs. Half-duplex communication is a communication method often used in the latter communication application, that is, the communication device can only send or receive at the same time, thereby greatly simplifying the difficulty of device implementation or reducing the resources required for communication. Although half-duplex communication equipment cannot have the ability to send and receive data at the same time as a single device like full-duplex communication equipment, it can perform two-way information exchange by switching the sending and receiving modes.
[0003] Systems that usually use half-duplex communication for information exchange will stipulate that within a certain period of time, half of the time is used for information transmission in one direction, and the other half of the time is used for information transmission in the opposite direction; that is, for a single communication device in the system, the duration of the sending or receiving time slot is consistent with the duration of the receiving or sending time slot, so that the information transmission capacity (bandwidth) in the two transmission directions is equal. In this case, if the amount of information that the system needs to transmit in both directions is always consistent or close, then such a system can perform bidirectional data transmission with the maximum transmission efficiency, that is, the bandwidth utilization rate is maximized.
[0004] However, in actual applications, not only is there a large difference in the amount of data transmitted in the two directions, but this difference will also change continuously as the system runs. If the data bandwidth in the two directions is kept consistent in such applications, it will cause a waste of bandwidth and reduce communication efficiency. Summary of the invention
[0005] The present invention provides a time slot variable protocol communication method and device based on a half-duplex communication mode, which is used to solve the defect in the prior art that half-duplex communication has inconsistent data bandwidth in two directions, resulting in low communication efficiency.
[0006] In a first aspect, the present invention provides a time slot variable protocol communication method based on a half-duplex communication mode, comprising:
[0007] Establish a communication connection between the master device and the slave device;
[0008] During the communication between the master device and the slave device, the master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent fed back by the slave device;
[0009] The communication transceiver cycle of the two-way communication includes: a master device sending time slot, a first protection interval time slot, a slave device sending time slot and a second protection interval time slot.
[0010] According to a time slot variable protocol communication method based on a half-duplex communication mode provided by the present invention, the master device sending time slot is sent by the master device and received by the slave device;
[0011] The first protection interval time slot is inserted between the master device sending time slot and the slave device sending time slot;
[0012] The slave device sending time slot is sent by the slave device and received by the master device;
[0013] The second protection interval time slot is inserted between the slave device sending time slot and the next master device sending time slot.
[0014] According to a time slot variable protocol communication method based on a half-duplex communication mode provided by the present invention, the valid data content sent by the master device and the slave device includes: a frame synchronization header, a frame type identifier, a frame length, valid data and LDPC coding;
[0015] The frame synchronization header is used by the receiving party to perform frame header synchronization;
[0016] The frame type identifier is used to distinguish whether the frame type is a service data type or a control data type;
[0017] The frame length is used to represent the length of valid data in the valid data area;
[0018] The valid data corresponds to the frame type and is used to represent service data or control data;
[0019] The LDPC coding is used to occupy the coded data so that the entire frame of data has the ability to correct errors through receiving and decoding.
[0020] According to a time slot variable protocol communication method based on a half-duplex communication mode provided by the present invention, the LDPC encoding uses 882 bytes of data and the encoding code length is 126 bytes.
[0021] According to a time slot variable protocol communication method based on a half-duplex communication mode provided by the present invention, the control data includes: valid control data and a padding field;
[0022] The valid control data includes a first control data unit, a second control data unit, a third control data unit, a fourth control data unit, a fifth control data unit and a sixth control data unit;
[0023] The first control data unit is used to indicate the reception status of the sender in the last reception time slot;
[0024] The second control data unit is used to indicate whether the current sending time slot is the last time slot;
[0025] The third control data unit is used to indicate the duration of the master device sending time slot;
[0026] The fourth control data unit is used to indicate the duration of the time slot sent by the slave device;
[0027] The fifth control data unit is used to indicate the duration of the first guard interval time slot and the second guard interval time slot;
[0028] The sixth control data unit is used to indicate the amount of data to be sent by the sending device.
[0029] According to a time slot variable protocol communication method based on a half-duplex communication mode provided by the present invention, the effective control data and the padding field total 874 bytes;
[0030] When the valid data is less than 874 bytes, the sender fills it with 0x5A data until it meets 874 bytes.
[0031] According to a time slot variable protocol communication method based on a half-duplex communication mode provided by the present invention, establishing a communication connection between a master device and a slave device includes:
[0032] The master device will continuously send and establish a connection with a communication transmission and reception cycle of 10ms transmission time slot, 10ms reception time slot, and 2ms protection interval time slot;
[0033] In the sending time slot, the master device continuously sends control data frames, wherein the first control data unit is 0x01, the second control data unit is 0x00, the third control data unit and the fourth control data unit are 0x0A, the fifth control data unit is 0x02, and the sixth control data unit is an actual value;
[0034] After receiving the control data frame sent by the master device, the slave device sends the control instruction in reverse according to the agreed time slot, wherein the first control data unit is 0x01, the second control data unit is 0x00, the third control data unit and the fourth control data unit are 0x0A, the fifth control data unit is 0x02, and the sixth control data unit is an actual value;
[0035] After receiving the control data sent in the reverse direction by the slave device for the first time, the master device sends control data again, the first control data unit becomes 0x00, the second control data unit is 0x00, the third control data unit, the fourth control data unit, and the fifth control data unit determine the values of the master device sending time slot and the slave device sending time slot according to the ratio of the amount of data to be sent by the master device and the amount of data to be sent by the slave device in the previous transmission and reception; the sixth control data unit is the actual amount of data to be sent. After the sending is completed, the master device enters the connection establishment state;
[0036] The slave device sends the same control instruction data in the reverse direction according to the new time slot agreed upon by the control instruction, and enters the connection establishment state after the sending is completed to establish the connection between the master device and the slave device.
[0037] According to a time slot variable protocol communication method based on a half-duplex communication mode provided by the present invention, the master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent fed back by the slave device, including:
[0038] The master device first sends a control data frame in the master device sending time slot, and the slave device first sends a control data frame in the slave device sending time slot, and then starts to send the service data frame. The control data frame is sent again at the end of each sending time slot.
[0039] The master device adjusts the time slot duration of the two-way data communication in each transceiver cycle according to the real-time feedback of the amount of data to be sent by the master device and the slave device, and controls the two-way data bandwidth.
[0040] In a second aspect, the present invention further provides a time slot variable protocol communication device based on a half-duplex communication mode, comprising:
[0041] A communication module, used to establish a communication connection between the master device and the slave device;
[0042] An adjustment module is used to control and adjust the time slot ratio of two-way communication in real time according to the amount of data to be sent fed back by the slave device during the communication between the master device and the slave device; wherein the communication transceiver cycle of the two-way communication includes: the master device sending time slot, the first protection interval time slot, the slave device sending time slot and the second protection interval time slot.
[0043] In a third aspect, the present invention also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the above-described time slot variable protocol communication methods based on the half-duplex communication mode.
[0044] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described time slot variable protocol communication methods based on a half-duplex communication mode.
[0045] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned time slot variable protocol communication methods based on the half-duplex communication mode.
[0046] The present invention provides a time slot variable protocol communication method and device based on a half-duplex communication mode. The method includes establishing a communication connection between a master device and a slave device; during the communication process between the master device and the slave device, the master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent fed back by the slave device; wherein the communication transceiver cycle of the two-way communication includes: the master device sending time slot, the first protection interval time slot, the slave device sending time slot and the second protection interval time slot. Since the master device can adjust the time slot ratio in real time by feeding back the amount of data to be sent from the slave device, and then adjust the bandwidth of the two-way communication, the bandwidth utilization rate is effectively improved, and the communication efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 is a flow chart of a time slot variable protocol communication method based on a half-duplex communication mode provided in this embodiment;
[0049] Figure 2 This is a schematic diagram of communication state transition provided by this embodiment.
[0050] Figure 3 It is a structural schematic diagram of a time slot variable protocol communication device based on a half-duplex communication mode provided by an embodiment of the present invention;
[0051] Figure 4 It is a schematic diagram of the structure of the electronic device provided in this embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] Figure 1 is a flow chart of a time slot variable protocol communication method based on a half-duplex communication mode provided in this embodiment, Figure 2 This is a schematic diagram of communication state transition provided by this embodiment.
[0054] like Figure 1 and Figure 2 As shown, the time slot variable protocol communication method based on the half-duplex communication mode provided by the embodiment of the present invention mainly includes the following steps:
[0055] 101. Establish a communication connection between the master device and the slave device.
[0056] In a specific implementation process, the complete communication method between the master device and the slave device needs to first establish a connection between the master device and the slave device. The master-slave communication protocol under half-duplex communication, the default startup or power-on state of the master and slave devices is an unconnected state. First, the master and slave devices need to complete at least two sending and two receiving processes to establish a connection. The way to establish the connection is that the master device will continuously send and establish a connection with a communication transmission and reception cycle of 10ms sending time slot, 10ms receiving time slot, and 2ms protection interval time slot. In the sending time slot, the master device continuously sends control data frames, where the first control data unit is 0x01, the second control data unit is 0x00, the third control data unit and the fourth control data unit are 0x0A, the fifth control data unit is 0x02, and the sixth control data unit is the actual value.
[0057] After receiving the control data frame sent by the master device, the slave device sends the control instruction in the reverse direction according to the agreed time slot, wherein the first control data unit is 0x01, the second control data unit is 0x00, the third control data unit and the fourth control data unit are 0x0A, the fifth control data unit is 0x02, and the sixth control data unit is the actual value;
[0058] After receiving the control data sent by the slave device in the reverse direction for the first time, the master device sends control data again. The first control data unit becomes 0x00, the second control data unit is 0x00, and the third control data unit, the fourth control data unit, and the fifth control data unit determine the values of the master device's sending time slot and the slave device's sending time slot according to the ratio of the amount of data to be sent by the master device and the amount of data to be sent by the slave device in the previous transmission and reception; the sixth control data unit is the actual amount of data to be sent. After sending, the master device enters the connection establishment state. The slave device sends the same control instruction data in the reverse direction according to the new time slot agreed upon by this control instruction, and enters the connection establishment state after sending, and establishes the connection between the master device and the slave device.
[0059] 102. During the communication process between the master device and the slave device, the master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent fed back by the slave device.
[0060] After the master device and the slave device establish a connection state, in their respective transmission time slots, that is, the master device in the master device transmission time slot and the slave device in the slave device transmission time slot, first sends a control data frame, and then starts to send the service data frame, and sends a control data frame again at the end of each transmission time slot. When the master device and the slave device have not established a connection, they are in an unlinked state. After the connection is established, they are in a link-established state. After the link is established, the bandwidth is continuously adjusted. After the data is sent, the communication ends. In this way, the master device can adjust the time slot duration of the two-way data communication in each transceiver cycle according to the real-time feedback of the amount of data to be sent by the master device and the slave device, control the two-way data bandwidth, and improve bandwidth utilization.
[0061] Table 1 is a schematic diagram of the communication time slots of the communication transceiver cycle provided by this embodiment.
[0062] As shown in Table 1, a communication time slot within a cycle of the communication protocol for realizing automatic adjustment of the time slot length by the master device is regarded as a communication transceiver cycle, including: the master device sending time slot, the first protection interval time slot, the slave device sending time slot and the second protection interval time slot. At this point, a communication transceiver cycle ends, followed by the next communication transceiver cycle, which repeats over and over again.
[0063]
[0064] Table 1;
[0065] Among them, the master device transmission time slot is sent by the master device and received by the slave device. The valid data content sent by the master device includes a section of control information, followed by the business data to be transmitted to the slave device. The first protection interval time slot is inserted between the master device transmission time slot and the slave device transmission time slot; the second protection interval time slot is inserted between the slave device transmission time slot and the next master device transmission time slot. It ensures that the master device and the slave device have enough time to switch the transmission and reception functions, and at the same time can offset the error caused by the asynchrony of the time slots between devices caused by a certain clock difference or Doppler effect. The length of the first protection interval time slot and the second protection interval time slot is usually much shorter than the master device transmission time slot and the slave device transmission time slot. Generally, 1-5ms is sufficient. The slave device transmission time slot is sent by the slave device and received by the master device. The valid data content sent by the slave device also includes a section of control information, followed by the business data that needs to be transmitted to the master device.
[0066] Table 2 is a schematic diagram of the communication time slot of a baseband frame format provided by this embodiment, that is, a communication time slot within a cycle. A baseband frame has a total of 1012 bytes. The valid data content sent by the master device and the slave device includes: frame synchronization header, frame type identifier, frame length, valid data and LDPC code.
[0067]
[0068] Table 2;
[0069] The frame synchronization header is fixed data, designed as 0x1ACFFC1D, and is used by the receiver for frame header synchronization, marking the start of a frame.
[0070] The frame type identifier is used to distinguish whether the frame type is a business data type or a control data type. 0x00 is a business data type, which means that the valid data of the frame is all business data, prompting the receiving device to process the valid data received later as business data; 0x01 is a control data type, which means that the valid data of the frame is control instruction data, prompting the receiving device to configure or execute the valid data received later as control instruction data.
[0071] The frame length is used to indicate the length of the valid data in the valid data area. The maximum value is 874. When the valid data in a frame is less than 874 bytes, the sender fills it with several bytes of 0x5A data to make up 874 bytes. The receiver discards the padding data after the valid data according to the frame length.
[0072] The valid data corresponds to the frame type and is used to represent business data or control data. If it is business data, what is transmitted is actual business data; if it is control data, what is transmitted is control instruction data.
[0073] LDPC coding is the abbreviation of low-density parity check code, and its function is to occupy the coded data so that the whole frame of data has the ability to correct errors through receiving and decoding. LDPC 7 / 8 coding is adopted, that is, the coding efficiency is 7 / 8, and 1 / 7 of the effective data volume is used as the coding code group length for framing. In this embodiment, 882 bytes of data are used for LDPC coding, and the coding code length is 126 bytes to obtain a certain anti-interference ability and improve the communication reliability of the system.
[0074] Table 3 is a schematic diagram of the control data segment provided in this embodiment. As shown in Table 3, the control data includes: valid control data and padding fields; the valid control data and padding fields total 874 bytes; when the valid data is less than 874 bytes, the sender fills in 0x5A data at the end to meet 874 bytes.
[0075]
[0076] Table 3;
[0077] Among them, the valid control data includes a first control data unit (i.e., unit 1), a second control data unit (i.e., unit 2), a third control data unit (i.e., unit 3), a fourth control data unit (i.e., unit 4), a fifth control data unit (i.e., unit 5) and a sixth control data unit (i.e., unit 6).
[0078] The first control data unit is used to indicate the receiving status of the sender in the last receiving time slot. 0x00 indicates that the current receiving data demodulation is normal, and 0x01 indicates that the current receiving data demodulation is abnormal.
[0079] The second control data unit is used to indicate whether the current transmission time slot is the last time slot. 0x01 means that the current time slot is the last time slot of this communication, and the communication between the two parties ends in the next communication cycle, and the connection is not established. 0x00 means that the current time slot is not the last time slot, and the connection is established in the next communication cycle. This unit can only be sent by the master device.
[0080] The third control data unit is used to indicate the duration of the master device sending time slot, the fourth control data unit is used to indicate the duration of the slave device sending time slot, and the fifth control data unit is used to indicate the duration of the first protection interval time slot and the second protection interval time slot, in ms. These three parameters are only sent by the master device.
[0081] The sixth control data unit is used to indicate the amount of data to be sent by the sending device, in steps of 1000 bytes, that is, 0x00 represents that the device has 0-1000 bytes to be sent, 0x01 represents that the device has 1001-2000 bytes to be sent, and so on.
[0082] The time slot variable protocol communication method based on the half-duplex communication mode of the present invention has low implementation cost and simple equipment, and can be implemented in a half-duplex system. The system can flexibly adjust the bidirectional data bandwidth during operation, thereby improving the transmission efficiency of the system.
[0083] Based on the same general inventive concept, the present invention also protects a time slot variable protocol communication device based on a half-duplex communication mode. The time slot variable protocol communication device based on a half-duplex communication mode provided by the present invention is described below. The time slot variable protocol communication device based on a half-duplex communication mode described below and the time slot variable protocol communication method based on a half-duplex communication mode described above can be referenced to each other.
[0084] Figure 3 It is a structural schematic diagram of a time slot variable protocol communication device based on a half-duplex communication mode provided by an embodiment of the present invention.
[0085] like Figure 3 As shown, this embodiment provides a time slot variable protocol communication device based on a half-duplex communication mode, including:
[0086] The communication module 301 is used to establish a communication connection between the master device and the slave device;
[0087] The adjustment module 302 is used for controlling and adjusting the time slot ratio of the two-way communication in real time by the master device according to the amount of data to be sent fed back by the slave device during the communication process between the master device and the slave device; wherein the communication transceiver cycle of the two-way communication includes: the master device sending time slot, the first protection interval time slot, the slave device sending time slot and the second protection interval time slot.
[0088] Figure 4 It is a schematic diagram of the structure of the electronic device provided in this embodiment.
[0089] like Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 complete mutual communication through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a time slot variable protocol communication method based on a half-duplex communication mode, the method comprising: establishing a communication connection between a master device and a slave device; during the communication process between the master device and the slave device, the master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent fed back by the slave device; wherein the communication transceiver cycle of the two-way communication comprises: a master device sending time slot, a first protection interval time slot, a slave device sending time slot and a second protection interval time slot.
[0090] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0091] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the time slot variable protocol communication method based on the half-duplex communication mode provided by the above methods, and the method includes: establishing a communication connection between the master device and the slave device; during the communication process between the master device and the slave device, the master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent fed back by the slave device; wherein the communication transceiver cycle of the two-way communication includes: the master device sending time slot, the first protection interval time slot, the slave device sending time slot and the second protection interval time slot.
[0092] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the time slot variable protocol communication method based on the half-duplex communication mode provided by the above-mentioned methods, the method comprising: establishing a communication connection between a master device and a slave device; during the communication process between the master device and the slave device, the master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent fed back by the slave device; wherein the communication transceiver cycle of the two-way communication comprises: a master device sending time slot, a first protection interval time slot, a slave device sending time slot and a second protection interval time slot.
[0093] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A time slot variable protocol communication method based on half-duplex communication mode, characterized in that: include: Establish a communication connection between the master device and the slave device; During the communication between the master device and the slave device, the master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent fed back by the slave device; The communication transceiver cycle of the two-way communication includes: a master device sending time slot, a first protection interval time slot, a slave device sending time slot and a second protection interval time slot; The master device transmission time slot is sent by the master device and received by the slave device; the first protection interval time slot is inserted between the master device transmission time slot and the slave device transmission time slot; the slave device transmission time slot is sent by the slave device and received by the master device; the second protection interval time slot is inserted between the slave device transmission time slot and the next master device transmission time slot; The valid data content sent by the master device and the slave device includes: a frame synchronization header, a frame type identifier, a frame length, valid data and an LDPC code; the frame synchronization header is used for the receiver to perform frame header synchronization; the frame type identifier is used to distinguish whether the frame type is a service data type or a control data type; the frame length is used to indicate the length of the valid data in the valid data area; the valid data corresponds to the frame type and is used to indicate the service data or the control data; the LDPC code is used to occupy the coded data so that the entire frame data has the ability of error correction through receiving and decoding; The control data includes: valid control data and padding fields; the valid control data includes a first control data unit, a second control data unit, a third control data unit, a fourth control data unit, a fifth control data unit and a sixth control data unit; the first control data unit is used to indicate the reception status of the sender in the previous receiving time slot; the second control data unit is used to indicate whether the current sending time slot is the last time slot; the third control data unit is used to indicate the duration of the master device sending time slot; the fourth control data unit is used to indicate the duration of the slave device sending time slot; the fifth control data unit is used to indicate the duration of the first protection interval time slot and the second protection interval time slot; the sixth control data unit is used to indicate the amount of data to be sent by the sending device.
2. The time slot variable protocol communication method based on half-duplex communication mode according to claim 1, characterized in that: The LDPC encoding uses 882 bytes of data and the encoding code length is 126 bytes.
3. The time slot variable protocol communication method based on half-duplex communication mode according to claim 1, characterized in that: The effective control data and padding field total 874 bytes; When the valid data is less than 874 bytes, the sender fills it with 0x5A data until it meets 874 bytes.
4. The time slot variable protocol communication method based on half-duplex communication mode according to claim 1, characterized in that: The step of establishing a communication connection between the master device and the slave device comprises: The master device will continuously send and establish a connection with a communication transmission and reception cycle of 10ms transmission time slot, 10ms reception time slot, and 2ms protection interval time slot; In the sending time slot, the master device continuously sends control data frames, wherein the first control data unit is 0x01, the second control data unit is 0x00, the third control data unit and the fourth control data unit are 0x0A, the fifth control data unit is 0x02, and the sixth control data unit is an actual value; After receiving the control data frame sent by the master device, the slave device sends the control instruction in reverse according to the agreed time slot, wherein the first control data unit is 0x01, the second control data unit is 0x00, the third control data unit and the fourth control data unit are 0x0A, the fifth control data unit is 0x02, and the sixth control data unit is an actual value; After receiving the control data sent in the reverse direction by the slave device for the first time, the master device sends control data again, the first control data unit becomes 0x00, the second control data unit is 0x00, the third control data unit, the fourth control data unit, and the fifth control data unit determine the values of the master device sending time slot and the slave device sending time slot according to the ratio of the amount of data to be sent by the master device and the amount of data to be sent by the slave device in the previous transmission and reception; the sixth control data unit is the actual amount of data to be sent. After the sending is completed, the master device enters the connection establishment state; The slave device sends the same control instruction data in the reverse direction according to the new time slot agreed upon by the control instruction, and enters the connection establishment state after the sending is completed to establish the connection between the master device and the slave device.
5. The time slot variable protocol communication method based on half-duplex communication mode according to claim 1, characterized in that: The master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent fed back by the slave device, including: The master device first sends a control data frame in the master device sending time slot, and the slave device first sends a control data frame in the slave device sending time slot, and then starts to send the service data frame. The control data frame is sent again at the end of each sending time slot. The master device adjusts the time slot duration of the two-way data communication in each transceiver cycle according to the real-time feedback of the amount of data to be sent by the master device and the slave device, and controls the two-way data bandwidth.
6. A time slot variable protocol communication device based on half-duplex communication mode, characterized in that: include: A communication module, used to establish a communication connection between the master device and the slave device; An adjustment module is used for, during the communication process between the master device and the slave device, the master device controls and adjusts the time slot ratio of the two-way communication in real time according to the amount of data to be sent fed back by the slave device; wherein the communication transceiver cycle of the two-way communication includes: a master device sending time slot, a first protection interval time slot, a slave device sending time slot and a second protection interval time slot; the master device sending time slot is sent by the master device and received by the slave device; the first protection interval time slot is inserted between the master device sending time slot and the slave device sending time slot; the slave device sending time slot is sent by the slave device and received by the master device; the second protection interval time slot is inserted between the slave device sending time slot and the next master device sending time slot; the valid data content sent by the master device and the slave device includes: a frame synchronization header, a frame type identifier, a frame length, valid data and an LDPC code; the frame synchronization header is used for the receiver to perform frame header synchronization; the frame type identifier is used to distinguish whether the frame type is a service data type or a control data type; the frame length is used to represent It is the length of valid data in the valid data area; the valid data corresponds to the frame type and is used to represent business data or control data; the LDPC coding is used to occupy the coded data so that the entire frame of data has the ability to correct errors through receiving and decoding; the control data includes: valid control data and padding fields; the valid control data includes a first control data unit, a second control data unit, a third control data unit, a fourth control data unit, a fifth control data unit and a sixth control data unit; the first control data unit is used to indicate the receiving status of the sender in the previous receiving time slot; the second control data unit is used to indicate whether the current sending time slot is the last time slot; the third control data unit is used to indicate the duration of the master device sending time slot; the fourth control data unit is used to indicate the duration of the slave device sending time slot; the fifth control data unit is used to indicate the duration of the first protection interval time slot and the second protection interval time slot; the sixth control data unit is used to indicate the amount of data to be sent by the sending device.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the time slot variable protocol communication method based on the half-duplex communication mode is implemented as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Device for implementing dynamic time-slot TDMA distribution
CN101296229A
Underwater acoustic communication method for time slot adaptive selection based on length of distance
CN105933985A