A HPLC+HRF dual-mode communication system and method
By employing a single microcontroller unit and a hash function mapping structure in the HPLC+HRF dual-mode communication system, the optimal communication protocol is dynamically selected, solving the problems of high hardware cost and rigid protocol switching, and realizing a low-cost and efficient communication solution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU ELECTRIC POWER INFORMATION TECH
- Filing Date
- 2025-05-20
- Publication Date
- 2026-07-24
AI Technical Summary
Existing HPLC+HRF dual-mode communication systems suffer from high hardware costs, rigid protocol switching, low success rates, and high latency, making them unsuitable for complex power line environments.
A single microcontroller unit is used to implement soft programmable control. Combined with a hash function mapping structure and a high-order function scheduling system, the optimal communication protocol is selected through a dynamic configuration decision model, enabling software-driven fast protocol switching and resource optimization.
It reduces hardware costs, improves communication link reliability and success rate, reduces latency, enhances protocol loading efficiency, supports multiple topologies, and adapts to large-scale deployments.
Smart Images

Figure CN120475051B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of communication technology, and in particular relates to an HPLC+HRF dual-mode communication system and method. Background Technology
[0002] Power communication refers to the collective term for various communication technologies and networks used to transmit information in power systems. It provides essential information support for the operation, management, and maintenance of power systems. HPLC+HRF dual-mode communication is a technology that utilizes existing power line infrastructure for high-speed data transmission. It achieves information transmission by loading high-frequency signals onto power lines and is suitable for applications such as data acquisition, remote monitoring, and automated control in smart grids.
[0003] The prior art disclosed in CN115297379A provides a multi-mode broadband carrier power line communication system. This system includes a carrier circuit, a multi-mode power communication terminal, a power consumption adjustment module, an integrated circuit module, and a processor. This system integrates broadband power line carrier, low-power wireless, and Bluetooth communication functions, enabling integrated meter reading ("four meters in one") and supporting multi-channel, multi-mode data transmission via power IoT sensor network nodes. Compared to a single HPLC method, this prior art, using a multi-mode fusion approach, significantly improves the reliability and success rate of the communication link. It also possesses noise identification and modulation mode adaptation capabilities, allowing for flexible adjustment of communication strategies based on power line conditions. It can be expanded to various topologies such as star, tree, and mesh, supporting distributed relay communication and adapting to large-scale deployment. However, the multi-mode communication module integrates both HPLC and HRF wireless communication chips, resulting in higher hardware costs than traditional single-mode solutions. Furthermore, with limited memory and CPU resources, it suffers from communication latency and reduced execution efficiency, limiting its large-scale adoption. Summary of the Invention
[0004] To address the problems existing in the prior art, the technical solution of the present invention is as follows:
[0005] An HPLC+HRF dual-mode communication system includes a soft programmable control module, a preset module, a dynamic adjustment module, a protocol switching module, and a data interaction module;
[0006] The soft programmable control module is supported by a single microcontroller unit and is used to perform system initialization.
[0007] The preset module pre-sets protocol templates and modulation driving code corresponding to different communication types; the communication types include low-voltage power line high-speed carrier communication (HPLC) and wireless communication (HRF); (the protocol templates are stored in a categorized manner using a hash function mapping structure;)
[0008] The dynamic adjustment module selects and loads the optimal communication protocol based on the current power line communication environment state through a dynamic configuration decision model with the weighted sum of protocol sensitivity and information distance as the objective function, and generates a protocol driving signal based on the modulation driving code.
[0009] The protocol switching module, based on the protocol template, switches the current communication protocol to the optimal communication protocol via software.
[0010] The data interaction module sends the communication protocol to a unified modulation driver interface and performs signal modulation based on the modulation driver code.
[0011] A dual-mode HPLC+HRF communication method, based on an HPLC+HRF dual-mode communication system, includes the following steps:
[0012] Step 1) Pre-set protocol templates and modulation driving codes corresponding to different communication types; the communication types include low-voltage power line high-speed carrier communication and wireless communication, and are classified and stored using a hash function mapping structure;
[0013] Step 2) System initialization: Configure system clock, GPIO multiplexing, and DMA channels;
[0014] Step 3) Based on the current power line communication environment, solve the dynamic configuration decision model with the weighted sum of protocol sensitivity and information distance as the objective function to obtain the optimal communication protocol, and generate the protocol driving signal based on the modulation driving code;
[0015] Step 4) Invoke the preset protocol template corresponding to the optimal communication protocol, and switch protocols through a higher-order function scheduling model;
[0016] Step 5) Send the communication protocol to the modulation driver interface and perform signal modulation based on the modulation driver code.
[0017] Furthermore, the protocol template D described in step 1) ttl The expression is:
[0018]
[0019] In the formula, It is the set of media access control layer state machines for the i-th protocol; These are physical layer parameters; It is the modulation-driven template space; This is the total number of agreements; Tensor products represent the coupled combination of logic at each layer of the protocol;
[0020] Furthermore, the modulation driving code expression formula described in step 1) is as follows:
[0021]
[0022] In the formula, F iit (x,y,z) represents the composite function of the modulation drive code initialized in the preset module for high-speed carrier communication and wireless communication, calculated based on the superposition of multiple signal channels; ε i The amplitude adjustment coefficient of the i-th communication channel reflects the intensity of different modulation signals; φ represents the carrier wave of the i-th modulated signal; i It is the frequency of the i-th modulated wave; It controls the initial offset of the modulation signal phase to avoid multi-channel interference; The modulated data payload of the i-th path uses M-QAM; x i ,y i The coordinates of the constellation diagram are the input. It is the difference compensation factor for the corresponding protocol template of the i-th path.
[0023] Furthermore, the expression for the hash function mapping structure in step 1) is:
[0024]
[0025] In the formula, Ψ represents a mapping function; {CT} represents the set of communication types; H poo (x) represents the function and the communication type. The corresponding protocol template; It corresponds to the communication type. The first protocol template; It corresponds to the communication type. The second protocol template; This represents the specific communication type selected; The function k represents the input signal. The modulation process; It is the signal input to the modulation function; It is the weighting coefficient of the i-th signal; It is the i-th component of the signal; l is the parameter used for adjustment. powers of; c i It is the weighting coefficient of the i-th signal; It is the logarithmic modulation part of the i-th signal; v is the power of the logarithmic term controlled by this parameter; b k It is the modulo value of the modulated result; n k This is the number of signal elements that need to be processed in this communication protocol.
[0026] Furthermore, in step 2), the system initialization adopts a composite function model with state transition and dynamic resource scheduling. The expression of this composite function model is:
[0027]
[0028] In the formula, I MCU (t) represents the initialization progress function of the microcontroller at time t; Q c (t) is the control variable vector, including system clock settings, GPIO multiplexing configuration, and DMA channel initialization; Y Φ R(t) is the resource allocation matrix; -1 R(t) is the Jacobian matrix of the programmable logic of the microcontroller unit. -1 The coupling constraint matrix contains timing dependencies, power thresholds, and interface conflicts; Tr(·) is the matrix trace function used to quantize the initialization complexity. It is the expected integral of the time average;
[0029] Furthermore, the method for constructing the dynamic configuration decision model in step 3) with the weighted sum of protocol sensitivity and information distance as the objective function is as follows:
[0030] Suppose the microcontroller unit supports N configurable submodules, and its configuration space is:
[0031]
[0032] In the formula, U represents the complete set of all optional communication protocol configurations, u i This represents the i-th available communication protocol configuration. Indicates a length of n i The binary vector space, where i = 1, 2, ..., N is the index range;
[0033] Define the dynamic configuration decision model as follows:
[0034]
[0035] In the formula, u * (t) is the optimal communication protocol configuration dynamically selected based on the network state at time t. u represents the parameter value that minimizes the objective function. i ∈U is the candidate set of protocol configurations, and M represents the number of communication environment parameters participating in the optimization evaluation. Indicates environmental parameter O j The weight of the impact on protocol selection Indicates the current configuration u i For environmental parameter O jThe partial derivative of , |·| represents the modulus of sensitivity, and β is the penalty strength for controlling the deviation of the communication protocol distribution from the ideal state. It is a measure of protocol configuration u i The "information distance" S between the corresponding behavioral probability distribution and the ideal distribution il It is the expected distribution of the target protocol behavior. It is the actual probability distribution;
[0036] Furthermore, the specific method for solving the dynamic configuration decision model with the weighted sum of protocol sensitivity and information distance as the objective function based on the current power line communication environment state to obtain the optimal communication protocol is as follows:
[0037] Let the state vector of the communication environment be a high-dimensional time-varying tensor, expressed by the formula:
[0038]
[0039] In the formula, γ(t) represents the matrix of error information at time t. It is the perceived value of the k′-th feature at the i′-th node on the j′-th link. It is the number of nodes. Indicates the number of links. Represents the dimensions of environmental characteristics. It is a real number field with dimension The tensor space, after dimensionality reduction by principal component decomposition, forms the principal vector of the current environment state, expressed by the formula: e t =HSD[γ(t)]∈Γ d′ , where l t It represents the environment state at the current time t, HSD[·] is the higher-order singular value decomposition, and Γ is the environment state at the current time t. d′ It is a tensor space of dimension d′ in the real number field. Based on the variational Bayesian strategy, the communication protocol U is selected, and a probabilistic selection distribution is introduced, expressed by the formula: in It is conditional probability, U t e represents the strategy chosen at time t. t Let U be the environment state at time t, U′ be an index for summation, and w be the environment state at time t. U′ It is the weight vector associated with policy U′, ι(e t ) refers to the environmental state e t The feature mapping performed, exp(·) is an exponential function representation of the exponential operation;
[0040] The communication protocol loading process as a resource-constrained scheduling process is represented by a mixed-integer nonlinear programming approach, expressed as follows:
[0041] In the formula, a i∈{0,1} is a binary decision variable. It is the total number of protocol stacks, ι i It is the weight coefficient associated with the i-th protocol stack. κ is the communication quality of the i-th protocol stack at time t. i It is the load factor associated with the i-th protocol stack. This indicates the load level of the i-th protocol stack. This indicates the total memory usage. This is the memory requirement of the i-th protocol stack, Θ ram This is the maximum available memory in the system. This indicates the total CPU usage. This is the CPU requirement of the i-th protocol stack, Θ cpu It is the maximum available CPU resource in the system. It is an indicator function. Given the environmental state at time t t The conditional probability of selecting the i-th protocol stack is given, where λ is a threshold used to determine whether to select that protocol stack. The communication protocol activation sequence is arranged by priority, and instruction set preloading is performed through a warm-start mechanism.
[0042] Furthermore, the specific method for switching protocols by invoking a preset protocol template corresponding to the optimal communication protocol and using a higher-order function scheduling model is as follows:
[0043] A high-order function scheduling system based on state mapping, switching strategy, and convergence control is constructed to switch the communication protocol via software. This system operates in a continuous-time protocol state space. The composite protocol of the communication protocol state vector Φ(t) in time is defined by the following formula:
[0044]
[0045] In the formula, Φ(t) is the current communication protocol state at time t. It is the summation symbol, θ i (t) is the value of the i-th element at time t, π i The value of the i-th element belongs to the set. It is a binary vector space.
[0046] It is a set of communication protocol state vectors, which introduces a dynamic switching mapping and can be expressed by the following formula:
[0047]
[0048] In the formula, σ is a mapping operator, Φ(t) is the current communication protocol state at time t, and Φ(t)+ The communication protocol state at the next time step is obtained by mapping σ. In parameter space Choose the optimal Ψ from among them. It is a weighted matrix, Ψ is the decision variable in the optimization problem, and Φ(t) is the current communication protocol state. This represents the square of the weighted error between the current state Φ(t) and the candidate state Ψ. Let τ represent the total variation regularization term with respect to Ψ. comp (Ψ) represents the computational complexity term. It is the domain of the decision variable Ψ;
[0049] The protocol switching procedure includes:
[0050] Let the iterative process be: In the formula, It is in the The decision variables obtained in the next iteration Let σ be the current decision variable, and let σ be a mapping operator; if there exists a constant 0 < ρ < 1, satisfying:
[0051]
[0052] In the formula, Φ1 and Φ2 represent two different states, σ is a mapping operator, ||σ(Φ1)-σ(Φ2)|| represents the difference between the two mapped states, ||Φ1-Φ2|| is the standard way to calculate the difference between the two states, and ψ is the contraction factor. If it is a quantification condition, then according to Banach's fixed-point theorem, there exists a unique convergent solution: And σ(Φ) * )=Φ * In the formula, Φ* represents the target state. It refers to the following Increased state It will approach Φ * , σ(Φ) represents the number of iterations. * ) is the mapping function σ applied to the target state Φ * The result, i.e., the communication protocol switching behavior converges stably in the software space, is expressed by the following formula:
[0053] in It is a switch function. It is the characteristic function, ξ. It is an adaptive threshold. The first derivative of the communication environment state represents the rate of change. It refers to the difference in service quality between the current protocol and the best protocol.
[0054] Furthermore, the specific method for sending the communication protocol to the modulation driver interface and performing signal modulation based on the modulation driver code includes:
[0055] A dynamically coupled system based on communication protocol representation mapping, control path constraint optimization, and multidimensional protocol channel transformation function is constructed to send the loaded communication protocol to a unified modulation drive interface. The communication protocol is represented as a quadruple in the MCU control module, with the following expression formula: in It is a symbol for a set. It is the media access control layer configuration matrix for the i-th protocol. It is the physical layer modulation mapping matrix. It is the source data structure. It is a response / feedback control logic, and the unified modulation drive interface is defined as an abstract function space;
[0056] Define a communication protocol injection function, expressed as follows:
[0057] satisfy:
[0058]
[0059] In the formula, It is a symbol representing a mapping of a communication protocol. This represents an element in the protocol space. This represents an element in the output space. It is the optimal solution in the optimization problem. This indicates the modulation driver code to be optimized. It is a collection of modulation-driven code. This represents the sum of squared errors over the time domain. This represents the signal value transmitted through the physical layer at time t. This represents the desired target signal. This represents the regularization terms related to synchronization. This represents the second-order gradient with respect to the modulation-driven code. It is the regularization parameter, δ syc It is a metric function for synchronization error, representing the system's synchronization performance during communication protocol switching. This indicates that the summation is performed over all moments in the time interval t from 0 to T″. It is the actual alignment time for the i-th type of communication protocol at time t. It is the reference time at time t. The squared term of the synchronization error represents the deviation between the alignment time and the reference time of the i-th type of communication protocol at time t. The dynamically coupled execution path follows a state transition function. Expression formula:
[0060]
[0061] In the formula, A state transition function represents a transition from a pair of inputs. arrive The mapping, It is one of the input parameters. It is another input parameter. This is the output result after mapping. It is an operation function. It is another operation function. It is a function composition symbol. express The output result is equal to the result obtained by first activating a certain function. Then bind resources The resulting dynamic load balancing, avoiding interface blocking, can be expressed as:
[0062]
[0063] In the formula, This indicates the load level at time t. This indicates the number of communication protocols involved in load balancing. It is a time function of the i-th communication protocol. Indicates the degree of resource consumption, η′ is used to adjust the magnitude of the influence of the term. This represents the response of task i under given load conditions. Queue represents the squared value of the task's consumption under load conditions. i (t) is the queue length of the i-th task at time t, θ″ q″ It is a threshold used to control the queue length. It is an indicator function whose value is 1.
[0064] Compared with the prior art, the present invention has the following beneficial effects:
[0065] This invention provides an HPLC+HRF dual-mode communication system and method. The system uses a single microcontroller unit to replace the multi-chip architecture and dynamically manages hardware resources through mathematical models (resource allocation matrix, Jacobian matrix). This solves the problem of high hardware cost caused by the integration of HPLC and HRF wireless chips in traditional HPLC+HRF dual-mode communication systems, and has the advantages of lower hardware cost and higher resource utilization.
[0066] The method of this invention is based on the principal vector of environmental state and dynamically selects the optimal protocol through mixed integer nonlinear programming (MINLP) and variational Bayesian strategy. It solves the problems of rigid protocol switching and low success rate in traditional systems under complex power line environments, improves the reliability and success rate of communication links, and has the ability to identify noise and adapt modulation methods. It can flexibly adjust the communication strategy according to the power line conditions, and can be expanded to various topologies such as star, tree, and mesh. It supports distributed relay communication and is suitable for large-scale deployment.
[0067] The method of this invention implements protocol switching using a high-order function scheduling system and verifies convergence based on Banach's fixed-point theorem. It solves the problems of high latency and poor stability in traditional protocol switching, which relies on hardware implementation. The invention achieves fast protocol switching driven by software, ensuring a stable and oscillating switching process and reducing the risk of communication interruption.
[0068] The method of this invention uses a hash function mapping structure to achieve fast retrieval and classified storage of protocol templates, improves protocol loading efficiency, avoids resource waste, supports remote OTA updates of protocol templates, and reduces operation and maintenance costs.
[0069] The method of this invention optimizes data transmission through a synchronization error regularization algorithm and avoids interface blocking by combining dynamic load scheduling. This solves the problems of large synchronization errors and uneven interface load during data transmission, thereby improving the resource utilization of the modulation interface and ensuring the efficient completion of communication tasks. Attached Figure Description
[0070] Figure 1 This is a schematic diagram of an HPLC+HRF dual-mode communication system. Detailed Implementation
[0071] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.
[0072] Example 1:
[0073] The present invention provides an HPLC+HRF dual-mode communication system, such as... Figure 1 As shown, it includes a programmable control module, a preset module, a dynamic adjustment module, a protocol switching module, and a data interaction module;
[0074] The soft programmable control module, supported by a single microcontroller unit, is used to perform system initialization; system initialization includes configuring the system clock, GPIO multiplexing, and DMA channels.
[0075] The pre-built module contains protocol templates and modulation drive code corresponding to different communication types; the communication types include high-speed power line carrier communication (HPLC) and wireless communication (HRF); the protocol templates are stored in a classified manner through a hash function mapping structure;
[0076] The dynamic adjustment module selects and loads the optimal communication protocol based on the current power line communication environment by using a dynamic configuration decision model with the weighted sum of protocol sensitivity and information distance as the objective function, and generates a protocol driving signal based on the modulation driving code.
[0077] The protocol switching module, based on a protocol template, switches the current communication protocol to the optimal one via software. It uses a cyclic iterative state mapping function to converge to a stable protocol state, where the timing synchronization of the protocol switching depends on the system clock.
[0078] The data interaction module sends the communication protocol to the unified modulation driver interface through the configured DMA channel and performs signal modulation based on the modulation driver code.
[0079] Example 2:
[0080] The present invention discloses an HPLC+HRF dual-mode communication method, based on the HPLC+HRF dual-mode communication system of the present invention, the method comprising the following steps:
[0081] Step 1) Pre-set protocol templates and modulation drive codes corresponding to different communication types; communication types include low-voltage power line high-speed carrier communication (HPLC) and wireless communication (HRF) and are classified and stored using a hash function mapping structure; that is, a fast retrieval relationship between communication types and protocol templates is established through the hash function mapping structure;
[0082] Step 2) Perform system initialization via the microcontroller unit (MCU), configuring the system clock, GPIO multiplexing, and DMA channels;
[0083] Step 3) Based on the current power line communication environment, solve the dynamic configuration decision model with the weighted sum of protocol sensitivity and information distance as the objective function to obtain the optimal communication protocol, and generate the protocol driving signal based on the modulation driving code;
[0084] Step 4) Call the preset protocol template corresponding to the optimal communication protocol, and switch the protocol through the high-order function scheduling model. The triggering time and timing synchronization of the protocol switch are controlled by the system clock.
[0085] Step 5) Send the communication protocol to the modulation driver interface through the configured DMA channel, and perform signal modulation based on the modulation driver code.
[0086] In one embodiment, in step 1), protocol template Dttl The expression is:
[0087]
[0088] In the formula, It is the set of media access control layer state machines for the i-th protocol; These are physical layer parameters; It is the modulation-driven template space; This is the total number of agreements; Tensor products represent the coupled combination of logic at each layer of the protocol;
[0089] In one embodiment, the modulation drive code in step 1) pre-configures the modulation function library, which needs to be loaded into the executable memory area during the MCU startup phase. The expression formula for the modulation drive code is as follows:
[0090]
[0091] In the formula, F iit (x,y,z) represents the composite function in the preset module that initializes the modulation drive code for high-speed carrier communication and wireless communication on low-voltage power lines, calculated by superimposing multiple signal channels. From i=1 to Summation of ε; i The amplitude adjustment coefficient of the i-th communication channel reflects the intensity of different modulation signals; φ represents the carrier wave of the i-th modulated signal; i It is the frequency of the i-th modulated wave; It controls the initial offset of the modulation signal phase to avoid multi-channel interference; The modulated data payload of the i-th path uses M-QAM; x i ,y i The coordinates of the constellation diagram are the input. It is the difference compensation factor for the corresponding protocol template of the i-th path.
[0092] In one embodiment, the expression for the hash function mapping structure in step 1) is:
[0093]
[0094] In the formula, Ψ represents a mapping function; {CT} represents the set of communication types; H poo (x) represents the function and the communication type. The corresponding protocol template; It corresponds to the communication type. The first protocol template; It corresponds to the communication type. The second protocol template; This represents the specific communication type selected; The function k represents the input signal. The modulation process; It is the signal input to the modulation function; It is the weighting coefficient of the i-th signal; It is the i-th component of the signal; l is the parameter used for adjustment. powers of; c i It is the weighting coefficient of the i-th signal; It is the logarithmic modulation part of the i-th signal; v is the power of the logarithmic term controlled by this parameter; b k It is the modulo value of the modulated result; n k This is the number of signal elements that need to be processed in this communication protocol.
[0095] Furthermore, the pre-configured module is responsible for loading and initializing the required communication protocol templates and modulation drive code for HPLC communication (low-voltage power line high-speed carrier communication) and wireless communication within the control module. By quickly switching protocols according to different communication requirements, the system flexibility is improved. The pre-loading and parameter adjustment of the modulation drive code helps ensure the stability of different communication protocols in a multi-channel environment, which helps to avoid signal interference. The hash function mapping structure optimizes the efficiency of protocol loading and avoids resource waste.
[0096] In one embodiment, in step 2), system initialization employs a composite function model with state transitions and dynamic resource scheduling. The expression of this composite function model is:
[0097]
[0098] In the formula, I MCU (t) represents the initialization progress function for the microcontroller unit (MCU) at time t; Q c (t) is the control variable vector, including system clock settings, GPIO multiplexing configuration, and DMA channel initialization; Y Φ R(t) is the resource allocation matrix; -1 R(t) is the Jacobian matrix of the programmable logic of the microcontroller unit. -1 The coupling constraint matrix contains timing dependencies, power thresholds, and interface conflicts; Tr(·) is the matrix trace function used to quantize the initialization complexity. It is the expected integral of the time average;
[0099] In one embodiment, the method for constructing the dynamic configuration decision model in step 3) with the weighted sum of protocol sensitivity and information distance as the objective function is as follows:
[0100] Suppose the microcontroller unit supports N configurable submodules, and its configuration space is:
[0101]
[0102] In the formula, U represents the complete set of all optional communication protocol configurations, u i This represents the i-th available communication protocol configuration. Indicates a length of n i The binary vector space, where i = 1, 2, ..., N is the index range;
[0103] Define the dynamic configuration decision model as follows:
[0104]
[0105] In the formula, u * (t) is the optimal communication protocol configuration dynamically selected based on the network state at time t. u represents the parameter value that minimizes the objective function. i ∈U is the candidate set of protocol configurations, and M represents the number of communication environment parameters participating in the optimization evaluation. Indicates environmental parameter O j The weight of the impact on protocol selection Indicates the current configuration u i For environmental parameter O j The partial derivative of , |·| represents the modulus of sensitivity, and β is the penalty strength for controlling the deviation of the communication protocol distribution from the ideal state. It is a measure of protocol configuration u i The "information distance" S between the corresponding behavioral probability distribution and the ideal distribution il It is the expected distribution of the target protocol behavior. It is the actual probability distribution;
[0106] In one embodiment, the specific method for obtaining the optimal communication protocol by solving a dynamic configuration decision model with a weighted sum of protocol sensitivity and information distance as the objective function, based on the current power line communication environment status, is as follows:
[0107] Let the state vector of the communication environment be a high-dimensional time-varying tensor, expressed by the formula:
[0108]
[0109] In the formula, γ(t) represents the matrix of error information at time t. It is the perceived value of the k′-th feature at the i′-th node on the j′-th link. It is the number of nodes. Indicates the number of links. Represents the dimensions of environmental characteristics. It is a real number field with dimension The tensor space, after dimensionality reduction by principal component decomposition, forms the principal vector of the current environment state, expressed by the formula: l t =HSD[γ(t)]∈Γ d′ , where l t It represents the environment state at the current time t, HSD[·] is the higher-order singular value decomposition, and Γ is the environment state at the current time t. d′ Let U be a tensor space of dimension d′ in the real number field. Based on the variational Bayesian strategy for selecting the communication protocol U, a probabilistic selection distribution is introduced, expressed by the formula: in It is conditional probability, U t The strategy chosen at time t, l t Let U be the environment state at time t, U′ be an index for summation, and w be the environment state at time t. U′ It is the weight vector associated with policy U′, ι(l t ) refers to the environmental state. t The feature mapping performed, exp(·) is an exponential function representation of the exponential operation;
[0110] The communication protocol loading process as a resource-constrained scheduling process is represented using mixed-integer nonlinear programming, expressed as:
[0111] In the formula, a i ∈{0,1} is a binary decision variable. It is the total number of protocol stacks, ι i It is the weight coefficient associated with the i-th protocol stack. κ is the communication quality of the i-th protocol stack at time t. i It is the load factor associated with the i-th protocol stack. This indicates the load level of the i-th protocol stack. This indicates the total memory usage. This is the memory requirement of the i-th protocol stack, Θ ram This is the maximum available memory in the system. This indicates the total CPU usage. This is the CPU requirement of the i-th protocol stack, Θ cpu It is the maximum available CPU resource in the system. It is an indicator function. Given the environmental state at time t t The conditional probability of selecting the i-th protocol stack is given, where λ is a threshold used to determine whether to select that protocol stack. The communication protocol activation sequence is arranged by priority, and instruction set preloading is performed through a warm-start mechanism.
[0112] Furthermore, the dynamic adjustment module flexibly switches communication protocols based on real-time environmental conditions, ensuring optimal communication quality under different network environments. By utilizing variational Bayesian strategies and priority sorting, it facilitates stable communication even under high loads, reducing network interruptions and latency. It also automatically adjusts protocols under different network conditions to adapt to environmental changes.
[0113] In one embodiment, the specific method for switching protocols using a higher-order function scheduling model by invoking a pre-set protocol template corresponding to the optimal communication protocol is as follows:
[0114] By constructing a high-order function scheduling system based on state mapping, switching strategy, and convergence control, communication protocols can be switched via software. The high-order function scheduling system operates in a continuous-time protocol state space. The composite protocol of the communication protocol state vector Φ(t) in time is defined by the following formula:
[0115]
[0116] In the formula, Φ(t) is the current communication protocol state at time t. It is the summation symbol, θ i (t) is the value of the i-th element at time t, π i The value of the i-th element belongs to the set. It is a binary vector space.
[0117] It is a set of communication protocol state vectors, which introduces a dynamic switching mapping and can be expressed by the following formula:
[0118]
[0119] In the formula, σ is a mapping operator, Φ(t) is the current communication protocol state at time t, and Φ(t) + The communication protocol state at the next time step is obtained by mapping σ. In parameter space Choose the optimal Ψ from among them. It is a weighted matrix, Ψ is the decision variable in the optimization problem, and Φ(t) is the current communication protocol state. This represents the square of the weighted error between the current state Φ(t) and the candidate state Ψ. Let τ represent the total variation regularization term with respect to Ψ. comp (Ψ) represents the computational complexity term. It is the domain of the decision variable Ψ;
[0120] The protocol switching procedure includes:
[0121] Let the iterative process be: In the formula, It is in the The decision variables obtained in the next iteration Let σ be the current decision variable, and let σ be a mapping operator; if there exists a constant 0 < ρ < 1, satisfying:
[0122]
[0123] In the formula, Φ1 and Φ2 represent two different states, σ is a mapping operator, ||σ(Φ1)-σ(Φ2)|| represents the difference between the two mapped states, ||Φ1-Φ2|| is the standard way to calculate the difference between the two states, and ψ is the contraction factor. If it is a quantification condition, then according to Banach's fixed-point theorem, there exists a unique convergent solution: And σ(Φ) * )=Φ * In the formula, Φ* represents the target state. It refers to the following The increase in state It will approach Φ * , σ(Φ) represents the number of iterations. * ) is the mapping function σ applied to the target state Φ * The result, namely the stable convergence of the communication protocol switching behavior in the software space, is expressed by the following formula:
[0124] in It is a switch function. It is the characteristic function, ξ. It is an adaptive threshold. The first derivative of the communication environment state represents the rate of change. It refers to the difference in service quality between the current protocol and the best protocol.
[0125] Furthermore, by dynamically selecting the optimal communication protocol through software, the device can always operate in the best communication state. By utilizing state mapping and switching strategies, network resource usage can be intelligently optimized, which helps to reduce the burden and latency caused by protocol switching. Through iterative and convergence processes, protocol switching can stabilize and tend to the optimal state after each operation, which helps to avoid system instability and fluctuations.
[0126] In one embodiment, the specific method for sending the communication protocol to the modulation driver interface and performing signal modulation based on the modulation driver code includes:
[0127] A dynamically coupled system based on communication protocol representation mapping, control path constraint optimization, and multidimensional protocol channel transformation functions is constructed to send the loaded communication protocol to a unified modulation drive interface. The communication protocol is represented as a quadruple in the MCU control module, expressed as: in It is a symbol for a set. It is the media access control layer configuration matrix for the i-th protocol. It is the physical layer modulation mapping matrix. It is the source data structure. It is a response / feedback control logic, and the unified modulation drive interface is defined as an abstract function space;
[0128] Define a communication protocol injection function, expressed as follows:
[0129] satisfy:
[0130]
[0131] In the formula, It is a symbol representing a mapping of a communication protocol. This represents an element in the protocol space. This represents an element in the output space. It is the optimal solution in the optimization problem. This indicates the modulation driver code to be optimized. It is a collection of modulation driving code. This represents the sum of squared errors over the time domain. This represents the signal value transmitted through the physical layer at time t. This represents the desired target signal. This represents the regularization terms related to synchronization. This represents the second-order gradient with respect to the modulation-driven code. It is the regularization parameter, δ syc It is a metric function for synchronization error, representing the system's synchronization performance during communication protocol switching. This indicates that the summation is performed over all moments in the time interval t from 0 to T″. It is the actual alignment time for the i-th type of communication protocol at time t. It is the reference time at time t. The squared term of the synchronization error represents the deviation between the alignment time and the reference time of the i-th type of communication protocol at time t. The dynamically coupled execution path follows a state transition function. Expression formula:
[0132]
[0133] In the formula, A state transition function represents a transition from a pair of inputs. arrive The mapping, It is one of the input parameters. It is another input parameter. This is the output result after mapping. It is an operation function. It is another operation function. It is a function composition symbol. express The output result is equal to the result obtained by first activating a certain function. Then bind resources The resulting dynamic load balancing, avoiding interface blocking, can be expressed as:
[0134]
[0135] In the formula, This indicates the load level at time t. This indicates the number of communication protocols involved in load balancing. It is a time function of the i-th communication protocol. Indicates the degree of resource consumption, η′ is used to adjust the magnitude of the influence of the term. This represents the response of task i under given load conditions. Queue represents the squared value of the task's consumption under load conditions. i (t) is the queue length of the i-th task at time t, θ″ q″ It is a threshold used to control the queue length. It is an indicator function whose value is 1.
[0136] Furthermore, the data interaction module optimizes protocol mapping and modulation processes to facilitate efficient switching and data transmission in multi-protocol environments. Through synchronization error regularization and modulation optimization, it reduces errors and delays during data transmission, improving communication quality. Dynamic load calculation and resource allocation prevent modulation interface blocking, optimize resource utilization, and facilitate the efficient completion of communication tasks.
[0137] This invention utilizes a soft-programmable scheme, replacing multiple communication chips with a single MCU, simplifying the hardware structure and saving BOM costs. The communication protocol template can be updated remotely via OTA, reducing maintenance costs. Through dynamic configuration and optimized scheduling, it improves the stability and efficiency of the system in complex environments, reduces communication latency, and increases data transmission rates. By using a hash function mapping structure, it optimizes the execution efficiency of protocol loading, improving the system's response speed and thus increasing work execution efficiency. It automatically adjusts the protocol under different network conditions to adapt to environmental changes. With limited memory and CPU resources, it intelligently schedules protocol stack loading, enhancing system performance and execution efficiency.
[0138] The system and method of this invention utilize modern multi-core processors and distributed computing architectures to parallelize or distribute the tasks of software modules across multiple computing nodes, significantly improving execution efficiency. If a software module can fully leverage the parallelism of multi-core processors, allocating tasks to different cores for simultaneous execution through parallel programming techniques, the execution efficiency may improve almost linearly for fully parallelizable tasks—that is, using n cores results in an efficiency increase of nearly n times. However, in reality, due to potential dependencies and communication overhead between tasks, the efficiency improvement is usually less linear, potentially reaching 3-5 times or even higher, depending on the degree of parallelism and system architecture. Highly efficient software modules can handle more tasks under the same hardware conditions, or use lower-performance, cheaper hardware while meeting the same performance requirements. For example, in data centers, improved software module execution efficiency can reduce the number of servers, thereby lowering hardware procurement costs, data center space costs, and power consumption costs. Highly efficient software modules also have lower maintenance costs due to their stable operation and lower probability of failure. Meanwhile, software upgrades and optimizations are relatively easier because efficient code structures are easier to understand and modify. This helps reduce the workload of technical support and maintenance personnel, lowering long-term maintenance costs. Improved software module execution efficiency allows developers to debug, test, and optimize faster during development, reducing the time spent on repeated modifications and adjustments due to performance issues. For example, in software development, faster compilation and execution speeds allow developers to verify new features and algorithms more quickly, thereby accelerating the overall product development process and enabling technological achievements to be brought to market faster.
[0139] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A dual-mode communication method using HPLC+HRF, characterized in that, Includes the following steps: Step 1) Pre-set protocol templates and modulation driving codes corresponding to different communication types; the communication types include low-voltage power line high-speed carrier communication and wireless communication, and are classified and stored using a hash function mapping structure; Step 2) System initialization: Configure system clock, GPIO multiplexing, and DMA channels; Step 3) Based on the current power line communication environment, solve the dynamic configuration decision model with the weighted sum of protocol sensitivity and information distance as the objective function to obtain the optimal communication protocol, and generate the protocol driving signal based on the modulation driving code; Step 4) Invoke the preset protocol template corresponding to the optimal communication protocol, and perform protocol switching through a higher-order function scheduling model; Step 5) Send the communication protocol to the modulation driver interface and perform signal modulation based on the modulation driver code; The specific method for switching protocols by invoking a pre-set protocol template corresponding to the optimal communication protocol and using a higher-order function scheduling model is as follows: A high-order function scheduling system based on state mapping, switching strategy, and convergence control is constructed to switch the communication protocol via software. This high-order function scheduling system operates in a continuous-time protocol state space and defines the communication protocol state vector. In the composite protocol of time, the expression formula is: ; In the formula, It is a moment The current communication protocol status, It is the summation symbol. At any moment Corresponding to the The value of each element, It is the first The values of each element belong to the set. , It is a binary vector space. It is a set of communication protocol state vectors, which introduces a dynamic switching mapping and can be expressed by the following formula: , In the formula, It is a mapping operator. It is a moment The current communication protocol status, Through mapping The communication protocol state obtained at the next moment, In parameter space Choose the optimal one , It is a weighted matrix. These are decision variables in optimization problems. This is the current communication protocol status. Indicates the current state With candidate state The square of the weighted error between them, Indicates to The total variation regularization term, Represents the computational complexity term. Decision variables Domain; The protocol switching procedure includes: Let the iterative process be: In the formula, It is in the The decision variables obtained in the next iteration These are the current decision variables. It is a mapping operator; if a constant exists ,satisfy: ; In the formula, This represents two different states. It is a mapping operator. This represents the difference between two mapped states. This is the standard way to calculate the difference between these two states. It is a contractile factor. If it is a quantification condition, then according to Banach's fixed-point theorem, there exists a unique convergent solution: In the formula, It is the target state. It refers to the following The increase in state It will approach , Represents the number of iterations. It is a mapping function Apply to target state The result, i.e., the communication protocol switching behavior converges stably in the software space, is expressed by the following formula: ; in It is a switch function. It is a characteristic function. , It is an adaptive threshold. The first derivative of the communication environment state represents the rate of change. It refers to the difference in service quality between the current protocol and the best protocol.
2. The HPLC+HRF dual-mode communication method according to claim 1, characterized in that, The protocol template mentioned in step 1) The expression is: ; In the formula, It is the first The protocol's media access control layer state machine set; These are physical layer parameters; It is the modulation-driven template space; This is the total number of agreements; It is a coupled combination of the logic of each layer of the tensor product representation protocol.
3. The HPLC+HRF dual-mode communication method according to claim 2, characterized in that, The modulation drive code expression formula described in step 1) is as follows: ; In the formula, The composite function representing the initialization of modulation drive code for low-voltage power line high-speed carrier communication and wireless communication in the preset module is calculated by superimposing multiple signal channels; It is the first The amplitude adjustment coefficient of the communication channel reflects the intensity of different modulated signals; It means the first The carrier wave of the modulated signal; It is the first The frequency of the modulated wave; It controls the initial offset of the modulation signal phase to avoid multi-channel interference; It is the first The modulation data payload of the path adopts the M-QAM method; The coordinates of the constellation diagram are the input. It is the first Difference compensation factor for the corresponding protocol template.
4. The HPLC+HRF dual-mode communication method according to claim 3, characterized in that, The expression for the hash function mapping structure in step 1) is: ; ; In the formula, Represent a mapping function; A collection representing communication types; This function represents the communication type. The corresponding protocol template; It corresponds to the communication type. The first protocol template; It corresponds to the communication type. The second protocol template; This represents the specific communication type selected; It is this function Indicates the input signal The modulation process; It is the signal input to the modulation function; It is the first The weighting coefficients of each signal; It is the first of the signals One component; This parameter is used for adjustment. powers of; It is the first The weighting coefficients of each signal; It is the first The logarithmic modulation part of the signal; This parameter controls the exponentiation of the logarithmic term; It is the modulo value of the modulated result; This is the number of signal elements that need to be processed in this communication protocol.
5. The HPLC+HRF dual-mode communication method according to claim 1, characterized in that, In step 2), system initialization is performed using a composite function model with state transitions and dynamic resource scheduling. The expression of this composite function model is: ; In the formula, This represents the initialization progress function for the microcontroller at time t. The control variable vector includes system clock settings, GPIO multiplexing configuration, and DMA channel initialization; It is a resource allocation matrix; It is the Jacobian matrix of the programmable logic of the microcontroller unit; The coupling constraint matrix includes timing dependencies, power thresholds, and interface conflicts; The matrix trace function is used to quantize the initialization complexity; It is the time-averaged expected integral.
6. The HPLC+HRF dual-mode communication method according to claim 1, characterized in that, The method for constructing the dynamic configuration decision model in step 3), which uses the weighted sum of protocol sensitivity and information distance as the objective function, is as follows: Assume the microcontroller unit supports A configurable submodule, whose configuration space is as follows: ; In the formula, This represents the complete set of all optional communication protocol configurations. Indicates the first One available communication protocol configuration, Indicates length is binary vector space, It is an index range; Define the dynamic configuration decision model as follows: ; In the formula, It is in time The optimal communication protocol configuration is dynamically selected based on network conditions in real time. This represents the parameter values that minimize the objective function. It is a candidate set of protocol configurations. This indicates the number of communication environment parameters involved in the optimization evaluation. Indicates environmental parameters The weight of the impact on protocol selection Indicates the current configuration For environmental parameters The partial derivatives, This indicates taking the modulus of sensitivity. It is the penalty intensity for controlling the distribution of communication protocols to deviate from the ideal state. It is a measure of protocol configuration The information distance between the corresponding behavioral probability distribution and the ideal distribution. It is the expected distribution of the target protocol behavior. It is the actual probability distribution.
7. The HPLC+HRF dual-mode communication method according to claim 1, characterized in that, The specific method for solving the dynamic configuration decision model with the weighted sum of protocol sensitivity and information distance as the objective function based on the current power line communication environment to obtain the optimal communication protocol is as follows: Let the state vector of the communication environment be a high-dimensional time-varying tensor, expressed by the formula: ; In the formula, Indicates at time The matrix of error information, It is the first Class features in the first The node is the first Perceived values on the link, It is the number of nodes. Indicates the number of links. Represents the dimensions of environmental characteristics. It is a real number field with dimension The tensor space, after dimensionality reduction by principal component decomposition, forms the principal vector of the current environment state, expressed by the formula: ,in It is the current moment. The environmental conditions, It is a higher-order singular value decomposition. It is a real number field with dimension The tensor space is used to select the communication protocol based on a variational Bayesian strategy. Introducing the probability selection distribution, the formula is: ,in It is conditional probability. Indicates at time The chosen strategy It is a moment The environmental conditions, It is an index for summation. Is with strategy The relevant weight vector, It is the state of the environment The feature mapping performed An exponential function represents an operation on an exponential pair; The communication protocol loading process as a resource-constrained scheduling process is represented by a mixed-integer nonlinear programming approach, expressed as follows: ; ; In the formula, It is a binary decision variable. It is the total number of protocol stacks. Is with the first Weight coefficients related to each protocol stack It is the first Each protocol stack at time Communication quality, Is with the first Load factor related to each protocol stack Indicates the first The load level of each protocol stack This indicates the total memory usage. It is the first Memory requirements for each protocol stack This is the maximum available memory in the system. This indicates the total CPU usage. It is the first CPU requirements for each protocol stack It is the maximum available CPU resource in the system. It is an indicator function. At any moment Given environment state Next choice The conditional probability of each protocol stack The threshold is used to determine whether to select the protocol stack. The communication protocol activation sequence is arranged by priority, and the instruction set is preloaded through a hot start mechanism.
8. The HPLC+HRF dual-mode communication method according to claim 1, characterized in that, The specific method for sending the communication protocol to the modulation driver interface and performing signal modulation based on the modulation driver code includes: A dynamically coupled system based on communication protocol representation mapping, control path constraint optimization, and multidimensional protocol channel transformation function is constructed to send the loaded communication protocol to a unified modulation drive interface. The communication protocol is represented as a quadruple in the MCU control module, with the following expression formula: ,in It is a symbol for a set. It is the first Media access control layer configuration matrix for each protocol. It is the physical layer modulation mapping matrix. It is the source data structure. It is a response / feedback control logic, and the unified modulation drive interface is defined as an abstract function space; Define a communication protocol injection function, expressed as follows: ; In the formula, It is a symbol representing a mapping of a communication protocol. This represents an element in the protocol space. This represents an element in the output space. It is the optimal solution in the optimization problem. This indicates the modulation driver code to be optimized. It is a collection of modulation-driven code. This represents the sum of squared errors over the time domain. Indicates time The signal values transmitted through the physical layer at all times. This represents the desired target signal. This represents the regularization terms related to synchronization. This represents the second-order gradient with respect to the modulation-driven code. It is a regularization parameter. It is a metric function for synchronization error, representing the system's synchronization performance during communication protocol switching. Indicates time interval from arrive Accumulate all moments. It is in time At any time for the first The actual alignment time of the communication protocol. It is in time Reference time for the moment. The squared term of the synchronization error is represented at time t. No. The deviation between the alignment time and the reference time in the communication protocol, and the dynamic coupling execution path following the state transition function. Formula: ; In the formula, A state transition function represents a transition from a pair of inputs. arrive The mapping, It is one of the input parameters. It is another input parameter. This is the output result after mapping. It is an operation function. It is another operation function. It is a function composition symbol. express The output result is equal to the result obtained by first activating a certain function. Then bind resources The resulting dynamic load balancing, avoiding interface blocking, can be expressed as: ; In the formula, Indicates at time The load level, This indicates the number of communication protocols involved in load balancing. Is with the first The time function of a communication protocol Indicates the degree of resource consumption. Used to adjust the magnitude of the influence of the term. This represents the task under given load conditions. The response This represents the squared value of the resource consumption of the task under load conditions. It is the first The task at time queue length, It is a threshold used to control the queue length. It is an indicator function whose value is 1.
9. An HPLC+HRF dual-mode communication system for executing the method according to any one of claims 1 to 8, characterized in that, It includes a programmable control module, a preset module, a dynamic adjustment module, a protocol switching module, and a data interaction module; The soft programmable control module is supported by a single microcontroller unit and is used to perform system initialization. The preset module pre-sets protocol templates and modulation drive codes corresponding to different communication types; the communication types include low-voltage power line high-speed carrier communication and wireless communication. The dynamic adjustment module selects and loads the optimal communication protocol based on the current power line communication environment state through a dynamic configuration decision model with the weighted sum of protocol sensitivity and information distance as the objective function, and generates a protocol driving signal based on the modulation driving code. The protocol switching module, based on the protocol template, switches the current communication protocol to the optimal communication protocol via software. The data interaction module sends the communication protocol to a unified modulation driver interface and performs signal modulation based on the modulation driver code.
Citation Information
Patent Citations
CN115297379A
CN114885040A
CN117439687A