Dual-mode communication channel switching method and device based on multi-mode perception and weight decision
By obtaining multi-mode parameters to calculate the channel quality index and comprehensive score, and combining the switching strategy of dynamic threshold and hysteresis, the communication mode is optimized, which solves the problem of unstable channel switching in the existing technology and realizes high reliability and flexible communication in complex environments.
Patent Information
- Application Number
- CN202510907479.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-07-02
AI Technical Summary
The existing communication switching method based on multiple transmission modes is difficult to ensure transmission reliability and flexibility in complex scenarios, mainly because the mode switching is simply performed based on the threshold, resulting in unstable channel switching.
By obtaining the multi-mode parameters of the first and second channels, calculating the channel quality index and comprehensive score, and based on the switching strategy of dynamic thresholds and hysteresis, combined with the service type and score trend, the communication mode selection is optimized to avoid frequent switching and critical fluctuations.
It improves the success rate and reliability of communication transmission, reduces signaling overhead, and ensures stable communication in complex environments.
Smart Images

Figure CN120417094B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid communication technology, and in particular to a dual-mode communication channel switching method and device based on multi-mode perception and weight decision-making. Background Art
[0002] Currently, the two primary methods for local communication in smart grid electricity consumption information collection are broadband power line carrier communication (PLC) and wireless communication. Broadband PLC uses power lines as a transmission medium, transmitting information via carrier waves. PLC is susceptible to noise interference and signal attenuation within the power line network, resulting in fluctuations in communication quality and reliability. Wireless communication, on the other hand, cannot guarantee consistent transmission performance due to transmission power limitations and various factors, including environmental, climatic, and geographical factors.
[0003] In the application process of smart grid, the environment is complex, the business carrying requirements are diverse, and the transmission reliability requirements are high. In order to avoid the problem of poor flexibility in application when using only one broadband power line carrier communication or wireless communication method, it is proposed to use multiple transmission methods for communication. However, the existing technology only simply switches according to the threshold when selecting the current transmission mode based on multiple transmission methods, which makes it difficult to ensure transmission reliability and flexibility in complex scenarios. Summary of the Invention
[0004] In view of this, the present invention provides a dual-mode communication channel switching method and device based on multi-mode perception and weight decision-making to solve the problem of poor reliability of mode switching simply based on thresholds in the prior art.
[0005] In the first aspect, the present invention provides a dual-mode communication channel switching method based on multi-mode perception and weight decision-making, the method comprising: obtaining multi-mode parameters of a first channel and a second channel, the multi-mode parameters including physical layer parameters and protocol layer parameters; calculating a first channel quality index and a second channel quality index respectively according to the multi-mode parameters, and calculating a comprehensive score based on the first channel quality index, the second channel quality index and the dynamic weight; determining whether to trigger mode switching based on the relationship between the comprehensive score and the switching threshold and the changing trend of the comprehensive score, the switching threshold being the sum of a dynamic threshold and a hysteresis amount, and the dynamic threshold and the hysteresis amount being determined based on the service type of the data to be transmitted.
[0006] The dual-mode communication channel switching method based on multimode sensing and weighted decision-making provided by the embodiments of the present invention calculates a channel quality index and a comprehensive score based on the channel's multimode parameters. The method then determines whether to trigger a mode switch based on the relationship between the comprehensive score and the switching threshold, as well as the changing trend of the comprehensive score. The dynamic threshold and hysteresis settings can avoid problems such as frequent channel switching and critical fluctuations. Furthermore, based on the determination of the comprehensive score and switching threshold, the changing trend of the comprehensive score is further considered, thereby enabling the selection of a more optimal channel for transmission, ensuring the success rate of communication transmission and improving transmission reliability.
[0007] In an optional embodiment, whether to trigger mode switching is determined based on the relationship between the comprehensive score and the switching threshold and the changing trend of the comprehensive score, including: when the comprehensive score is greater than or equal to the sum of the dynamic threshold and the hysteresis amount, maintaining the current channel for transmission of data to be transmitted; when the comprehensive score is less than the dynamic threshold, triggering mode switching; when the comprehensive score is greater than or equal to the dynamic threshold and less than the sum of the dynamic threshold and the hysteresis amount, determining whether to trigger mode switching based on the changing trend of the comprehensive score.
[0008] In the present invention, by setting a dynamic threshold according to the service type, the communication mode is optimized; at the same time, setting a hysteresis amount can avoid the critical fluctuation of the comprehensive score triggering the switching process, that is, avoiding frequent switching of channels, thereby improving system stability and reducing signaling overhead.
[0009] In an optional embodiment, whether to trigger mode switching is determined based on the changing trend of the comprehensive score, including: calculating the average of historical comprehensive scores based on a sliding window; determining whether the changing trend of the comprehensive score is an upward trend or a downward trend based on the relationship between the current comprehensive score and the average of the historical comprehensive scores; when in an upward trend, maintaining the current channel to transmit the data to be transmitted; when in a downward trend, triggering mode switching.
[0010] In the present invention, whether to trigger mode switching is determined according to the comprehensive score change trend, wherein when it is in an upward trend, the current channel is maintained; when it is in a downward trend, the channel is switched, thereby avoiding further deterioration of channel quality.
[0011] In an optional embodiment, after determining the trigger mode switch, the method further includes: if it is determined that the qualities of the two channels are medium according to the first channel quality index and the second channel quality index, switching to fragmentation mode transmission, wherein the fragmentation mode is to fragment the data to be transmitted and then transmit it through the first channel and the second channel respectively; if it is determined that the qualities of both channels are not medium and there is no unavailable channel according to the first channel quality index and the second channel quality index, switching the transmission mode to another channel transmission.
[0012] In an optional embodiment, the protocol layer parameters include service priority; before determining whether to trigger mode switching based on the relationship between the comprehensive score and the switching threshold and the changing trend of the comprehensive score, the method also includes: if it is determined based on the first channel quality index and the second channel quality index that there are unavailable channels and better channels, switching to the better channel for transmission; if the current data to be transmitted is the highest priority of the service priority, the data to be transmitted will be fragmented and transmitted using the first channel and the second channel respectively.
[0013] In the present invention, when the service priority is the highest priority, the fragmented transmission method is directly adopted, thereby ensuring the timeliness of the highest priority such as emergency data transmission and reducing the probability of data communication failure.
[0014] In an optional embodiment, a first channel quality index and a second channel quality index are calculated respectively according to the multimode parameters, and a comprehensive score is calculated based on the first channel quality index, the second channel quality index and the dynamic weight, including: calculating the first channel quality index according to the number of available subcarriers and the signal-to-noise ratio; calculating the second channel quality index according to the signal strength, the bit error rate and the average interference power; determining the dynamic weight according to the service type of the data to be transmitted, and determining the data priority according to the service priority of the protocol layer parameters; and calculating the comprehensive score according to the first channel quality index, the second channel quality index, the dynamic weight and the data priority.
[0015] In the present invention, the first channel quality index is calculated using the number of available subcarriers and the signal-to-noise ratio, which enables the first channel quality index to accurately measure the channel reliability and stability; the second channel quality index is calculated using signal strength, bit error rate, and average interference power, thereby comprehensively evaluating the channel quality, which is suitable for high-frequency communication scenarios with complex and dynamically changing interference.
[0016] In an optional embodiment, if it is determined that the quality of the two channels is medium based on the first channel quality index and the second channel quality index, switching to fragmented mode transmission includes: if it is determined that the quality of the two channels is medium based on the first channel quality index and the second channel quality index, fragmenting the data to be transmitted according to the ratio of the first signal quality index and the second channel quality index; transmitting the fragmented data to be transmitted using the first channel and the second channel respectively; and reorganizing the data transmitted using the first channel and the second channel at the receiving end based on hash verification.
[0017] In the present invention, the data to be transmitted is transmitted in segments according to the proportion of the channel quality index, thereby ensuring synchronous transmission when the two channels are transmitted.
[0018] In an optional implementation, the first channel quality index is calculated using the following formula:
[0019]
[0020] Where, represents the first channel quality index, represents the total number of subcarriers in the HPLC channel, SNR represents the signal-to-noise ratio, and K represents the adjustment constant;
[0021] The second channel quality index is calculated using the following formula:
[0022]
[0023] Where, represents the second channel quality index, Indicates signal strength, Indicates the signal threshold, BER indicates the bit error rate, represents the average interference power, represents the interference tolerance threshold;
[0024] The comprehensive score is calculated using the following formula:
[0025]
[0026] In the formula, S represents the comprehensive score, Indicates business priority, , 、 and Represent the corresponding weights respectively.
[0027] In the present invention, the above formula is used to calculate the two channel quality indices, which not only realizes the quantification of the channel quality indices, but also realizes the normalization of the channel quality indices.
[0028] In the second aspect, the present invention provides a dual-mode communication channel switching device based on multi-mode perception and weight decision-making, the device including: a parameter acquisition module, used to obtain multi-mode parameters of the first channel and the second channel, the multi-mode parameters including physical layer parameters and protocol layer parameters; an index and score calculation module, used to calculate the first channel quality index and the second channel quality index respectively according to the multi-mode parameters, and calculate the comprehensive score based on the first channel quality index, the second channel quality index and the dynamic weight; a switching judgment module, used to determine whether to trigger mode switching based on the relationship between the comprehensive score and the switching threshold and the changing trend of the comprehensive score, the switching threshold being the sum of the dynamic threshold and the hysteresis amount, and the dynamic threshold and the hysteresis amount are determined based on the service type of the data to be transmitted.
[0029] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions stored in the memory, and the processor executing the computer instructions to execute the dual-mode communication channel switching method based on multi-mode perception and weight decision-making of the above-mentioned first aspect or any corresponding embodiment thereof.
[0030] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the dual-mode communication channel switching method based on multi-mode perception and weight decision-making of the above-mentioned first aspect or any corresponding embodiment thereof.
[0031] In a fifth aspect, the present invention provides a computer program product comprising computer instructions, the computer instructions being used to enable a computer to execute the dual-mode communication channel switching method based on multi-mode perception and weight decision-making of the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 1 is a flow chart of a dual-mode communication channel switching method based on multi-mode perception and weight decision according to an embodiment of the present invention;
[0034] Figure 2 is a schematic diagram of a dual-mode fragmentation transmission method according to an embodiment of the present invention;
[0035] Figure 3 1 is a flow chart of another dual-mode communication channel switching method based on multi-mode perception and weight decision according to an embodiment of the present invention;
[0036] Figure 4 is a structural block diagram of a dual-mode communication channel switching device based on multi-mode perception and weight decision according to an embodiment of the present invention;
[0037] Figure 5 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0039] According to an embodiment of the present invention, an embodiment of a dual-mode communication channel switching method based on multi-mode perception and weight decision is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0040] In this embodiment, a dual-mode communication channel switching method based on multi-mode perception and weight decision is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. Figure 1 is a flow chart of a dual-mode communication channel switching method based on multi-mode perception and weight decision according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0041] Step S101: Obtain multimode parameters of a first channel and a second channel. The multimode parameters include physical layer parameters and protocol layer parameters. The first channel and the second channel are, respectively, a channel based on broadband power line carrier communications and a channel based on wireless communications. For example, the first channel and the second channel are HPLC (High-speed Power Line Communications) and HRF (High-speed Radio Frequency) channels, respectively. In practical applications, the first channel and the second channel may also be other types of channels.
[0042] The multimode parameters obtained in this embodiment include physical layer parameters and protocol layer parameters. The physical layer parameters can be collected from the physical layer of the communication chip and are used to assess channel quality for two channels. For example, for the HPLC channel, parameters such as the power spectral density (PSD) and available subcarrier ratio in the 0.7MHz-12MHz frequency band can be monitored; for the HRF channel, parameters such as the multipath delay spread (≤5μs for a high-quality channel) and interference energy in the 470MHz-510MHz frequency band can be monitored. Specifically, power spectral density can provide analytical data for the channel's signal-to-noise ratio characteristics, while interference energy can provide analytical data for the channel's interference power characteristics. Multipath delay spread is positively correlated with bit error rate and can be used to correct the bit error rate. Furthermore, channel quality can be assessed using parameters such as signal-to-noise ratio, available subcarrier ratio, bit error rate, and interference power.
[0043] Protocol layer parameters include the MAC layer retransmission count and the application layer service priority. In this embodiment, the retransmission count for the HPLC channel is less than or equal to three, and the retransmission count for the HRF channel is less than or equal to five. Specifically, when data transmission errors occur due to interference, noise, or other factors, the MAC layer automatically triggers the retransmission mechanism and retransmits within the set retransmission count. The application layer sets the priority for different service types. For example, in this embodiment, the service priority is set as emergency commands > real-time data > historical data.
[0044] In step S102, a first channel quality index and a second channel quality index are calculated based on the multimode parameters, and a comprehensive score is calculated based on the first channel quality index, the second channel quality index, and the dynamic weight. Specifically, when calculating the channel quality index, this embodiment uses the physical layer parameters in the multimode parameters as indicators for evaluating the channel quality index calculation. When calculating the comprehensive score, this embodiment first assigns dynamic weights to data of different service types based on the service priorities in the protocol layer parameters. A weighted calculation is then performed based on the dynamic weights and combined with the calculated channel quality index to obtain a comprehensive score. In addition, when calculating the comprehensive score, this embodiment further determines the service priority of the data to be transmitted based on the service priority in the protocol layer parameters, and performs a weighted calculation based on the service priority of the data to be transmitted.
[0045] Step S103 , determining whether to trigger mode switching based on the relationship between the comprehensive score and the switching threshold and the changing trend of the comprehensive score, wherein the switching threshold is the sum of a dynamic threshold and a hysteresis, and the dynamic threshold and the hysteresis are determined based on the service type of the data to be transmitted.
[0046] Specifically, to optimize the selection of communication modes, i.e., channels, this embodiment sets differentiated dynamic thresholds for different service types. Specifically, the dynamic thresholds can be set to correspond to the service requirements of the service type. For example, for service types with high real-time requirements, the dynamic threshold is set higher, while for service types that can tolerate high latency, the dynamic threshold is set lower. Furthermore, to avoid frequent channel switching, a hysteresis is set based on the dynamic threshold to prevent frequent switching triggers when comparing the comprehensive score with the dynamic threshold. Furthermore, in addition to comparing the relationship between the comprehensive score and the switching threshold, this embodiment further considers the changing trend of the comprehensive score when determining whether to trigger a mode switch. This trend can be understood as the change in the current comprehensive score compared to the historical score. Thus, by considering multiple aspects, determining whether to trigger a mode switch, the selected transmission mode better meets the requirements of the transmitted data. The dual-mode communication channel switching method based on multi-mode sensing and weighted decision-making provided in this embodiment of the present invention calculates a channel quality index and a comprehensive score using the multi-mode parameters of the channel. The determination of whether to trigger a mode switch is based on the relationship between the comprehensive score and the switching threshold, as well as the changing trend of the comprehensive score. This enables the selection of a more optimal channel for transmission, ensuring the success rate of communication transmission and improving transmission reliability.
[0047] This embodiment provides a dual-mode communication channel switching method based on multi-mode perception and weight decision-making, and the process includes the following steps:
[0048] Step S201: Obtain multimode parameters of the first channel and the second channel. The multimode parameters include physical layer parameters and protocol layer parameters. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0049] Step S202 : Calculate a first channel quality index and a second channel quality index respectively according to the multimode parameters, and calculate a comprehensive score based on the first channel quality index, the second channel quality index and the dynamic weight.
[0050] Specifically, the above step S202 includes:
[0051] Step S2021 calculates a first channel quality index based on the number of available subcarriers and the signal-to-noise ratio. Specifically, the signal-to-noise ratio is expressed as the ratio of signal power to noise power. Among the physical layer parameters obtained above, the power spectral density of the HPLC channel is monitored. Therefore, the signal power spectral density and the noise power spectral density can be separated based on the power spectral density. The signal power and noise power are then calculated based on the signal power spectral density and the noise power spectral density, respectively. Finally, the signal-to-noise ratio is calculated based on the signal power and noise power. Furthermore, the number of available subcarriers represents the bandwidth of the HPLC channel for data transmission, and the signal-to-noise ratio affects the transmission error rate. Therefore, using the number of available subcarriers and the signal-to-noise ratio to calculate the first channel quality index enables the first channel quality index to accurately measure channel reliability and stability.
[0052] In this embodiment, when calculating the first channel quality index, not only the number of available subcarriers and the signal-to-noise ratio are considered, but also the first channel quality index is constrained to be within the range of 0 to 1 according to the following calculation formula, thereby achieving normalization of the channel quality index.
[0053]
[0054] Where, represents the first channel quality index, This value represents the total number of subcarriers in the HPLC channel. This number varies depending on the selected frequency band. For example, when frequency band 1 is selected, the total number of subcarriers is 131. SNR represents the signal-to-noise ratio. When SNR approaches 0, the signal is extremely poor, and when SNR approaches 1, the signal is excellent. K represents the adjustment constant (usually 1-10), which is used to control the saturation characteristics of SNR.
[0055] Step S2022: Calculate a second channel quality index based on signal strength, bit error rate, and average interference power. Signal strength can be directly monitored, and average interference power can be obtained from interference energy in the physical layer parameters. The bit error rate of the channel can be corrected using the multipath delay spread in the physical layer parameters. This correction process can be expressed as follows:
[0056]
[0057] Where, represents the corrected bit error rate, Indicates the theoretical bit error rate before correction, represents the multipath delay spread, Indicates the preset reference delay threshold.
[0058] This embodiment calculates the second channel quality index using signal strength, bit error rate, and average interference power, providing a comprehensive assessment of channel quality. This approach is suitable for high-frequency communication scenarios with complex and dynamically changing interference. Furthermore, the second channel quality index is constrained to the range of 0 to 1 using the following calculation formula, thus achieving normalization of the channel quality index.
[0059]
[0060] Where, represents the second channel quality index, Indicates signal strength, represents the signal threshold, which is -90dBm in this embodiment, and BER represents the bit error rate. represents the average interference power, represents the interference tolerance threshold, which is -95dBm in this embodiment.
[0061] Step S2023, determines a dynamic weight based on the business type of the data to be transmitted, and determines the data priority based on the business priority of the protocol layer parameters; wherein, the corresponding weights can be determined in advance for different business types, thereby, after determining the business type of the data to be transmitted, its weight can be determined based on the corresponding relationship; in addition, this embodiment also takes the business priority into consideration when calculating the comprehensive score, based on which, when transmitting different data, the data priority can be determined based on the business priority in the protocol layer parameters. For example, the business priority includes a business priority of 1 for urgent data, and a business priority of 0.3 for real-time data and historical data. If the data to be transmitted is urgent data, its data priority is 1.
[0062] Step S2024: Calculate a comprehensive score based on the first channel quality index, the second channel quality index, the dynamic weight, and the data priority. Specifically, the comprehensive score is calculated using the following formula:
[0063]
[0064] Where, Indicates business priority, , 、 and Represent the corresponding weights respectively.
[0065] Based on the above step S2023, the weights corresponding to different service types are as shown in Table 1 below:
[0066] Table 1
[0067]
[0068] For example, if the data to be transmitted is urgent data, such as fault recording data, then , , , .
[0069] In step S203, if the presence of an unusable channel and a preferred channel is determined based on the first and second channel quality indices, transmission is switched to the preferred channel. Specifically, after calculating the channel quality index and the comprehensive score, the presence of an unusable channel and a preferred channel is first determined based on the two channel quality indices. For example, this determination can be made by setting a threshold. For determining an unusable channel, the threshold is set to 0.1. That is, when the channel quality index is less than or equal to 0.1, the channel is determined to be unusable. For determining a preferred channel, the threshold is set to 0.5. That is, when the channel quality index is greater than 0.5, the channel is determined to be a preferred channel.
[0070] Specifically, when the first channel quality index is less than or equal to 0.1 (i.e., the first channel is unavailable) and the second channel quality index is greater than 0.5 (i.e., the second channel is a better channel), the system is forced to switch to the second channel; when the second channel quality index is less than or equal to 0.1 (i.e., the second channel is unavailable) and the first channel quality index is greater than 0.5 (i.e., the first channel is a better channel), the system is forced to switch to the first channel.
[0071] It should be noted that the channel switching determination in this embodiment is performed after a device has joined the network and selected a channel for transmission. For example, after a device joins the network, it first attempts to join the network using the HPLC channel. If the HPLC channel fails, it attempts to join the network using the HRF channel. Only after the device has successfully joined the network and determined the relay device will the aforementioned channel parameter acquisition, channel index calculation, and channel switching process be performed.
[0072] In addition, after calculating the two channel quality indexes, if it is determined that both channel quality indexes are less than or equal to 0.1, it means that both channels are unavailable. At this time, a communication abnormality alarm indication should be output to inform relevant personnel to check the channels to avoid affecting data transmission.
[0073] Step S204, if the data to be transmitted is the highest priority of the business priority, the data to be transmitted will be fragmented and transmitted using the first channel and the second channel respectively. Specifically, the above-mentioned protocol layer parameters include business priorities, such as urgent data>real-time data>historical data. If the data to be transmitted is the highest level of business priority, that is, urgent data, then at this time, it is not necessary to consider whether the two channel quality indexes are in the medium channel quality situation, nor is it necessary to consider the size of the comprehensive score, and the data to be transmitted can be directly fragmented and transmitted. Among them, the specific method of fragmented transmission can be implemented with reference to the process of the above-mentioned step S204, which will not be repeated here. It should also be noted that if there is an unavailable channel, even if the data to be transmitted is the highest level of business priority, it is also necessary to use an available channel for transmission.
[0074] Step S205 , determining whether to trigger mode switching based on the relationship between the comprehensive score and the switching threshold and the changing trend of the comprehensive score, wherein the switching threshold is the sum of a dynamic threshold and a hysteresis, and the dynamic threshold and the hysteresis are determined based on the service type of the data to be transmitted.
[0075] Specifically, the above step S205 includes:
[0076] Step S2051: When the comprehensive score is greater than or equal to the sum of the dynamic threshold and the hysteresis value, the current channel is maintained for transmission of the data to be transmitted.
[0077] Step S2052: When the comprehensive score is less than the dynamic threshold, a mode switch is triggered.
[0078] Step S2053: When the comprehensive score is greater than or equal to the dynamic threshold and less than the sum of the dynamic threshold and the hysteresis, it is determined whether to trigger mode switching according to the change trend of the comprehensive score.
[0079] In this embodiment, the dynamic threshold settings are shown in Table 2 below:
[0080] Table 2
[0081]
[0082] When determining whether to trigger a mode switch based on the dynamic threshold and hysteresis, the comprehensive score is first compared with the sum of the dynamic threshold and hysteresis. When the comprehensive score is greater than or equal to the sum of the dynamic threshold and hysteresis, the switching process is not triggered; however, when the comprehensive score is less than the dynamic threshold, channel switching is initiated. When the comprehensive score is between the dynamic threshold and the sum of the dynamic threshold and hysteresis, the decision is made based on the trend of the comprehensive score. Thus, by setting this hysteresis, critical fluctuations in the comprehensive score can be avoided from triggering the switching process. For example, if hysteresis is not set and the current threshold is 0.8, then small fluctuations in the comprehensive score near the threshold (such as 0.79 and 0.81) will result in frequent channel switching. Therefore, by setting hysteresis, this embodiment can improve system stability and reduce signaling overhead.
[0083] Similar to dynamic thresholds, dynamic hysteresis can also be set based on service type. For example, for real-time services, the hysteresis can be set between 0.05 and 0.1, ensuring strict anti-jitter protection; for non-real-time services, the hysteresis can be set between 0.02 and 0.05, achieving a moderate tolerance for latency.
[0084] In an optional embodiment, whether to trigger mode switching is determined based on the changing trend of the comprehensive score, including: calculating the average of historical comprehensive scores based on a sliding window; determining whether the changing trend of the comprehensive score is an upward trend or a downward trend based on the relationship between the current comprehensive score and the average of the historical comprehensive scores; when in an upward trend, maintaining the current channel to transmit the data to be transmitted; when in a downward trend, triggering mode switching.
[0085] Specifically, the following formula can be used to calculate the average of the historical comprehensive score:
[0086]
[0087] Where, Represents the mean of the historical comprehensive scores, and N represents the size of the sliding window. For example, N=5, which implements the calculation of the mean of the past five comprehensive scores; Represents the previous i ratings.
[0088] In the calculation , the current comprehensive score Compared with it, if , considered as an upward trend, delay switching; if Specifically, if the comprehensive score is judged to be on an upward trend and is expected to rebound in the future, the current channel is maintained for data transmission, that is, channel switching is not performed temporarily; if the comprehensive score is judged to be on a downward trend, a channel switch is performed immediately to prevent the current channel quality from further deteriorating.
[0089] Specifically, the scenario shown in Table 3 below represents the comprehensive score S and the dynamic threshold S. th and hysteresis △S hysteresis The relationship determines whether the mode switching process is triggered.
[0090] Table 3
[0091]
[0092] In step S206, if the quality of both channels is determined to be medium based on the first channel quality index and the second channel quality index, the transmission mode is switched to fragmented mode. The fragmented mode fragments the data to be transmitted and transmits it via the first channel and the second channel respectively. Specifically, after the comprehensive score determines whether to trigger the mode switch, the channel quality index can be further used to determine the specific transmission mode to switch to. If both channel quality indices are medium, the transmission mode is switched to fragmented mode.
[0093] Specifically, the above step S206 includes:
[0094] In step S2061, if the first channel quality index and the second channel quality index determine that both channels have medium quality, the data to be transmitted is fragmented based on the ratio of the first channel quality index to the second channel quality index. The threshold for determining medium channel quality can be determined based on actual conditions. In this embodiment, the threshold is set to [0.4, 0.7]. That is, when both channel quality indices are within the range of 0.4 to 0.7, fragmented transmission is initiated. Specifically, the specific method for fragmenting the data can be determined using the following formula:
[0095]
[0096] Where, Indicates the ratio of the data lengths assigned to the HPLC signal and the HRF channel.
[0097] After the data splitting method is determined, the data to be transmitted is split according to the splitting method.
[0098] Step S2062: The fragmented data to be transmitted is transmitted using the first channel and the second channel respectively. Specifically, after the data to be transmitted is split, data is transmitted according to the data length corresponding to each channel. Figure 2 As shown, in order to facilitate the subsequent verification of the completeness of the received data, after the data to be transmitted is fragmented, two data Data1 and Data2 are obtained. The hash value Hash of each data Data1 and Data2 is first calculated, and then the hash value and the data are transmitted together. At the same time, during the transmission process, the retransmission limit in the above protocol layer parameters is followed.
[0099] In step S2063, the data transmitted via the first and second channels is reassembled at the receiving end based on a hash check. Specifically, after receiving data transmitted via both channels, the same hash algorithm is used to calculate a hash value for the received data. This value is then compared with the hash value included in the transmitted data. If the two values match, the data is intact and the received data can be reassembled. If the two values do not match, the fragment is corrupted and the fragmented data needs to be retransmitted.
[0100] In step S207, if the first channel quality index and the second channel quality index determine that both channel qualities are not medium and no unusable channels exist, the transmission mode is switched to another channel. Specifically, after the comprehensive score determines that the mode switch is triggered, if the channel quality index determines that both channel qualities are not medium and no unusable channels exist, the transmission mode is switched to another channel. If the current transmission mode is using the first channel, the transmission mode is switched to the second channel after the trigger is determined; if the current transmission mode is using the second channel, the transmission mode is switched to the first channel after the trigger is determined.
[0101] As a specific application example of the embodiment of the present invention, Figure 3 As shown, the dual-mode communication channel switching method based on multi-mode perception and weight decision is implemented using the following process:
[0102] 1. Build a multimodal channel perception model. This model is specifically used to obtain the multimodal parameters of two channels.
[0103] 1.1, Acquire parameters from the physical layer of the communication chip.
[0104] For HPLC channels, the power spectral density (PSD) and available subcarrier ratio (≥80% indicates a healthy state) in the 0.7MHz-12MHz frequency band are monitored in real time. For HRF channels, the multipath delay spread (≤5μs indicates a high-quality channel) and interference energy (≤-95dBm) in the 470-510MHz frequency band are detected.
[0105] 1.2, Protocol layer parameter acquisition. Synchronously obtain the MAC layer retransmission count (HPLC ≤ 3 times, HRF ≤ 5 times) and application layer service priority (emergency command > real-time data > historical data).
[0106] 2. Dynamic weight decision algorithm.
[0107] 2.1, input.
[0108] Real-time acquisition of HPLC channel parameters, HRF channel parameters and business type labels of data to be transmitted.
[0109] Preset parameters: Weight dynamic rule table (business type → weight allocation), dynamic threshold S th , hysteresis △S hysteresis And fragment transmission trigger conditions, etc.
[0110] 2.2, output.
[0111] Communication mode selection: HPLC master / HRF master / dual-mode fragmented transmission.
[0112] Interference suppression strategy: Through the dynamic weight decision algorithm, channel evaluation is completed, the appropriate communication mode is selected, and data transmission time slot allocation is realized under different communication modes.
[0113] 2.3, core switching logic steps.
[0114] Step 1: Channel quality assessment and normalization. Use the following formula to calculate and constrain the indicator range in real time using channel parameters:
[0115]
[0116]
[0117] If CQIHPLC ≤ 0.1 (power line noise is too high) or CQIHRF ≤ 0.1 (RF signal is very weak), the channel is marked as "unavailable".
[0118] Step 2: Business type matching and weight allocation. Specifically, weight allocation can be performed using Table 1 above.
[0119] Step 3: Use the following formula to calculate the comprehensive score.
[0120]
[0121] Step 4: Use the switching decision rule shown below to determine whether to perform channel switching.
[0122] Rule 1: Forced switching (when the channel is unavailable).
[0123] If CQIHPLC≤0.1 and CQIHRF>0.5→forced switch to HRF;
[0124] If CQIHRF≤0.1 and CQIHPLC>0.5→force switch to HPLC.
[0125] Rule 2: Rating threshold triggers.
[0126] If S≥S th +△S hysteresis → Maintain the current mode;
[0127] If S <Sth →Trigger mode switching;
[0128] If S th ≤S th +△S hysteresis → Combine historical rating trends to make a judgment. If the historical rating trend is upward, do not switch for now, anticipating that the rating may rebound in the future; if it is downward, switch in advance to avoid further deterioration of quality.
[0129] Rule 3: Dual-mode collaborative fragmented transmission.
[0130] If CQIHPLC∈[0.4,0.7] and CQIHRF∈[0.4,0.7]→start fragment transmission.
[0131] The data packet is split into two pieces, and the length distribution is expressed by the following formula:
[0132]
[0133] The receiving end reconstructs the data through hash check. When the quality of both HPLC and HRF channels is medium, dual-mode collaborative fragmented transmission can effectively reduce the probability of data communication failure, increase the transmission rate, and thus improve communication performance.
[0134] Rule 4: Business priority preemption.
[0135] If P business =1 (e.g., failure event) → ignore scoring and force dual-mode parallel transmission.
[0136] Step 5: Send data.
[0137] Select the corresponding sending channel according to the communication mode:
[0138] HPLC master mode, sending data through the HPLC channel;
[0139] HRF master mode, sending data through the HRF channel;
[0140] In the dual-mode fragmentation transmission mode, after fragmenting the data according to rule 3, the data is sent through the HPLC channel and the HRF channel respectively. After the receiving end completes receiving the data, the data of the two channels is reassembled.
[0141] In an optional implementation manner, the channel switching method is described through the following transmission scenario:
[0142] Scenario 1: Normal electricity consumption data collection.
[0143] Input: CQIHPLC=0.8, CQIHRF=0.6;
[0144] Business type = electricity consumption statistics (w1=0.3,w2=0.6,w3=0.1), P business =0.3.
[0145] Calculation: S=0.3×0.8+0.6×0.6+0.1×0.3=0.24+0.36+0.03=0.63.
[0146] Decision: S = 0.63 ≥ S th =0.6→maintain HPLC main mode.
[0147] Scenario 2: Fault reporting in a noisy environment.
[0148] Input: CQIHPLC=0.2 (noise interference), CQIHRF=0.7;
[0149] Service type = fault recording (w1=0.4,w2=0.4,w3=0.2), P business =1.
[0150] Calculation: S=0.4×0.2+0.4×0.7+0.2×1=0.08+0.28+0.2=0.56.
[0151] Decision: Rule 4 triggered (P business =1) → Ignore S=0.56 and force dual-mode parallel transmission to ensure zero data loss.
[0152] Scenario 3: Dual-mode fragmented transmission.
[0153] Input: Assume that the number of available subcarriers currently collected is 200, SNR = 5dB, and the adjustment constant is set to K = 1.
[0154] The calculation results show that: CQIHPL=0.593;
[0155] Input: Assume that the current wireless signal strength is collected , the bit error rate is , When the reference signal strength is set to , the reference interference threshold is set to .
[0156] Calculation shows that: CQIHRF=0.683.
[0157] CQIHPL=0.5∈[0.4,0.7], CQIHRF=0.642∈[0.4,0.7], so the fragmented transmission mode is enabled.
[0158]
[0159] When the quality of both HPLC and HRF channels is medium, the data packet to be transmitted is split into two data at a ratio of 0.77:1, and the data is transmitted using HPLC and HRF fragments to improve the communication success rate.
[0160] The channel switching method of this invention features fuzzy sharding triggering, dynamic threshold design, and strong adaptability. Through dynamic scoring and weight distribution, it maintains the optimal communication mode during grid noise fluctuations, ensuring the success rate of communication transmission. Furthermore, this method has the characteristic of low latency. For example, when the weight for real-time services favors HPLC, the latency is reduced by 35% compared to the pure HRF solution.
[0161] In this embodiment, a dual-mode communication channel switching device based on multi-mode perception and weight decision-making is also provided. The device is used to implement the above-mentioned embodiments and preferred embodiments, and the details that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation by hardware, or a combination of software and hardware, is also possible and conceivable.
[0162] This embodiment provides a dual-mode communication channel switching device based on multi-mode perception and weight decision, such as Figure 4 Shown, including:
[0163] A parameter acquisition module 41 is configured to acquire multimode parameters of the first channel and the second channel, where the multimode parameters include physical layer parameters and protocol layer parameters;
[0164] an index and score calculation module 42 for respectively calculating a first channel quality index and a second channel quality index according to the multimode parameters, and calculating a comprehensive score based on the first channel quality index, the second channel quality index, and a dynamic weight;
[0165] The switching judgment module 43 is used to determine whether to trigger mode switching based on the relationship between the comprehensive score and the switching threshold and the changing trend of the comprehensive score. The switching threshold is the sum of the dynamic threshold and the hysteresis amount, and the dynamic threshold and the hysteresis amount are determined based on the business type of the data to be transmitted.
[0166] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.
[0167] In addition, the device can be embedded in the firmware of the HPLC and HRF dual-mode communication modules and implemented through a lightweight state machine, making it suitable for high-density and high-interference electricity consumption information collection scenarios.
[0168] The embodiment of the present invention also provides a computer device having the above Figure 4 The dual-mode communication channel switching device based on multi-mode perception and weight decision is shown.
[0169] See also Figure 5 , Figure 5 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0170] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0171] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.
[0172] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created based on the use of a computer device for displaying a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0173] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0174] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0175] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0176] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.
[0177] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A dual-mode communication channel switching method based on multi-mode perception and weight decision, characterized in that: The method comprises: Acquire multimode parameters of the first channel and the second channel, the multimode parameters including physical layer parameters and protocol layer parameters; Calculating a first channel quality index and a second channel quality index respectively according to the multimode parameters, and calculating a comprehensive score based on the first channel quality index, the second channel quality index, and a dynamic weight, where the dynamic weight represents different weights assigned to data of different service types based on the service priority in the protocol layer parameters; determining whether to trigger mode switching based on a relationship between the comprehensive score and a switching threshold and a changing trend of the comprehensive score, wherein the switching threshold is the sum of a dynamic threshold and a hysteresis amount, and the dynamic threshold and the hysteresis amount are determined based on the service type of the data to be transmitted; If the quality of the two channels is determined to be medium according to the first channel quality index and the second channel quality index, switching to fragmentation mode transmission, wherein the fragmentation mode is to fragment the data to be transmitted and transmit them respectively through the first channel and the second channel; If it is determined according to the first channel quality index and the second channel quality index that the qualities of both channels are not medium and there is no unavailable channel, the transmission mode is switched to another channel transmission.
2. The method according to claim 1, characterized in that Determining whether to trigger mode switching according to the relationship between the comprehensive score and the switching threshold and the change trend of the comprehensive score includes: When the comprehensive score is greater than or equal to the sum of the dynamic threshold and the hysteresis value, the current channel is maintained for transmitting the data to be transmitted; When the comprehensive score is less than the dynamic threshold, the mode switching is triggered; When the comprehensive score is greater than or equal to the dynamic threshold and less than the sum of the dynamic threshold and the hysteresis, whether to trigger the mode switch is determined according to the change trend of the comprehensive score.
3. The method according to claim 2, characterized in that Determine whether to trigger mode switching based on the trend of changes in the comprehensive score, including: Calculate the mean of historical comprehensive scores based on the sliding window; Determine whether the change trend of the comprehensive score is an upward trend or a downward trend based on the relationship between the current comprehensive score and the average of the historical comprehensive scores; When the trend is upward, the current channel is maintained for transmitting the data to be transmitted; When in a downtrend, the mode switch is triggered.
4. The method according to claim 1, wherein The protocol layer parameter includes a service priority; before determining whether to trigger mode switching based on the relationship between the comprehensive score and the switching threshold and the change trend of the comprehensive score, the method further includes: If it is determined according to the first channel quality index and the second channel quality index that there are unusable channels and better channels, switching to the better channel for transmission; If the data to be transmitted currently has the highest service priority, the data to be transmitted is fragmented and transmitted using the first channel and the second channel respectively.
5. The method according to claim 1, wherein Calculating a first channel quality index and a second channel quality index respectively according to the multimode parameters, and calculating a comprehensive score based on the first channel quality index, the second channel quality index, and a dynamic weight, including: Calculating a first channel quality index according to the number of available subcarriers and the signal-to-noise ratio; Calculating a second channel quality index based on signal strength, bit error rate, and average interference power; Determine dynamic weights based on the service type of the data to be transmitted, and determine data priority based on the service priority of protocol layer parameters; A comprehensive score is calculated based on the first channel quality index, the second channel quality index, the dynamic weight, and the data priority.
6. The method according to claim 1, characterized in that If it is determined according to the first channel quality index and the second channel quality index that the two channels have medium quality, switching to fragmented mode transmission includes: If it is determined that the two channels have medium quality according to the first channel quality index and the second channel quality index, the data to be transmitted is fragmented according to the ratio of the first channel quality index to the second channel quality index; Transmitting the fragmented data to be transmitted using the first channel and the second channel respectively; The data transmitted by using the first channel and the second channel are reorganized based on the hash check at the receiving end.
7. The method according to claim 1, characterized in that The first channel quality index is calculated using the following formula: Where, represents the first channel quality index, represents the total number of subcarriers in the HPLC channel, SNR represents the signal-to-noise ratio, and K represents the adjustment constant; The second channel quality index is calculated using the following formula: Where, represents the second channel quality index, Indicates signal strength, Indicates signal threshold, BER indicates bit error rate, represents the average interference power, represents the interference tolerance threshold; The comprehensive score is calculated using the following formula: In the formula, S represents the comprehensive score, Indicates business priority, , 、 and Represent the corresponding weights respectively.
8. A dual-mode communication channel switching device based on multi-mode perception and weight decision, characterized in that: The device comprises: A parameter acquisition module, configured to acquire multimode parameters of the first channel and the second channel, the multimode parameters including physical layer parameters and protocol layer parameters; an index and score calculation module, configured to calculate a first channel quality index and a second channel quality index respectively according to the multimode parameters, and calculate a comprehensive score based on the first channel quality index, the second channel quality index, and a dynamic weight, where the dynamic weight represents different weights assigned to data of different service types based on the service priority in the protocol layer parameters; a switching judgment module, configured to determine whether to trigger a mode switch based on a relationship between the comprehensive score and a switching threshold and a changing trend of the comprehensive score, wherein the switching threshold is the sum of a dynamic threshold and a hysteresis, wherein the dynamic threshold and the hysteresis are determined based on the service type of the data to be transmitted; If the quality of the two channels is determined to be medium according to the first channel quality index and the second channel quality index, switching to fragmentation mode transmission, wherein the fragmentation mode is to fragment the data to be transmitted and transmit them respectively through the first channel and the second channel; If it is determined according to the first channel quality index and the second channel quality index that the qualities of both channels are not medium and there is no unavailable channel, the transmission mode is switched to another channel transmission.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the dual-mode communication channel switching method based on multi-mode perception and weight decision according to any one of claims 1 to 7.
Citation Information
Patent Citations
Adaptive selection method of data transmission channel based on dual-mode communication
CN117834529A
Unmanned aerial vehicle vertical switching method and system in power grid multi-system communication
CN118972913A