Method and device for adjusting rate mode of USB (Universal Serial Bus) data transmission
By detecting signal status and historical parameters in real time, the USB data transmission rate mode is dynamically adjusted, which solves the problem of noise interference from USB 3.0 devices, increases the network rate, reduces the frequent switching of rate modes, and improves the user experience.
Patent Information
- Application Number
- CN202410679538.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-08-30
AI Technical Summary
The broadband noise of USB 3.0 devices affects the signal-to-noise ratio and throughput of wireless devices, causing some frequency bands to be affected, and frequent switching of fixed-rate modes affects user experience.
By detecting signal status and historical parameters in real time, the USB data transmission rate mode is dynamically adjusted to reduce noise interference, avoid frequent switching, and increase network speed.
It effectively reduces the impact of USB 3.0 devices on wireless links, increases network speed, reduces frequent switching of speed modes, and improves user experience.
Smart Images

Figure CN118574169A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of USB data link layer interaction technology, and in particular to a method and device for adjusting a rate mode of USB data transmission. Background Art
[0002] As technology continues to improve, various USB 3.0 host controllers that support Super Speed have emerged. When a USB 3.0 host controller finds that its port is connected to a Super Speed USB device, it will perform a Super Speed test to check whether the USB device currently supports Super Speed transmission. If it does, it will switch to Super Speed signal mode, otherwise it will continue to work at full speed or high speed. From the perspective of USB devices, the Super Speed signal mode adaptation process is similar to the full (high) speed device adaptation process. Therefore, more and more USB 3.0 terminals will be used, and users' requirements for high-definition video and transmission rates are constantly increasing. USB 3.0 can meet such user needs, and terminals that support USB 3.0 can have a larger bandwidth and achieve better power management.
[0003] In the prior art, before a communication terminal with a USB interface registers on a network, the device side has already locked the negotiation rate of its corresponding USB interface. However, the broadband noise sent by the USB 3.0 device will affect the signal-to-noise ratio and limit the sensitivity of any wireless device receiver close to the USB 3.0 device. Therefore, part of the frequency band on the network side will be affected by the noise, and when the device side matches the USB peer, it will be configured according to the default negotiation rate mode of the peer USB and fixed to the USB negotiation rate mode after matching, resulting in a certain decrease in the throughput of the device's wireless link. Summary of the invention
[0004] The present invention provides a method and device for adjusting the rate mode of USB data transmission, so as to achieve the technical effect of reducing the influence of the USB3.0 negotiation rate mode on the wireless link throughput on part of the frequency band.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a method for adjusting the rate mode of USB data transmission, comprising the following steps:
[0006] In response to the mode detection signal, a signal state value, a current working mode, a current rate mode and a historical adjustment parameter are acquired, and according to the current working mode, it is determined whether the current rate mode needs to be adjusted;
[0007] If it is determined that the current rate mode needs to be adjusted, a current adjustment parameter is determined according to the signal state value and the current rate mode, and whether the current rate mode needs to be adjusted is determined according to the current adjustment parameter, the historical adjustment parameter and the number of times the adjustment detection reaches the standard;
[0008] If it is determined that the current rate mode needs to be adjusted, the current rate mode is adjusted according to the current adjustment parameters, and the current adjustment parameters are stored as the historical adjustment parameters.
[0009] The rate mode adjustment method provided by the present invention obtains the corresponding signal state value, current working mode, current rate mode and historical adjustment parameters in response to the mode detection signal, and judges whether the current rate mode of the device needs to be adjusted according to the current working mode. When it is judged that adjustment is needed, the current adjustment parameters are determined according to the signal state value and the current rate mode, and then it is judged whether the current rate mode needs to be adjusted according to the current adjustment parameters, historical adjustment parameters and the number of times the adjustment detection meets the standard, and then it is determined whether adjustment is needed according to the judgment result, and after the adjustment, the current adjustment parameters are stored in the database as historical adjustment parameters.
[0010] The present invention detects the connection status and signal status of the device in real time, and determines whether the signal is in an interfered state by detecting various parameters. If it is determined that the signal is in an interfered state, the adjustment mechanism notifies the system to adjust the rate mode, thereby increasing the rate of the network and realizing that the USB negotiation mode will be dynamically adjusted in the case of low perception when the device is in operation. At the same time, the dynamically adjusted USB negotiation mode also reduces the signal interference of USB3.0 on some frequency bands, avoiding the impact of fixed USB rate mode or frequent switching of USB rate mode on user experience.
[0011] As a preferred example, judging whether the current rate mode needs to be adjusted according to the current working mode specifically includes:
[0012] Analyze the current working mode, and determine whether the current rate mode needs to be adjusted according to the analysis result;
[0013] If the analysis result is that the current working mode is the 3.0 tuning mode, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and the current rate mode is judged;
[0014] If the analysis result is that the current working mode is the 2.0 tuning mode, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and the current rate mode is judged;
[0015] If the analysis result is that the current working mode is the automatic tuning mode, it means that the current rate mode needs to be adjusted.
[0016] Determine whether the current speed mode needs to be adjusted according to the current working mode, that is, determine whether the current USB speed mode of the device needs to be adjusted according to the current network status of the device. Taking the current working mode of the device as the first judgment standard for whether to switch the USB speed mode of the device means that the current working mode is added as a basic judgment condition to the complete judgment process, realizing the initial judgment of the USB speed mode switch.
[0017] As a preferred example, judging whether the current rate mode needs to be adjusted according to the current adjustment parameter, the historical adjustment parameter and the number of times the adjustment detection reaches the standard specifically includes:
[0018] Analyze and determine whether the current rate mode needs to be adjusted according to the current adjustment parameters;
[0019] If the current adjustment parameter is the first instruction, it means that there is no need to adjust the current rate mode, and the adjustment detection standard-reaching times are cleared;
[0020] If the current adjustment parameter is the second instruction, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and whether the current rate mode needs to be adjusted is further determined according to the historical adjustment parameter and the number of times the adjustment detection reaches the standard;
[0021] If the current adjustment parameter is the third instruction, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and whether the current rate mode needs to be adjusted is further determined based on the historical adjustment parameter and the number of times the adjustment detection meets the standard.
[0022] If the system determines that the current rate mode needs to be adjusted through the first judgment condition, that is, the current working mode of the system, then the second judgment on whether the current rate mode needs to be adjusted is started, that is, whether the current rate mode needs to be adjusted is further determined based on the current adjustment parameters. Since the current adjustment parameters are determined by the system based on the signal state value and the current rate mode, the current adjustment parameters will be more in line with the signal transmission state of the current frequency band of the device. Therefore, further judgment on whether the current rate mode needs to be adjusted based on the current adjustment parameters also improves the accuracy and practicality of the judgment result.
[0023] If it is determined that the current rate mode does not need to be adjusted, the adjustment detection standard times need to be cleared to ensure that the next time the standard times are increased, the adjustment detection standard times are zero, which does not affect the system's adjustment judgment based on the standard times. By setting the adjustment detection standard times set by the system, a fixed USB rate mode or frequent switching of USB rate modes is avoided, and the reliability of the current adjustment parameters is also improved.
[0024] As a preferred example, further determining whether the current rate mode needs to be adjusted according to the historical adjustment parameters and the adjustment detection standard reaching times specifically includes:
[0025] Compare the historical adjustment parameters with the current adjustment parameters, output and determine whether the current rate mode needs to be adjusted according to the comparison result;
[0026] If the comparison result is that the historical adjustment parameter is the same as the current adjustment parameter, it means that there is no need to adjust the current rate mode, and the adjustment detection standard-reaching times are cleared;
[0027] If the comparison result is that the historical adjustment parameter is different from the current adjustment parameter, then it is determined whether the requirement for adjusting the current rate mode is met according to the number of times the adjustment detection reaches the standard.
[0028] Compare the historical adjustment parameters with the current adjustment parameters, and the output comparison results further determine whether the current rate mode needs to be adjusted, and also further improve the accuracy of the judgment results. If the comparison results are the same, it means that the current adjustment parameters are the same as the historical adjustment parameters, but the system still determines that the current rate mode needs to be adjusted. There is a possibility that the adjustment cannot be successful because the hardware device does not support the target rate mode that needs to be adjusted in the current adjustment parameters. There is also a possibility that the hardware device adjustment fails and the system detection still needs to adjust the current rate mode.
[0029] Therefore, the above comparison method can avoid the situation of forced switching to the same USB speed mode multiple times. However, since the USB data cable does not support the USB speed mode, forced switching to the same speed mode will affect the normal use of users.
[0030] As a preferred example, determining whether the requirement for adjusting the current rate mode is met according to the adjustment detection reaching the target number is specifically:
[0031] Compare the adjustment detection standard-reaching times with a preset adjustment detection standard-reaching threshold, output and determine whether the adjustment detection standard-reaching times meet the requirement for adjusting the current rate mode according to the comparison result;
[0032] If the adjustment detection standard-reaching times is less than the adjustment detection standard-reaching threshold, the adjustment detection standard-reaching times is incremented by one, and the process returns to responding to the mode detection signal;
[0033] If the adjustment detection standard-reaching times is equal to the adjustment detection standard-reaching threshold, the current rate mode is adjusted according to the current adjustment parameter, and the adjustment detection standard-reaching times is cleared.
[0034] By making a final judgment on the number of times the adjustment detection meets the standard, it is determined whether the current rate mode needs to be adjusted, thereby reducing the adjustment frequency for the current rate mode and further improving the accuracy of the output judgment result, avoiding frequent switching of the USB rate mode.
[0035] Correspondingly, the present invention also provides a rate mode adjustment device for USB data transmission, the rate mode adjustment device comprising a signal response module, a parameter judgment module and a mode adjustment module;
[0036] The signal response module is used to respond to the mode detection signal, collect and obtain the signal state value, the current working mode, the current rate mode and the historical adjustment parameters, and determine whether the current rate mode needs to be adjusted according to the current working mode;
[0037] The parameter judgment module is used to determine the current adjustment parameter according to the signal state value and the current rate mode if it is determined that the current rate mode needs to be adjusted, and to judge whether the current rate mode needs to be adjusted according to the current adjustment parameter, the historical adjustment parameter and the number of times the adjustment detection reaches the standard;
[0038] The mode adjustment module is used for adjusting the current rate mode according to the current adjustment parameters if it is determined that the current rate mode needs to be adjusted, and storing the current adjustment parameters as the historical adjustment parameters.
[0039] As a preferred example, the signal response module determines whether the current rate mode needs to be adjusted according to the current working mode, specifically including:
[0040] Analyze the current working mode, and determine whether the current rate mode needs to be adjusted according to the analysis result;
[0041] If the analysis result is that the current working mode is the 3.0 tuning mode, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and the current rate mode is judged;
[0042] If the analysis result is that the current working mode is the 2.0 tuning mode, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and the current rate mode is judged;
[0043] If the analysis result is that the current working mode is the automatic tuning mode, it means that the current rate mode needs to be adjusted.
[0044] As a preferred example, the parameter judgment module judges whether the current rate mode needs to be adjusted according to the current adjustment parameter, the historical adjustment parameter and the number of times the adjustment detection reaches the standard, specifically including:
[0045] Analyze and determine whether the current rate mode needs to be adjusted according to the current adjustment parameters;
[0046] If the current adjustment parameter is the first instruction, it means that there is no need to adjust the current rate mode, and the adjustment detection standard-reaching times are cleared;
[0047] If the current adjustment parameter is the second instruction, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and whether the current rate mode needs to be adjusted is further determined according to the historical adjustment parameter and the number of times the adjustment detection reaches the standard;
[0048] If the current adjustment parameter is the third instruction, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and whether the current rate mode needs to be adjusted is further determined based on the historical adjustment parameter and the number of times the adjustment detection meets the standard.
[0049] As a preferred example, the parameter judgment module further judges whether the current rate mode needs to be adjusted according to the historical adjustment parameter and the adjustment detection standard-reaching times, specifically including:
[0050] Compare the historical adjustment parameters with the current adjustment parameters, output and determine whether the current rate mode needs to be adjusted according to the comparison result;
[0051] If the comparison result is that the historical adjustment parameter is the same as the current adjustment parameter, it means that there is no need to adjust the current rate mode, and the adjustment detection standard-reaching times are cleared;
[0052] If the comparison result is that the historical adjustment parameter is different from the current adjustment parameter, then it is determined whether the requirement for adjusting the current rate mode is met according to the number of times the adjustment detection reaches the standard.
[0053] As a preferred example, the parameter judgment module determines whether the requirement for adjusting the current rate mode is met according to the adjustment detection reaching the standard number, specifically:
[0054] Compare the adjustment detection standard-reaching times with a preset adjustment detection standard-reaching threshold, output and determine whether the adjustment detection standard-reaching times meet the requirement for adjusting the current rate mode according to the comparison result;
[0055] If the adjustment detection standard-reaching times is less than the adjustment detection standard-reaching threshold, the adjustment detection standard-reaching times is incremented by one, and the process returns to responding to the mode detection signal;
[0056] If the adjustment detection standard-reaching times is equal to the adjustment detection standard-reaching threshold, the current rate mode is adjusted according to the current adjustment parameter, and the adjustment detection standard-reaching times is cleared. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 : A flow chart of an embodiment of a method for adjusting the rate mode of USB data transmission provided by the present invention;
[0058] Figure 2 : A structural schematic diagram of an embodiment of a rate mode adjustment device for USB data transmission provided by the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0060] Embodiment 1
[0061] Please refer to Figure 1 , is a flow chart of an embodiment of the method for adjusting the rate mode of USB data transmission provided by the present invention, including steps 101 to 103, each of which is specifically as follows:
[0062] Step 101: In response to a mode detection signal, a signal state value, a current working mode, a current rate mode and a historical adjustment parameter are obtained, and it is determined whether the current rate mode needs to be adjusted according to the current working mode.
[0063] The rate mode adjustment method provided by the present invention obtains the corresponding signal state value, current working mode, current rate mode and historical adjustment parameters in response to the mode detection signal, and judges whether the current rate mode of the device needs to be adjusted according to the current working mode, and uses the current working mode as the first judgment condition for whether the current rate mode needs to be adjusted.
[0064] In this embodiment, the signal state value obtained by the system is specifically the wan side state value, including but not limited to data such as frequency band and signal value. The current working mode described in this embodiment includes the following three working modes, namely automatic tuning mode, 2.0 tuning mode and 3.0 tuning mode; the adjustment parameters also include three adjustment parameters, namely the first instruction, the second instruction and the third instruction.
[0065] Specifically, in this embodiment, judging whether the current rate mode needs to be adjusted according to the current working mode specifically includes:
[0066] Analyze the current working mode, and determine whether the current rate mode needs to be adjusted according to the analysis result;
[0067] If the analysis result is that the current working mode is the 3.0 tuning mode, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and the current rate mode is judged;
[0068] If the analysis result is that the current working mode is the 2.0 tuning mode, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and the current rate mode is judged;
[0069] If the analysis result is that the current working mode is the automatic tuning mode, it means that the current rate mode needs to be adjusted.
[0070] Determine whether the current speed mode needs to be adjusted according to the current working mode, that is, determine whether the current USB speed mode of the device needs to be adjusted according to the current network status of the device. Taking the current working mode of the device as the first judgment standard for whether to switch the USB speed mode of the device means that the current working mode is added as a basic judgment condition to the complete judgment process, realizing the initial judgment of the USB speed mode switch.
[0071] In this embodiment, if the system determines that the current working mode of the device is the automatic tuning mode, it means that in this mode the system will perform optimal automatic processing according to the actual frequency band and signal value; if the current working mode determined by the system is the USB2.0 tuning mode, it means that in this mode, the system will force the current adjustment parameter to be set to the second instruction, that is, adjust the current rate mode to the 2.0 rate mode; if the system determines that the current working mode is the USB3.0 tuning mode, it means that in this mode, the system will force the current adjustment parameter to be set to the third instruction, that is, adjust the current rate mode to the 3.0 rate mode.
[0072] Step 102: If it is determined that the current rate mode needs to be adjusted, the current adjustment parameters are determined according to the signal state value and the current rate mode, and whether the current rate mode needs to be adjusted is determined according to the current adjustment parameters, the historical adjustment parameters and the number of times the adjustment detection meets the standard.
[0073] When the system determines that adjustment is needed and determines the current adjustment parameters based on the signal status value and the current rate mode, it then determines whether the current rate mode needs to be adjusted based on the current adjustment parameters, historical adjustment parameters and the number of times the adjustment detection is met. Based on the above parameter data, it is determined whether the current rate mode of the device needs to be further judged in depth, and a response judgment result is output as a double judgment condition for whether to adjust the current rate mode. Since the reference parameters include the current adjustment parameters, historical adjustment parameters and the number of times the adjustment detection is met, the double judgment condition also includes the second, third and fourth judgment conditions corresponding to the above three different parameter data.
[0074] Specifically, the present embodiment determines whether the current rate mode needs to be adjusted according to the current adjustment parameter, the historical adjustment parameter, and the number of times the adjustment detection reaches the standard, specifically including:
[0075] Analyze and determine whether the current rate mode needs to be adjusted according to the current adjustment parameters;
[0076] If the current adjustment parameter is the first instruction, it means that there is no need to adjust the current rate mode, and the adjustment detection standard-reaching times are cleared;
[0077] If the current adjustment parameter is the second instruction, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and whether the current rate mode needs to be adjusted is further determined according to the historical adjustment parameter and the number of times the adjustment detection reaches the standard;
[0078] If the current adjustment parameter is the third instruction, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and whether the current rate mode needs to be adjusted is further determined based on the historical adjustment parameter and the number of times the adjustment detection meets the standard.
[0079] If the system determines that the current rate mode needs to be adjusted through the first judgment condition, that is, the current working mode of the system, then the second judgment on whether the current rate mode needs to be adjusted is started, that is, whether the current rate mode needs to be adjusted is further determined based on the current adjustment parameters. Since the current adjustment parameters are determined by the system based on the signal state value and the current rate mode, the current adjustment parameters will be more in line with the signal transmission state of the current frequency band of the device. Therefore, further judgment on whether the current rate mode needs to be adjusted based on the current adjustment parameters also improves the accuracy and practicality of the judgment result.
[0080] If it is determined that the current rate mode does not need to be adjusted, the adjustment detection standard times need to be cleared to ensure that the next time the standard times are increased, the adjustment detection standard times are zero, which does not affect the system's adjustment judgment based on the standard times. By setting the adjustment detection standard times set by the system, a fixed USB rate mode or frequent switching of USB rate modes is avoided, and the reliability of the current adjustment parameters is also improved.
[0081] In this embodiment, the adjustment parameters include the following three parameter types, namely, the first instruction, STATUS_SET0, which specifically means no adjustment is required; the second instruction, STATUS_SET1, which specifically means adjusting the current speed mode to USB2.0, i.e., 2.0 speed mode; and the third instruction, STATUS_SET2, which specifically means adjusting the current speed mode to USB3.0, i.e., 3.0 speed mode. Therefore, by analyzing the specific meaning of the current adjustment parameter, a second judgment can be made on whether the current speed mode needs to be adjusted.
[0082] After the second judgment, the system will make further judgments based on the historical adjustment parameters and the number of times the adjustment test has been met. If the second judgment is that no adjustment is required, the system will also clear the number of times the adjustment test has been met before returning to the mode detection signal response to avoid the current number of times the adjustment has been met affecting the statistics of the next number of times the adjustment has been met.
[0083] Furthermore, in this embodiment, further determining whether the current rate mode needs to be adjusted according to the historical adjustment parameter and the adjustment detection standard-reaching number of times specifically includes:
[0084] Compare the historical adjustment parameters with the current adjustment parameters, output and determine whether the current rate mode needs to be adjusted according to the comparison result;
[0085] If the comparison result is that the historical adjustment parameter is the same as the current adjustment parameter, it means that there is no need to adjust the current rate mode, and the adjustment detection standard-reaching times are cleared;
[0086] If the comparison result is that the historical adjustment parameter is different from the current adjustment parameter, then it is determined whether the requirement for adjusting the current rate mode is met according to the number of times the adjustment detection reaches the standard.
[0087] Compare the historical adjustment parameters with the current adjustment parameters, and the output comparison results further determine whether the current rate mode needs to be adjusted, and also further improve the accuracy of the judgment results. If the comparison results are the same, it means that the current adjustment parameters are the same as the historical adjustment parameters, but the system still determines that the current rate mode needs to be adjusted. There is a possibility that the adjustment cannot be successful because the hardware device does not support the target rate mode that needs to be adjusted in the current adjustment parameters. There is also a possibility that the hardware device adjustment fails and the system detection still needs to adjust the current rate mode.
[0088] Therefore, the above comparison method can avoid the situation of forced switching to the same USB speed mode multiple times. However, since the USB data cable does not support the USB speed mode, forced switching to the same speed mode will affect the normal use of users.
[0089] When the system determines that the historical adjustment parameters are the same as the current adjustment parameters, the system believes that an adjustment judgment has been made before this confirmation, but the adjustment failed. Therefore, it is confirmed that there are corresponding limitations in the hardware of the device, which makes the device unable to switch to the target rate mode. Therefore, it is determined that there is no need to adjust the current rate mode, and the number of adjustment detection compliance times is cleared.
[0090] Furthermore, in this embodiment, determining whether the requirement for adjusting the current rate mode is met according to the adjustment detection standard-reaching times is specifically as follows:
[0091] Compare the adjustment detection standard-reaching times with a preset adjustment detection standard-reaching threshold, output and determine whether the adjustment detection standard-reaching times meet the requirement for adjusting the current rate mode according to the comparison result;
[0092] If the adjustment detection standard-reaching times is less than the adjustment detection standard-reaching threshold, the adjustment detection standard-reaching times is incremented by one, and the process returns to responding to the mode detection signal;
[0093] If the adjustment detection standard-reaching times is equal to the adjustment detection standard-reaching threshold, the current rate mode is adjusted according to the current adjustment parameter, and the adjustment detection standard-reaching times is cleared.
[0094] By making a final judgment on the number of times the adjustment detection meets the standard, it is determined whether the current rate mode needs to be adjusted, thereby reducing the adjustment frequency for the current rate mode and further improving the accuracy of the output judgment result, avoiding frequent switching of the USB rate mode.
[0095] In this embodiment, if the system determines that the number of adjustment detection compliance times does not reach the adjustment detection compliance threshold, it means that the system has not yet met the adjustment requirements of the current rate mode, and no adjustment is made temporarily. Instead, the number of detections is increased by one, and the system returns to the mode detection signal response step until the number of compliance times is equal to the compliance threshold, that is, the adjustment requirements are met. Only then will the system adjust the current rate mode according to the current adjustment parameters corresponding to the requirements, and at the same time, clear the number of adjustment detection compliance times to avoid affecting the statistics of the next number of detections.
[0096] In order to better illustrate the working principle and step flow of the USB data transmission rate mode adjustment method and device of the present invention, it is possible but not limited to refer to the relevant records above.
[0097] Accordingly, see Figure 2 , Figure 2 A schematic diagram of the structure of an embodiment of the rate mode adjustment device for USB data transmission provided by the present invention. Figure 2 As shown, the rate mode adjustment device includes a signal response module 201, a parameter judgment module 202 and a mode adjustment module 203.
[0098] The signal response module 201 is used to respond to the mode detection signal, collect and obtain the signal state value, current working mode, current rate mode and historical adjustment parameters, and determine whether the current rate mode needs to be adjusted according to the current working mode.
[0099] Further, the signal response module 201 determines whether the current rate mode needs to be adjusted according to the current working mode, specifically including:
[0100] Analyze the current working mode, and determine whether the current rate mode needs to be adjusted according to the analysis result;
[0101] If the analysis result is that the current working mode is the 3.0 tuning mode, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and the current rate mode needs to be judged; if the analysis result is that the current working mode is the 2.0 tuning mode, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and the current rate mode needs to be judged; if the analysis result is that the current working mode is the automatic tuning mode, it means that the current rate mode needs to be adjusted.
[0102] The parameter judgment module 202 is used to determine the current adjustment parameters according to the signal state value and the current rate mode if it is determined that the current rate mode needs to be adjusted, and to judge whether the current rate mode needs to be adjusted according to the current adjustment parameters, the historical adjustment parameters and the number of adjustment detection compliance times.
[0103] Further, the parameter determination module 202 determines whether the current rate mode needs to be adjusted according to the current adjustment parameter, the historical adjustment parameter and the number of times the adjustment detection reaches the standard, specifically including:
[0104] Analyze and determine whether the current rate mode needs to be adjusted according to the current adjustment parameters;
[0105] If the current adjustment parameter is the first instruction, it means that there is no need to adjust the current rate mode, and the number of times the adjustment detection meets the standard is cleared; if the current adjustment parameter is the second instruction, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and whether the current rate mode needs to be adjusted is further determined based on the historical adjustment parameters and the number of times the adjustment detection meets the standard; if the current adjustment parameter is the third instruction, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and whether the current rate mode needs to be adjusted is further determined based on the historical adjustment parameters and the number of times the adjustment detection meets the standard.
[0106] Furthermore, the parameter determination module 202 further determines whether the current rate mode needs to be adjusted according to the historical adjustment parameters and the adjustment detection reaching the standard number, specifically including:
[0107] Compare the historical adjustment parameters with the current adjustment parameters, output and determine whether the current rate mode needs to be adjusted according to the comparison result;
[0108] If the comparison result is that the historical adjustment parameters are the same as the current adjustment parameters, it means that there is no need to adjust the current rate mode, and the number of adjustment detection compliance times is cleared; if the comparison result is that the historical adjustment parameters are different from the current adjustment parameters, it is determined whether the requirements for adjusting the current rate mode are met based on the number of adjustment detection compliance times.
[0109] Furthermore, the parameter determination module 202 determines whether the requirement for adjusting the current rate mode is met according to the adjustment detection reaching the standard number, specifically:
[0110] Compare the adjustment detection standard-reaching times with a preset adjustment detection standard-reaching threshold, output and determine whether the adjustment detection standard-reaching times meet the requirement for adjusting the current rate mode according to the comparison result;
[0111] If the number of adjustment detection compliance times is less than the adjustment detection compliance threshold, the number of adjustment detection compliance times is incremented by one and returned to respond to the mode detection signal; if the number of adjustment detection compliance times is equal to the adjustment detection compliance threshold, the current rate mode is adjusted according to the current adjustment parameters, and the number of adjustment detection compliance times is cleared.
[0112] The mode adjustment module 203 is used for adjusting the current rate mode according to the current adjustment parameters if it is determined that the current rate mode needs to be adjusted, and storing the current adjustment parameters as the historical adjustment parameters.
[0113] In summary, the embodiment of the present invention provides a method and device for adjusting the rate mode of USB data transmission, which responds to and obtains the device signal state value, current working mode, current rate mode and historical adjustment parameters according to the mode detection signal, determines whether the current rate mode needs to be adjusted according to the current working mode, and if it is determined to be necessary, determines the current adjustment parameters according to the signal state value and the current rate mode, determines whether the current rate mode needs to be adjusted according to the current adjustment parameters, historical adjustment parameters and the number of times the adjustment detection reaches the standard, and if it is determined to be necessary, adjusts the current rate mode according to the current adjustment parameters. The present invention determines whether the signal is in an interfered state by real-time detection of various parameters of the device, and notifies the system to perform rate mode adjustment operations through an adjustment mechanism when it is determined to be in an interfered state, thereby improving the rate of the network, realizing dynamic adjustment in the low-perception state of the USB negotiation mode, and reducing the signal interference of USB3.0 on some frequency bands.
[0114] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for adjusting the rate mode of USB data transmission, characterized in that: The following steps are involved: In response to the mode detection signal, a signal state value, a current working mode, a current rate mode and a historical adjustment parameter are acquired, and according to the current working mode, it is determined whether the current rate mode needs to be adjusted; If it is determined that the current rate mode needs to be adjusted, a current adjustment parameter is determined according to the signal state value and the current rate mode, and whether the current rate mode needs to be adjusted is determined according to the current adjustment parameter, the historical adjustment parameter and the number of times the adjustment detection reaches the standard; If it is determined that the current rate mode needs to be adjusted, the current rate mode is adjusted according to the current adjustment parameters, and the current adjustment parameters are stored as the historical adjustment parameters.
2. A method for adjusting the rate mode of USB data transmission as claimed in claim 1, characterized in that: The determining whether the current rate mode needs to be adjusted according to the current working mode specifically includes: Analyze the current working mode, and determine whether the current rate mode needs to be adjusted according to the analysis result; If the analysis result is that the current working mode is the 3.0 tuning mode, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and the current rate mode is judged; If the analysis result is that the current working mode is the 2.0 tuning mode, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and the current rate mode is judged; If the analysis result is that the current working mode is the automatic tuning mode, it means that the current rate mode needs to be adjusted.
3. A method for adjusting the rate mode of USB data transmission as claimed in claim 1, characterized in that: The determining whether the current rate mode needs to be adjusted according to the current adjustment parameter, the historical adjustment parameter, and the number of times the adjustment detection reaches the standard specifically includes: Analyze and determine whether the current rate mode needs to be adjusted according to the current adjustment parameters; If the current adjustment parameter is the first instruction, it means that there is no need to adjust the current rate mode, and the adjustment detection standard-reaching times are cleared; If the current adjustment parameter is the second instruction, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and whether the current rate mode needs to be adjusted is further determined according to the historical adjustment parameter and the number of times the adjustment detection reaches the standard; If the current adjustment parameter is the third instruction, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and whether the current rate mode needs to be adjusted is further determined based on the historical adjustment parameter and the number of times the adjustment detection meets the standard.
4. A method for adjusting the rate mode of USB data transmission as claimed in claim 3, characterized in that: The further determining whether the current rate mode needs to be adjusted according to the historical adjustment parameter and the adjustment detection standard-reaching times specifically includes: Compare the historical adjustment parameters with the current adjustment parameters, output and determine whether the current rate mode needs to be adjusted according to the comparison result; If the comparison result is that the historical adjustment parameter is the same as the current adjustment parameter, it means that there is no need to adjust the current rate mode, and the adjustment detection standard-reaching times are cleared; If the comparison result is that the historical adjustment parameter is different from the current adjustment parameter, then it is determined whether the requirement for adjusting the current rate mode is met according to the number of times the adjustment detection reaches the standard.
5. A method for adjusting the rate mode of USB data transmission as claimed in claim 4, characterized in that: The determining whether the requirement for adjusting the current rate mode is met according to the adjustment detection standard-reaching times is specifically: Compare the adjustment detection standard-reaching times with a preset adjustment detection standard-reaching threshold, output and determine whether the adjustment detection standard-reaching times meet the requirement for adjusting the current rate mode according to the comparison result; If the adjustment detection standard-reaching times is less than the adjustment detection standard-reaching threshold, the adjustment detection standard-reaching times is incremented by one, and the process returns to responding to the mode detection signal; If the adjustment detection standard-reaching times is equal to the adjustment detection standard-reaching threshold, the current rate mode is adjusted according to the current adjustment parameter, and the adjustment detection standard-reaching times is cleared.
6. A rate mode adjustment device for USB data transmission, characterized in that: The rate mode adjustment device includes a signal response module, a parameter judgment module and a mode adjustment module; The signal response module is used to respond to the mode detection signal, collect and obtain the signal state value, the current working mode, the current rate mode and the historical adjustment parameters, and determine whether the current rate mode needs to be adjusted according to the current working mode; The parameter judgment module is used to determine the current adjustment parameter according to the signal state value and the current rate mode if it is determined that the current rate mode needs to be adjusted, and to judge whether the current rate mode needs to be adjusted according to the current adjustment parameter, the historical adjustment parameter and the number of times the adjustment detection reaches the standard; The mode adjustment module is used for adjusting the current rate mode according to the current adjustment parameters if it is determined that the current rate mode needs to be adjusted, and storing the current adjustment parameters as the historical adjustment parameters.
7. The device for adjusting the rate mode of USB data transmission as claimed in claim 6, characterized in that: The signal response module determines whether the current rate mode needs to be adjusted according to the current working mode, specifically including: Analyze the current working mode, and determine whether the current rate mode needs to be adjusted according to the analysis result; If the analysis result is that the current working mode is the 3.0 tuning mode, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and the current rate mode is judged; If the analysis result is that the current working mode is the 2.0 tuning mode, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and the current rate mode is judged; If the analysis result is that the current working mode is the automatic tuning mode, it means that the current rate mode needs to be adjusted.
8. The device for adjusting the rate mode of USB data transmission as claimed in claim 6, characterized in that: The parameter judgment module judges whether the current rate mode needs to be adjusted according to the current adjustment parameter, the historical adjustment parameter and the number of times the adjustment detection reaches the standard, specifically including: Analyze and determine whether the current rate mode needs to be adjusted according to the current adjustment parameters; If the current adjustment parameter is the first instruction, it means that there is no need to adjust the current rate mode, and the adjustment detection standard-reaching times are cleared; If the current adjustment parameter is the second instruction, it means that the current rate mode needs to be adjusted to the 2.0 rate mode, and whether the current rate mode needs to be adjusted is further determined according to the historical adjustment parameter and the number of times the adjustment detection reaches the standard; If the current adjustment parameter is the third instruction, it means that the current rate mode needs to be adjusted to the 3.0 rate mode, and whether the current rate mode needs to be adjusted is further determined based on the historical adjustment parameter and the number of times the adjustment detection meets the standard.
9. The device for adjusting the rate mode of USB data transmission as claimed in claim 8, characterized in that: The parameter judgment module further judges whether the current rate mode needs to be adjusted according to the historical adjustment parameter and the adjustment detection reaching the standard number, specifically including: Compare the historical adjustment parameters with the current adjustment parameters, output and determine whether the current rate mode needs to be adjusted according to the comparison result; If the comparison result is that the historical adjustment parameter is the same as the current adjustment parameter, it means that there is no need to adjust the current rate mode, and the adjustment detection standard-reaching times are cleared; If the comparison result is that the historical adjustment parameter is different from the current adjustment parameter, then it is determined whether the requirement for adjusting the current rate mode is met according to the number of times the adjustment detection reaches the standard.
10. The device for adjusting the rate mode of USB data transmission according to claim 9, characterized in that: The parameter judgment module determines whether the requirement for adjusting the current rate mode is met according to the adjustment detection standard-reaching times, specifically: Compare the adjustment detection standard-reaching times with a preset adjustment detection standard-reaching threshold, output and determine whether the adjustment detection standard-reaching times meet the requirement for adjusting the current rate mode according to the comparison result; If the adjustment detection standard-reaching times is less than the adjustment detection standard-reaching threshold, the adjustment detection standard-reaching times is incremented by one, and the process returns to responding to the mode detection signal; If the adjustment detection standard-reaching times is equal to the adjustment detection standard-reaching threshold, the current rate mode is adjusted according to the current adjustment parameter, and the adjustment detection standard-reaching times is cleared.
Citation Information
Cited By
Communication connection method and device, equipment and medium
CN119739668A
