Disclosure of Invention
The invention aims to provide a method and a device for adjusting transmission rate, which can realize that wireless AP equipment can automatically switch the transmission rate between PCIE1.1 and PCIE 2.0.
The technical scheme provided by the invention is as follows:
the invention provides a method for adjusting transmission rate, which comprises the following steps: acquiring a background noise value and a transmission rate of an Nth period, and comparing the magnitude relation between the background noise value of the Nth period and a preset background noise value; adjusting the transmission rate of the (N + 1) th cycle according to the magnitude relation between the background noise value of the Nth cycle and the preset background noise value; n is an integer and is not less than 0.
Further, the adjusting the transmission rate of the (N + 1) th cycle according to the magnitude relationship between the noise floor value of the nth cycle and the preset noise floor value includes: determining the magnitude relation between the background noise value of the Nth period and the preset background noise value; when the noise floor value of the Nth period is equal to the preset noise floor value, controlling the transmission rate of the (N + 1) th period to be the transmission rate of the Nth period; when the noise floor value of the nth period is greater than the preset noise floor value, controlling the transmission rate of the (N + 1) th period to be the transmission rate corresponding to PCIE 1.1; and when the noise floor value of the nth period is smaller than the preset noise floor value, controlling the transmission rate of the (N + 1) th period to be the transmission rate corresponding to PCIE 2.0.
Further, before the adjusting the transmission rate of the (N + 1) th cycle, the method includes: and adjusting the transmission rate of the (N + 1) th period after a preset time length.
The invention also provides a method for adjusting the transmission rate, which comprises the following steps: acquiring a background noise value and a transmission rate of an Nth period, and comparing the size relation between the background noise value of the Nth period and a preset background noise value range; adjusting the transmission rate of the (N + 1) th cycle according to the size relation between the background noise value of the Nth cycle and the preset background noise value range; n is an integer and is not less than 0.
Further, the adjusting the transmission rate of the (N + 1) th cycle according to the size relationship between the noise floor value of the nth cycle and the preset noise floor value range includes: determining the size relation between the background noise value of the Nth period and the preset background noise value range; when the noise floor value of the Nth period is within the preset noise floor value range, controlling the transmission rate of the (N + 1) th period to be the transmission rate of the Nth period; when the noise floor value of the nth period is greater than the maximum value of the preset noise floor value range, controlling the transmission rate of the (N + 1) th period to be the transmission rate corresponding to PCIE 1.1; and when the noise floor value of the nth period is smaller than the minimum value of the preset noise floor value range, controlling the transmission rate of the (N + 1) th period to be the transmission rate corresponding to PCIE 2.0.
The invention also provides a device for adjusting the transmission rate, which comprises: the first acquisition module is used for acquiring the background noise value and the transmission rate of the Nth period; the first comparison module is used for comparing the magnitude relation between the background noise value of the Nth period acquired by the first acquisition module and a preset background noise value; the first adjusting module is used for adjusting the transmission rate of the (N + 1) th cycle according to the magnitude relation between the background noise value of the Nth cycle obtained by the comparison of the first comparing module and the preset background noise value; n is an integer and is not less than 0.
Further, the first adjusting module comprises: the first determining submodule determines the magnitude relation between the background noise value of the Nth period and the preset background noise value; the first control submodule is used for controlling the transmission rate of the (N + 1) th cycle to be the transmission rate of the Nth cycle when the noise floor value of the Nth cycle is equal to the preset noise floor value; the second control submodule is used for controlling the transmission rate of the (N + 1) th cycle to be the transmission rate corresponding to the PCIE1.1 when the background noise value of the Nth cycle is larger than the preset background noise value; and the third control sub-module is configured to control the transmission rate of the (N + 1) th cycle to be a transmission rate corresponding to PCIE2.0 when the noise floor value of the nth cycle is smaller than the preset noise floor value.
Further, the first adjusting module comprises: and the processing submodule is used for adjusting the transmission rate of the (N + 1) th period after the preset time length.
The invention also provides a device for adjusting the transmission rate, which comprises: the second acquisition module is used for acquiring the background noise value and the transmission rate of the Nth period; the second comparison module is used for comparing the size relation between the background noise value of the Nth period acquired by the second acquisition module and a preset background noise value range; the second adjusting module is used for adjusting the transmission rate of the (N + 1) th cycle according to the size relation between the background noise value of the Nth cycle obtained by the comparison of the second comparing module and the preset background noise value range; n is an integer and is not less than 0.
Further, the second adjusting module comprises: the second determining submodule determines the magnitude relation between the background noise value of the Nth period and the preset background noise value; a fourth control sub-module, configured to control the transmission rate of the (N + 1) th cycle to be the transmission rate of the nth cycle when the noise floor value of the nth cycle is equal to the preset noise floor value range; a fifth control sub-module, configured to control the transmission rate of the (N + 1) th cycle to be a transmission rate corresponding to PCIE1.1 when the noise floor value of the nth cycle is greater than the maximum value of the preset noise floor value range; and the sixth control submodule is used for controlling the transmission rate of the (N + 1) th cycle to be the transmission rate corresponding to PCIE2.0 when the background noise value of the Nth cycle is smaller than the minimum value of the preset background noise value range.
The method and the device for adjusting the transmission rate can bring at least one of the following beneficial effects:
1. in the invention, by comparing the magnitude relation between the background noise value of the Nth period and the preset background noise value, the method has the following advantages:
1) since the smaller the Noise Floor value is, the smaller the interference is, the clearer the wireless signal is, and the larger the required transmission rate is, the larger the size relationship between the Noise Floor value of the nth period and the preset Noise Floor value is compared, so that the currently required transmission rate of the wireless AP device can be determined according to the Noise Floor value, and the wireless AP device can be autonomously switched between the two rates of PCIE1.1 and PCIE 2.0.
2) Because the relation between the noise floor value of the Nth period and the preset noise floor value is compared, the transmission rate (PCIE1.1 or PCIE2.0) of the PCIE which is actually required to be carried out is obtained, the physical transmission rate is better utilized, the utilization rate of the transmission rate is improved, meanwhile, the interference can be correspondingly reduced, the bottleneck of the system is enabled not to exist on the PCIE any more, and meanwhile, the transmission links of the system are guaranteed to achieve the maximum performance.
3) Because the relation between the background noise value of the Nth period and the preset background noise value is compared, the actual transmission rate of the PCIE which needs to be carried out is obtained, the number of the links of the PCIE does not need to be increased, the complexity of hardware design is avoided to be increased, and the utilization rate of the bandwidth is improved by utilizing the PCIE switching rate to the maximum extent.
4) When the wireless AP device WIFI has the transmission rate of PCIE1.1, if the measured background noise value is larger than or equal to the preset background noise value, the transmission rate of the wireless AP is adjusted to PCIE1.1, so that 2.4G can be used under the condition of low wireless signal coverage, and disconnection between the user STC and the wireless AP is avoided. And if the measured background noise value is smaller than the preset background noise value, adjusting the transmission rate of the wireless AP to PCIE2.0, so that the interference between frequency bands is reduced, the transmission rate is improved, and the use experience of a user is enhanced.
2. In the invention, the transmission rate of the (N + 1) th period is adjusted after the preset time length, so that the method has the following advantages:
5) because the switching is performed only after the preset time duration is kept in the change area before each switching, such as a trend of one minute, frequent switching is avoided, system computing resources and CPU processing efficiency can be saved, and further electric quantity consumption is saved.
6) Because the switching can be performed only after the changing area is kept for a preset time before each switching, such as a trend of one minute, frequent switching is avoided, and the condition of disconnection between the STC and the wireless AP equipment can be reduced.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
Referring to fig. 1, an embodiment of a method for adjusting a transmission rate according to the present invention includes:
s110, acquiring a background noise value and a transmission rate of an Nth period, and comparing the magnitude relation between the background noise value of the Nth period and a preset background noise value;
s120, adjusting the transmission rate of the (N + 1) th cycle according to the magnitude relation between the background noise value of the Nth cycle and the preset background noise value; n is an integer and is not less than 0.
Specifically, in this embodiment, when the wireless router needs to design the sub-boards or extend the sub-boards, the sub-boards can only transmit at one rate, and if the transmission rate needs to be changed, the wireless router needs to manually set the switch. Since the smaller the Noise Floor value is, the smaller the interference is, the clearer the wireless signal is, and the larger the required transmission rate is, the larger the size relationship between the Noise Floor value of the nth period and the preset Noise Floor value is compared, so that the currently required transmission rate of the wireless AP device can be determined according to the Noise Floor value, and the wireless AP device can be autonomously switched between the two rates of PCIE1.1 and PCIE 2.0. In the embodiment, the background noise value of the wireless router at the current moment is obtained, and then the magnitude relation between the nth background noise value of the current moment and the preset background noise value is compared to obtain a comparison result, so that the transmission rate of the (N + 1) th cycle is adjusted according to the comparison result, and whether the transmission rate needs to be adjusted is judged according to the magnitude relation of the background noise values.
Referring to fig. 2, another embodiment of a method for adjusting a transmission rate according to the present invention includes:
s210, acquiring a background noise value and a transmission rate of an Nth period, and comparing the magnitude relation between the background noise value of the Nth period and a preset background noise value;
s220, determining the magnitude relation between the noise floor value of the Nth period and the preset noise floor value;
s230, when the noise floor value of the Nth period is equal to the preset noise floor value, controlling the transmission rate of the (N + 1) th period to be the transmission rate of the Nth period;
s240, when the noise floor value of the nth period is greater than the preset noise floor value, controlling the transmission rate of the (N + 1) th period to be a transmission rate corresponding to PCIE 1.1;
s250, when the noise floor value in the nth period is smaller than the preset noise floor value, controlling the transmission rate in the (N + 1) th period to be a transmission rate corresponding to PCIE 2.0.
Specifically, in this embodiment, by comparing the magnitude relationship between the noise floor value of the nth period and the preset noise floor value, the transmission rate (PCIE1.1 or PCIE2.0) actually required to be performed by the PCIE is obtained, so that the physical transmission rate is better utilized, the utilization rate of the transmission rate is improved, and meanwhile, interference can be correspondingly reduced, so that the bottleneck of the system no longer exists on the PCIE, and meanwhile, it is ensured that the transmission links of the system all achieve the maximum performance. The transmission rate currently required by the wireless AP equipment can be judged according to the background noise value, so that the wireless AP equipment can be automatically switched between two rates of PCIE1.1 and PCIE 2.0. For example, the default transmission rate of the router a is PCIE1.1, the router a runs data transmission at the transmission rate corresponding to PCIE1.1 after being started, and if the background noise is smaller than the preset background noise value, the interference received by the router itself is small, and the transmission rate required for data or signal transmission is large, and the router a needs to switch its own transmission rate to PCIE 2.0. If the background noise is larger than the preset background noise value, the interference on the router is large, the transmission rate required by data or signal transmission is smaller, and the transmission rate of the router A is switched and adjusted to PCIE 1.1. Therefore, the transmission rate can be adjusted according to the real-time performance of the router, the bandwidth is saved, and the bandwidth and the resource utilization rate are improved. Because the relation between the background noise value of the Nth period and the preset background noise value is compared, the actual transmission rate of the PCIE which needs to be carried out is obtained, the number of the links of the PCIE does not need to be increased, the complexity of hardware design is avoided to be increased, and the utilization rate of the bandwidth is improved by utilizing the PCIE switching rate to the maximum extent.
Referring to fig. 3, another embodiment of a method for adjusting a transmission rate according to the present invention includes:
s310, acquiring a background noise value and a transmission rate of an Nth period, and comparing the magnitude relation between the background noise value of the Nth period and a preset background noise value;
s320, determining the magnitude relation between the noise floor value of the Nth period and the preset noise floor value;
s330, when the noise floor value of the Nth period is equal to the preset noise floor value, 3, controlling the transmission rate of the (N + 1) th period to be the transmission rate of the Nth period after a preset time length;
s340, when the noise floor value of the nth period is greater than the preset noise floor value, controlling the transmission rate of the (N + 1) th period to be a transmission rate corresponding to PCIE1.1 after a preset duration;
s350, when the noise floor value of the nth period is smaller than the preset noise floor value, controlling the transmission rate of the (N + 1) th period to be the transmission rate corresponding to PCIE2.0 after a preset duration.
Specifically, in this embodiment, by comparing the magnitude relationship between the noise floor value of the nth period and the preset noise floor value, the transmission rate (PCIE1.1 or PCIE2.0) actually required to be performed by the PCIE is obtained, so that the physical transmission rate is better utilized, the utilization rate of the transmission rate is improved, and meanwhile, interference can be correspondingly reduced, so that the bottleneck of the system no longer exists on the PCIE, and meanwhile, it is ensured that the transmission links of the system all achieve the maximum performance. Since the frequency of PCIE1.1 is 1.25GHz, the frequency of PCIE2.0 is 2.5GHz, and the WIFI of the wireless AP device is 2.4GHz, generally, when the WIFI is 2.4GHz, using PCIE2.0 will generate interference due to the proximity of frequencies. The transmission rate of the (N + 1) th period is adjusted after the preset time length, namely the transmission rate can be adjusted only after the preset time length is kept in a changing area before each switching, such as a one-minute trend, frequent switching is avoided, system computing resources and CPU processing efficiency can be saved, and electric quantity consumption is further saved. The situation of line drop can be reduced.
If the current transmission rate of the router B is PCIE2.0, if the background noise at the current moment is measured to be smaller than the preset background noise value, the interference on the router per se is small, and the transmission rate required by data or signal transmission is large, the router B is required to keep the transmission rate of the router per se to be PCIE2.0, namely the transmission rate is not changed, until the background noise of the router B at the next moment is larger than the preset background noise value, the interference on the router per se is increased, and the transmission rate of the router per se is switched and adjusted to PCIE1.1 after the preset duration, for example, one minute. Therefore, the transmission rate can be adjusted according to the real-time performance of the router, the bandwidth is saved, and the bandwidth and the resource utilization rate are improved. Because the relation between the background noise value of the Nth period and the preset background noise value is compared, the actual transmission rate of the PCIE which needs to be carried out is obtained, the number of the links of the PCIE does not need to be increased, the complexity of hardware design is avoided to be increased, and the utilization rate of the bandwidth is improved by utilizing the PCIE switching rate to the maximum extent. The method and the device avoid disconnection of the user STC and the wireless AP, reduce interference between frequency bands, improve transmission rate and enhance use experience of the user. The transmission rate currently required by the wireless AP equipment can be judged according to the background noise value, so that the wireless AP equipment can be automatically switched between two rates of PCIE1.1 and PCIE 2.0.
Referring to fig. 4, another embodiment of a method for adjusting a transmission rate according to the present invention includes:
s410, acquiring a background noise value and a transmission rate of an Nth period, and comparing the size relation between the background noise value of the Nth period and a preset background noise value range;
s420, adjusting the transmission rate of the (N + 1) th cycle according to the size relation between the background noise value of the Nth cycle and the preset background noise value range; n is an integer and is not less than 0.
Specifically, in this embodiment, when the wireless router needs to design the sub-boards or extend the sub-boards, the sub-boards can only transmit at one rate, and if the transmission rate needs to be changed, the wireless router needs to manually set the switch. Since the smaller the Noise Floor value is, the smaller the interference is, the clearer the wireless signal is, and the larger the required transmission rate is, the larger the size relationship between the Noise Floor value of the nth period and the preset Noise Floor value range is compared, so that the currently required transmission rate of the wireless AP device can be determined according to the Noise Floor value, and the wireless AP device can be autonomously switched between the PCIE1.1 rate and the PCIE2.0 rate. In the embodiment, the background noise value of the wireless router at the current moment is obtained, and then the magnitude relation between the nth background noise value of the current moment and the maximum value and the minimum value in the preset background noise value range is compared to obtain a comparison result, so that the transmission rate of the (N + 1) th cycle is adjusted according to the comparison result, and the judgment whether the transmission rate needs to be adjusted is made according to the magnitude relation of the background noise values.
Referring to fig. 5, another embodiment of a method for adjusting a transmission rate according to the present invention includes:
s510, determining the size relation between the background noise value of the Nth period and the preset background noise value range;
s520, when the noise floor value of the Nth period is in the preset noise floor value range, controlling the transmission rate of the (N + 1) th period to be the transmission rate of the Nth period;
s530, when the noise floor value of the nth period is greater than the maximum value of the preset noise floor value range, controlling the transmission rate of the (N + 1) th period to be a transmission rate corresponding to PCIE 1.1;
s540, when the noise floor value in the nth period is smaller than the minimum value of the preset noise floor value range, controlling the transmission rate in the (N + 1) th period to be the transmission rate corresponding to PCIE 2.0.
Specifically, in this embodiment, the transmission rate (PCIE1.1 or PCIE2.0) actually required to perform PCIE is obtained by comparing the magnitude relationship between the noise floor value of the nth period and the preset noise floor value range, so that the physical transmission rate is better utilized, the utilization rate of the transmission rate is improved, and meanwhile, interference can be correspondingly reduced, so that the system bottleneck no longer exists on the PCIE, and meanwhile, the system transmission links are ensured to achieve the maximum performance. Since the frequency of PCIE1.1 is 1.25GHz, the frequency of PCIE2.0 is 2.5GHz, and the WIFI of the wireless AP device is 2.4GHz, generally, when the WIFI is 2.4GHz, using PCIE2.0 will generate interference due to the proximity of frequencies. The method has the advantages that frequent switching can be avoided within a preset range of background noise, system computing resources are saved, CPU processing efficiency is improved, and the condition that the online terminals such as mobile phones and computers are disconnected due to frequent switching is avoided. The transmission rate currently required by the wireless AP equipment can be judged according to the background noise value, so that the wireless AP equipment can be automatically switched between two rates of PCIE1.1 and PCIE 2.0.
Referring to fig. 6, an embodiment of an apparatus 100 for adjusting a transmission rate according to the present invention includes:
a first obtaining module 110, configured to obtain a noise floor value and a transmission rate of an nth period;
a first comparing module 120, configured to compare a magnitude relationship between the noise floor value of the nth period acquired by the first acquiring module 110 and a preset noise floor value;
the first adjusting module 130 adjusts the transmission rate of the (N + 1) th cycle according to the magnitude relationship between the noise floor value of the nth cycle obtained by the comparison of the first comparing module 120 and the preset noise floor value; n is an integer and is not less than 0.
Specifically, in this embodiment, by comparing the magnitude relationship between the noise floor value of the nth period and the preset noise floor value, the currently required transmission rate of the wireless AP device can be determined according to the noise floor value, so that the wireless AP device can autonomously switch between two rates, namely PCIE1.1 and PCIE 2.0. In the embodiment, the background noise value of the wireless router at the current moment is obtained, and then the magnitude relation between the nth background noise value of the current moment and the preset background noise value is compared to obtain a comparison result, so that the transmission rate of the (N + 1) th cycle is adjusted according to the comparison result, and whether the transmission rate needs to be adjusted is judged according to the magnitude relation of the background noise values.
Referring to fig. 7, with respect to the embodiment shown in fig. 6, another embodiment of the apparatus 100 for adjusting a transmission rate according to the present invention includes: the first obtaining module 110, the first comparing module 120, and the first adjusting module 130 are different in that the first adjusting module 130 further includes:
the first determining submodule 131 determines a magnitude relation between the noise floor value of the nth period and the preset noise floor value;
a first control sub-module 132, configured to control the transmission rate of the (N + 1) th cycle to be the transmission rate of the nth cycle when the noise floor value of the nth cycle is equal to the preset noise floor value;
the second control submodule 133 is configured to control the transmission rate of the (N + 1) th cycle to be a transmission rate corresponding to PCIE1.1 when the noise floor value of the nth cycle is greater than the preset noise floor value;
and a third control sub-module 134, configured to control the transmission rate of the (N + 1) th cycle to be a transmission rate corresponding to PCIE2.0 when the noise floor value of the nth cycle is smaller than the preset noise floor value.
Specifically, in this embodiment, by comparing the magnitude relationship between the noise floor value of the nth period and the preset noise floor value, the transmission rate (PCIE1.1 or PCIE2.0) actually required to be performed by the PCIE is obtained, so that the physical transmission rate is better utilized, the utilization rate of the transmission rate is improved, and meanwhile, interference can be correspondingly reduced, so that the bottleneck of the system no longer exists on the PCIE, and meanwhile, it is ensured that the transmission links of the system all achieve the maximum performance. The transmission rate currently required by the wireless AP equipment can be judged according to the background noise value, so that the wireless AP equipment can be automatically switched between two rates of PCIE1.1 and PCIE 2.0. Because the relation between the background noise value of the Nth period and the preset background noise value is compared, the actual transmission rate of the PCIE which needs to be carried out is obtained, the number of the links of the PCIE does not need to be increased, the complexity of hardware design is avoided to be increased, and the utilization rate of the bandwidth is improved by utilizing the PCIE switching rate to the maximum extent.
Preferably, the first adjusting module 130 further includes a processing submodule 135, configured to adjust the transmission rate of the (N + 1) th cycle after a preset time length.
The processing submodule 135 adjusts the transmission rate of the (N + 1) th cycle after the preset duration, that is, the preset duration needs to be maintained in the change area before each switching, and then the switching is performed as a trend of one minute, so that frequent switching is avoided, system computing resources can be saved, the processing efficiency of a CPU (central processing unit) can be improved, and further, the power consumption can be reduced. The situation of line drop can be reduced.
Referring to fig. 8, an embodiment of an apparatus 200 for adjusting a transmission rate according to the present invention includes:
a second obtaining module 210, configured to obtain a noise floor value and a transmission rate of an nth period;
a second comparing module 220, configured to compare the magnitude relationship between the noise floor value of the nth period acquired by the second acquiring module 210 and a preset noise floor value range;
a second adjusting module 230, configured to adjust a transmission rate of an (N + 1) th cycle according to a size relationship between the noise floor value of the nth cycle obtained by the comparison of the second comparing module 220 and the preset noise floor value range; n is an integer and is not less than 0.
Specifically, in this embodiment, by comparing the magnitude relationship between the noise floor value of the nth period and the preset noise floor value range, the currently required transmission rate of the wireless AP device can be determined according to the noise floor value, so that the wireless AP device can autonomously switch between two rates, namely PCIE1.1 and PCIE 2.0. In the embodiment, the background noise value of the wireless router at the current moment is obtained, and then the magnitude relation between the nth background noise value of the current moment and the maximum value and the minimum value in the preset background noise value range is compared to obtain a comparison result, so that the transmission rate of the (N + 1) th cycle is adjusted according to the comparison result, and the judgment whether the transmission rate needs to be adjusted is made according to the magnitude relation of the background noise values.
Referring to fig. 9, with respect to the embodiment shown in fig. 8, another embodiment of an apparatus 200 for adjusting a transmission rate according to the present invention includes: a second obtaining module 210, a second comparing module 220, and a second adjusting module 230, with the difference that the second adjusting module 230 further includes:
a second determining submodule 231, configured to determine a magnitude relationship between the noise floor value of the nth period and the preset noise floor value;
a fourth control sub-module 232, configured to control the transmission rate of the (N + 1) th cycle to be the transmission rate of the nth cycle when the noise floor value of the nth cycle is equal to the preset noise floor value range;
a fifth control sub-module 233, configured to control the transmission rate of the (N + 1) th cycle to be a transmission rate corresponding to PCIE1.1 when the noise floor value of the nth cycle is greater than the maximum value of the preset noise floor value range;
a sixth control submodule 234, configured to control the transmission rate of the (N + 1) th cycle to be a transmission rate corresponding to PCIE2.0 when the noise floor value of the nth cycle is smaller than the minimum value of the preset noise floor value range.
Specifically, in this embodiment, the transmission rate (PCIE1.1 or PCIE2.0) actually required to perform PCIE is obtained by comparing the magnitude relationship between the noise floor value of the nth period and the preset noise floor value range, so that the physical transmission rate is better utilized, the utilization rate of the transmission rate is improved, and meanwhile, interference can be correspondingly reduced, so that the system bottleneck no longer exists on the PCIE, and meanwhile, the system transmission links are ensured to achieve the maximum performance. Since the frequency of PCIE1.1 is 1.25GHz, the frequency of PCIE2.0 is 2.5GHz, and the WIFI of the wireless AP device is 2.4GHz, generally, when the WIFI is 2.4GHz, using PCIE2.0 will generate interference due to the proximity of frequencies. The method has the advantages that frequent switching can be avoided within a preset range of background noise, system computing resources are saved, CPU processing efficiency is improved, and the condition that the online terminals such as mobile phones and computers are disconnected due to frequent switching is avoided. The transmission rate currently required by the wireless AP equipment can be judged according to the background noise value, so that the wireless AP equipment can be automatically switched between two rates of PCIE1.1 and PCIE 2.0. For example, assuming that the preset range of the background noise value is-80 dBm to-95 dBm, the transmission rate of the wireless router C at this time is PCIE2.0, and when the current background noise of the wireless router C is detected to be-104 dBm, since-104 dBm is less than-80 dBm, the wireless router C keeps the transmission rate PCIE2.0 at this time unchanged until the next process measures the local noise. When the current background noise of the wireless router C is detected to be-78 dBm, the-78 dBm is larger than-95 dBm, so that the transmission rate of the wireless router C is switched to be PCIE1.1, and whether the transmission rate of the wireless router C needs to be switched and adjusted is judged until the next process measures the local noise. When the current background noise of the wireless router C is detected to be-85 dBm, the-85 dBm is larger than-80 dBm and smaller than-95 dBm, so that the wireless router C keeps the transmission rate PCIE2.0 unchanged until the next process measures the local noise.
Referring to fig. 10, the present invention provides an example of a method for adjusting a transmission rate, including:
s101, a GPIO signal is sent by controlling a CPU;
s102, controlling the router to read the Noise Floor in the kernel;
s103, judging the size relationship between the read Noise Floor and-85 dBm;
s104, when Noise Floor is less than-85 dBm, the switching transmission rate is PCIE2.0 after one minute;
s105, when the Noise Floor is-85 dBm, keeping the last transmission rate unchanged for one minute;
s106, when Noise Floor > -85dBm, the switching transmission rate is PCIE1.1 after one minute;
in this embodiment, a fixed switching value is set, a value of NOISE FLOOR is selected as a switching condition, where NOISE FLOOR is a value comprehensively calculated by combining the transceiving performance and the receiving power of a terminal, and an experiment proves that-85 dBm is a point where the performance is changed from good to bad, when the value is less than-85 dBm, the value is switched to PCIE2.0, when the value is greater than-85 dBm, the value is switched to PCIE1.1, when-85 dBm keeps the last state unchanged, and before each switching, the switching needs to be performed in a changing area with a trend of keeping for one minute, so as to avoid frequent switching. Compared with the prior best technology, the invention can realize the automatic switching between the two transmission rates of PCIE1.1 and PCIE2.0, and has better balance between the performance and the anti-interference.
Referring to fig. 11, the present invention provides another example of a method for adjusting a transmission rate, including:
s111, the CPU is controlled to send GPIO signals;
s112, controlling the router to read the Noise Floor in the kernel;
s113 judging the size relationship between the read Noise Floor and-80 dBm to-85 dBm;
s114, when Noise Floor is less than-85 dBm, the switching transmission rate is PCIE 2.0;
s115, when-80 dBm < Noise Floor < -85dBm, keeping the last transmission rate unchanged;
s116, when Noise Floor > -80dBm, switching the transfer rate to PCIE 1.1;
in this embodiment, a determination interval is set, the determination interval ranges from-85 dBm to-80 dBm, when the determination interval is smaller than-85 dBm, the determination interval is switched to PCIE2.0, when the determination interval is larger than-80 dBm, PCIE1.1 is used, and when the determination interval is between-85 dBm and-80 dBm, the state of the last PCIE rate is kept unchanged. The embodiment supports two PCIE transmission rates simultaneously, the two transmission rates can be switched automatically, balance of performance and anti-interference performance is kept, no influence is caused on customer use during switching, and use experience of a user is improved.
Specifically, in any of the above embodiments, the hardware design shown in fig. 12 is adopted, and the 2.4G and 5G chips are connected to the CPU through the adapter board, and the calculation of the noise floor value is obtained through the change in the value of the register, so that the determination is realized according to the calculated noise floor value, and the rate switching is completed. Adopt the keysets to make to set up more rationally in the space, divide the board design also can avoid interfering more.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.