A dual-communication heat pump remote control method and system
By establishing long-term 4G and Wi-Fi connections in heat pump equipment, real-time monitoring of link quality, dynamic selection of the quality of the primary transmission link, and intelligent seamless switching when the link quality deteriorates, key data is transmitted collaboratively, and hierarchical power consumption management is performed during the quiet period. This solves the problems of unstable link quality and high energy consumption in the remote control of heat pump equipment, and achieves higher equipment stability and energy efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG NEW ENERGY TECH DEV
- Filing Date
- 2026-04-13
- Publication Date
- 2026-07-14
AI Technical Summary
In existing remote control systems for heat pump equipment, the online stability of a single communication method is easily affected by network fluctuations, and the dual-link switching scheme lacks continuous perception and unified scheduling, resulting in control request interruption, session state loss, and high energy consumption.
Establish and maintain long-term 4G and Wi-Fi connections between the heat pump controller and the cloud server, monitor link quality in real time, dynamically select the primary transmission link and perform intelligent seamless switching when the link quality deteriorates, coordinate the transmission of critical data, and perform hierarchical power consumption management during the quiet period.
It enables continuous sensing and dynamic adjustment of link quality in remote control of heat pump equipment, reduces the impact of switching on services, improves system reliability and energy efficiency, solves technical problems that traditional solutions could not solve, and improves equipment stability and energy efficiency.
Smart Images

Figure CN122395680A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of Internet of Things (IoT) control, and particularly relates to a remote control method and system for a dual-communication heat pump. Background Technology
[0002] Heat pump equipment is increasingly using remote networking for parameter setting, status monitoring, fault alarms, and operation and maintenance coordination in residential heating, commercial hot water, industrial drying, and building energy systems. The equipment typically establishes a communication link with the cloud via a 4G cellular network or Wi-Fi network, from which the cloud sends control commands to the equipment and receives operational data. In current engineering practice, while a single communication method is simple to implement, its online stability is entirely dependent on a single network link. If there are fluctuations in the on-site network, router malfunctions, carrier signal attenuation, or increased local interference, problems such as increased control command latency, discontinuous status feedback, or even equipment offline can easily occur.
[0003] To address this deficiency, some systems have introduced dual 4G and Wi-Fi communication configurations. However, many solutions still rely on a static primary / backup mode, typically activating the backup link only after the primary link is determined to be physically disconnected. This lack of continuous awareness of link degradation makes it difficult to promptly identify weak connection states—such as high latency, high packet loss, and increased heartbeat jitter—that indicate the link is not broken but is no longer suitable for carrying control services. Consequently, while the device appears online, the actual control experience has significantly degraded. Other solutions, while achieving simultaneous online dual links or dual heartbeat keep-alive, lack a unified scheduling mechanism for link status acquisition, quality assessment, primary link selection, handover preparation, actual handover, critical data transmission, and power consumption control during quiet periods. Link roles often rely on coarse, instantaneous state switching, which is prone to frequent repetitions during fluctuating wireless environments and makes it difficult to complete service context preparation before handover. Therefore, in scenarios with high real-time and continuity requirements, such as heat pump mode switching, temperature setting, start / stop control, fault reset, and defrosting control, issues such as control request interruption, session state loss, duplicate execution, response misalignment, and short-term uncontrollability may still occur. At the same time, long-term parallel online operation of dual links can also lead to increased power consumption, communication traffic, and cloud connection maintenance costs. If both links are always operating in an equally active manner, the economics of long-term deployment will be reduced. However, if the collaborative link is kept in an overly passive state for a long time in order to save energy, it may not be able to take over in time when the quality of the primary link deteriorates. Summary of the Invention
[0004] This invention discloses a dual-communication heat pump remote control method and system to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, a first aspect of the present invention provides a remote control method for a dual-communication heat pump, the method comprising: A 4G long-term connection based on a 4G communication module and a Wi-Fi long-term connection based on a Wi-Fi communication module are established and maintained between the heat pump controller and the remote cloud server, respectively. Real-time monitoring and evaluation of the multi-dimensional link quality parameters of the 4G long connection and the Wi-Fi long connection, generating corresponding link quality evaluation results; Based on the quality evaluation results of the 4G long connection and the Wi-Fi long connection, the link with better quality is dynamically selected as the primary transmission link, while the other link remains as a cooperative link; When the quality of the current primary transmission link is detected to be degraded and the switching conditions are met, intelligent seamless switching and cooperative transmission are performed. Before the switching, the session state is pre-synchronized through the cooperative link, and during the switching process, key control data is transmitted through dual links in a cooperative manner. When the heat pump controller is in a quiet period, hierarchical power consumption management is performed on the collaborative links based on the stability of the primary link and the takeover value of the collaborative links.
[0006] Furthermore, establishing and maintaining a 4G long-lived connection based on a 4G communication module and a Wi-Fi long-lived connection based on a Wi-Fi communication module between the heat pump controller and the remote cloud server specifically includes: After the heat pump controller is powered on, it loads the 4G communication module driver and the Wi-Fi communication module driver respectively, and calls the TCP / IP protocol stack to initiate TCP connection requests to the remote cloud server respectively; For each connection, record the connection handle, the most recent send time, and the most recent receive time; Set up an independent heartbeat timer to maintain connection activity by periodically sending lightweight heartbeat messages. The heartbeat period is dynamically adjusted according to the business activity status and confirmation time jitter.
[0007] Furthermore, the real-time monitoring and evaluation of the multi-dimensional link quality parameters of the 4G long-lived connection and the Wi-Fi long-lived connection, and the generation of corresponding link quality evaluation results, specifically include: Based on heartbeat interaction data and physical layer measurements of the communication module, signal strength, round-trip time, packet loss rate, and heartbeat success rate are collected. Linear normalization is performed on the collected signal strength, round-trip time, packet loss rate, and heartbeat success rate to map data with different physical meanings to a unified scale; The normalized signal strength, latency index, packet loss rate inverse value, and heartbeat success rate are weighted and calculated to obtain the overall link quality assessment value.
[0008] Furthermore, the step of dynamically selecting the link with better quality as the primary transmission link based on the quality evaluation results of the 4G long-lived connection and the Wi-Fi long-lived connection specifically includes: Based on the current business activity status, the link role in the previous cycle, and the link quality fluctuation, a primary priority value is constructed. Links that are in the control active phase and have already undertaken the primary transmission task are given a maintenance gain, while links with excessively rapid quality fluctuations are penalized. When the difference between the primary priority values of two links is greater than the preset role update threshold, the link with the higher primary priority value is marked as a candidate primary link. When the same candidate primary link is maintained for a preset number of evaluation periods, it is officially updated as the current primary transmission link, and the other link is updated as a cooperative link.
[0009] Furthermore, the step of performing intelligent seamless handover and coordinated transmission when the link quality of the current primary transmission link is detected to be deteriorated and the handover conditions are met specifically includes: Calculate the current quality degradation of the primary link and the quality advantage of the cooperative link relative to the primary link, and generate a switching drive value; When the switching drive value reaches the pre-synchronization threshold, a pre-synchronization request is sent to the remote cloud server through the collaborative link to copy the session state of the current primary link to the collaborative link. When the switching driver value reaches the formal switching threshold, the service transmission path will be switched from the original primary link to the collaborative link, and the link role label will be updated.
[0010] Furthermore, the dual-link coordinated transmission of key control data during the switching process specifically includes: Between the pre-synchronization phase and the formal switching phase, identify start / stop commands, mode switching commands, target temperature write commands, or fault clearing commands; When critical control data is identified, a message with a critical service tag is generated and simultaneously pushed into the sending queues of the primary transmission link and the cooperative link for concurrent transmission. After receiving the message, the remote cloud server performs deduplication based on the instruction sequence number and executes only the first valid instruction that arrives.
[0011] Furthermore, the step of performing hierarchical power consumption management on the collaborative link when the heat pump controller is in a business quiescent period specifically includes: Monitor the command queue, status reporting queue, and alarm queue in the business scheduling thread. When the queue is empty within the preset silent observation period, it is determined that the business has entered the silent period. Calculate the cooperative link maintenance index, which is generated based on the risk level of the primary link and the takeover capability of the cooperative link itself; Based on the comparison between the cooperative link maintenance index and the preset hierarchical threshold, the cooperative link is controlled to enter a low-power listening state, an intermittent wake-up state, or a deep sleep state.
[0012] Furthermore, the step of controlling the cooperative link to enter a low-power monitoring state, an intermittent wake-up state, or a deep sleep state based on the comparison result between the cooperative link maintenance index and a preset hierarchical threshold specifically includes: When the cooperative link maintenance exponent is greater than or equal to the first threshold, the cooperative link is controlled to enter a low-power listening state, the high-frequency scanning task is turned off, only the registration hold and the base clock are retained, and the heartbeat cycle is extended. When the cooperative link maintenance index is less than the first threshold and greater than or equal to the second threshold, the cooperative link is controlled to enter the intermittent wake-up state and configured as a duty cycle mode of short-term wake-up plus long-term sleep. When the cooperative link maintenance index is less than the second threshold, the cooperative link is controlled to enter a deep sleep state, the data transmission task is turned off, and only the minimum listening capability is retained.
[0013] Furthermore, the method also includes the step of exiting hierarchical power management: When a new control service is issued from the cloud, or when the quality of the current primary link degrades to the point of triggering the pre-synchronization condition, the silent period power consumption control process is immediately exited. Based on the current power consumption level of the collaborative link, execute the corresponding wake-up process, restore the RF transceiver unit and normal heartbeat cycle, and reinstate it to the regular quality assessment cycle.
[0014] A second aspect of the present invention provides a dual-communication heat pump remote control system, the system comprising: A dual-mode communication module is used to establish and maintain a 4G long connection based on the 4G communication module and a Wi-Fi long connection based on the Wi-Fi communication module, respectively. The link monitoring module is used to monitor and evaluate the multi-dimensional link quality parameters of the 4G long connection and the Wi-Fi long connection in real time, and generate corresponding link quality evaluation results. The role allocation module is used to dynamically select the link with better quality as the primary transmission link based on the quality evaluation results of the 4G long connection and the Wi-Fi long connection, and keep the other link as the cooperative link. The switching control module is used to perform intelligent seamless switching and cooperative transmission when the link quality of the current primary transmission link is detected to be degraded and the switching conditions are met. Before switching, the session state is pre-synchronized through the cooperative link, and during the switching process, key control data is transmitted through dual links in a cooperative manner. The power management module is used to perform hierarchical power management on the collaborative links based on the stability of the primary link and the takeover value of the collaborative links when the heat pump controller is in the business quiescent period.
[0015] The beneficial technical effects of the present invention are at least as follows: To address the aforementioned issues, this invention provides a dual-communication heat pump remote control method and system. First, it establishes and maintains long-term connections between a 4G link and a Wi-Fi link simultaneously, providing a stable foundation for subsequent link quality awareness through continuous heartbeats and status recording. Then, it generates directly comparable link quality results based on status information such as signal strength, latency, packet loss, and heartbeat confirmation during link operation. Based on this, and considering service activity status, the link role in the previous cycle, and link quality fluctuations, it dynamically assigns roles to the two links, ensuring that the link with better quality and suitability for current service continuity undertakes the primary transmission task, while the other link remains a cooperative link. When the primary link experiences continuous degradation, this invention does not wait until the link completely fails before switching, but rather… Based on the degradation trend of the primary link and the carrying advantages of the cooperative link, pre-synchronization is initiated first, enabling the cooperative link to take over the current control session in advance. Then, after the formal conditions are met, the service transmission path is switched, thus transforming the traditional "remedial switching after failure" into a "smooth transition during degradation." During the switching transition phase, this invention further sets up a cooperative transmission mechanism for critical control services and high-volume services, enabling important control data to have higher arrival reliability while reducing the impact of switching on service continuity. After the equipment enters the service quiet period, this invention performs hierarchical power consumption management on the cooperative link based on the stability of the current primary link and the takeover value of the cooperative link, reducing long-term operating energy consumption while ensuring rapid recovery of takeover capability. Overall, this invention does not make partial modifications to a single communication link, but rather organizes dual long-term connection maintenance, link quality assessment, dynamic selection of link roles, predictive handover preparation, formal handover, collaborative transmission of critical services, and energy consumption management during quiet periods into a closed-loop engineering solution suitable for heat pump remote control scenarios. This solution addresses the problems of weak connection identification, delayed primary / backup handover, poor continuity of the handover process, insufficient reliability of critical services, and high long-term operating costs of dual links in existing technologies. Attached Figure Description
[0016] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.
[0017] Figure 1 This is a flowchart of a dual-communication heat pump remote control method according to the present invention.
[0018] Figure 2 This is a framework diagram of a dual-communication heat pump remote control system according to the present invention. Detailed Implementation
[0019] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0020] In one or more embodiments, such as Figure 1 As shown, a remote control method for a dual-communication heat pump is disclosed, the method comprising the following: S1: Establish and maintain a 4G long-term connection based on the 4G communication module and a Wi-Fi long-term connection based on the Wi-Fi communication module between the heat pump controller and the remote cloud server.
[0021] Specifically, step one establishes both a 4G long-lived connection and a Wi-Fi long-lived connection between the heat pump controller and the remote cloud server, and maintains these two connections in an active state, thus providing a stable communication foundation for subsequent link status acquisition, quality assessment, and link switching. In practice, after the heat pump controller is powered on, the processor starts the communication management program, loading the 4G communication module driver and the Wi-Fi communication module driver respectively. For the 4G side, the processor sends a network status query command to the module via the serial port, sequentially obtaining the SIM card status, cellular network registration status, and packet data service access status. After confirming that the module has obtained data communication capabilities, it calls the TCP / IP protocol stack in the controller's operating system to initiate a TCP connection request to the remote cloud server. For the Wi-Fi side, the processor reads the locally stored SSID, authentication password, and routing access parameters through the module driver. After completing wireless routing access and obtaining the local area network IP address, it calls the same TCP / IP protocol stack to initiate another TCP connection request to the remote cloud server. The two connections use the same server address and service port, but the underlying bearer networks are a cellular network and a wireless LAN, respectively, thus physically forming two independent long-lived connection channels. In the implementation of the project, the remote cloud server can be deployed on a fixed public network address. After the heat pump controller completes network access, it establishes two TCP connections. The processor records the connection handle, the most recent sending time, and the most recent receiving time for each connection in the running memory. The connection handle is returned by the operating system after the connect is successful, and the most recent sending time and the most recent receiving time are given by the processor's real-time clock. The data format can be a second-level or millisecond-level integer timestamp. These records are stored in the link status area for direct use in subsequent heartbeat sending and link status acquisition.
[0022] After two connections are successfully established, the processor immediately enters the dual-link heartbeat maintenance phase, setting independent heartbeat timers for the 4G and Wi-Fi long connections respectively. Each time a heartbeat cycle arrives, the corresponding link sends a lightweight heartbeat message to the remote cloud server. Upon receiving the message, the remote cloud server returns an acknowledgment message, and the processor updates the most recent acknowledgment time for that link after receiving the acknowledgment message. The heartbeat message uses a fixed-length small data packet, and its content includes at least the device identifier, link type identifier, and sending timestamp. The device identifier comes from the factory serial number or device serial number stored in memory, the link type identifier is filled in as 4G or Wi-Fi by the communication management program, and the sending timestamp comes from the processor's real-time clock. In this way, the round-trip latency, heartbeat success rate, and consecutive heartbeat loss cases required for subsequent link quality assessment can all be obtained directly from the heartbeat interaction records without the need for additional independent probe messages. The heartbeat cycle is adjusted according to the level of service activity and acknowledgment time jitter, and its calculation method is as follows: ; in, This indicates the heartbeat transmission cycle of the current link, in seconds, which is calculated in real time by the communication management program in the processor and written into the status area of the corresponding link. This represents the baseline heart rate cycle in seconds, and is a preset configuration value stored in memory, for example, it can be set to 30 seconds. This indicates a business activity flag. It is a dimensionless quantity, and its value is jointly given by the device control command queue and the uplink data queue. It takes the value of 1 when there are control commands to be issued, fault alarms to be uploaded, or parameter interaction is in progress. It takes the value of 0 when there is no business interaction. This represents the average deviation of the three most recent heartbeat confirmation times from their average interval, in seconds. The data source is the timestamp recorded by the processor when it receives three consecutive heartbeat confirmation messages, and is calculated in memory by the communication management program. This represents the jitter correction factor, a dimensionless quantity whose value comes from the local configuration area and is typically set between 0.2 and 0.5. In the formula, , and The units are all seconds. and Since it is dimensionless, all terms on the right side have the same dimension, and the unit of the calculation result is seconds. In a specific implementation, if the basic heartbeat cycle... If a remote control interaction exists within seconds, then The mean deviation of the time interval between the three most recent heartbeat confirmations from the average interval is ; Seconds, locally configured jitter correction factor The current heart rate cycle is At this point, the link enters a relatively higher frequency of active keep-alive state; if the system enters a silent operation phase, then... Under the same tremor conditions, the heart rate cycle becomes The time interval corresponds to the normal maintenance state under low communication load. With this setting, the link activity confirmation frequency is higher during the active phase, the additional traffic consumption during the silent phase is lower, and the wireless channel burden is not amplified due to excessive detection when there are slight jitters in the heartbeat confirmation.
[0023] During the heartbeat maintenance process, the processor continuously updates the status record of each link based on the confirmation results. If a link fails to receive an confirmation message after a heartbeat cycle, the communication management program immediately initiates a fast retransmission. If no confirmation message is received after two consecutive heartbeat cycles, the processor closes the TCP connection corresponding to that link and re-initiates a connection request according to the aforementioned network access and link establishment process, ensuring that both links remain available. After the above processing, two distinct output objects are formed between the heat pump controller and the remote cloud server: a 4G long connection and a Wi-Fi long connection. The 4G long connection represents a cellular communication long connection established and continuously interacting with the remote cloud server through the 4G communication module; the Wi-Fi long connection represents a wireless LAN communication long connection established and continuously interacting with the remote cloud server through the Wi-Fi communication module. Subsequent steps can directly collect link status parameters such as signal strength, round-trip time, packet loss rate, and heartbeat success rate around these two output objects, thereby maintaining the continuity of the entire technical route in engineering implementation.
[0024] S2: Monitor and evaluate the multi-dimensional link quality parameters of the 4G long connection and the Wi-Fi long connection in real time, and generate corresponding link quality evaluation results.
[0025] Specifically, after the heat pump controller establishes and enters a stable heartbeat maintenance state through the establishment of 4G and Wi-Fi long-term connections, the processor directly collects link status data based on the operational data of these two long-term connections in the communication management thread. The collection process does not introduce additional probe messages; instead, it fully reuses the heartbeat interaction data continuously generated in step one, as well as the physical layer measurement values provided by the communication module itself. Within each heartbeat cycle, the processor obtains current signal strength data from both the 4G and Wi-Fi communication modules. The 4G side reads RSRP or RSSI values via a serial port query command, while the Wi-Fi side reads the RSSI register value through the driver interface. Both return integer values in dBm. Simultaneously, the sending time is recorded when sending heartbeat messages. Record the reception time when an acknowledgment message is received. The round-trip time of the heartbeat is obtained by comparing the two values. Within multiple consecutive heartbeat cycles, the packet loss rate and heartbeat success rate are obtained by counting the number of transmissions and successful acknowledgments. All the above data comes from existing communication processes: signal strength comes from the communication module hardware interface, timestamps come from the processor's real-time clock, and counting results come from counter variables in the communication thread. This ensures that the data source is clear and requires no additional system overhead.
[0026] To enable comparison of data with different physical meanings under the same evaluation system, the processor performs scaling on various parameters in memory. This processing is based on the linear normalization concept in classic signal quality evaluation methods, originating from the min-max normalization method in statistics. Specifically, signal strength is linearly mapped from the original dBm range to a range of 0 to 1; round-trip delay is transformed into an indicator of "lower delay, higher quality" through inverse mapping; packet loss rate is directly used as a negative indicator using its inverse value; and heartbeat success rate is directly used as a positive indicator. Based on the above-processed indicators, the link comprehensive quality calculation adopts a weighted linear model, the original form of which comes from the multi-indicator weighted scoring method commonly used in communication systems. In this scheme, it has been adapted for dual-link long-term online scenarios to directly reflect real-time communication capabilities. Its expression is: ; in, This represents the overall quality assessment value of the link. It is a dimensionless quantity with a value range of 0 to 1. It is calculated and stored by the processor in the communication management thread. This represents the normalized signal strength. Its original value comes from the RSSI or RSRP (unit: dBm) returned by the communication module and is converted into a dimensionless quantity after linear mapping. This represents the normalized latency index, whose original value is derived from... The result is calculated (in seconds or milliseconds), and then converted into a dimensionless quantity through reverse mapping. The packet loss rate is represented by dividing the number of unacknowledged heartbeats within the sliding window by the total number of transmissions, and is a dimensionless ratio. The heartbeat success rate is represented by dividing the number of successful acknowledgments within the sliding window by the total number of transmissions, and is also a dimensionless proportion. , , , These are the weighting coefficients for each indicator, which are dimensionless constants derived from the device's local configuration area. For example, they can be set based on actual operating experience. , , , .because , , , All quantities are dimensionless, and the weighting coefficients are also dimensionless. Therefore, the dimensions on both sides of the formula are consistent, and the calculation results are consistent. It is a dimensionless quantity, which conforms to the physical meaning.
[0027] In the specific calculation process, all intermediate quantities can be obtained through explicit steps. For example, within a certain time window, the RSSI measured by the 4G link is... dBm, preset mapping range is dBm, then the normalized signal strength Obtained through linear transformation Within the same time window, the round-trip delays of three heartbeats were respectively s、 s and s, take the average value s, if the maximum acceptable latency is set to s, then the normalized time delay index If no acknowledgment is received in one of the last five heartbeats, the packet loss rate is [missing information]. Heart rate success rate Substitute the above values into the formula and take the weights. , , , , can be obtained This result directly reflects the overall quality level of the link at that moment. Using the same method, the processor performs the exact same data acquisition and calculation process on the Wi-Fi long-lived connection to obtain the quality assessment value of another link.
[0028] Because wireless communication environments are subject to short-term fluctuations, single calculation results may exhibit jitter. Therefore, the implementation further performs a simple moving average process on the quality values over multiple consecutive periods, for example, averaging the results from the three most recent calculations. The arithmetic mean of the values is used as the final evaluation value for the current time step. This processing method originates from smoothing techniques in time series analysis. It does not alter the original formula structure but only stabilizes the output results, improving the continuity of the evaluation results without increasing computational complexity. Finally, the processor obtains the corresponding quality evaluation values for 4G long-lived connections. and the corresponding quality assessment value of Wi-Fi long connection Both are stored in the link state area and dynamically updated over time, providing direct input for subsequent primary link selection and predictive switching.
[0029] S3: Based on the quality evaluation results of the 4G long connection and the Wi-Fi long connection, dynamically select the link with better quality as the primary transmission link, and keep the other link as the cooperative link.
[0030] Specifically, step three uses the 4G link quality assessment value output in step two. Wi-Fi link quality assessment value As input, the processor in the heat pump controller dynamically allocates the primary transmission link and the cooperative link within the communication management thread. The processing object here is no longer the raw signal strength, latency, or packet loss data, but rather the directly comparable comprehensive quality result given in step two. Therefore, the task of this step is to further transform the "link quality result" into a "link role result." In heat pump remote control scenarios, this step has strong business constraints: during stages such as target temperature modification, operating mode switching, start / stop control, defrosting switching, and fault alarm confirmation, control commands are often issued continuously. If the link role changes immediately based on the instantaneous quality of a single cycle, although both links are online, the default sending path of the cloud control flow will change back and forth in a short period, easily causing unstable command arrival rhythm, thus affecting subsequent pre-switching preparation and session state maintenance. Therefore, the processor, when reading... and Next, combining three pieces of information—"whether the current service is active," "which link already handled the primary transmission in the previous cycle," and "whether the quality of the current link has fluctuated significantly compared to the previous cycle"—primary priority values are constructed for each of the two links. Then, a threshold-based continuous judgment method is used to determine the current primary transmission link. Here, "whether the current service is active" directly reuses the service activity flag from step one. The value is consistently determined by both the device control command queue and the uplink status queue. It is set to 1 when there are pending control commands, pending alarm uploads, or pending parameter exchanges, and to 0 during stable, silent operation. "Which link in the previous cycle has undertaken the primary transmission?" is given by the previous cycle's primary flag in the link status area. For the currently evaluated link, this is recorded as... When the link was selected as the primary link in the previous cycle ,otherwise The "Previous Cycle Link Quality Value" is directly read from the historical record of the previous cycle in step two and recorded as follows: In this way, all variables used in this step can find clear data sources in the preceding steps and the equipment operating status, and can correspond one-to-one with the continuous control requirements in the heat pump control scenario.
[0031] The construction of priority values originates from the utility function method in classical decision theory. The original form of this method uses the current evaluation value as the basis for decision-making, i.e. In this step, the processor addresses the continuous transmission requirements of heat pump remote control by adding a service continuity gain term and introducing a quality fluctuation suppression term, resulting in an improved expression suitable for selecting a dual-long-connection primary link: ; in, Indicates link The primary priority value in the current evaluation cycle is a dimensionless quantity, calculated in real time by the processor based on the current quality value, the quality value of the previous cycle, and the primary flag in the link state region; when hour, Corresponding to the output of step two ,when hour, The output corresponding to step two Both are comprehensive quality assessment values calculated based on link quality parameters in step two, and are dimensionless quantities. This indicates a business activity flag, which originates from the device control command queue and the uplink status queue. It is a dimensionless binary quantity with a value of 0 or 1. This indicates the link hold flag, which is derived from the primary link record of the previous cycle in the link status area. It is a dimensionless binary quantity with a value of 0 or 1. Indicates link The overall quality assessment value in the previous assessment cycle is derived from the historical records of the results in step two and is a dimensionless quantity. This represents the service continuity gain coefficient, which originates from the local configuration area and is a dimensionless constant. It is used to provide limited maintenance gain to links that have already undertaken the main transmission in the previous cycle during the control active phase. This represents the fluctuation suppression coefficient, derived from the local configuration area. It is a dimensionless constant used to penalize short-term, large-amplitude fluctuations in the link. Because... , , , , and Since all quantities are dimensionless, the dimensions of all terms on the right side of the formula are consistent. It remains a dimensionless quantity, yet the dimensionality holds. The derivation logic of this expression is clear: based on the current overall quality of the link... As a basic evaluation value; when the heat pump equipment is in an active control phase and a certain link has already undertaken the main transmission task, through Add a finite hold-up gain to the link to ensure that the control flow is preferentially transmitted along the existing stable path during continuous operation; then through This suppresses links where quality changes too rapidly between the previous and current cycles, preventing links from immediately becoming the main transmission channel due to short-term signal spikes. This results in... It inherits the real-time quality evaluation results from step two and also incorporates the scenario requirements of heat pump remote control for continuous control stability.
[0032] In obtaining respectively and Subsequently, the processor further executes the primary link role update based on the switching decision concept with hysteresis threshold in the control system. The classic source of this concept is the hysteresis comparator and Schmitt triggering decision in control engineering. Its core is not to check if there is a slight difference between the two inputs, but whether the difference exceeds a threshold sufficient to indicate that a "stable superior-inferiority relationship has been established." In this step, the processor updates the primary link role based on the difference between the primary priority values of the two links and the threshold. The comparison is performed, and the decision expression is as follows: ; in, This indicates the primary priority value for the current evaluation period of 4G long-lived connections, derived from the previous formula. The calculation results at that time; This indicates the primary priority value for the current evaluation period of a Wi-Fi long-lived connection, derived from the previous formula. The calculation results at that time; It represents the magnitude of the difference in primary priority values between two links, and is a dimensionless quantity; This represents the primary link role update threshold, derived from the local configuration area. It is a dimensionless constant, typically set between 0.03 and 0.08 depending on network fluctuations. Because... , and Both are dimensionless quantities, so the dimensions on both sides of the formula are consistent. The processor performs the following process during actual execution: first, compare... and The size, if If the difference magnitude meets the above threshold condition, then the 4G long connection is recorded as a candidate primary link; if If the difference in amplitude meets the above threshold conditions, then the Wi-Fi long connection is recorded as a candidate primary link; if the difference in amplitude does not meet the threshold conditions... If the primary link flag from the previous cycle remains valid, the processor maintains a continuous decision counter in the link state area to ensure that role changes are consistent with the continuous evaluation cycle in step two. Only when the same candidate result appears for three consecutive evaluation cycles will the corresponding link be officially written to the current primary link flag, and the other link written to the cooperative link flag. In engineering implementation, the "three evaluation cycles" can be consistent with the sliding window update cycle in step two. For example, evaluating every 15 seconds will result in a stable role determination within approximately 45 seconds; a 30-second evaluation cycle will result in a stable role determination within approximately 90 seconds. This setting allows the primary link changes to match the rhythm of long-term online operation of the dual links, ensuring both timely role updates and control path stability.
[0033] After the processor completes continuous determination and updates the link role, two distinct outputs are generated in the link state area. One is the current primary transmission link identifier. The first identifier is either 4G or Wi-Fi, and it corresponds one-to-one with the actual connection handle. The upper-layer business thread will prioritize calling the connection corresponding to this identifier to send control commands, parameter setting messages, and status feedback data; the second identifier is the current cooperative link identifier. Its value is the identifier of another link that remains online and continuously participates in heartbeat maintenance, quality assessment, and subsequent takeover preparation.
[0034] S4: When the link quality of the current primary transmission link is detected to be degraded and the switching conditions are met, intelligent seamless switching and cooperative transmission are performed. Before the switching, the session state is pre-synchronized through the cooperative link, and during the switching process, key control data is transmitted through dual links in a cooperative manner.
[0035] Specifically, step four directly takes the current primary transmission link identifier output from step three. and current collaborative link identifier The processor first determines... Locate the status record of the current primary link in the link status area, and then read the most recently written current quality assessment value and the quality assessment value of the previous assessment cycle from this status record; simultaneously, according to... Locate the status record of the current collaborative link and read the current quality assessment value corresponding to that collaborative link. Thus, the data actually used by the processor in this step for calculation is the current quality assessment value of the current primary link. The previous cycle quality assessment value of the current primary link. and the current quality assessment value of the current collaborative link. .in, and All of these are directly derived from the comprehensive quality assessment results in step two, only mapped to "current primary link quality" and "current collaborative link quality" through the link roles already determined in step three; This is derived from the historical evaluation period stored in the link state area. In a heat pump remote control scenario, looking at... The instantaneous magnitude of the signal is insufficient to accurately determine the switching timing. This is because during the temperature setting, operating mode switching, compressor start-up and shutdown, and defrosting control phases of a heat pump, a rapid deterioration in the link often manifests as response jitter, control confirmation delays, and discontinuous status feedback, even when the device appears to be still online. Therefore, the switching decision must reflect both that "the current primary link has deteriorated" and that "the cooperating link has better carrying capacity." Based on this scenario characteristic, the processor combines the first-order backward difference concept from numerical analysis with the relative advantage / disadvantage comparison concept from communication decision-making, first using... This indicates the degree of quality degradation of the current primary link between two adjacent evaluation periods, and then uses... This indicates the quality advantage of the cooperative link relative to the primary link. Then, these two quantities are weighted and combined to obtain the switching drive value. Its calculation formula is: ; in, This represents the switching drive value, which is a dimensionless quantity and is calculated in real time by the processor within the communication management thread based on three quality records in the link state area. This indicates the current quality assessment value of the primary link in this evaluation period, derived from the results of step two and passed through... position; This indicates the quality assessment value of the current primary link in the previous assessment period, which is derived from the historical records in the link status area. This indicates the quality assessment value of the current collaborative link in this evaluation period, derived from the results of step two and passed through... position; This represents the trend weighting coefficient, a dimensionless configuration parameter stored in the local configuration area, used to adjust the proportions of "primary link decline rate" and "relative advantage of cooperating links" in the handover drive. The original idea behind this formula comes from two parts: the first part is the method of characterizing the trend using the difference between adjacent sample values in numerical analysis; the second part is the method of reflecting substitution conditions using relative advantage in communication link comparison. This step linearly combines these two parts to form the handover drive value. The derivation logic is: when A larger value indicates a faster decline in the primary link and a stronger urgency for switching; when... A larger value indicates that the collaborative link has a greater carrying capacity advantage than the primary link, and the feasibility of switching is higher; when both increase simultaneously, A rapid increase indicates that the system has entered a state where a switchover should be prepared for or even executed. Because... , , and All of them are dimensionless quantities, therefore It is still a dimensionless quantity, and the dimensions are consistent on both sides of the formula.
[0036] The processor performs one calculation at the end of each evaluation cycle. and compare it with the pre-synchronization threshold in the local configuration area. and formal switching threshold Compare and set .in, and These are all dimensionless configuration parameters, derived from the equipment parameter area fixed after commissioning, used to distinguish between "switchover preparation" and "actual switchover" as two consecutive stages. In actual work, when... First time reaching or exceeding At this time, the processor immediately enters the pre-synchronization phase. The default transmission link for the service remains unchanged. However, the communication management thread will... A pre-synchronization request message is sent to the cloud server. This message consists of a device identifier, the current session number, the sequence number of the most recently sent control command, the sequence number of the most recently acknowledged command, and a cached digest of unacknowledged commands. The device identifier comes from the device identity information registered in step one. The session number and command sequence number are maintained by the business scheduling thread each time a control command is enqueued and sent. The cached digest of unacknowledged commands comes from the retransmission queue in memory. After receiving the pre-synchronization request, the cloud server checks the corresponding device's session management table on the server side. A backup communication context is created, and a pre-synchronization completion acknowledgment is returned. Upon receiving this acknowledgment, the processor copies the session state of the current primary link to the corresponding state area of the cooperative link, including the list of most recently sent but unacknowledged control commands, their sequence numbers, the sequence number of the most recent status return, and the current cloud response waiting position. Thus, After pre-synchronization is completed, all conditions are met for taking over the current control session. In remote control of heat pumps, if the context is lost during switching of operations such as "setting the outlet water temperature", "switching heating / cooling modes", "compressor start / stop", and "fault reset", it may cause inconsistencies between the control state of the cloud and the device. The pre-synchronization stage is designed to address this risk and therefore plays a decisive role in this step.
[0037] In subsequent evaluation cycles Continue to rise and reach or exceed When this condition is met for two consecutive evaluation cycles, the processor performs a formal handover. The requirement of two consecutive evaluation cycles is to distinguish between transient wireless interference and persistent link degradation in the environment where the heat pump equipment is located, preventing a change in the default transmission path due to a single short-term jitter. During the formal handover, the processor does not re-establish the link but directly updates the default transmission handle in the service scheduling thread, changing the original mapping to... The default sending path is rewritten to be mapped to The transmission path is then determined, and the primary link marker in the link state area is updated to the original one. The collaborative link marker is updated to the original Because the session state has already been copied to the collaborative link state area during the pre-synchronization phase, after updating the sending path, the new primary link can continue to send subsequent commands using the original session number and control command sequence number without needing to re-initiate login or re-initialize the session. For control commands that are still in the "sent but not acknowledged" state at the moment of switching, the processor retrieves them one by one from the unacknowledged command cache and performs a resend on the new primary link according to the original sequence number; the cloud server performs an idempotency check on each control command according to the sequence number, and when it receives a duplicate control command with the same sequence number, it only accepts the first valid command and discards the duplicate message, thereby ensuring that the heat pump body will not repeatedly start and stop, repeatedly change temperature, or repeatedly switch modes due to switching.
[0038] During the transition window between pre-synchronization and formal switchover, the processor performs coordinated transmission of critical control data. Specifically, when generating control messages, the service scheduling thread first checks the instruction type. If the instruction is related to heat pump operation safety or real-time control, such as start / stop commands, mode switching commands, target temperature write commands, or fault clearing commands, a critical service flag is added to the message header, and messages with the same sequence number are pushed into the header simultaneously. and Two transmission queues are used. Each queue calls its respective link's connection handle to send the same control message to the cloud server. At the receiving end, the cloud server performs deduplication based on the instruction sequence number and device identifier, using only the first arriving message as the valid control input. For large-volume services such as firmware upgrade packages, runtime log packages, or historical fault data packets, the processor uses a fixed-length fragmentation method for coordinated transmission, for example, fragmenting into 512-byte segments and numbering them by sequence number. During the pre-synchronization phase, newer fragments are given priority. Send, and the original Continue sending queued but not yet confirmed fragments; after the formal switchover, the new primary link will handle subsequent fragment transmission, while the original collaborative link will be reserved as a channel for retransmitting missing fragments. The cloud server reassembles the data according to the fragment sequence number and uses a receive bitmap to confirm the range of fragments already received. This approach is particularly suitable for scenarios involving remote upgrades of heat pump equipment or batch log uploads, because the data volume for such services is significantly larger than that for ordinary control commands. If the transmission were to wait entirely for the single link switchover to complete before resuming, it would often prolong the service duration, while collaborative transmission can maintain continuous data flow during link degradation.
[0039] The feasibility of the above process can be directly verified using specific numerical values. Assume the current output of step three is... , The processor then reads the current 4G link quality assessment value from the link state area. Previous period quality assessment value And read the current quality assessment value of the Wi-Fi link. Trend weight coefficient in local configuration area Pre-synchronization threshold Formal switching threshold Substituting into the formula, we get: , ,therefore .because Meanwhile The processor immediately initiates the pre-synchronization phase, through Send a pre-synchronization request to the cloud server and complete session state replication. If the 4G link deteriorates further in the next evaluation cycle... The quality update in the previous cycle was Meanwhile, the Wi-Fi link is maintained Then there is , Substituting into If the 4G link degrades in the next evaluation cycle... , The Wi-Fi link is still Then there is , Substituting into Since both adjacent evaluation periods meet the requirements... The processor executes the formal handover, switching the default transmission path to the Wi-Fi persistent connection and retaining the original 4G persistent connection as the new cooperative link. This numerical calculation process shows that the handover is not based on a single instantaneous quality value, but is driven by both the degradation trend of the primary link and the carrying capacity advantage of the cooperative link, thus forming a continuous, calculable, and reproducible implementation path between pre-synchronization and formal handover. After the above execution, this step produces two update results. The first is the updated primary transmission link identifier. Its value is written back to the link state area by the processor after the formal switch is completed, and directly corresponds to the default sending path used by the current service scheduling thread; the second is the updated cooperative link identifier. This value corresponds to another link that remains online, continues to participate in heartbeat, quality assessment, collaborative transmission of critical data, and preparation for subsequent handover. Thus, the "primary link - collaborative link" role relationship established in step three gains further dynamic migration capability in this step, and the quality assessment results output in step two are actually transformed into executable pre-synchronization, handover, and collaborative transmission actions. This step advances the dual long-lived connection from "parallel online" to a state of "predictable handover with continuous service during handover," enabling the heat pump remote control system to maintain continuous control sessions and reliable transmission of critical services even in scenarios involving weak networks, jitter, and partial disconnections.
[0040] S5: When the heat pump controller is in the business quiescent period, perform hierarchical power consumption management on the collaborative links based on the stability of the primary link and the takeover value of the collaborative links.
[0041] Specifically, step five directly takes the current primary transmission link identifier output from step four. and current collaborative link identifier The processor jointly performs silent period energy management in the communication management thread and the power consumption control thread. The processor first reads the control command queue, status reporting queue, and alarm queue from the service scheduling thread. When all three queues are empty within the preset silent observation period, and the time interval between the most recent cloud-issued control command and the most recent device-initiated report is greater than the silent judgment threshold, the service activity flag used and continuously maintained in step one is set. Set it to 0 and mark the current moment as the start of the silent period. The silent observation duration and silent judgment threshold are stored in the local configuration area; for example, they can be set to 120 seconds and 90 seconds respectively. The control command queue, status reporting queue, and alarm queue are all located in the processor's running memory and are maintained in real time by the service scheduling thread. Therefore, the determination of the silent period is entirely based on the device's current actual service status. After completing the silent period determination, the processor... and Locate the status records corresponding to the current primary link and the current cooperating link in the link status area, and read the link quality assessment value continuously updated in step two. To maintain consistency in the meaning of variables, this step records the quality assessment value corresponding to the current primary link as... The quality assessment value corresponding to the current collaborative link is denoted as Among them, if If it is 4G, then The corresponding 4G link quality assessment value, if For Wi-Fi, then Corresponding Wi-Fi link quality assessment value; This corresponds to the quality assessment value of the other link in the current assessment period. Thus, the output of step four... and In this step, both are explicitly used to locate specific link objects, while the link quality results generated in step two are mapped to direct computational inputs for quiet period energy management through these two link roles.
[0042] In remote control scenarios for heat pumps, the silent period is not simply "all devices go into hibernation when there are no messages." Because heat pump equipment operates at constant temperature at night, provides constant temperature replenishment for commercial hot water, and controls the temperature of circulating water, although the intervals between control operations are significantly longer, the cloud may still issue parameter modification, start / stop commands, or alarm confirmation instructions at any time. Therefore, the collaborative link still needs to retain a certain takeover capability. This step, based on the duty cycle control concept in classic communication energy saving, constructs a collaborative link maintenance index to address this scenario characteristic. This is used to quantify the wake-up level that the collaborative link should maintain during the silent period. Its original idea comes from the linear weighted method in wireless communication terminals that "jointly determines the monitoring strength based on service requirements and link risks." In this step, the processor combines the current quality of the primary link, the current quality of the collaborative link, and the service silent state to form a judgment formula suitable for the heat pump dual-long-connection control scenario: ; in, This represents the cooperative link maintenance index, which is a dimensionless quantity and is calculated in real time by the processor in the power control thread based on the data in the link state area and the service state area. This indicates a business activity flag, originating from the business scheduling thread, with a value of 0 or 1, triggered during the quiet period of this step. ; This indicates the current quality assessment value of the primary link, derived from the output of step two and passed through... The location indicates that it is a dimensionless quantity. This indicates the current quality assessment value of the collaborative link, derived from the output of step two and passed through... The location indicates that it is a dimensionless quantity. This represents the risk weight coefficient of the primary link, a dimensionless constant stored in the local configuration area. It is used to adjust the impact of "increasing the alert level of the cooperative link when the primary link deteriorates," and is typically set between 0.5 and 0.8. The derivation of this formula is clear: first take... This indicates the risk level of the primary link; the lower the quality of the primary link, the larger the value, indicating that the collaborative links need to maintain a higher wake-up level. Then take... This indicates the takeover capability of the cooperative link itself. The higher the quality of the cooperative link, the larger this value, indicating that even with reduced power consumption, it still has a good foundation for takeover; then through... and The two factors mentioned above are weighted to form a comprehensive maintenance requirement for the quiet period; finally, multiplied by... As a business-level silent gating item, this ensures that the power management corresponding to this formula is only enabled during the silent period. Because , , and All of them are dimensionless quantities, so It remains a dimensionless quantity, with consistent dimensions on both sides of the formula. This expression reflects two characteristics: First, the more unstable the primary link is, the higher the takeover readiness of the collaborative link needs to be; second, the better the quality of the collaborative link itself, the more suitable it is to maintain a listening state that can be quickly woken up and reliably take over services. Therefore, during the quiet period, its basic availability should be maintained first, rather than being reduced to a deep dormant state that cannot be recovered in time.
[0043] The processor gets Then, according to the two-level threshold in the local configuration area. and Hierarchical power consumption control is performed on the cooperative link, where Both are dimensionless configuration parameters. In practical implementation, when... When the collaborative link enters a low-power listening state, the processor disables unnecessary high-frequency scanning tasks through the driver interface of the corresponding module of the link, retaining only registration hold, base clock, and wake-up interrupt, and extending the heartbeat cycle from the normal cycle in step one to the listening cycle, for example, from 30 seconds to 90 seconds; when When the cooperative link enters an intermittent wake-up state, the processor configures the link to a duty cycle mode of "short wake-up + long sleep," for example, waking up for 10 seconds every 180 seconds. Within the wake-up window, it completes one heartbeat transmission, one quality sampling, and one downlink wake-up frame check, and then shuts down the RF transmitting and receiving units and enters sleep mode. When the cooperating link enters a deep sleep state, the processor shuts down the data transmission task of that link, retaining only the minimum listening capability triggered by GPIO interrupts, module timers, or baseband-side low-power wake-up pins. The primary link remains fully active, continuing to operate according to the long connection maintenance mechanism in step one and the quality assessment mechanism in step two, ensuring that the cloud can still issue control commands and receive device status normally through the primary link during the silent period. The low-power listening state, intermittent wake-up state, and deep sleep state can all be implemented using existing 4G module AT command sets or Wi-Fi chip driver power management interfaces. For example, a 4G module can reduce power consumption by entering a minimum functional mode while retaining the network registration context, and a Wi-Fi module can enter a low-power state by disabling continuous listening and enabling DTIM synchronous wake-up. After each state switch, the processor writes the current power level to the link state area for direct use in subsequent wake-up and switching steps.
[0044] When the cloud issues new control requests during the silent period, or when the quality of the current primary link degrades to near the pre-synchronization trigger condition set in step four within two consecutive evaluation cycles, the processor immediately exits the silent period power control process. Upon exiting, if the cooperative link is in a low-power listening state, the processor directly restores its normal heartbeat cycle and full-function reception; if the cooperative link is in an intermittent wake-up state or a deep sleep state, the processor issues a wake-up command to the corresponding communication module through the power control thread, reopens the RF transceiver unit, restores the clock, performs a fast network attachment check, and sends a recovery heartbeat message, then reintegrates the link into the regular quality evaluation cycle in step two. This action is crucial in heat pump scenarios because although the device is silent for a long time at night, users may temporarily modify the target temperature or start / stop schedule on their mobile phones. Once there is a new control request from the cloud, the cooperative link needs to be restored to a takeover state within a short time. Since step four has already... and With clear distinction, the processor can accurately locate which link needs to be restored when it wakes up, without having to re-determine the role relationship.
[0045] This scheme can be verified through specific numerical values to demonstrate its calculation and operational process. Assume the output of step four is... , The processor then reads the current primary link quality assessment value from the link state area. Current collaborative link quality assessment value The business activity indicator has been set to [value] during the silent observation period. Set the primary link risk weight coefficient in the local configuration area. Hierarchical threshold , Substituting into the formula, we get: ,then .because The processor configures the 4G cooperative link to an intermittent wake-up state, for example, waking up for 10 seconds every 180 seconds and completing one heartbeat and one quality sampling within the wake-up window. If the quality of the subsequent primary Wi-Fi link degrades... The quality of 4G collaborative links has been improved to If the other parameters remain unchanged, then we have ,and then .because The processor immediately upgrades the 4G cooperative link from an intermittent wake-up state to a low-power listening state, restoring a shorter listening cycle and a higher level of takeover readiness, providing a power-prepared backup channel for the pre-synchronization and formal handover in step four. For example, if the primary link quality remains at... The quality of the collaborative link is ,but lower than The processor can then reduce the cooperative link to a deep sleep state, retaining only the minimum wake-up capability. This calculation process shows that this step does not statically stipulate "4G is always in sleep mode and Wi-Fi is always active" or "cooperative links are uniformly reduced to a certain fixed level," but rather dynamically allocates power consumption levels during the silent period based on the stability of the current primary link and the takeover value of the cooperative link.
[0046] After the above processing, the link state area continues to retain the output from step four. and Two link role identifiers, simultaneously for Add a record of the current power consumption level. This way, when the system re-enters a period of high service activity, or when switching conditions are detected again in step four, the processor can directly read the current power consumption level of the collaborative link and execute the corresponding wake-up and takeover process without needing to reconstruct the link role relationships. The entire process organically connects the dual long-term connection established in step one, the link quality assessment value output in step two, the primary and secondary link roles formed in step three, and the pre-synchronization and switching conditions formed in step four. This allows the heat pump remote control system to significantly reduce the continuous active power consumption of the 4G and Wi-Fi modules during long-term silent operation, while maintaining sufficiently fast recovery capabilities when link quality deteriorates or cloud services arrive, thus achieving a balance between "highly stable long-term connections" and "low long-term operating power consumption" in engineering.
[0047] In one or more embodiments, such as Figure 2 As shown, a dual-communication heat pump remote control system is disclosed, the system comprising: A dual-mode communication module is used to establish and maintain a 4G long connection based on the 4G communication module and a Wi-Fi long connection based on the Wi-Fi communication module, respectively. The link monitoring module is used to monitor and evaluate the multi-dimensional link quality parameters of the 4G long connection and the Wi-Fi long connection in real time, and generate corresponding link quality evaluation results. The role allocation module is used to dynamically select the link with better quality as the primary transmission link based on the quality evaluation results of the 4G long connection and the Wi-Fi long connection, and keep the other link as the cooperative link. The switching control module is used to perform intelligent seamless switching and cooperative transmission when the link quality of the current primary transmission link is detected to be degraded and the switching conditions are met. Before switching, the session state is pre-synchronized through the cooperative link, and during the switching process, key control data is transmitted through dual links in a cooperative manner. The power management module is used to perform hierarchical power management on the collaborative links based on the stability of the primary link and the takeover value of the collaborative links when the heat pump controller is in the business quiescent period.
[0048] It is worth noting that the specific workflow of the dual-communication heat pump remote control system provided in this embodiment is the same as that of the dual-communication heat pump remote control method described in the above embodiment, and will not be repeated here.
[0049] This invention also provides a dual-communication heat pump remote control device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the steps described in the above embodiment of a dual-communication heat pump remote control method, for example... Figure 1 The steps S1 to S4 described above; or, when the processor executes the computer program, it implements the functions of each module in the above system embodiments.
[0050] For example, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the dual-communication heat pump remote control device.
[0051] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for remote control of a dual-communication heat pump, characterized in that, The method includes: A 4G long-term connection based on a 4G communication module and a Wi-Fi long-term connection based on a Wi-Fi communication module are established and maintained between the heat pump controller and the remote cloud server, respectively. Real-time monitoring and evaluation of the multi-dimensional link quality parameters of the 4G long connection and the Wi-Fi long connection, generating corresponding link quality evaluation results; Based on the quality evaluation results of the 4G long connection and the Wi-Fi long connection, the link with better quality is dynamically selected as the primary transmission link, while the other link remains as a cooperative link; When the quality of the current primary transmission link is detected to be degraded and the switching conditions are met, intelligent seamless switching and cooperative transmission are performed. Before the switching, the session state is pre-synchronized through the cooperative link, and during the switching process, key control data is transmitted through dual links in a cooperative manner. When the heat pump controller is in a quiet period, hierarchical power consumption management is performed on the collaborative links based on the stability of the primary link and the takeover value of the collaborative links.
2. The dual-communication heat pump remote control method according to claim 1, characterized in that, The establishment and maintenance of a 4G long-term connection based on a 4G communication module and a Wi-Fi long-term connection based on a Wi-Fi communication module between the heat pump controller and the remote cloud server specifically includes: After the heat pump controller is powered on, it loads the 4G communication module driver and the Wi-Fi communication module driver respectively, and calls the TCP / IP protocol stack to initiate TCP connection requests to the remote cloud server respectively; For each connection, record the connection handle, the most recent send time, and the most recent receive time; Set up an independent heartbeat timer to maintain connection activity by periodically sending lightweight heartbeat messages. The heartbeat period is dynamically adjusted according to the business activity status and confirmation time jitter.
3. The remote control method for a dual-communication heat pump according to claim 1, characterized in that, The real-time monitoring and evaluation of the multi-dimensional link quality parameters of the 4G long-lived connection and the Wi-Fi long-lived connection, and the generation of corresponding link quality evaluation results, specifically include: Based on heartbeat interaction data and physical layer measurements of the communication module, signal strength, round-trip time, packet loss rate, and heartbeat success rate are collected. Linear normalization is performed on the collected signal strength, round-trip time, packet loss rate, and heartbeat success rate to map data with different physical meanings to a unified scale; The normalized signal strength, latency index, packet loss rate inverse value, and heartbeat success rate are weighted and calculated to obtain the overall link quality assessment value.
4. The remote control method for a dual-communication heat pump according to claim 1, characterized in that, The step of dynamically selecting the link with better quality as the primary transmission link based on the quality evaluation results of the 4G long-lived connection and the Wi-Fi long-lived connection specifically includes: Based on the current business activity status, the link role in the previous cycle, and the link quality fluctuation, a primary priority value is constructed. Links that are in the control active phase and have already undertaken the primary transmission task are given a maintenance gain, while links with excessively rapid quality fluctuations are penalized. When the difference between the primary priority values of two links is greater than the preset role update threshold, the link with the higher primary priority value is marked as a candidate primary link. When the same candidate primary link is maintained for a preset number of evaluation periods, it is officially updated as the current primary transmission link, and the other link is updated as a cooperative link.
5. The remote control method for a dual-communication heat pump according to claim 1, characterized in that, When the link quality of the current primary transmission link is detected to be degraded and the switching conditions are met, intelligent seamless switching and cooperative transmission are performed, specifically including: Calculate the current quality degradation of the primary link and the quality advantage of the cooperative link relative to the primary link, and generate a switching drive value; When the switching drive value reaches the pre-synchronization threshold, a pre-synchronization request is sent to the remote cloud server through the collaborative link to copy the session state of the current primary link to the collaborative link. When the switching driver value reaches the formal switching threshold, the service transmission path will be switched from the original primary link to the collaborative link, and the link role label will be updated.
6. The remote control method for a dual-communication heat pump according to claim 1, characterized in that, The dual-link coordinated transmission of key control data during the switching process specifically includes: Between the pre-synchronization phase and the formal switching phase, identify start / stop commands, mode switching commands, target temperature write commands, or fault clearing commands; When critical control data is identified, a message with a critical service tag is generated and simultaneously pushed into the sending queues of the primary transmission link and the cooperative link for concurrent transmission. After receiving the message, the remote cloud server performs deduplication based on the instruction sequence number and executes only the first valid instruction that arrives.
7. The remote control method for a dual-communication heat pump according to claim 1, characterized in that, The provision that hierarchical power consumption management is performed on the collaborative link when the heat pump controller is in a quiet period includes: Monitor the command queue, status reporting queue, and alarm queue in the business scheduling thread. When the queue is empty within the preset silent observation period, it is determined that the business has entered the silent period. Calculate the cooperative link maintenance index, which is generated based on the risk level of the primary link and the takeover capability of the cooperative link itself; Based on the comparison between the cooperative link maintenance index and the preset hierarchical threshold, the cooperative link is controlled to enter a low-power listening state, an intermittent wake-up state, or a deep sleep state.
8. The remote control method for a dual-communication heat pump according to claim 7, characterized in that, The step of controlling the cooperative link to enter a low-power monitoring state, an intermittent wake-up state, or a deep sleep state based on the comparison result between the cooperative link maintenance index and a preset hierarchical threshold specifically includes: When the cooperative link maintenance exponent is greater than or equal to the first threshold, the cooperative link is controlled to enter a low-power listening state, the high-frequency scanning task is turned off, only the registration hold and the base clock are retained, and the heartbeat cycle is extended. When the cooperative link maintenance index is less than the first threshold and greater than or equal to the second threshold, the cooperative link is controlled to enter the intermittent wake-up state and configured as a duty cycle mode of short-term wake-up plus long-term sleep. When the cooperative link maintenance index is less than the second threshold, the cooperative link is controlled to enter a deep sleep state, the data transmission task is turned off, and only the minimum listening capability is retained.
9. The remote control method for a dual-communication heat pump according to claim 1, characterized in that, The method also includes a step to exit hierarchical power management: When a new control service is issued from the cloud, or when the quality of the current primary link degrades to the point of triggering the pre-synchronization condition, the silent period power consumption control process is immediately exited. Based on the current power consumption level of the collaborative link, execute the corresponding wake-up process, restore the RF transceiver unit and normal heartbeat cycle, and reinstate it to the regular quality assessment cycle.
10. A dual-communication heat pump remote control system, characterized in that, The system includes: A dual-mode communication module is used to establish and maintain a 4G long connection based on the 4G communication module and a Wi-Fi long connection based on the Wi-Fi communication module, respectively. The link monitoring module is used to monitor and evaluate the multi-dimensional link quality parameters of the 4G long connection and the Wi-Fi long connection in real time, and generate corresponding link quality evaluation results. The role allocation module is used to dynamically select the link with better quality as the primary transmission link based on the quality evaluation results of the 4G long connection and the Wi-Fi long connection, and keep the other link as the cooperative link. The switching control module is used to perform intelligent seamless switching and cooperative transmission when the link quality of the current primary transmission link is detected to be degraded and the switching conditions are met. Before switching, the session state is pre-synchronized through the cooperative link, and during the switching process, key control data is transmitted through dual links in a cooperative manner. The power management module is used to perform hierarchical power management on the collaborative links based on the stability of the primary link and the takeover value of the collaborative links when the heat pump controller is in the business quiescent period.