Packet bit allocation method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202611071761.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-16
AI Technical Summary
[0007]本发明的目的是提供一种分组比特分配方法、装置、电子设备及存储介质,以解决传统分组比特分配方法中因组内信噪比波动大而导致的载波传输性能大幅下降的问题
[0032] The bit allocation method provided by this invention, by globally sorting all subcarriers according to their signal-to-noise ratio (SNR) and then grouping them, ensures that the SNR of subcarriers within each group is as close as possible, solving the problem of large SNR fluctuations within groups in traditional grouping methods. The significant reduction in the SNR variance within a group allows for more accurate selection of the modulation scheme based on the group's average SNR, avoiding the situation in traditional methods where the modulation order of the entire group is reduced to ensure the bit error rate of low SNR subcarriers, thus fully utilizing the transmission capacity of high SNR subcarriers. Simultaneously, by shielding subcarriers with extremely low SNR, these subcarriers are prevented from becoming bottlenecks in the system's bit error rate, further reducing the overall bit error rate of the system.
Smart Images

Figure CN122932726A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power line carrier communication, and in particular to a method, apparatus, electronic device, and storage medium for packet bit allocation. Background Technology
[0002] Orthogonal Frequency Division Multiplexing (OFDM) technology has become the core physical layer technology of power line carrier communication systems due to its advantages such as strong resistance to multipath fading, high spectral efficiency, and simple implementation. In an OFDM system, the entire transmission bandwidth is divided into multiple mutually orthogonal subcarriers, each of which can be modulated and transmitted independently.
[0003] In broadband power line carrier communication systems, due to multipath effects, the channel often exhibits frequency-selective fading characteristics, and the channel quality (usually represented by signal-to-noise ratio, SNR) varies significantly across different subcarriers. To fully utilize channel resources and improve system spectral efficiency and transmission reliability, adaptive bit allocation techniques are widely used. This technique dynamically allocates a different number of bits based on the SNR of each subcarrier, maximizing the system's transmission rate while satisfying total power and bit error rate constraints.
[0004] In practical applications, to reduce algorithm complexity and feedback overhead, a grouped bit allocation method is typically used: multiple adjacent subcarriers are divided into a subcarrier group, and bit allocation and modulation scheme selection are performed on a group-by-group basis. All subcarriers within the same group use the same modulation scheme and are allocated the same number of bits.
[0005] However, traditional block bit allocation methods have a serious drawback: they cannot handle the problem of large signal-to-noise ratio (SNR) fluctuations among subcarriers within a block. Due to frequency-selective fading of the channel, the SNR of adjacent subcarriers may change drastically, resulting in subcarriers with significantly different SNRs existing within the same block. If the modulation scheme is selected based on the average SNR within the block, the subcarriers with lower SNR will fail to meet the bit error rate (BER) requirements, leading to an increase in the overall BER and a decrease in system performance.
[0006] Therefore, traditional packet bit allocation methods suffer from a significant drop in transmission performance due to large fluctuations in the signal-to-noise ratio within a packet. Summary of the Invention
[0007] The purpose of this invention is to provide a packet bit allocation method, apparatus, electronic device, and storage medium to solve the problem of significant degradation in carrier transmission performance caused by large fluctuations in the signal-to-noise ratio within a packet in traditional packet bit allocation methods.
[0008] To solve the above-mentioned technical problems, the present invention provides a method for allocating block bits, characterized in that it includes:
[0009] Channel estimation is performed for each subcarrier of the carrier system, and the signal-to-noise ratio of each subcarrier is calculated;
[0010] All the subcarriers are sorted from high to low according to their signal-to-noise ratio to obtain an ordered subcarrier sequence;
[0011] According to the preset shielding strategy, some subcarriers are shielded from the ordered subcarrier sequence, and the shielded subcarriers are not used for data transmission.
[0012] The remaining unmasked subcarriers are divided into several subcarrier groups in descending order of signal-to-noise ratio, and each subcarrier group contains the same number of subcarriers.
[0013] Calculate the average signal-to-noise ratio of each subcarrier group, and select the corresponding modulation scheme for each subcarrier group according to the preset modulation selection scheme;
[0014] Allocate a number of bits corresponding to the selected modulation scheme to all subcarriers within each subcarrier group.
[0015] Furthermore, the method of sorting all the subcarriers according to their signal-to-noise ratio from high to low includes: arranging the subcarriers with the highest signal-to-noise ratio at the beginning of the sequence and arranging the subcarriers with the lowest signal-to-noise ratio at the end of the sequence.
[0016] Furthermore, the preset shielding strategy is as follows: set the number of subcarriers to be shielded, and shield the corresponding number of subcarriers sequentially starting from the end of the ordered subcarrier sequence.
[0017] Furthermore, the preset shielding strategy is as follows: set a signal-to-noise ratio (SNR) shielding threshold, and shield all subcarriers with an SNR lower than the shielding threshold.
[0018] Furthermore, the method of dividing into several subcarrier groups includes: the number of subcarriers in each subcarrier group is determined according to the preset group size of the system, and each subcarrier group contains the same number of subcarriers.
[0019] Furthermore, the preset modulation selection method includes: setting multiple modulation methods and assigning different signal-to-noise ratio (SNR) switching threshold values to each modulation method; comparing the average SNR of the subcarrier group with the SNR switching threshold values, and selecting the corresponding modulation method for each subcarrier group based on the comparison result.
[0020] Furthermore, the preset modulation selection method includes: a uniform modulation method for each subcarrier group, and all subcarriers within the same subcarrier group using the same modulation method and the same number of bits.
[0021] A block bit allocation device, comprising:
[0022] The channel estimation module is used to perform channel estimation for each subcarrier of the carrier system and calculate the signal-to-noise ratio of each subcarrier;
[0023] The signal-to-noise ratio (SNR) sorting module is used to globally sort all available subcarriers according to their SNR from high to low, resulting in an ordered subcarrier sequence.
[0024] The subcarrier shielding module is used to shield the subcarriers with the lowest signal-to-noise ratio from the ordered subcarrier sequence according to a preset shielding strategy.
[0025] The grouping module is used to divide the remaining unmasked subcarriers into several subcarrier groups in descending order of signal-to-noise ratio, with each group containing the same number of subcarriers.
[0026] The modulation scheme selection module is used to calculate the average signal-to-noise ratio of each subcarrier group and select the corresponding modulation scheme for each subcarrier group according to the preset modulation scheme switching threshold table.
[0027] The bit allocation and feedback module is used to allocate the number of bits corresponding to the selected modulation scheme to all subcarriers in each subcarrier group, and to feed back the subcarrier masking information, grouping information and modulation scheme information of each group to the transmitting end.
[0028] An electronic device, comprising:
[0029] Memory, used to store computer programs;
[0030] A processor is used to implement the steps of the memory management method described above when executing the computer program.
[0031] A computer-readable storage medium storing a computer program, which, when executed, performs the steps of the memory management method described above.
[0032] The bit allocation method provided by this invention, by globally sorting all subcarriers according to their signal-to-noise ratio (SNR) and then grouping them, ensures that the SNR of subcarriers within each group is as close as possible, solving the problem of large SNR fluctuations within groups in traditional grouping methods. The significant reduction in the SNR variance within a group allows for more accurate selection of the modulation scheme based on the group's average SNR, avoiding the situation in traditional methods where the modulation order of the entire group is reduced to ensure the bit error rate of low SNR subcarriers, thus fully utilizing the transmission capacity of high SNR subcarriers. Simultaneously, by shielding subcarriers with extremely low SNR, these subcarriers are prevented from becoming bottlenecks in the system's bit error rate, further reducing the overall bit error rate of the system. Attached Figure Description
[0033] To more clearly illustrate the technical solutions of the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a flowchart of the block bit allocation method of the present invention;
[0035] Figure 2 This is a schematic diagram of the block bit allocation device of the present invention;
[0036] Figure 3 This is a schematic diagram of the signal-to-noise ratio distribution of subcarriers obtained using existing bit allocation methods.
[0037] Figure 4 This is a schematic diagram of the signal-to-noise ratio distribution of subcarriers obtained by the grouped bit allocation method of the present invention. Detailed Implementation
[0038] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] The traditional method for allocating bits in a block is as follows: channel estimation is performed according to the agreed-upon sub-channel block size; sub-channel masking is performed based on the signal-to-noise ratio (SNR) of each sub-channel, and sub-channels below the masking threshold are masked out; modulation order is selected, with different modulation orders corresponding to different threshold SNRs, and the corresponding modulation order is selected in combination with the sub-channel SNR.
[0040] Traditional block bit allocation methods have a serious drawback: they cannot handle large fluctuations in the signal-to-noise ratio (SNR) of subcarriers within a block. Due to frequency-selective fading in the channel, the SNR of adjacent subcarriers can change drastically, resulting in subcarriers with significantly different SNRs existing within the same block. If the modulation scheme is selected based on the average SNR within the block, the subcarriers with lower SNR will fail to meet the bit error rate (BER) requirements, leading to an increase in the overall system BER and a decrease in system performance.
[0041] In other words, physically adjacent subcarriers within a group may simultaneously fall into the deep fading region, resulting in extremely low signal-to-noise ratios (SNR) for some subcarriers within the group, while the SNR for other subcarriers remains relatively high. This leads to:
[0042] First, the signal-to-noise ratio (SNR) fluctuates drastically within the group: high SNR subcarriers and extremely low SNR subcarriers coexist in the same group, and the modulation scheme determined by the average SNR cannot match both simultaneously.
[0043] Secondly, deep-fading subcarriers reduce the overall group efficiency: extremely low signal-to-noise ratio subcarriers significantly reduce the average signal-to-noise ratio of the group, forcing the entire group to use a lower modulation order, which seriously wastes the transmission capacity of high signal-to-noise ratio subcarriers within the group.
[0044] Secondly, there is a high risk of bit error rate or waste of resources: if reliability is prioritized, the capability of high signal-to-noise ratio subcarriers cannot be utilized; if modulation is selected based on average signal-to-noise ratio, the bit error rate on deep-fading subcarriers will far exceed the target value, leading to overall performance degradation.
[0045] Therefore, the traditional "adjacent subcarrier segmentation" method suffers from a significant drop in transmission performance due to fluctuations in the signal-to-noise ratio within a group under deep fading channels. There is an urgent need for an adaptive bit allocation scheme that can effectively combat deep fading and reduce the differences in signal-to-noise ratio within a group while maintaining low complexity.
[0046] Taking the commonly used power line channel model as an example, the signal-to-noise ratio distribution corresponding to direct grouping of adjacent subcarriers is as follows: Figure 3 As shown.
[0047] The core of this invention is to provide a packet bit allocation method, apparatus, electronic device, and storage medium. By first globally sorting all subcarriers according to their signal-to-noise ratio (SNR), and then shielding some low-quality subcarriers, the subcarriers with similar SNRs are grouped together. This ensures that the SNRs of the subcarriers within each group are as close as possible, minimizing the SNR variance within the group. This solves the problem of a significant decrease in carrier transmission performance caused by large fluctuations in the SNR within the group in traditional packet bit allocation methods.
[0048] The specific implementation method is as follows:
[0049] This embodiment provides a method for allocating block bits. Figure 1 This is a flowchart illustrating the block bit allocation method provided in an embodiment of the present invention. (Refer to...) Figure 1 The method includes the following steps S101 to S106.
[0050] Step S101: Perform channel estimation for each subcarrier of the carrier system and calculate the signal-to-noise ratio of each subcarrier.
[0051] Specifically, in a carrier system, the receiver performs channel estimation for each subcarrier, obtains the channel state information of each subcarrier, and calculates the signal-to-noise ratio (SNR) value for each subcarrier accordingly. Channel estimation can employ pilot-assisted estimation, which uses inserted pilot symbols to estimate the channel frequency response at each subcarrier position, and then combines this with noise power estimation to calculate the SNR of each subcarrier.
[0052] Step S102: Sort all subcarriers according to their signal-to-noise ratio from high to low to obtain an ordered subcarrier sequence.
[0053] Specifically, the signal-to-noise ratio (SNR) values of all available subcarriers calculated in step S101 are globally sorted and arranged in descending order of SNR, so that the subcarrier with the highest SNR is placed at the beginning of the sequence and the subcarrier with the lowest SNR is placed at the end of the sequence, forming an ordered subcarrier sequence.
[0054] Step S103: According to the preset shielding strategy, some subcarriers are shielded from the ordered subcarrier sequence. The shielded subcarriers are not used for data transmission.
[0055] Specifically, a certain number of subcarriers are masked from the end of the ordered subcarrier sequence (i.e., the part with the lowest signal-to-noise ratio). The masking strategy can be set as follows: pre-determine the number of subcarriers to be masked, and then mask the corresponding number of subcarriers sequentially starting from the end of the ordered subcarrier sequence; or, set a signal-to-noise ratio masking threshold, and mask all subcarriers with a signal-to-noise ratio below this threshold. The masked subcarriers are not used for data transmission, thus preventing these low-quality subcarriers from becoming a bottleneck in the system's bit error rate.
[0056] Step S104: Divide the remaining unmasked subcarriers into several subcarrier groups in descending order of signal-to-noise ratio, with each group containing the same number of subcarriers.
[0057] Specifically, the unmasked subcarriers from step S103 are divided into several subcarrier groups in descending order of signal-to-noise ratio. The number of subcarriers in each group is determined according to the preset group size of the system, and all valid groups contain the same number of subcarriers.
[0058] Step S105: Calculate the average signal-to-noise ratio of each subcarrier group, and select the corresponding modulation method for each subcarrier group according to the preset modulation selection method.
[0059] Step S106: Assign the number of bits corresponding to the selected modulation scheme to all subcarriers within each subcarrier group.
[0060] Specifically, all subcarriers within each subcarrier group are allocated the number of bits corresponding to the selected modulation scheme;
[0061] Preferably, after allocating the number of bits, the subcarrier shielding information, grouping information, and modulation scheme information of each group are fed back to the transmitting end.
[0062] The bit allocation method provided in this embodiment, by globally sorting all subcarriers according to their signal-to-noise ratio (SNR) before grouping them, ensures that the SNR of subcarriers within each group is as close as possible, thus solving the problem of large SNR fluctuations within groups in traditional grouping methods. Taking a common power line channel model as an example, when adjacent subcarriers are directly grouped, the maximum variance of the SNR within each group can reach 14.4, while after SNR sorting and grouping in this embodiment, the maximum variance of the SNR within each group is only about 0.6. See also Figure 3 , Figure 4 The significant reduction in intra-group signal-to-noise ratio variance allows for more accurate selection of the modulation scheme based on the group's average signal-to-noise ratio. This avoids the situation in traditional methods where the overall modulation order of the group is reduced to ensure the bit error rate of low-SNR subcarriers, thus fully utilizing the transmission capacity of high-SNR subcarriers. Simultaneously, by shielding subcarriers with extremely low SNR, these subcarriers are prevented from becoming bottlenecks in the system's bit error rate, further reducing the overall system bit error rate.
[0063] In some embodiments, such as Figure 1 As shown, in step S102, the method of sorting all available subcarriers according to the signal-to-noise ratio from high to low specifically includes: arranging the subcarrier with the highest signal-to-noise ratio at the beginning of the sequence and arranging the subcarrier with the lowest signal-to-noise ratio at the end of the sequence.
[0064] Specifically, after calculating the signal-to-noise ratio (SNR) of each subcarrier, a sorting algorithm (such as quicksort, mergesort, etc.) is used to sort all subcarriers in descending order of their SNR values. After sorting, the first subcarrier in the sequence has the highest SNR, and the last subcarrier has the lowest SNR.
[0065] This embodiment strictly sorts the subcarriers according to their signal-to-noise ratio (SNR) from high to low, allowing subsequent masking operations to focus on processing all low-quality subcarriers (which naturally cluster at the end of the sequence after sorting). It also provides a smoothly varying SNR ordered sequence for subsequent grouping operations. The sorted subcarrier sequence naturally exhibits a smooth SNR variation, ensuring a high degree of SNR consistency within subsequent fixed-size groups.
[0066] Preferably, such as Figure 1 As shown, in step S103, the preset shielding strategy is: set the number of subcarriers to be shielded, and shield the corresponding number of subcarriers sequentially starting from the end of the ordered subcarrier sequence.
[0067] Specifically, the system pre-sets a number N of subcarriers to be masked based on the current channel state. Starting from the end of the ordered subcarrier sequence obtained in step S102 (i.e., the end with the lowest signal-to-noise ratio), N subcarriers are masked sequentially. These masked subcarriers are not used for data transmission. The number of masked subcarriers is determined by the actual channel state; the more subcarriers masked, the fewer usable subcarriers, indicating poorer channel quality and weaker data transmission capability. The number of masked subcarriers can serve as a guiding parameter to help users perform operations such as frequency band switching based on channel quality.
[0068] By using the above settings, and by setting the number of carriers to be masked and then masking them sequentially from the end of the sequence, the lowest quality subcarriers can be centrally removed. Since all deeply decaying subcarriers are concentrated at the end of the sequence after sorting, these extremely low signal-to-noise ratio subcarriers can be prevented from mixing into any valid packets by removing them all at once. This prevents them from lowering the average signal-to-noise ratio of the group and also eliminates the waste of resources from inefficient or invalid transmissions on them.
[0069] In some embodiments, such as Figure 1 As shown, in step S103, the preset shielding strategy is: set a signal-to-noise ratio (SNR) shielding threshold value, and shield all subcarriers with an SNR lower than the shielding threshold value.
[0070] Specifically, the system sets corresponding signal-to-noise ratio (SNR) thresholds based on different modulation schemes. Taking BPSK, QPSK, 16QAM, and 64QAM as examples, let Thr_BPSK be the threshold SNR for BPSK modulation. When the SNR of a subcarrier is less than Thr_BPSK, that subcarrier is blocked. In other words, subcarriers with an SNR lower than the minimum SNR threshold required by the lowest modulation order (BPSK) are considered to lack the ability to effectively transmit data and are blocked.
[0071] This embodiment sets a signal-to-noise ratio (SNR) shielding threshold, blocking all subcarriers below that threshold. This shielding method adaptively determines the number of subcarriers to be shielded based on channel quality; the worse the channel conditions, the more subcarriers are shielded. Compared to a fixed-number shielding method, the threshold shielding method is more flexible and better adapts to time-varying channel environments.
[0072] In some embodiments, such as Figure 1 As shown, in step S104, the method of dividing into several subcarrier groups includes: the number of subcarriers in each group is determined according to the preset group size of the system, and all valid groups contain the same number of subcarriers.
[0073] Specifically, the system presets a fixed grouping size N_group (for example, 4 or 8 subcarriers form one group). After the subcarrier masking is completed in step S103, the remaining unmasked subcarriers are sequentially divided in the order of signal-to-noise ratio from high to low, and every N_group subcarriers are divided into one subcarrier group. All valid groups contain the same number of subcarriers.
[0074] The equal division by the fixed grouping size ensures the structural consistency of all valid groups, which facilitates the subsequent unified modulation mode selection and bit allocation on a group basis, and reduces the algorithm complexity and feedback overhead. The sorting makes subcarriers with similar signal-to-noise ratios adjacent to each other in the sequence, so that the fixed-size grouping naturally divides subcarriers with similar signal-to-noise ratios into the same group.
[0075] By setting the masking quantity and sequentially masking from the tail of the sequence, the concentrated removal of the lowest-quality subcarriers is realized. Since all deep-fading subcarriers are concentrated at the tail of the sequence after sorting, one-time removal can prevent these extremely low signal-to-noise ratio subcarriers from being mixed into any valid group, which not only prevents them from lowering the average signal-to-noise ratio of the group, but also eliminates the resource waste of inefficient or ineffective transmission thereon.
[0076] Optionally, as shown in Figure 1 , in step S105, the preset modulation selection mode includes: configuring multiple modulation modes, corresponding different signal-to-noise ratio switching thresholds to each modulation mode; comparing the average signal-to-noise ratio of the subcarrier group with the signal-to-noise ratio switching thresholds, and selecting the corresponding modulation mode for each subcarrier group according to the comparison result.
[0077] As a preferred embodiment, multiple switching thresholds can be used to divide the signal-to-noise ratio into multiple intervals, and the subcarrier group whose signal-to-noise ratio falls within the corresponding interval is selected as the modulation mode corresponding to the corresponding interval. A single carrier in a subcarrier group with a high signal-to-noise ratio is allocated with more bits.
[0078] Specifically, taking the four modulation modes of BPSK, QPSK, 16QAM, and 64QAM as examples, the corresponding thresholds are denoted as Thr_BPSK, Thr_QPSK, Thr_16QAM, and Thr_64QAM. Let the average signal-to-noise ratio of the i-th subcarrier group be SNR_i, and the selection method of the modulation order is as follows:
[0079] When SNR_i<Thr_BPSK, the subcarrier group does not transmit data (or adopts BPSK);
[0080] When Thr_BPSK≤SNR_i<Thr_QPSK, BPSK modulation is adopted (each subcarrier carries 1 bit);
[0081] When Thr_QPSK≤signal-to-noise ratio_i<Thr_16QAM, QPSK modulation is adopted (each subcarrier carries 2 bits);
[0082] When Thr_16QAM≤signal-to-noise ratio_i<Thr_64QAM, 16QAM modulation is adopted (each subcarrier carries 4 bits);
[0083] When signal-to-noise ratio_i≥Thr_64QAM, 64QAM modulation is adopted (each subcarrier carries 6 bits).
[0084] The number of bits carried by each subcarrier corresponding to each modulation mode is as follows: BPSK corresponds to 1 bit, QPSK corresponds to 2 bits, 16QAM corresponds to 4 bits, and 64QAM corresponds to 6 bits.
[0085] In this embodiment, by setting multi-level signal-to-noise ratio thresholds, the group average signal-to-noise ratio is compared with each level of thresholds to adaptively select the optimal modulation mode. Since the variance of the signal-to-noise ratio within the group after sorting and grouping is extremely small, the group average signal-to-noise ratio can accurately represent the actual channel quality of each subcarrier in the group. Therefore, the modulation mode selected based on the group average signal-to-noise ratio can match all subcarriers in the group at the same time, which will not cause bit errors due to overestimation of the channel quality, nor waste spectrum resources due to underestimation of the channel quality.
[0086] In some embodiments, such as Figure 1 as shown, in step S105, the preset modulation selection manner includes: unifying the corresponding modulation mode for each subcarrier group, and all subcarriers in the same subcarrier group adopt the same modulation mode and the same number of bits.
[0087] Specifically, after the corresponding modulation mode is selected for each subcarrier group in step S105, all subcarriers in the subcarrier group adopt the same modulation mode and are allocated the same number of bits. That is, each subcarrier in the same subcarrier group carries the same number of bits. By unifying the modulation mode in units of groups, all subcarriers in the same group adopt the same modulation mode and the same number of bits. This unified allocation manner greatly reduces the feedback overhead of the system, and the transmitting end only needs to obtain the modulation mode information of each subcarrier group, without needing to obtain the modulation mode information of each subcarrier. At the same time, since the signal-to-noise ratios within the group are highly consistent after sorting and grouping, the unified modulation mode will not cause performance loss, realizing the balance between low signaling overhead and high performance.
[0088] Figure 2 is a structural block diagram of a grouped bit allocation apparatus provided in an embodiment of the present invention. With reference to Figure 2 , the apparatus includes: a channel estimation module 100, a signal-to-noise ratio sorting module 200, a subcarrier shielding module 300, a grouping module 400, a modulation mode selection module 500, and a bit allocation and feedback module 600.
[0089] The channel estimation module 100 is used to perform channel estimation for each subcarrier of the carrier system and calculate the signal-to-noise ratio of each subcarrier. The operation performed by this module corresponds to step S101 in Embodiment 1, and its specific implementation can be referred to the description of step S101.
[0090] The signal-to-noise ratio (SNR) sorting module 200 is used to globally sort all available subcarriers according to their SNR from high to low, resulting in an ordered subcarrier sequence. The operation performed by this module corresponds to step S102 in Embodiment 1, and its specific implementation can be found in the description of step S102.
[0091] The subcarrier shielding module 300 is used to shield the subcarriers with the lowest signal-to-noise ratio from an ordered subcarrier sequence according to a preset shielding strategy. The operation performed by this module corresponds to step S103 in Embodiment 1, and its specific implementation can be referred to the description of step S103.
[0092] The grouping module 400 is used to divide the remaining unmasked subcarriers into several subcarrier groups in descending order of signal-to-noise ratio, with each group containing the same number of subcarriers. The operation performed by this module corresponds to step S104 in Embodiment 1, and its specific implementation can be found in the description of step S104.
[0093] The modulation scheme selection module 500 is used to calculate the average signal-to-noise ratio of each subcarrier group and select the corresponding modulation scheme for each subcarrier group according to a preset modulation scheme switching threshold table. The operation performed by this module corresponds to step S105 in Embodiment 1, and its specific implementation can be referred to the description of step S105.
[0094] The bit allocation and feedback module 600 is used to allocate the number of bits corresponding to the selected modulation scheme to all subcarriers within each subcarrier group, and to feed back the subcarrier masking information, grouping information, and modulation scheme information of each group to the transmitting end. The operation performed by this module corresponds to step S106 in Embodiment 1, and its specific implementation can be referred to the description of step S106.
[0095] The packet bit allocation device provided in this embodiment achieves packet bit allocation based on signal-to-noise ratio (SNR) ranking through the coordinated operation of a channel estimation module, a signal-to-noise ratio (SNR) ranking module, a subcarrier masking module, a packetization module, a modulation scheme selection module, and a bit allocation and feedback module. The SNR ranking module globally ranks all deeply fading subcarriers to the end of the sequence. The subcarrier masking module avoids extremely low SNR subcarriers from being mixed into effective packets by one-time removal. The packetization module groups subcarriers with similar SNR into the same group. These modules together achieve a comprehensive effect of minimizing intra-group variance, eliminating the negative impact of deep fading, and controlling signaling overhead at the packet level.
[0096] This embodiment provides an electronic device, which includes a memory and a processor.
[0097] Memory is used to store computer programs.
[0098] A processor for implementing the block bit allocation method as described above when executing a computer program.
[0099] Specifically, by executing the computer program stored in the memory, the processor can perform the following functions: perform channel estimation and calculate the signal-to-noise ratio (SNR) for each subcarrier of the carrier system; sort all subcarriers according to their SNR from high to low; block some subcarriers according to a preset blocking strategy; divide the remaining subcarriers into several subcarrier groups; calculate the average SNR of each group and select the modulation method; and allocate the corresponding number of bits to each group.
[0100] The electronic device provided in this embodiment can automatically complete the entire process of packet bit allocation based on signal-to-noise ratio sorting by executing a computer program stored in the memory through a processor. This electronic device can be any node device with computing capabilities in a power line carrier communication system, such as a concentrator, data collector, or communication module. By implementing the packet bit allocation method of this invention in such devices, the transmission performance and spectral efficiency of the power line carrier communication system under frequency-selective fading channel conditions can be effectively improved.
[0101] This embodiment provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed, performs the steps of the block bit allocation method described above.
[0102] Specifically, the computer-readable storage medium may be a read-only memory (ROM), random access memory (RAM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), register, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. When the computer program in the storage medium is executed by the processor, it can perform the following steps: perform channel estimation and calculate the signal-to-noise ratio (SNR) for each subcarrier of the carrier system; sort all subcarriers according to their SNR from high to low; block some subcarriers according to a preset blocking strategy; divide the remaining subcarriers into several subcarrier groups; calculate the average SNR of each group and select a modulation scheme; and allocate a corresponding number of bits to each group.
[0103] The computer-readable storage medium provided in this embodiment stores a computer program for executing a block bit allocation method. This storage medium can exist independently or be embedded in an electronic device. Users can load the computer program from this storage medium into any device with computing capabilities, thereby enabling that device to perform block bit allocation based on signal-to-noise ratio sorting. This facilitates the widespread deployment and application of the block bit allocation method.
[0104] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that the elements inherent in a process, method, article, or apparatus that includes a list of elements are included. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Additionally, portions of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.
[0105] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0106] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0107] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0108] The above provides a detailed description of the packet bit allocation method, apparatus, electronic device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for allocating block bits, characterized in that, include: Channel estimation is performed for each subcarrier of the carrier system, and the signal-to-noise ratio of each subcarrier is calculated; All the subcarriers are sorted from high to low according to their signal-to-noise ratio to obtain an ordered subcarrier sequence; According to the preset shielding strategy, some subcarriers are shielded from the ordered subcarrier sequence, and the shielded subcarriers are not used for data transmission. The remaining unmasked subcarriers are divided into several subcarrier groups in descending order of signal-to-noise ratio, and each subcarrier group contains the same number of subcarriers. Calculate the average signal-to-noise ratio of each subcarrier group, and select the corresponding modulation scheme for each subcarrier group according to the preset modulation selection scheme; Allocate a number of bits corresponding to the selected modulation scheme to all subcarriers within each subcarrier group.
2. The block bit allocation method according to claim 1, characterized in that, The method of sorting all the subcarriers according to their signal-to-noise ratio from high to low includes: placing the subcarrier with the highest signal-to-noise ratio at the beginning of the sequence and placing the subcarrier with the lowest signal-to-noise ratio at the end of the sequence.
3. The block bit allocation method according to claim 2, characterized in that, The preset shielding strategy is as follows: set the number of subcarriers to be shielded, and shield the corresponding number of subcarriers sequentially starting from the end of the ordered subcarrier sequence.
4. The block bit allocation method according to claim 1, characterized in that, The preset shielding strategy is as follows: set a signal-to-noise ratio (SNR) shielding threshold, and shield all subcarriers with an SNR lower than the shielding threshold.
5. The block bit allocation method according to claim 1, characterized in that, The method of dividing into several subcarrier groups includes: the number of subcarriers in each subcarrier group is determined according to the preset group size of the system, and each subcarrier group contains the same number of subcarriers.
6. The block bit allocation method according to claim 1, characterized in that, The preset modulation selection method includes: setting multiple modulation methods and assigning different signal-to-noise ratio (SNR) switching threshold values to each modulation method; comparing the average SNR of the subcarrier group with the SNR switching threshold values, and selecting the corresponding modulation method for each subcarrier group based on the comparison result.
7. The block bit allocation method according to claim 1, characterized in that, The preset modulation selection method includes: a uniform modulation method for each subcarrier group, and all subcarriers within the same subcarrier group using the same modulation method and the same number of bits.
8. A block bit allocation device, characterized in that, include: The channel estimation module is used to perform channel estimation for each subcarrier of the carrier system and calculate the signal-to-noise ratio of each subcarrier; The signal-to-noise ratio (SNR) sorting module is used to globally sort all available subcarriers according to their SNR from high to low, resulting in an ordered subcarrier sequence. The subcarrier shielding module is used to shield the subcarriers with the lowest signal-to-noise ratio from the ordered subcarrier sequence according to a preset shielding strategy. The grouping module is used to divide the remaining unmasked subcarriers into several subcarrier groups in descending order of signal-to-noise ratio, with each group containing the same number of subcarriers. The modulation scheme selection module is used to calculate the average signal-to-noise ratio of each subcarrier group and select the corresponding modulation scheme for each subcarrier group according to the preset modulation scheme switching threshold table. The bit allocation and feedback module is used to allocate the number of bits corresponding to the selected modulation scheme to all subcarriers in each subcarrier group, and to feed back the subcarrier masking information, grouping information and modulation scheme information of each group to the transmitting end.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to perform the steps of the memory management method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the steps of the memory management method as described in any one of claims 1 to 7.