Communication method based on CCA mechanism, electronic equipment, storage medium and computer program product
By performing multi-level statistics and judgments in the MAC layer and PHY layer, identifying and avoiding the strong noise interference environment, the problem of packet transmission errors in the existing technology in the strong noise environment is solved, and more efficient and reliable wireless communication is achieved.
Patent Information
- Application Number
- CN202411728581.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-28
AI Technical Summary
In complex communication environments, it is difficult for the prior art to accurately identify the strong noise interference environment, resulting in packet errors in the strong noise interference environment, affecting the packetization of other devices.
By starting two statistical processes in the MAC layer and the PHY layer, counting the wireless communication parameters, signal power intensity and noise power intensity, determining whether the current wireless communication environment is a strong noise interference environment, and actively avoiding it at the hardware level.
It realizes accurate judgment and rapid avoidance in a highly noise interference environment, avoids packet errors, and reduces the impact on other devices.
Smart Images

Figure CN119545569A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method and electronic device, a computer-readable storage medium, and a computer program product based on a CCA mechanism. Background Art
[0002] The CCA (Clear Channel Assessment) mechanism is a key technology used in the 802.11 wireless LAN standard. Before a wireless device occupies a channel to send data, it first detects whether the channel is idle. On the one hand, if the detection result is that the channel is busy, it waits for the channel to be idle. On the other hand, if the detection result is that the channel is idle, the wireless device can participate in the competition for channel access through a random backoff mechanism, and transmit data on the channel after successfully competing.
[0003] However, related solutions determine whether a channel is idle by comparing signal strength with the CCA threshold value. They cannot accurately identify strong noise interference environments in complex communication environments. Packet transmission in a strong noise interference environment may cause packet transmission errors and affect packet transmission of other devices. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a communication method and electronic device, storage medium, and computer program product based on the CCA mechanism, which are used to effectively identify a strong noise interference environment, and then avoid the strong noise interference environment to avoid packet sending errors.
[0005] On the one hand, the present application provides a communication method based on a CCA mechanism, which is applied to a wireless communication device, including:
[0006] Counting a plurality of wireless communication parameters in a first time window at a MAC layer, and determining a plurality of first channel state parameters using the plurality of wireless communication parameters;
[0007] Judging whether there is suspicion of strong noise interference in the current wireless communication environment according to the plurality of first channel state parameters;
[0008] If so, counting the signal power strength and the noise power strength in the second time window at the PHY layer, and determining a plurality of second channel state parameters based on the signal power strength and the noise power strength;
[0009] Determining whether the current wireless communication environment is a strong noise interference environment according to the second channel state parameter;
[0010] If the current wireless communication environment is a strong noise interference environment, active avoidance is performed.
[0011] In one embodiment, the counting of multiple wireless communication parameters in the first time window at the MAC layer and determining a plurality of first channel state parameters using the multiple wireless communication parameters includes:
[0012] Counting, at the MAC layer, the channel busy duration, the total number of air interface packets received, the first reception duration of correct air interface packets received, the first number of correct air interface packets received, the second reception duration of incorrect air interface packets received, the second number of incorrect air interface packets received, the third reception duration of air interface packets for which error resolution was received, and the third number of incorrect air interface packets received within the first time window;
[0013] Determine a first duty cycle of a correct air interface packet corresponding to a reception duration according to the first reception duration and the channel busy duration;
[0014] Determine, according to the second receiving duration and the channel busy duration, a second duty cycle of the receiving duration corresponding to the erroneous air interface packet;
[0015] Determine, according to the third reception duration and the channel busy duration, a third duty cycle of the reception duration corresponding to the error-decoded air interface packet;
[0016] Determine a first proportion according to the first number of received packets and the total number of received air interface packets;
[0017] Determine a second proportion according to the second number of received packets and the total number of received air interface packets;
[0018] Determine a third proportion according to the third number of received packets and the total number of received air interface packets;
[0019] The first duty cycle, the second duty cycle, the third duty cycle, the first proportion, the second proportion and the third proportion are used as first channel state parameters.
[0020] In one embodiment, judging whether there is suspicion of strong noise interference in the current wireless communication environment according to the plurality of first channel state parameters includes:
[0021] Determine whether the sum of the first duty cycle and the second duty cycle is less than a preset first threshold, and obtain a first determination result;
[0022] Determine whether the sum of the first proportion and the second proportion is less than a preset second threshold, and obtain a second determination result;
[0023] Determine whether the third duty cycle is greater than a preset third threshold, and obtain a third determination result;
[0024] Determine whether the third proportion is greater than a preset fourth threshold, and obtain a fourth determination result;
[0025] If the first judgment result, the second judgment result, the third judgment result and the fourth judgment result are all yes, it is determined that there is suspicion of strong noise interference in the current wireless communication environment.
[0026] In one embodiment, the method further comprises:
[0027] After the PHY layer statistics process is started, if the MAC layer statistics results in a specified number of consecutive first time windows all indicate that there is no strong noise interference suspicion in the current wireless communication environment, the PHY layer statistics process is exited.
[0028] In one embodiment, the counting of the signal power strength and the noise power strength in the second time window at the PHY layer, and determining a plurality of second channel state parameters based on the signal power strength and the noise power strength, includes:
[0029] Counting the signal power intensity and the noise power intensity of each designated unit time period in the second time window at the PHY layer;
[0030] Determine, according to the signal power strength of the plurality of designated unit time periods, a fourth duty cycle corresponding to N power strength levels; wherein N is a positive integer greater than 2;
[0031] Determining a fifth duty cycle corresponding to N power intensity levels according to the noise power intensities of the plurality of designated unit time periods;
[0032] A plurality of second channel state parameters are determined from the N fourth duty cycles and the N fifth duty cycles.
[0033] In one embodiment, judging whether the current wireless communication environment is a strong noise interference environment according to the second channel state parameter includes:
[0034] Selecting at least two fourth duty ratios from the N fourth duty ratios, and constructing a plurality of first comparison parameters with the selected at least two fourth duty ratios;
[0035] Selecting at least two fifth duty ratios from the N fifth duty ratios, and constructing a plurality of second comparison parameters with the selected at least two fifth duty ratios;
[0036] Determine whether the plurality of first comparison parameters are all less than corresponding fifth thresholds, and obtain a fifth determination result;
[0037] Determine whether the plurality of second comparison parameters are all greater than corresponding sixth thresholds, and obtain a sixth determination result;
[0038] If both the fifth judgment result and the sixth judgment result are yes, it is determined that the current wireless communication environment is a strong noise interference environment.
[0039] In one embodiment, if the current wireless communication environment is a strong noise interference environment, actively avoiding includes:
[0040] If the current wireless communication environment is a strong noise interference environment, the CCA threshold value is reduced from the default value to the target value.
[0041] In one embodiment, the method further comprises:
[0042] If the current wireless communication environment is a weak interference environment, the CCA threshold value is switched to the default value.
[0043] On the other hand, the present application provides an electronic device, the electronic device comprising:
[0044] processor;
[0045] a memory for storing processor-executable instructions;
[0046] Wherein, the processor is configured to execute the above-mentioned communication method based on the CCA mechanism.
[0047] Furthermore, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program can be executed by a processor to complete the above-mentioned communication method based on the CCA mechanism.
[0048] In addition, the present application provides a computer program product, including a computer program / instruction, which implements the above-mentioned communication method based on the CCA mechanism when executed by a processor.
[0049] The present application scheme can start two statistical processes at the MAC layer and the PHY layer to accurately determine whether the current wireless communication environment is a strong noise interference environment, and can quickly and actively avoid sending packets at the hardware level in a strong noise interference environment, thereby avoiding packet sending errors and avoiding affecting the packet sending of other devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings required for use in the embodiments of the present application are briefly introduced below.
[0051] Figure 1 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;
[0052] Figure 2 A flow chart of a communication method based on a CCA mechanism provided in an embodiment of the present application;
[0053] Figure 3 A schematic diagram of a flow chart of a method for generating a first channel state parameter provided in an embodiment of the present application;
[0054] Figure 4 A flowchart of a method for determining suspected strong noise interference provided by an embodiment of the present application;
[0055] Figure 5 A schematic diagram of a flow chart of a method for generating a second channel state parameter provided in an embodiment of the present application;
[0056] Figure 6 A flowchart of a method for determining a strong noise interference environment provided by an embodiment of the present application;
[0057] Figure 7 A block diagram of a communication device based on the CCA mechanism provided in one embodiment of the present application. DETAILED DESCRIPTION
[0058] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0059] Similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0060] like Figure 1 As shown, this embodiment provides an electronic device 1, including: at least one processor 11 and a memory 12, Figure 1 A processor 11 is taken as an example. The processor 11 and the memory 12 are connected via a bus 10. The memory 12 stores instructions that can be executed by the processor 11. The instructions are executed by the processor 11 so that the electronic device 1 can execute all or part of the process of the method in the following embodiment. In one embodiment, the electronic device 1 can be a wireless communication device, such as a mobile phone, a laptop computer, a tablet computer, a host, etc., for executing a communication method based on the CCA mechanism.
[0061] The memory 12 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0062] The present application also provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by the processor 11 to complete the communication method based on the CCA mechanism provided by the present application.
[0063] The present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the communication method based on the CCA mechanism provided by the present application.
[0064] See also Figure 2 , is a flow chart of a communication method based on the CCA mechanism provided in an embodiment of the present application, such as Figure 2 As shown, the method may include the following steps 210 - 250 .
[0065] Step 210: Count a plurality of wireless communication parameters within a first time window at the MAC layer, and determine a plurality of first channel state parameters using the plurality of wireless communication parameters.
[0066] Among them, the first time window is the time window for the MAC (Media Access Control layer) layer to count wireless communication parameters. The duration of the first time window can be configured as needed. For example, the duration of the first time window can be any value such as 1 second, 2 seconds, 3 seconds, etc. The MAC layer can periodically enter the first time window to count wireless communication parameters, or randomly enter the first time window to count wireless communication parameters. The two first time windows can be continuous in time, that is, the first time window behind is entered immediately after the previous first time window ends. Alternatively, there can be a time interval between the two first time windows.
[0067] The wireless communication parameters are used to quantify the states of Wi-Fi signals and noise signals in the current wireless communication environment. The first channel state parameter is a parameter characterizing the channel state determined according to the statistical result of the MAC layer.
[0068] During the operation of the wireless communication device, multiple wireless communication parameters can be counted in each first time window by software at the MAC layer, and then a number of first channel state parameters can be determined by the multiple wireless communication parameters.
[0069] Step 220: Determine whether there is suspicion of strong noise interference in the current wireless communication environment based on a plurality of first channel state parameters.
[0070] After the first channel state parameter is obtained, it can be determined by the first channel state parameter whether there is suspicion of strong noise interference in the current wireless communication environment.
[0071] On the one hand, if there is suspicion of strong noise interference, step 230 may be continued to start the statistical process of the PHY (Physical Layer) layer.
[0072] On the other hand, since the statistical processes of the MAC layer and the PHY layer are independent of each other, after the statistical process of the PHY layer is started, the statistical process of the MAC layer from step 210 to step 220 is still being executed. After the statistical process of the PHY layer is started, if the statistical results of the MAC layer in the first time window of a specified number of consecutive times indicate that there is no suspicion of strong noise interference in the current wireless communication environment, the PHY layer statistical process can be exited, thereby exiting the active avoidance mode. Here, the specified number can be configured as needed. For example, the specified number can be 3, 4, 5, etc. Through this measure, when the MAC layer determines that there is no suspicion of strong noise interference in the current wireless communication environment for multiple consecutive times, the computing resources of the PHY layer are saved.
[0073] Step 230: If it exists, the signal power strength and the noise power strength in the second time window are counted at the PHY layer, and a plurality of second channel state parameters are determined based on the signal power strength and the noise power strength.
[0074] Among them, the second time window is a time window for the PHY layer to count the signal power strength and the noise power strength. The duration of the second time window can be configured as needed. For example, the duration of the second time window can be configured as needed. For example, the duration of the second time window can be any value such as 1 second, 2 seconds, 3 seconds, etc.
[0075] After starting the statistical process of the PHY layer, the PHY layer can periodically enter the second time window to count the signal power strength and the noise power strength. The two second time windows can be continuous in time, that is, the second time window after the previous second time window ends immediately enters the next second time window. Alternatively, there can be a time interval between the two second time windows.
[0076] After the signal power intensity and the noise power intensity are counted in each second time window, several second channel state parameters corresponding to the second time window can be calculated by the signal power intensity and the noise power intensity. The second channel state parameters are parameters characterizing the channel state determined according to the statistical results of the PHY layer.
[0077] Step 240: Determine whether the current wireless communication environment is a strong noise interference environment according to the second channel state parameter.
[0078] Step 250: If the current wireless communication environment is a strong noise interference environment, active avoidance is performed.
[0079] After obtaining the second channel state parameter, it can be determined whether the current wireless communication environment is a strong noise interference environment. On the one hand, if the current wireless communication environment is a strong noise interference environment, it can actively avoid it and not send packets. On the other hand, if the current wireless communication environment is a weak noise interference environment, it can participate in the competition for channel access when the channel is idle under the CCA mechanism, and transmit data on the channel after the competition is successful.
[0080] Through the above measures, two statistical processes can be started at the MAC layer and the PHY layer to accurately determine whether the current wireless communication environment is a strong noise interference environment, and can quickly and actively avoid sending packets at the hardware level in a strong noise interference environment, thereby avoiding packet sending errors and avoiding affecting the packet sending of other devices.
[0081] In one embodiment, if the current wireless communication environment is a strong noise interference environment, the CCA threshold value may be reduced from a default value to a target value. Here, the target value may be configured as required, and the target value is less than the default value.
[0082] Through this measure, in a strong noise interference environment, the CCA threshold value is lowered, making it easier for wireless communication devices to determine that the channel is busy, thereby achieving active avoidance.
[0083] In one embodiment, after the CCA threshold value is reduced to the target value, if the current wireless communication environment is determined to be a weak interference environment in a subsequent statistical process of the PHY layer, the CCA threshold value may be switched to a default value.
[0084] Through this measure, in a weak noise interference environment, the CCA threshold value is switched to the default value, so that the wireless communication device determines whether the channel is busy according to the universal standard and participates in the competition for channel access when the channel is idle. Since it is in a weak noise interference environment, packets can be sent normally after successful competition, and there will be no problem of packet sending errors.
[0085] In one embodiment, see Figure 3 , is a flow chart of a method for generating a first channel state parameter provided in an embodiment of the present application, such as Figure 3 As shown, when step 210 is executed to generate the first state parameter, the following steps 310 to 380 may be executed.
[0086] Step 310: Count at the MAC layer the channel busy duration within the first time window, the total number of air interface packets received, the first reception duration for receiving correct air interface packets, the first number of correct air interface packets received, the second reception duration for receiving erroneous air interface packets, the second number of erroneous air interface packets received, the third reception duration for receiving decoded air interface packets, and the third number of decoded air interface packets received.
[0087] The channel busy duration (denoted as TS) is the total duration of the channel busyness in the first time window.
[0088] The total number of air interface packets received (denoted as NS) is the total number of air interface packets received in the first time window.
[0089] The first receiving duration (denoted as T1) is the duration of receiving the air interface packets that are correctly received and have address matching within the first time window.
[0090] The first number of received packets (denoted as N1) is the total number of air interface packets that are correctly received and have matching addresses within the first time window.
[0091] The second receiving duration (denoted as T2) is the receiving duration of the air interface packet that is correctly received within the first time window and has an unmatched address.
[0092] The second number of received packets (denoted as N2) is the total number of air interface packets that are correctly received within the first time window and whose addresses do not match.
[0093] The third receiving duration (denoted as T3) is the receiving duration of the air interface packet received within the first time window but parsed incorrectly.
[0094] The third number of received packets (denoted as N3) is the total number of air interface packets received in the first time window but parsed incorrectly.
[0095] The channel busy duration, the total number of air interface packets received, the first reception duration, the first number of received packets, the second reception duration, the second number of received packets, the third reception duration, and the third number of received packets are wireless communication parameters counted by the MAC layer.
[0096] Step 320: Determine a first duty cycle of the correct air interface packet corresponding to the first receiving duration according to the first receiving duration and the channel busy duration.
[0097] Exemplarily, the first duty cycle is calculated by the following formula (1):
[0098]
[0099] Among them, D t1 is the first duty cycle; T1 is the first receiving duration; TS is the channel busy duration.
[0100] Step 330: Determine a second duty cycle of the receiving duration corresponding to the erroneous air interface packet according to the second receiving duration and the channel busy duration.
[0101] Exemplarily, the second duty cycle is calculated by the following formula (2):
[0102]
[0103] Among them, D t2 is the second duty cycle; T2 is the second receiving duration; TS is the channel busy duration.
[0104] Step 340: Determine a third duty cycle corresponding to the reception duration of the decoded air interface packet according to the third reception duration and the channel busy duration.
[0105] Exemplarily, the third duty cycle is calculated by the following formula (3):
[0106]
[0107] Among them, D t3 is the third duty cycle; T3 is the third receiving duration; TS is the channel busy duration.
[0108] Step 350: Determine a first proportion according to the first number of received packets and the total number of air interface received packets.
[0109] Exemplarily, the first proportion is calculated by the following formula (4):
[0110]
[0111] Among them, D n1 is the first proportion; N1 is the first number of received packets; NS is the total number of air interface packets received.
[0112] Step 360: Determine a second proportion according to the second number of received packets and the total number of air interface received packets.
[0113] Exemplarily, the second proportion is calculated by the following formula (5):
[0114]
[0115] Among them, D n2 is the second proportion; N2 is the second number of received packets; NS is the total number of air interface packets received.
[0116] Step 370: Determine a third proportion according to the third number of received packets and the total number of air interface received packets.
[0117] Exemplarily, the first proportion is calculated by the following formula (6):
[0118]
[0119] Among them, D n3 is the third proportion; N3 is the number of third received packets; NS is the total number of air interface packets received.
[0120] Step 380: Use the first duty cycle, the second duty cycle, the third duty cycle, the first proportion, the second proportion and the third proportion as first channel state parameters.
[0121] After obtaining the first duty cycle, the second duty cycle, the third duty cycle, the first proportion, the second proportion and the third proportion, these parameters may be used as the first channel state parameters.
[0122] In one embodiment, see Figure 4 , is a flow chart of a method for determining suspected strong noise interference provided by an embodiment of the present application, such as Figure 4 As shown, when executing step 220, the following steps 410 to 450 may be executed.
[0123] Step 410: Determine whether the sum of the first duty cycle and the second duty cycle is less than a preset first threshold value, and obtain a first determination result.
[0124] The first threshold (denoted as Dset1) can be configured as needed.
[0125] The first duty cycle and the second duty cycle are added, and it is determined whether the addition result is less than a first threshold value to obtain a first determination result.
[0126] Step 420: Determine whether the sum of the first proportion and the second proportion is less than a preset second threshold, and obtain a second determination result.
[0127] Among them, the second threshold (denoted as Dset2) can be configured as needed. In one embodiment, the first threshold and the second threshold can be the same.
[0128] Add the first ratio and the second ratio, and determine whether the added result is less than the second threshold to obtain a second judgment result.
[0129] Step 430: Determine whether the third duty ratio is greater than a preset third threshold to obtain a third judgment result.
[0130] Among them, the third threshold (denoted as Dset3) can be configured as needed.
[0131] Step 440: Determine whether the third ratio is greater than a preset fourth threshold to obtain a fourth judgment result.
[0132] Among them, the fourth threshold (denoted as Dset4) can be configured as needed. In one embodiment, the fourth threshold and the third threshold can be the same.
[0133] Step 450: If the first judgment result, the second judgment result, the third judgment result, and the fourth judgment result are all yes, determine that there is a suspicion of strong noise interference in the current wireless communication environment.
[0134] When satisfying D t1 + D t2 < Dset1, and D n1 + D n2 < Dset2, and D t3 > Dset3, and D n3 > Dset4, it can be determined that there is a suspicion of strong noise interference in the current wireless communication environment.
[0135] In the case where any one of the judgment results is no, it can be determined that there is no suspicion of strong noise interference in the current wireless communication environment.
[0136] Through the above measures, it is possible to accurately judge whether there is a suspicion of strong noise interference in the wireless communication environment by means of multiple first channel state parameters.
[0137] In one embodiment, referring to Figure 5 , which is a schematic flowchart of a method for generating a second channel state parameter provided in an embodiment of the present application. As Figure 5 shown, when executing step 230 to generate a second state parameter, the following steps 510 to 540 can be executed.
[0138] Step 510: Statistically calculate the signal power intensity and the noise power intensity of each specified unit time period within the second time window at the PHY layer.
[0139] The second time window may be divided into a plurality of non-overlapping designated unit time periods, and the length of the designated unit time period may be configured as required.
[0140] Exemplarily, the designated unit time period may be any value such as 1us (microsecond), 2us, 3us, etc. If the second time window is 1 second and the designated unit time period is 1 microsecond, there are 1,000,000 designated unit time periods in one second time window. In this case, 1,000,000 signal power intensities and 1,000,000 noise power intensities may be statistically obtained.
[0141] Step 520: Determine a fourth duty cycle corresponding to N power intensity levels according to the signal power intensity of multiple designated unit time periods; wherein N is a positive integer greater than 2.
[0142] The signal power strength is divided into N power strength levels. The time in each power strength level is counted. Here, for any power strength level, the number of designated unit time periods in which the signal power strength is in the power strength level can be counted, and then the time corresponding to the power strength level can be determined based on the number and the length of the designated unit time period.
[0143] Further, the duty cycle corresponding to each power intensity level is calculated based on the time of each power intensity level and the duration of the second time window as the fourth duty cycle. In this case, N fourth duty cycles can be calculated.
[0144] Step 530: Determine a fifth duty cycle corresponding to N power intensity levels according to the noise power intensities of the multiple specified unit time periods.
[0145] The noise power intensity is divided into N power intensity levels. Here, the power intensity level of the noise power intensity is independent of the power intensity level of the signal power intensity. The time in each power intensity level is counted. Here, for any power intensity level, the number of specified unit time periods in which the noise power intensity is in the power intensity level can be counted, and then the time corresponding to the power intensity level is determined based on the number and the length of the specified unit time period.
[0146] Further, the duty cycle corresponding to each power intensity level is calculated based on the time of each power intensity level and the duration of the second time window as the fifth duty cycle. In this case, N fifth duty cycles can be calculated.
[0147] Step 540: Determine a plurality of second channel state parameters from the N fourth duty cycles and the N fifth duty cycles.
[0148] After obtaining N fourth duty cycles and N fifth duty cycles, these fourth duty packets and fifth duty packets may be used as second signal state parameters.
[0149] In one embodiment, see Figure 6 , is a flow chart of a method for determining a strong noise interference environment provided by an embodiment of the present application, such as Figure 6 As shown, the method may include the following steps 610 to 650.
[0150] Step 610: Select at least two fourth duty cycles from the N fourth duty cycles, and construct a plurality of first comparison parameters using the selected at least two fourth duty cycles.
[0151] At least two fourth duty cycles are selected from N fourth duty cycles, the selected fourth duty cycles are flexibly combined, and the combined fourth duty cycles are added together, so that each addition result and each fourth duty cycle can be used as a first comparison parameter.
[0152] Exemplarily, three fourth duty cycles are randomly selected from the N fourth duty cycles and are recorded as x1, x2 and x3. Then, seven first comparison parameters can be constructed: x1, x2, x3, x1+x2, x2+x3, x1+x3, x1+x2+x3.
[0153] Step 620: Select at least two fifth duty cycles from the N fifth duty cycles, and construct a plurality of second comparison parameters using the selected at least two fifth duty cycles.
[0154] At least two fifth duty cycles are selected from N fifth duty cycles, the selected fifth duty cycles are flexibly combined, and the combined fifth duty cycles are added together, so that each addition result, each fifth duty cycle, can be used as a second comparison parameter.
[0155] Exemplarily, three fifth duty cycles are randomly selected from the N fifth duty cycles and are recorded as y1, y2 and y3. Then, seven second comparison parameters can be constructed: y1, y2, y3, y1+y2, y2+y3, y1+y3, y1+y2+y3.
[0156] Step 630: Determine whether the plurality of first comparison parameters are all smaller than the corresponding fifth threshold value, and obtain a fifth determination result.
[0157] Each first comparison parameter is preset with a corresponding fifth threshold value, and the fifth threshold values of different first comparison parameters may be the same or different.
[0158] After obtaining a plurality of first comparison parameters, it may be determined whether the plurality of first comparison parameters are all smaller than their corresponding fifth thresholds, thereby obtaining a fifth determination result.
[0159] Step 640: Determine whether the plurality of second comparison parameters are all greater than the corresponding sixth threshold value, and obtain a sixth determination result.
[0160] Each second comparison parameter is preset with a corresponding sixth threshold value, and the sixth threshold values of different second comparison parameters may be the same or different.
[0161] After obtaining a plurality of second comparison parameters, it may be determined whether the plurality of second comparison parameters are all smaller than their corresponding sixth thresholds, thereby obtaining a sixth determination result.
[0162] Step 650: If the fifth judgment result and the sixth judgment result are both yes, it is determined that the current wireless communication environment is a strong noise interference environment.
[0163] When both the fifth and sixth judgment results are yes, it can be determined that the noise power is too large. In other words, the current wireless communication environment is a strong noise interference environment.
[0164] When at least one of the fifth judgment result and the sixth judgment result is no, it can be determined that the current wireless communication environment is a weak noise interference environment.
[0165] Through the above measures, the strong noise interference environment can be effectively identified at the PHY layer with the help of the second channel state parameter.
[0166] Figure 7 is a block diagram of a communication device based on the CCA mechanism according to an embodiment of the present invention, such as Figure 7 As shown, the device may include:
[0167] A first statistics module 710 is configured to count a plurality of wireless communication parameters in a first time window at a MAC layer, and determine a plurality of first channel state parameters using the plurality of wireless communication parameters;
[0168] A first judgment module 720 is used to judge whether there is a suspicion of strong noise interference in the current wireless communication environment according to the first channel state parameters;
[0169] A second statistical module 730, if present, is used to count the signal power strength and the noise power strength in the second time window at the PHY layer, and determine a plurality of second channel state parameters based on the signal power strength and the noise power strength;
[0170] A second judgment module 740 is used to judge whether the current wireless communication environment is a strong noise interference environment according to the second channel state parameter;
[0171] The avoidance module 750 is used to actively avoid if the current wireless communication environment is a strong noise interference environment.
[0172] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned communication method based on the CCA mechanism, and will not be repeated here.
[0173] In several embodiments provided in the present application, the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0174] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0175] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
Claims
1. A communication method based on a CCA mechanism, applied to a wireless communication device, characterized in that: include: Counting a plurality of wireless communication parameters in a first time window at a MAC layer, and determining a plurality of first channel state parameters using the plurality of wireless communication parameters; Judging whether there is suspicion of strong noise interference in the current wireless communication environment according to the plurality of first channel state parameters; If so, counting the signal power strength and the noise power strength in the second time window at the PHY layer, and determining a plurality of second channel state parameters based on the signal power strength and the noise power strength; Determining whether the current wireless communication environment is a strong noise interference environment according to the second channel state parameter; If the current wireless communication environment is a strong noise interference environment, active avoidance is performed.
2. The method according to claim 1, characterized in that The step of counting a plurality of wireless communication parameters in a first time window at a MAC layer and determining a plurality of first channel state parameters using the plurality of wireless communication parameters includes: Counting, at the MAC layer, the channel busy duration, the total number of air interface packets received, the first reception duration of correct air interface packets received, the first number of correct air interface packets received, the second reception duration of incorrect air interface packets received, the second number of incorrect air interface packets received, the third reception duration of air interface packets for which error resolution was received, and the third number of incorrect air interface packets received within the first time window; Determine a first duty cycle of a correct air interface packet corresponding to a reception duration according to the first reception duration and the channel busy duration; Determine, according to the second receiving duration and the channel busy duration, a second duty cycle of the receiving duration corresponding to the erroneous air interface packet; Determine, according to the third reception duration and the channel busy duration, a third duty cycle of the reception duration corresponding to the error-decoded air interface packet; Determine a first proportion according to the first number of received packets and the total number of received air interface packets; Determine a second proportion according to the second number of received packets and the total number of received air interface packets; Determine a third proportion according to the third number of received packets and the total number of received air interface packets; The first duty cycle, the second duty cycle, the third duty cycle, the first proportion, the second proportion and the third proportion are used as first channel state parameters.
3. The method according to claim 2, characterized in that The determining, based on the plurality of first channel state parameters, whether there is suspicion of strong noise interference in the current wireless communication environment includes: Determine whether the sum of the first duty cycle and the second duty cycle is less than a preset first threshold, and obtain a first determination result; Determine whether the sum of the first proportion and the second proportion is less than a preset second threshold, and obtain a second determination result; Determine whether the third duty cycle is greater than a preset third threshold, and obtain a third determination result; Determine whether the third proportion is greater than a preset fourth threshold, and obtain a fourth determination result; If the first judgment result, the second judgment result, the third judgment result and the fourth judgment result are all yes, it is determined that there is suspicion of strong noise interference in the current wireless communication environment.
4. The method according to claim 1, characterized in that The method further comprises: After the PHY layer statistics process is started, if the MAC layer statistics results in a specified number of consecutive first time windows all indicate that there is no strong noise interference suspicion in the current wireless communication environment, the PHY layer statistics process is exited.
5. The method according to claim 1, characterized in that The counting of the signal power strength and the noise power strength in the second time window at the PHY layer, and determining a plurality of second channel state parameters based on the signal power strength and the noise power strength, includes: Counting the signal power intensity and the noise power intensity of each designated unit time period in the second time window at the PHY layer; Determine, according to the signal power strength of the plurality of designated unit time periods, a fourth duty cycle corresponding to N power strength levels; wherein N is a positive integer greater than 2; Determining a fifth duty cycle corresponding to N power intensity levels according to the noise power intensities of the plurality of designated unit time periods; A plurality of second channel state parameters are determined from the N fourth duty cycles and the N fifth duty cycles.
6. The method according to claim 5, characterized in that The determining, according to the second channel state parameter, whether the current wireless communication environment is a strong noise interference environment includes: Selecting at least two fourth duty ratios from the N fourth duty ratios, and constructing a plurality of first comparison parameters with the selected at least two fourth duty ratios; Selecting at least two fifth duty ratios from the N fifth duty ratios, and constructing a plurality of second comparison parameters with the selected at least two fifth duty ratios; Determine whether the plurality of first comparison parameters are all less than corresponding fifth thresholds, and obtain a fifth determination result; Determine whether the plurality of second comparison parameters are all greater than corresponding sixth thresholds, and obtain a sixth determination result; If both the fifth judgment result and the sixth judgment result are yes, it is determined that the current wireless communication environment is a strong noise interference environment.
7. The method according to claim 1, characterized in that If the current wireless communication environment is a strong noise interference environment, actively avoiding it includes: If the current wireless communication environment is a strong noise interference environment, the CCA threshold value is reduced from the default value to the target value.
8. The method according to claim 7, characterized in that The method further comprises: If the current wireless communication environment is a weak interference environment, the CCA threshold value is switched to the default value.
9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; The processor is configured to execute the communication method based on the CCA mechanism as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program can be executed by a processor to complete the communication method based on the CCA mechanism as described in any one of claims 1-8.
11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the communication method based on the CCA mechanism described in any one of claims 1 to 8 is implemented.