Transmission rate switching method and related device

文档序号:172358 发布日期:2021-10-29 浏览:25次 中文

阅读说明:本技术 一种传输速率切换方法以及相关装置 (Transmission rate switching method and related device ) 是由 眭克涵 曹孝文 蒋文浩 许仕彬 常鸣 于 2020-04-28 设计创作,主要内容包括:本申请提供了一种传输速率切换方法和相关装置,其中,该方法应用于电子设备,所述电子设备包括第一电子器件和第二电子器件,所述方法包括:所述第二电子器件接收所述第一电子器件发送的第一数据包,所述第一数据包用于指示所述第二电子器件进行传输速率切换且切换后的传输速率为第一速率;所述第一电子器件根据所述第一速率进行传输速率切换,所述第一电子器件切换后的传输速率为所述第一速率。实施本申请实施例,能简化协商过程,提高传输速率切换效率。(The application provides a transmission rate switching method and a related device, wherein the method is applied to electronic equipment, the electronic equipment comprises a first electronic device and a second electronic device, and the method comprises the following steps: the second electronic device receives a first data packet sent by the first electronic device, wherein the first data packet is used for indicating the second electronic device to switch the transmission rate, and the switched transmission rate is the first rate; and the first electronic device switches the transmission rate according to the first rate, and the transmission rate after the first electronic device switches is the first rate. By implementing the embodiment of the application, the negotiation process can be simplified, and the transmission rate switching efficiency can be improved.)

1. A transmission rate switching method applied to an electronic device including a first electronic device and a second electronic device, the method comprising:

the second electronic device receives a first data packet sent by the first electronic device, wherein the first data packet is used for indicating the second electronic device to switch the transmission rate, and the switched transmission rate is the first rate;

and the first electronic device switches the transmission rate according to the first rate, and the transmission rate after the first electronic device switches is the first rate.

2. The method of claim 1, wherein the first packet comprises first indication information, and wherein the first indication information is used for indicating the first rate.

3. The method according to claim 1 or 2, wherein the first data packet further includes first forward link indication information and/or first backward link indication information, the first data packet is further used for instructing the second electronic device to perform forward link handover and/or backward link handover, and the switched forward link is the forward link indicated by the first forward link indication information, and the switched backward link is the backward link indicated by the first backward link indication information.

4. The method of claim 3, wherein the first packet is further used to instruct the second electronic device to perform transmission rate switching according to the first packet when detecting that no data is transmitted on the backward link indicated by the first backward link indication information; or the like, or, alternatively,

the first data packet is further used for indicating the second electronic device to switch the transmission rate according to the first data packet when detecting that the data transmission on the backward link indicated by the first backward link indication information is finished.

5. The method of any of claims 1-4, wherein the first data packet further comprises verification information and a first time window, and wherein after the first electronic device switches transmission rates according to the first rate, the method further comprises:

the first electronic device sends at least one first check packet to the second electronic device at the first rate;

when N first check packages in the first check packages are received in the first time window, the second electronic device sends at least one second check package to the first electronic device at the first rate, wherein the second check package is sent by the second electronic device in the first time window and is determined by the second electronic device according to the check information, and N is an integer greater than 1;

if the N second check-up packets in the second check-up packets are received in the first time window, the first electronic device determines to transmit data to the second electronic device at the first rate.

6. The method of claim 5, further comprising:

if the N second check packets in the second check packets are not received within the first time window, the first electronic device sends the first data packet to the second electronic device at the second rate and then sends the first check packet to the second electronic device at the first rate again;

when the N first check packages in the first check packages are received in the first time window, the second electronic device sends the second check packages to the first electronic device again at the first rate;

if the N second check packets in the second check packets are not received within the first time window, the first electronic device sends a second data packet to the second electronic device at a third rate after the first electronic device switches the first rate to the third rate, the second data packet is used to instruct the second electronic device to switch the transmission rate and the switched transmission rate is a fourth rate, the transmission rate is switched according to the fourth rate, the switched transmission rate of the first electronic device is the fourth rate, and the first check packet is sent to the second electronic device at the fourth rate until the first electronic device determines to transmit data to the second electronic device at the fourth rate;

the second rate is a rate before the first electronic device switches the transmission rate to the first rate, the second rate is smaller than the first rate, the third rate is a rate with the lowest rate among the transmission rates corresponding to the first electronic device, the fourth rate is greater than the second rate, and the fourth rate is smaller than the first rate.

7. A transmission rate switching apparatus, comprising a first electronic device and a second electronic device,

the second electronic device is configured to receive a first data packet sent by the first electronic device, where the first data packet is used to instruct the second electronic device to perform transmission rate switching, and a transmission rate after the switching is a first rate;

the first electronic device is used for carrying out transmission rate switching according to the first rate, and the transmission rate after the first electronic device is switched is the first rate.

8. The apparatus of claim 7, wherein the first packet comprises first indication information, and wherein the first indication information is used for indicating the first rate.

9. The apparatus according to claim 7 or 8, wherein the first data packet further includes first forward link indication information and/or first backward link indication information, the first data packet is further used to instruct the second electronic device to perform forward link handover and/or backward link handover, and the switched forward link is the forward link indicated by the first forward link indication information, and the switched backward link is the backward link indicated by the first backward link indication information.

10. The apparatus of claim 9, wherein the first packet is further configured to instruct the second electronic device to perform transmission rate switching according to the first packet when detecting that no data is transmitted on the backward link indicated by the first backward link indication information; or the like, or, alternatively,

the first data packet is further used for indicating the second electronic device to switch the transmission rate according to the first data packet when detecting that the data transmission on the backward link indicated by the first backward link indication information is finished.

11. The apparatus of any of claims 7-10, wherein the first data packet further comprises verification information and a first time window,

the first electronic device is further configured to send at least one first verification packet to the second electronic device at the first rate;

when receiving N first check packets of the first check packets within the first time window, the second electronic device is further configured to send at least one second check packet to the first electronic device at the first rate, where the second check packet is sent by the second electronic device within the first time window and the second check packet is determined by the second electronic device according to the check information, and N is an integer greater than 1;

the first electronic device is further configured to determine to transmit data to the second electronic device at the first rate if the N second parity packets of the second parity packets are received within the first time window.

12. The apparatus of claim 11,

if the N second check packets in the second check packets are not received within the first time window, the first electronic device is further configured to send the first check packet to the second electronic device again at the first rate after sending the first data packet to the second electronic device at the second rate;

when the N first check packets in the first check packets are received in the first time window, the second electronic device is further configured to send the second check packet to the first electronic device again at the first rate;

if the N second check packets in the second check packets are not received within the first time window, the first electronic device is further configured to send a second data packet to the second electronic device at a third rate after the first rate is switched to the third rate, where the second data packet is used to instruct the second electronic device to perform transmission rate switching and a switched transmission rate is a fourth rate, the transmission rate is switched according to the fourth rate, and the switched transmission rate of the first electronic device is the fourth rate, and the first check packet is sent to the second electronic device at the fourth rate until the first electronic device determines to transmit data to the second electronic device at the fourth rate;

the second rate is a rate before the first electronic device switches the transmission rate to the first rate, the second rate is smaller than the first rate, the third rate is a rate with the lowest rate among the transmission rates corresponding to the first electronic device, the fourth rate is greater than the second rate, and the fourth rate is smaller than the first rate.

13. A computer-readable storage medium, in which a computer program is stored which, when executed, implements the method of any one of claims 1-6.

Technical Field

The present application relates to the field of communications technologies, and in particular, to a transmission rate switching method and a related apparatus.

Background

With the rapid development of the electronic industry technology, the requirements on the interface transmission technology are higher and higher. Currently, data transmission can be realized by using a Mobile Industry Processor Interface (MIPI) which is an open standard and a specification established for a mobile application processor.

Generally, a transmission rate switching process is often involved in transmitting data using a physical layer (PHY) interface of the MIPI. In the prior art, when switching transmission rate, for example, a transmitter of a processor is required to send a cut-rate request to a receiver of a camera, and after the receiver of the processor receives feedback information fed back by the transmitter of the camera, the transmitter of the processor switches transmission rate. Further, the transmitter of the processor performs capability configuration and stops transmitting data, and the receiver of the camera performs rate switching when the receiver of the camera detects that the transmitter of the processor stops transmitting data. That is, in the prior art, when the transmission rate is switched, multiple interactions are required, which results in a complex negotiation process and low transmission rate switching efficiency.

Disclosure of Invention

The application provides a transmission rate switching method and a related device, which can simplify a negotiation process and improve transmission rate switching efficiency.

In a first aspect, a transmission rate switching method is provided, where the method is applied to an electronic device including a first electronic device and a second electronic device, and the method includes:

the second electronic device receives a first data packet sent by the first electronic device, wherein the first data packet is used for indicating the second electronic device to switch the transmission rate, and the switched transmission rate is the first rate;

and the first electronic device switches the transmission rate according to the first rate, and the transmission rate after the first electronic device switches is the first rate.

It can be seen that, in the above technical scheme, the negotiation process is simplified, and the transmission rate switching efficiency is improved.

In a possible implementation, the first data packet includes first indication information, and the first indication information is used for indicating the first rate.

It can be seen that, in the above technical solution, the indication of the rate by the indication information is realized, and preparation is made for the subsequent second electronic device to perform transmission rate switching.

In a possible implementation manner, the first data packet further includes first forward link indication information and/or first backward link indication information, the first data packet is further used for instructing the second electronic device to perform forward link handover and/or backward link handover, a forward link after handover is a forward link indicated by the first forward link indication information, and a backward link after handover is a backward link indicated by the first backward link indication information.

Therefore, in the technical scheme, the link switching is accurately controlled, the problem that in the prior art, multiple interactions are required to be carried out when the link is switched once is solved, the negotiation process is simplified, and the transmission rate switching efficiency is improved.

In a possible implementation manner, the first data packet is further used for instructing the second electronic device to perform transmission rate switching according to the first data packet when detecting that no data is transmitted on the backward link indicated by the first backward link indication information; or the like, or, alternatively,

the first data packet is further used for indicating the second electronic device to switch the transmission rate according to the first data packet when detecting that the data transmission on the backward link indicated by the first backward link indication information is finished.

It can be seen that, in the above technical solution, the problem that data transmission on the backward link indicated by the first backward link indication information fails due to unreliable data transmission after the cut-rate is performed after the transmission rate is switched according to the first data packet is avoided.

In a possible implementation, the first data packet further includes check information and a first time window, and after the first electronic device performs transmission rate switching according to the first rate, the method further includes:

the first electronic device sends at least one first check packet to the second electronic device at the first rate;

when N first check packages in the first check packages are received in the first time window, the second electronic device sends at least one second check package to the first electronic device at the first rate, wherein the second check package is sent by the second electronic device in the first time window and is determined by the second electronic device according to the check information, and N is an integer greater than 1;

if the N second check-up packets in the second check-up packets are received in the first time window, the first electronic device determines to transmit data to the second electronic device at the first rate.

It can be seen that, in the above technical solution, through the check packet and the first time window, the check on the reliability of the data transmission after the speed cut is realized, and it is avoided that data is sent to the second electronic device at the switched rate when the data transmission after the speed cut is unreliable.

In one possible embodiment, the method further comprises:

if the N second check packets in the second check packets are not received within the first time window, the first electronic device sends the first data packet to the second electronic device at the second rate and then sends the first check packet to the second electronic device at the first rate again;

when the N first check packages in the first check packages are received in the first time window, the second electronic device sends the second check packages to the first electronic device again at the first rate;

if the N second check packets in the second check packets are not received within the first time window, the first electronic device sends a second data packet to the second electronic device at a third rate after the first electronic device switches the first rate to the third rate, the second data packet is used to instruct the second electronic device to switch the transmission rate and the switched transmission rate is a fourth rate, the transmission rate is switched according to the fourth rate, the switched transmission rate of the first electronic device is the fourth rate, and the first check packet is sent to the second electronic device at the fourth rate until the first electronic device determines to transmit data to the second electronic device at the fourth rate;

the second rate is a rate before the first electronic device switches the transmission rate to the first rate, the second rate is smaller than the first rate, the third rate is a rate with the lowest rate among the transmission rates corresponding to the first electronic device, the fourth rate is greater than the second rate, and the fourth rate is smaller than the first rate.

It can be seen that, in the above technical solution, when data transmission after speed cut is unreliable, the first data packet is sent to the second electronic device at the original speed before the first speed is switched to, and the problem of failure of new speed negotiation due to external accidental factors is eliminated. Meanwhile, when the check packet is not received in the second time window, namely when the data transmission is still unreliable after the speed cut, a more flexible speed cut mode is provided by adopting the lowest speed corresponding to the equipment to transmit a new data packet.

In a second aspect, there is provided a transmission rate switching apparatus, the apparatus comprising a first electronic device and a second electronic device,

the second electronic device is configured to receive a first data packet sent by the first electronic device, where the first data packet is used to instruct the second electronic device to perform transmission rate switching, and a transmission rate after the switching is a first rate;

the first electronic device is used for carrying out transmission rate switching according to the first rate, and the transmission rate after the first electronic device is switched is the first rate.

In a possible implementation, the first data packet includes first indication information, and the first indication information is used for indicating the first rate.

In a possible implementation manner, the first data packet further includes first forward link indication information and/or first backward link indication information, the first data packet is further used for instructing the second electronic device to perform forward link handover and/or backward link handover, a forward link after handover is a forward link indicated by the first forward link indication information, and a backward link after handover is a backward link indicated by the first backward link indication information.

In a possible implementation manner, the first data packet is further used for instructing the second electronic device to perform transmission rate switching according to the first data packet when detecting that no data is transmitted on the backward link indicated by the first backward link indication information; or the like, or, alternatively,

the first data packet is further used for indicating the second electronic device to switch the transmission rate according to the first data packet when detecting that the data transmission on the backward link indicated by the first backward link indication information is finished.

In one possible embodiment, the first data packet further comprises a check information and a first time window,

the first electronic device is further configured to send at least one first verification packet to the second electronic device at the first rate;

when receiving N first check packets of the first check packets within the first time window, the second electronic device is further configured to send at least one second check packet to the first electronic device at the first rate, where the second check packet is sent by the second electronic device within the first time window and the second check packet is determined by the second electronic device according to the check information, and N is an integer greater than 1;

the first electronic device is further configured to determine to transmit data to the second electronic device at the first rate if the N second parity packets of the second parity packets are received within the first time window.

In one possible embodiment of the method according to the invention,

if the N second check packets in the second check packets are not received within the first time window, the first electronic device is further configured to send the first check packet to the second electronic device again at the first rate after sending the first data packet to the second electronic device at the second rate;

when the N first check packets in the first check packets are received in the first time window, the second electronic device is further configured to send the second check packet to the first electronic device again at the first rate;

if the N second check packets in the second check packets are not received within the first time window, the first electronic device is further configured to send a second data packet to the second electronic device at a third rate after the first rate is switched to the third rate, where the second data packet is used to instruct the second electronic device to perform transmission rate switching and a switched transmission rate is a fourth rate, the transmission rate is switched according to the fourth rate, and the switched transmission rate of the first electronic device is the fourth rate, and the first check packet is sent to the second electronic device at the fourth rate until the first electronic device determines to transmit data to the second electronic device at the fourth rate;

the second rate is a rate before the first electronic device switches the transmission rate to the first rate, the second rate is smaller than the first rate, the third rate is a rate with the lowest rate among the transmission rates corresponding to the first electronic device, the fourth rate is greater than the second rate, and the fourth rate is smaller than the first rate.

In a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed, implements the method of the first aspect or any one of the first aspects.

Drawings

Reference will now be made in brief to the drawings that are needed in describing embodiments or prior art.

Wherein:

fig. 1 is a schematic structural diagram of a transmission rate switching apparatus according to an embodiment of the present disclosure;

fig. 2 is a schematic flowchart of a transmission rate switching method according to an embodiment of the present application;

fig. 3 is a schematic link diagram provided in an embodiment of the present application;

fig. 4 is a schematic flowchart of another transmission rate switching method according to an embodiment of the present application;

fig. 5 is a schematic flowchart of another transmission rate switching method according to an embodiment of the present application;

fig. 6 is a flowchart illustrating another transmission rate switching method according to an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.

The terms "first" and "second" in the description and claims of the present application and the above-described drawings are used for distinguishing between different objects and not for describing a particular order.

First, the electronic device according to the embodiment of the present application may be integrated with a processor and a camera, or integrated with a processor and a display screen, or integrated with a processor, a camera, and a display screen, and of course, the electronic device may also be integrated with other electronic devices, which is not limited herein. The electronic device may be, for example, a mobile telephone (or so-called "cellular" telephone), a computer with mobile user equipment, a portable, pocket, hand-held, computer-included mobile device, or the like. The electronic device may also be a wearable device, and may also be a vehicle-mounted user equipment, for example, also referred to as an on-board unit (OBU), which is not limited in this embodiment of the present application. In addition, the electronic device can also be a computer, a tablet computer, a notebook computer, a palm computer and the like.

It will be appreciated that in embodiments of the present application, the first electronic device may be, for example, a processor, and the second electronic device may be, for example, a camera or a display screen.

Further, referring to fig. 1, fig. 1 is a schematic structural diagram of a transmission rate switching apparatus according to an embodiment of the present application. As shown in fig. 1, the first electronic device includes a control module, a transmitter, and a receiver, and the second electronic device includes a control module, a transmitter, and a receiver. The control module of the first electronic device may transmit data with the receiver of the second electronic device through the transmitter of the first electronic device, and the control module of the second electronic device may transmit data with the receiver of the second electronic device through the transmitter of the second electronic device.

To facilitate an understanding of the present application, relevant technical knowledge related to embodiments of the present application will be first introduced herein.

Generally, a transmission rate switching process is often involved in transmitting data by using a physical layer interface of the MIPI. In the prior art, when switching transmission rate, for example, a transmitter of a processor is required to send a cut-rate request to a receiver of a camera, and after the receiver of the processor receives feedback information fed back by the transmitter of the camera, the transmitter of the processor switches transmission rate. Further, the transmitter of the processor performs capability configuration and stops transmitting data, and the receiver of the camera performs rate switching when the receiver of the camera detects that the transmitter of the processor stops transmitting data. That is, in the prior art, when the transmission rate is switched, multiple interactions are required, which results in a complex negotiation process and low efficiency.

In order to solve the above technical problem, the present application provides a transmission rate switching method, and the following describes an embodiment of the present application in detail.

Referring to fig. 2, fig. 2 is a schematic flowchart of a transmission rate switching method according to an embodiment of the present disclosure. As shown in fig. 2, the method is applied to an electronic apparatus including a first electronic device and a second electronic device, and includes:

201. the second electronic device receives a first data packet sent by the first electronic device, wherein the first data packet is used for indicating the second electronic device to switch the transmission rate, and the switched transmission rate is the first rate.

The first data packet may also include the indication information, the first backward link indication information, the check information, and the first time window, and the first data packet may also include the first indication information, the first forward link indication information, the first backward link indication information, the check information, and the first time window. Further, the first indication information is used for indicating a first rate. Additionally, the first time window is determined based on the first rate. For example, the greater the first rate, the longer the first time window; the smaller the first rate, the shorter this first time window.

It should be noted that, when the first data packet includes the first indication information, the first forward link indication information, the check information, and the first time window, the first indication information is at least one first bit in the first data packet, and the at least one first bit in the first data packet is used to indicate the first rate when a value of the at least one first bit in the first data packet is a first value. The first forward link indication information is at least one second bit in the first data packet, and the at least one second bit in the first data packet is used for indicating the forward link indicated by the first forward link indication information when the value of the at least one second bit in the first data packet is the second value. The check information included in the first data packet is at least one third bit in the first data packet, and when the value of the at least one third bit in the first data packet is a third value, the at least one third bit in the first data packet is used for the second electronic device to determine at least one second check packet. The first time window is at least one fourth bit in the first data packet, and the at least one fourth bit in the first data packet is used for indicating the first time window when the value of the at least one fourth bit in the first data packet is a fourth value. The first numerical value, the second numerical value, the third numerical value and the fourth numerical value may be the same, may be partially the same, or may be completely different. Further, the first data packet is also used to instruct the second electronic device to perform forward link handover, and the switched forward link is the forward link indicated by the first forward link indication information.

When the first data packet includes first indication information, first backward link indication information, check information and a first time window, the first indication information is at least one first bit in the first data packet, and the at least one first bit in the first data packet is used for indicating a first rate when a value of the at least one first bit in the first data packet is a first value. The first backward link indication information is at least one second bit in the first data packet, and the at least one second bit in the first data packet is used for indicating the backward link indicated by the first backward link indication information when the value of the at least one second bit in the first data packet is the second value. The check information included in the first data packet is at least one third bit in the first data packet, and when the value of the at least one third bit in the first data packet is a third value, the at least one third bit in the first data packet is used for the second electronic device to determine the second check packet. The first time window is at least one fourth bit in the first data packet, and the at least one fourth bit in the first data packet is used for indicating the first time window when the value of the at least one fourth bit in the first data packet is a fourth value. The first numerical value, the second numerical value, the third numerical value and the fourth numerical value may be the same, may be partially the same, or may be completely different. Further, the first data packet is also used for instructing the second electronic device to perform a backward link switching, and the switched backward link is the backward link indicated by the first backward link indication information.

When the first data packet includes first indication information, first forward link indication information, first backward link indication information, check information, and a first time window, the first indication information is at least one first bit in the first data packet, and the at least one first bit in the first data packet is used to indicate a first rate when a value of the at least one first bit in the first data packet is a first value. The first forward link indication information is at least one second bit in the first data packet, and the at least one second bit in the first data packet is used for indicating the forward link indicated by the first forward link indication information when the value of the at least one second bit in the first data packet is the second value. The first backward link indication information is at least one third bit in the first data packet, and when the value of the at least one third bit in the first data packet is a third value, the at least one third bit in the first data packet is used for indicating the backward link indicated by the first backward link indication information. The check information included in the first data packet is at least one fourth bit in the first data packet, and when the value of the at least one fourth bit in the first data packet is a fourth value, the at least one fourth bit in the first data packet is used for indicating the second electronic device to determine the second check packet. The first time window is at least one fifth bit in the first data packet, and the at least one fifth bit in the first data packet is used for indicating the first time window when the value of the at least one fifth bit in the first data packet is a fifth value. It is to be understood that the first, second, third, fourth, and fifth values may be the same, partially the same, or completely different. Further, the first data packet is further used to instruct the second electronic device to perform forward link handover and backward link handover, where the switched forward link is the forward link indicated by the first forward link indication information, and the switched backward link is the backward link indicated by the first backward link indication information.

It should be noted that, when the first data packet includes the first backward link indication information, the first data packet is further used to instruct the second electronic device to perform transmission rate switching according to the first data packet when detecting that no data is transmitted on the backward link indicated by the first backward link indication information; or the like, or, alternatively,

the first data packet is further used for instructing the second electronic device to perform transmission rate switching according to the first data packet when detecting that data transmission on the backward link indicated by the first backward link indication information is finished.

For example, assuming that the first data packet includes the first indication information, the first forward link indication information, the first backward link indication information, the check information and the first time window, see table 1, table 1 is the information indicated by different bits of the first data packet, as shown in table 1:

TABLE 1 information indicated for different bits of the first data packet

It can be seen that in table 1, when the values of the bits 0 to 1 in the first data packet are different, the rates indicated by the bits 0 to 1 are also different. For example, when the value of the bit of 0-1 is 00, the rate indicated by the bit of 0-1 is rate 1; when the value of the bit of 0-1 is 01, the rate indicated by the bit of 0-1 is rate 2; when the value of the bit of 0-1 is 10, the rate indicated by the bit of 0-1 is rate 3; when the value of the bit of 0-1 is 11, the rate indicated by the bit of 0-1 is rate 4. When the values of the bits 2-3 in the first data packet are different, the forward links indicated by the bits 2-3 are also different. For example, when the value of the bit of 2-3 is 00, the forward link indicated by the bit of 2-3 is the forward link 1; when the value of the bit of 2-3 is 01, the forward link indicated by the bit of 2-3 is a forward link 2; when the value of the bit of 2-3 is 10, the forward link indicated by the bit of 2-3 is a forward link 3; when the value of the bit 2-3 is 11, the forward link indicated by the bit 2-3 is the forward link 4. When the values of the bits 4-5 in the first data packet are different, the backward links indicated by the bits 4-5 are also different. For example, when the value of the bit of 4-5 is 00, the backward link indicated by the bit of 4-5 is a backward link 1; when the value of the bit of 4-5 is 01, the backward link indicated by the bit of 4-5 is a backward link 2; when the value of the bit of 4-5 is 10, the backward link indicated by the bit of 4-5 is a backward link 3; and when the value of the bit of 4-5 is 11, the backward link indicated by the bit of 4-5 is a backward link 4. When the values of the bits 6 to 7 in the first data packet are different, the check information indicated by the bits 6 to 7 is also different. When the value of the bit of 6-7 is 00, the check information indicated by the bit of 6-7 is check information 1; when the value of the bit of 6-7 is 01, the check information indicated by the bit of 6-7 is check information 2; when the value of the bit of 6-7 is 10, the check information indicated by the bit of 6-7 is check information 3; when the value of the bit of 6-7 is 11, the check information indicated by the bit of 6-7 is check information 4. When the values of the bits 8-9 in the first data packet are different, the first time window indicated by the bits 8-9 is also different. When the value of the bit of 8-9 is 00, the first time window indicated by the bit of 8-9 is a first time window 1; when the value of the bit of 8-9 is 01, the first time window indicated by the bit of 8-9 is a first time window 2; when the value of the bit of 8-9 is 10, the first time window indicated by the bit of 8-9 is a first time window 3; when the value of the bit of 8-9 is 11, the first time window indicated by the bit of 8-9 is the first time window 4.

If rate 1 is less than rate 2, rate 2 is less than rate 3, and rate 3 is less than rate 4. Then, the rate 1 may be, for example, 1.5 gigabits per second (Gbps); rate 2 may be, for example, 4 Gbps; rate 3 may be, for example, 8 Gbps; rate 4 may be, for example, 16 Gbps. It is understood that the specific rate is the largest, and the specific rate is the smallest, and is not limited herein.

In addition, for example, referring to fig. 3, fig. 3 is a schematic link diagram provided in the embodiment of the present application. It can be seen that the link between the physical layer of the first electronic device and the physical layer of the second electronic device includes 4 forward links and 4 reverse links. For example, the forward link with link code 00 may be forward link 1, the forward link with link code 01 may be forward link 2, the forward link with link code 10 may be forward link 3, and the forward link with link code 11 may be forward link 4. For another example, the backward link with link code 00 may be backward link 1, the backward link with link code 01 may be backward link 2, the backward link with link code 10 may be backward link 3, and the backward link with link code 11 may be backward link 4.

Further, the second electronic device receives the first data packet sent by the first electronic device, that is, the control module of the second electronic device receives, through the receiver of the second electronic device, the first data packet sent by the control module of the first electronic device through the transmitter of the first electronic device. Specifically, referring to fig. 4, fig. 4 is a schematic flowchart of another transmission rate switching method according to an embodiment of the present application. It can be seen that there is an interaction process between the protocol layer of the first electronic device and the physical layer of the first electronic device, and there is also an interaction process between the protocol layer of the second electronic device and the physical layer of the second electronic device. Specifically, the protocol layer of the first electronic device may send a transmission rate switching instruction to the physical layer of the first electronic device. The transmission rate switch instruction may include a first rate, first forward link indication information, verification information, and a first time window. The transmission rate switch instruction may also include a first rate, first reverse link indication information, verification information, and a first time window. The transmission rate switch instruction may also include a first rate, first forward link indication information, first reverse link indication information, check information, and a first time window. It is understood that the physical layer of the first electronic device may receive the transmission rate switching command sent by the protocol layer of the first electronic device, that is, the control module of the first electronic device receives the transmission rate switching command. Further, the control module of the first electronic device may analyze the transmission rate switching instruction to obtain an analyzed transmission rate switching instruction. Next, the control module of the first electronic device may generate a first data packet based on the parsed transmission rate switching instruction. The control module of the first electronic device may then transmit the first data packet via the transmitter of the first electronic device to the receiver of the second electronic device.

Further, the control module of the second electronic device may parse the first data packet. If the control module of the second electronic device determines that the first data packet includes the indication information, the first forward link indication information, the check information, and the first time window after the parsing, the control module of the second electronic device may control the receiver of the second electronic device to perform transmission rate switching according to the first data packet, and the transmission rate after the switching is the first rate. That is, the control module of the second electronic device may control the receiver of the second electronic device to perform forward link handover according to the first data packet, where the switched forward link is the forward link indicated by the first forward link indication information.

If the control module of the second electronic device determines that the first data packet includes the indication information, the first backward link indication information, the check information, and the first time window after the parsing, the physical layer of the second electronic device may send a backward link cut-rate request to the protocol layer of the second electronic device, that is, the control module of the second electronic device may send a backward link cut-rate request to the protocol layer of the second electronic device. When receiving a backward link cut-off speed response sent by a protocol layer of the second electronic device, when detecting that data is not transmitted on a backward link indicated by the first backward link indication information, the control module of the second electronic device controls the transmitter of the second electronic device to perform transmission rate switching according to the first data packet, or when detecting that data transmission on the backward link indicated by the first backward link indication information is finished, the control module of the second electronic device controls the transmitter of the second electronic device to perform transmission rate switching according to the first data packet.

If the control module of the second electronic device determines that the first data packet includes the indication information, the first forward link indication information, the first backward link indication information, the check information, and the first time window after the analysis, the control module of the second electronic device may control the receiver of the second electronic device to perform forward link switching according to the first data packet, where the switched forward link is the forward link indicated by the first forward link indication information, and simultaneously send a backward link cut-speed request to a protocol layer of the second electronic device. When receiving a backward link cut-off speed response sent by a protocol layer of the second electronic device, when detecting that data is not transmitted on a backward link indicated by the first backward link indication information, the control module of the second electronic device controls the transmitter of the second electronic device to perform transmission rate switching according to the first data packet, or when detecting that data transmission on the backward link indicated by the first backward link indication information is finished, the control module of the second electronic device controls the transmitter of the second electronic device to perform transmission rate switching according to the first data packet.

It can be seen that, in the above technical solution, the indication of the rate by the indication information is realized, and preparation is made for the subsequent second electronic device to perform transmission rate switching. The method also realizes accurate control of link switching, avoids the problem that the link needs to be interacted for many times when being switched once in the prior art, simplifies the negotiation process and improves the transmission rate switching efficiency. In addition, the problem that data transmission fails on the backward link indicated by the first backward link indication information due to unreliable data transmission after the cut-off after the transmission rate switching is carried out according to the first data packet is also avoided.

202. The first electronic device switches the transmission rate according to the first rate, and the transmission rate after the first electronic device switches is the first rate.

It can be seen that, in the above technical scheme, the negotiation process is simplified, and the transmission rate switching efficiency is improved.

Referring to fig. 5, fig. 5 is a schematic flowchart of another transmission rate switching method according to an embodiment of the present application. As shown in fig. 5, the method is applied to an electronic apparatus including a first electronic device and a second electronic device, and includes:

501. the second electronic device receives a first data packet sent by the first electronic device, wherein the first data packet is used for indicating the second electronic device to switch the transmission rate, and the switched transmission rate is the first rate.

For the content of the first data packet, reference may be made to step 201 in fig. 2, which is not described herein again.

502. The first electronic device switches the transmission rate according to the first rate, and the transmission rate after the first electronic device switches is the first rate.

503. The first electronic device sends at least one first check packet to the second electronic device at a first rate, wherein the first check packet comprises check corresponding to the check information.

504. And when N first check packages in the first check packages are received in the first time window, the second electronic device sends at least one second check package to the first electronic device at the first rate.

Wherein the second check packet is sent by the second electronic device within the first time window and the second check packet is determined by the second electronic device according to the check information, and N is an integer greater than 1. N may be, for example, 2, 3, 4, 5, 6, 7, 10, etc.

If N second check packets of the second check packets are received within the first time window, step 505 is executed; if N second check packets of the second check packets are not received within the first time window, step 506 is executed.

It can be understood that, when the first electronic device sends the first check packet to the second electronic device at the first rate, the first electronic device starts timing to obtain a first start time corresponding to the first electronic device. Further, with the first start time corresponding to the first electronic device as a reference, if N second check packets in the second check packets are received within the first time window, step 505 is executed. If the N second check packets in the second check packet are not received within the first time window based on the first start time corresponding to the first electronic device, step 506 is executed. Further, the first ending time corresponding to the first electronic device is determined according to the first starting time corresponding to the first electronic device and the first time window.

The first electronic device sends the first check packet to the second electronic device at a first rate, that is, the control module of the first electronic device sends the first check packet to the receiver of the second electronic device through the transmitter of the first electronic device at the first rate. Specifically, referring to fig. 6, fig. 6 is a schematic flowchart of another transmission rate switching method according to the embodiment of the present application. As shown in fig. 6, it can be seen that the control module of the first electronic device can send the first check packet to the receiver of the second electronic device through the transmitter of the first electronic device at a first rate. When the second electronic device receives N first check packets in the first check packets, the control module of the second electronic device may determine the second check packet according to the check information included in the first data packet. The second electronic device may then send the second parity packet to the first electronic device at the first rate. That is, the control module of the second electronic device may send the second parity packet to the receiver of the first electronic device through the transmitter of the second electronic device at the first rate.

It is to be understood that the first parity packet and the second parity packet are the same parity packet.

It should be noted that, when the second electronic device performs transmission rate switching according to the first data packet, the second electronic device starts timing to obtain a first start time corresponding to the second electronic device. And taking the first starting time corresponding to the second electronic device as a reference, and when receiving the N first check packets in the first time window, the second electronic device sends at least one second check packet to the first electronic device at the first speed. Meanwhile, when the N second check packages in the first check package are received in the first time window, the second electronic device determines to transmit data to the first electronic device at the first rate. After the second electronic device determines to transmit data to the first electronic device at the first rate, the second electronic device stops sending the second check packet to the first electronic device at the first rate regardless of whether the second electronic device stops timing. In addition, after the second electronic device determines to transmit data to the first electronic device at the first rate, the physical layer of the second electronic device may send a message that the rate switch is successful to the protocol layer of the second electronic device. At this time, the second electronic device is in a standby state and waits for the subsequent data transmission at the first rate.

Further, the first ending time corresponding to the second electronic device is determined according to the first starting time and the first time window corresponding to the second electronic device.

In addition, if N first check packets in the first check packets are not received within the first time window, the second electronic device may switch the first rate to a rate before the second electronic device switches the transmission rate to the first rate.

505. The first electronic device then determines to transmit data to the second electronic device at the first rate.

After the first electronic device determines to transmit data to the second electronic device at the first rate, the first electronic device stops sending the first check packet to the second electronic device at the first rate no matter whether the first electronic device stops timing or not. In addition, after the first electronic device determines to transmit data to the second electronic device at the first rate, the physical layer of the first electronic device may send a message that the rate switch is successful to the protocol layer of the first electronic device. At this time, the first electronic device is in a standby state and waits for the subsequent data transmission at the first rate.

506. And the first electronic device sends the first check packet to the second electronic device again at the first rate after sending the first data packet to the second electronic device at the second rate.

It should be noted that, before sending the first data packet to the second electronic device at the second rate, the first electronic device may switch the first rate to the second rate, and then the first electronic device may send the first data packet to the second electronic device at the second rate. Further, after the first data packet is sent to the second electronic device at the second rate, before the first check packet is sent to the second electronic device at the first rate, the first electronic device further performs transmission rate switching according to the first rate, and the transmission rate after the first electronic device is switched is the first rate. It can be understood that, when the first electronic device sends the first check packet to the second electronic device again at the first rate, the first electronic device starts timing to obtain a second start time corresponding to the first electronic device. Further, with a second start time corresponding to the first electronic device as a reference, if N second check packets in the second check packet are received again within the first time window, the first electronic device determines to transmit data to the second electronic device at the first rate. Further, the subsequent process may refer to step 505 in fig. 5 for the relevant content after the first electronic device determines to transmit data to the second electronic device at the first rate, which is not described herein again.

If the second start time corresponding to the first electronic device is taken as a reference, if N second check packets in the second check packets are not received within the first time window, step 507 is executed. Further, the second ending time corresponding to the first electronic device is determined according to the second starting time corresponding to the first electronic device and the first time window.

507. And when N first check packages in the first check packages are received in the first time window, the second electronic device sends the second check packages to the first electronic device again at the first rate.

If N second check packets in the second check packets are received in the first time window, the first electronic device determines to transmit data to the second electronic device at the first rate. Further, the subsequent process may refer to step 505 in fig. 5 for the relevant content after the first electronic device determines to transmit data to the second electronic device at the first rate, which is not described herein again.

If N second parity packets of the second parity packets have not been received within the first time window, step 508 is executed.

It should be noted that, when the second electronic device switches the transmission rate again according to the first data packet, the second electronic device starts timing to obtain a second start time corresponding to the second electronic device. And taking second starting time corresponding to the second electronic device as a reference, and when N first check packages in the first check packages are received in the first time window, the second electronic device sends at least one second check package to the first electronic device at the first speed. Meanwhile, when N first check packets in the first check packets are received in the first time window, the second electronic device determines to transmit data to the first electronic device at the first rate. After the second electronic device determines to transmit data to the first electronic device at the first rate, the second electronic device stops sending the second check packet to the first electronic device at the first rate regardless of whether the second electronic device stops timing. In addition, after the second electronic device determines to transmit data to the first electronic device at the first rate, the physical layer of the second electronic device may send a message that the rate switch is successful to the protocol layer of the second electronic device. At this time, the second electronic device is in a standby state and waits for the subsequent data transmission at the first rate.

Further, the second ending time corresponding to the second electronic device is determined according to the second starting time corresponding to the second electronic device and the first time window.

508. And the first electronic device sends a second data packet to the second electronic device at a third rate after switching the first rate to the third rate, the second data packet is used for indicating the second electronic device to carry out transmission rate switching, the switched transmission rate is a fourth rate, the transmission rate switching is carried out according to the fourth rate, the switched transmission rate of the first electronic device is the fourth rate, and the first check packet is sent to the second electronic device at the fourth rate until the first electronic device determines to transmit data to the second electronic device at the fourth rate.

The second rate is a rate before the first electronic device switches the transmission rate to the first rate, the second rate is smaller than the first rate, the third rate is a rate with the lowest rate in the transmission rates corresponding to the first electronic device, the fourth rate is larger than the second rate, and the fourth rate is smaller than the first rate.

The second data packet may also include the indication information, the second backward link indication information, the check information, and the second time window, and the second data packet may also include the second indication information, the second forward link indication information, the second backward link indication information, the check information, and the second time window. Further, the second indication information is used for indicating a fourth rate. Additionally, the second time window is determined based on a fourth rate. For example, the greater the fourth rate, the longer the second time window; the smaller the fourth rate, the shorter the second time window. In addition, the first data packet includes the same check information as the second data packet.

It should be noted that, when the second packet includes the second indication information, the second forward link indication information, the check information, and the second time window, the second indication information is at least one first bit in the second packet, and the at least one first bit in the second packet is used to indicate the first rate when a value of the at least one first bit in the second packet is the first value. The second forward link indication information is at least one second bit in the second data packet, and the at least one second bit in the second data packet is used for indicating the forward link indicated by the second forward link indication information when the value of the at least one second bit in the second data packet is the second value. The check information included in the second data packet is at least one third bit in the second data packet, and the at least one third bit in the second data packet is used by the second electronic device to determine the second check packet when the value of the at least one third bit in the second data packet is a third value. The second time window is at least one fourth bit in the second data packet, and the at least one fourth bit in the second data packet is used for indicating the second time window when the value of the at least one fourth bit in the second data packet is a fourth value. The first numerical value, the second numerical value, the third numerical value and the fourth numerical value may be the same, may be partially the same, or may be completely different. Further, the second data packet is also used to instruct the second electronic device to perform forward link handover, and the switched forward link is the forward link indicated by the second forward link indication information.

When the second data packet includes second indication information, second backward link indication information, check information, and a second time window, the second indication information is at least one first bit in the second data packet, and the at least one first bit in the second data packet is used to indicate the first rate when a value of the at least one first bit in the second data packet is a first value. The second backward link indication information is at least one second bit in the second data packet, and the at least one second bit in the second data packet is used for indicating the backward link indicated by the second backward link indication information when the value of the at least one second bit in the second data packet is the second value. The check information included in the second data packet is at least one third bit in the second data packet, and the at least one third bit in the second data packet is used by the second electronic device to determine the second check packet when the value of the at least one third bit in the second data packet is a third value. The second time window is at least one fourth bit in the second data packet, and the at least one fourth bit in the second data packet is used for indicating the second time window when the value of the at least one fourth bit in the second data packet is a fourth value. The first numerical value, the second numerical value, the third numerical value and the fourth numerical value may be the same, may be partially the same, or may be completely different. Further, the second data packet is also used for instructing the second electronic device to perform a backward link switching, and the switched backward link is the backward link indicated by the second backward link indication information.

When the second packet includes second indication information, second forward link indication information, second backward link indication information, check information, and a second time window, the second indication information is at least one first bit in the second packet, and the at least one first bit in the second packet is used to indicate the first rate when the value of the at least one first bit in the second packet is the first value. The second forward link indication information is at least one second bit in the second data packet, and the at least one second bit in the second data packet is used for indicating the forward link indicated by the second forward link indication information when the value of the at least one second bit in the second data packet is the second value. The second backward link indication information is at least one third bit in the second data packet, and the at least one third bit in the second data packet is used for indicating the backward link indicated by the second backward link indication information when the value of the at least one third bit in the second data packet is a third value. The check information included in the second data packet is at least one fourth bit in the second data packet, and the at least one fourth bit in the second data packet is used by the second electronic device to determine the second check packet when the value of the at least one fourth bit in the second data packet is a fourth value. The second time window is at least one fifth bit in the second data packet, and the at least one fifth bit in the second data packet is used for indicating the second time window when the value of the at least one fifth bit in the second data packet is a fifth value. It is to be understood that the first, second, third, fourth, and fifth values may be the same, partially the same, or completely different. Further, the second data packet is further used to instruct the second electronic device to perform forward link handover and backward link handover, where the switched forward link is the forward link indicated by the second forward link indication information, and the switched backward link is the backward link indicated by the second backward link indication information.

It should be noted that, when the second packet includes the second backward link indication information, the second packet is further configured to instruct the second electronic device to perform transmission rate switching according to the second packet when detecting that no data is transmitted on the backward link indicated by the second backward link indication information; or the like, or, alternatively,

the first data packet is further used for instructing the second electronic device to perform transmission rate switching according to the first data packet when detecting that data transmission on the backward link indicated by the first backward link indication information is finished.

Further, the first electronic device sends the second data packet to the second electronic device at the third rate, that is, the control module of the first electronic device sends the second data packet to the control module of the second electronic device at the third rate through the transmitter of the first electronic device. It is understood that when the first electronic device sends the second data packet to the second electronic device at the third rate, the interaction process between the protocol layer of the first electronic device and the physical layer of the first electronic device is involved, and the interaction process between the protocol layer of the second electronic device and the physical layer of the second electronic device is also involved. Further, as for the interaction process between the protocol layer of the first electronic device and the physical layer of the first electronic device, and the interaction process between the protocol layer of the second electronic device and the physical layer of the second electronic device, reference may be made to step 201 in fig. 2, which is not repeated herein.

It can be appreciated that, upon receiving N of the first check packets within the second time window, the second electronic device sends the second check packet to the first electronic device at the fourth rate. And if N second check packets in the second check packets are received in the second time window, the first electronic device determines to transmit data to the second electronic device at a fourth rate. Further, when the first electronic device sends the first check packet to the second electronic device at the fourth rate, the first electronic device starts timing to obtain a third starting time corresponding to the first electronic device. Further, with a third starting time corresponding to the first electronic device as a reference, if N second check packets in the second check packets are received within the second time window, the first electronic device determines to transmit data to the second electronic device at a fourth rate. Further, the third ending time corresponding to the first electronic device is determined according to the third starting time corresponding to the first electronic device and the second time window. In addition, after the first electronic device determines to transmit data to the second electronic device at the fourth rate, the first electronic device stops transmitting the first check packet to the second electronic device at the fourth rate regardless of whether the first electronic device stops timing. In addition, after the first electronic device determines to transmit data to the second electronic device at the fourth rate, the physical layer of the first electronic device may send a message that the rate switching is successful to the protocol layer of the first electronic device. At this time, the first electronic device is in a standby state and waits for the subsequent data transmission at the fourth rate.

If N second check packets in the second check packet are not received within the second time window, the first electronic device may switch the fourth rate to the third rate, or may switch the fourth rate to the second rate, so that data may be transmitted to the second electronic device at the second rate or the third rate.

It should be noted that, when the second electronic device performs transmission rate switching according to the second data packet, the second electronic device starts timing to obtain a third start time corresponding to the second electronic device. And taking the third starting time corresponding to the second electronic device as a reference, and when receiving the N first check packets in the second time window, the second electronic device sends at least one second check packet to the first electronic device at a fourth rate. Meanwhile, when N first check packets in the first check packets are received in the second time window, the second electronic device determines to transmit data to the first electronic device at a fourth rate. Further, the third ending time corresponding to the second electronic device is determined according to the third starting time corresponding to the second electronic device and the second time window. In addition, after the second electronic device determines to transmit data to the first electronic device at the fourth rate, the second electronic device stops transmitting the second check packet to the first electronic device at the fourth rate regardless of whether the second electronic device stops timing. In addition, after the second electronic device determines to transmit data to the first electronic device at the fourth rate, the physical layer of the second electronic device may send a message that the rate switching is successful to the protocol layer of the second electronic device. At this time, the second electronic device is in a standby state and waits for the subsequent data transmission at the first rate.

In addition, if N first check packets in the first check packets are not received in the second time window, the second electronic device may switch the fourth rate to a rate before the second electronic device switches the transmission rate to the fourth rate.

It can be seen that, in the above technical scheme, the negotiation process is simplified, and the transmission rate switching efficiency is improved. Meanwhile, the verification of the reliability of the data transmission after the speed cut is realized through the verification packet and the second time window, and the data is prevented from being sent to the second electronic device at the switched speed when the data transmission after the speed cut is unreliable. In addition, the method and the device also realize that the second data packet is sent to the second electronic device by adopting the original rate before the first rate is switched when the data transmission is unreliable after the speed cut, and solve the problem that the new rate negotiation fails due to external accidental factors. Meanwhile, when the check packet is not received in the second time window, namely when the data transmission is still unreliable after the speed cut, a more flexible speed cut mode is provided by adopting the lowest speed corresponding to the equipment to transmit a new data packet.

The transmission rate switching device provided by the embodiment of the application comprises a first electronic device and a second electronic device.

The second electronic device is used for receiving a first data packet sent by the first electronic device, wherein the first data packet is used for indicating the second electronic device to switch the transmission rate, and the switched transmission rate is the first rate.

For the content of the first data packet, reference may be made to step 201 in fig. 2, which is not described herein again.

And the first electronic device is used for carrying out transmission rate switching according to the first rate, and the transmission rate after the first electronic device is switched is the first rate.

It can be seen that, in the above technical scheme, the negotiation process is simplified, and the transmission rate switching efficiency is improved.

In one possible embodiment, the first data packet includes first indication information indicating the first rate.

It can be seen that, in the above technical solution, the indication of the rate by the indication information is realized, and preparation is made for the subsequent second electronic device to perform transmission rate switching.

In a possible implementation, the first data packet further includes first forward link indication information and/or first backward link indication information, the first data packet is further used to instruct the second electronic device to perform forward link handover and/or backward link handover, and the switched forward link is the forward link indicated by the first forward link indication information, and the switched backward link is the backward link indicated by the first backward link indication information.

Therefore, in the technical scheme, the link switching is accurately controlled, the problem that in the prior art, multiple interactions are required to be carried out when the link is switched once is solved, the negotiation process is simplified, and the transmission rate switching efficiency is improved.

In a possible implementation manner, the first data packet is further used for instructing the second electronic device to perform transmission rate switching according to the first data packet when detecting that no data is transmitted on the backward link indicated by the first backward link indication information; or the like, or, alternatively,

the first data packet is further used for instructing the second electronic device to perform transmission rate switching according to the first data packet when detecting that data transmission on the backward link indicated by the first backward link indication information is finished.

It can be seen that, in the above technical solution, the problem that data transmission on the backward link indicated by the first backward link indication information fails due to unreliable data transmission after the cut-rate is performed after the transmission rate is switched according to the second data packet is avoided.

In one possible embodiment, the first data packet further comprises verification information and a first time window,

the first electronic device is also used for sending at least one first check packet to the second electronic device at a first rate;

when receiving N first check packets in the first time window, the second electronic device is further configured to send at least one second check packet to the first electronic device at the first rate, where the second check packet is sent by the second electronic device in the first time window and is determined by the second electronic device according to the check information, and N is an integer greater than 1;

the first electronic device is further configured to determine to transmit data to the second electronic device at the first rate if N second parity packets of the second parity packets are received within the first time window.

For the content of sending the first check packet to the second electronic device at the first rate, reference may be made to step 504 in fig. 5, which is not repeated herein. Reference may be made to step 504 in fig. 5 for contents of sending at least one second check-up packet to the first electronic device at the first rate, which is not described herein again. Reference may be made to step 505 in fig. 5 for determining to transmit data to the second electronic device at the first rate, which is not described herein again.

It can be seen that, in the above technical solution, through the check packet and the first time window, the check on the reliability of the data transmission after the speed cut is realized, and it is avoided that data is sent to the second electronic device at the switched rate when the data transmission after the speed cut is unreliable.

In a possible implementation manner, if N second check packets in the second check packets are not received within the first time window, the first electronic device is further configured to send the first check packet to the second electronic device again at the first rate after sending the first data packet to the second electronic device at the second rate;

the second electronic device is also used for sending the second check packet to the first electronic device again at the first speed when receiving the N first check packets in the first time window;

if the N second check packets in the second check packets are not received in the first time window, the first electronic device is further configured to send a second data packet to the second electronic device at the third rate after the first rate is switched to the third rate, the second data packet is used to instruct the second electronic device to perform transmission rate switching, and the switched transmission rate is a fourth rate, the transmission rate switching is performed according to the fourth rate, and the transmission rate after the first electronic device is switched is the fourth rate, and the first check packet is sent to the second electronic device at the fourth rate until the first electronic device determines to transmit data to the second electronic device at the fourth rate;

the second rate is a rate before the first electronic device switches the transmission rate to the first rate, the second rate is smaller than the first rate, the third rate is a rate with the lowest rate in the transmission rates corresponding to the first electronic device, the fourth rate is larger than the second rate, and the fourth rate is smaller than the first rate.

For the content of sending the first check packet to the second electronic device again at the first rate, refer to step 506 in fig. 5, which is not described herein again. Reference may be made to step 504 in fig. 5 for content of sending the second check-up packet to the first electronic device again at the first rate, which is not repeated herein. For the content of sending the second data packet to the second electronic device at the third rate after the first rate is switched to the third rate, refer to step 508 in fig. 5, which is not repeated herein.

It can be seen that, in the above technical solution, when data transmission after speed cut is unreliable, the original speed before the first speed is switched to is adopted to send the second data packet to the second electronic device, and the problem of new speed negotiation failure due to external accidental factors is eliminated. Meanwhile, when the check packet is not received in the first time window, namely when data transmission is still unreliable after speed cut, a more flexible speed cut mode is provided by adopting the lowest speed corresponding to the equipment to transmit a new data packet.

The present application also provides a computer-readable storage medium in which a computer program is stored, which, when executed, implements any of the methods, such as the transmission rate switching method.

The above-mentioned embodiments, objects, technical solutions and advantages of the present application are further described in detail, it should be understood that the above-mentioned embodiments are only examples of the present application, and are not intended to limit the scope of the present application, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present application should be included in the scope of the present application.

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:包数据生成方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类