Optimal displacement real-time control method for variable displacement compressor of motor home air conditioner

By constructing a student model that includes a shared feature extraction layer and a dedicated prediction head, and combining gated routing and hierarchical knowledge inheritance training, the problem of real-time high-precision adjustment of RV air conditioning compressors on edge devices is solved. This achieves efficient and low-power compressor control, adapts to complex environments, and improves the robustness and adaptability of the model.

CN121734031APending Publication Date: 2026-03-27ZHONGSHAN SHENBAO ELECTRIC APPLIANCES MFG
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-20
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing intelligent control systems for RV air conditioning compressors struggle to achieve high-precision, low-power real-time dynamic adjustment on edge devices. Limited by computing power, power consumption, and real-time performance, complex models are difficult to apply directly.

Method used

Using multi-condition training data based on a cloud-based teacher model, a student model is constructed that includes a shared feature extraction layer and a dedicated prediction head. Sparse activation is achieved using a gated routing module, and combined with hierarchical knowledge inheritance training and local fine-tuning mechanisms, the computational load is reduced and the prediction accuracy is improved.

Benefits of technology

It achieves efficient and accurate compressor optimal displacement prediction on low-computing-power edge devices, improves the robustness and adaptability of the model, adapts to complex and ever-changing driving environments, reduces computational load and power consumption, and has good engineering feasibility and data privacy and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121734031A_ABST
    Figure CN121734031A_ABST
Patent Text Reader

Abstract

The invention relates to an optimal displacement real-time control method for a variable displacement compressor of a motor home air conditioner, which comprises the following steps of: constructing a working condition classification rule table of high-temperature refrigeration, low-temperature heating, rapid cooling and the like through clustering and expert experience, and extracting a mapping relation of corresponding displacement-energy efficiency ratio; decoupling a shared feature extraction layer and a special prediction head structure, and realizing working condition self-adaptive sparse activation reasoning by combining a gating routing module; the student model performance is optimized by adopting hierarchical knowledge inheritance and soft label distillation; and real-time input perception, model branch selection, dynamic control and error self-adaptive fine adjustment can be realized after the device is deployed on the edge side. According to the method, the model decision-making precision, the response efficiency and the energy consumption performance under complex working conditions are improved, and the method has good transportability and intelligent maintenance capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent control technology for air conditioning compressors in mobile living spaces, and in particular to a method for real-time control of the optimal displacement of a variable displacement compressor for RV air conditioning. Background Technology

[0002] With the increasing popularity of mobile living spaces such as RVs, the demand for intelligent control of air conditioning systems is growing. In the current field of intelligent control of RV air conditioning compressors, mainstream technologies mostly employ large-scale predictive models based on deep neural networks. These models integrate environmental sensing parameters such as outside temperature, target inside temperature, and compressor speed to dynamically adjust compressor displacement, thereby improving energy efficiency and user comfort. Previous research has focused on improving model complexity and prediction accuracy, with multi-branch and multi-condition adaptive composite network structures becoming an industry trend. These high-precision models are mostly deployed in the cloud or on high-computing platforms, achieving excellent compressor displacement and energy efficiency mapping capabilities through offline training. However, due to limitations in computing power, power consumption, and real-time requirements of RV edge devices, complex models are difficult to directly apply to embedded control terminals. Summary of the Invention

[0003] This application provides a method for real-time control of the optimal displacement of a variable displacement compressor for RV air conditioning, which aims to solve one of the problems or issues of the prior art mentioned in the background.

[0004] This application provides a method for real-time optimal displacement control of a variable displacement compressor in a motorhome air conditioner, specifically including: S1: Based on the multi-condition training data of the cloud-based teacher model, extract the set of condition labels for different operating environments. The condition labels include high-temperature cooling, low-temperature heating and rapid cooling modes. Construct a condition classification rule table according to the mapping relationship between compressor displacement and energy efficiency ratio under each condition.

[0005] S2: Based on the operating condition classification rule table, a student model is constructed that includes a shared feature extraction layer and a dedicated prediction head structure. The shared feature extraction layer is used to extract general time-series features of the outside temperature, the target temperature inside the vehicle, and the current compressor speed, forming a unified feature vector output.

[0006] S3: Based on the unified feature vector and the working condition classification rule table, a gated routing module with dynamic sparse activation capability is designed. This module generates the corresponding path activation weight vector by calculating the similarity score between the input features and each working condition category, so as to determine the prediction head branch of the current optimal match.

[0007] S4: Input the path activation weight vector into the student model, activate only the prediction head branch whose weight exceeds the preset threshold, and the remaining branches enter a low-power sleep state, thereby forming a sparse inference path and reducing the amount of floating-point operations in the forward computation process.

[0008] S5: Based on the output soft label sequence of the teacher model under various working conditions, hierarchical knowledge inheritance training is performed on the student model. The soft label cross-entropy loss is used to optimize the overall output distribution, and the intermediate layer feature matching loss is introduced to constrain the output of the shared feature extraction layer, so that it approximates the feature response of the corresponding layer of the teacher model.

[0009] S6: Deploy the student model trained by hierarchical knowledge inheritance to the RV edge control device. During real-time operation, collect environmental perception parameters and input them into the shared feature extraction layer to obtain a unified feature vector under the current working condition, which serves as the basis for judgment by the gating routing module.

[0010] S7: Determine whether the path activation weight vector output by the gated routing module points to a single dominant branch. If it exists and its weight value is higher than the set activation threshold, then trigger the execution process of the corresponding prediction head and output the optimal displacement suggestion value for that branch.

[0011] S8: Based on the historical prediction error sequence cached locally, monitor the deviation trend of the current active branch. When the absolute value of the error rises above the adaptive threshold within multiple consecutive sampling periods, start the local fine-tuning mechanism and update the gradient of the last layer weight parameters of the prediction head with a small sample to maintain the performance of the edge model.

[0012] The method for real-time optimal displacement control of a variable displacement compressor for RV air conditioning provided in this application has the following beneficial effects: (1) To address the technical shortcomings of existing vehicle thermal management control systems, such as low prediction accuracy, weak generalization ability, and difficulty in adapting to dynamic operating conditions, this application constructs a dynamic sparse activation architecture with a gated routing mechanism, which enables efficient and accurate prediction of the optimal displacement of the compressor on low-computing-power edge devices. Traditional methods typically employ a single compact model or static pruning strategy, which often suffers from large prediction deviations and response lags due to limited representation capabilities when facing complex and ever-changing driving environments and temperature control requirements. In contrast, this solution innovatively introduces a student network design approach guided by a teacher model, using multi-branch specialized sub-models to extract shared features and unique decision paths, and implementing conditional path activation based on real-time input conditions at the student end. Only the prediction head matching the current scenario is run, while the remaining redundant computing modules are in a dormant state, significantly reducing the computational load and power consumption during inference. This allows the model to be stably deployed in resource-constrained vehicle controllers while maintaining prediction accuracy close to that of a highly complex teacher model, effectively overcoming the inherent contradiction between lightweight design and high performance.

[0013] (2) To further enhance the robustness and adaptability of the model in long-term operation, this application proposes a learning mechanism that combines hierarchical knowledge distillation with local incremental updates, which significantly enhances the student model's comprehensive understanding of multi-condition features and its sensitivity to environmental drift. Unlike conventional knowledge distillation, which relies solely on the soft labels of the output layer to transmit information, this scheme introduces intermediate layer feature matching loss during the training phase, forcing the student backbone network to learn the cross-condition general feature expressions contained in the teacher model, thereby improving its basic perception ability; at the same time, fine-grained knowledge transfer is performed independently for each condition, ensuring that different prediction heads fully inherit the fine-grained control logic of the corresponding professional sub-models, thereby achieving synergistic optimization of relevance and specificity. More importantly, in the post-deployment phase, the model continuously monitors the performance degradation trend of the current main activation path through locally cached historical prediction error data. Once a continuous increase in deviation is detected, a selective fine-tuning mechanism is triggered, which performs incremental learning on only the prediction heads that are used frequently and whose performance has deteriorated significantly. This avoids the high resource consumption and system downtime risk caused by global parameter retraining, forming a closed-loop adaptive evolution capability. This effectively solves the problem of model performance degradation caused by factors such as seasonal changes and equipment aging in practical applications.

[0014] (3) Compared to traditional technical paths that rely on federated learning, model quantization, or complex online learning frameworks, this solution achieves high-performance lightweight modeling entirely based on structural design and knowledge transfer strategies. It requires no additional communication overhead, hardware support, or large-scale annotation data backhaul, resulting in stronger engineering feasibility and system compatibility. The entire method does not introduce external collaborative nodes or encrypted computing modules, simplifying the deployment process and ensuring data privacy and security. Its dynamic routing judgment relies solely on conventional sensor signals such as outside temperature, target setting, and compressor speed, eliminating the need for additional sensing devices and adapting to existing vehicle ECU architectures. Furthermore, this architecture naturally supports subsequent functional expansion; for example, adding new operating conditions can be quickly integrated by adding a prediction head and reusing the existing backbone network, demonstrating excellent scalability and maintenance convenience. In summary, this solution not only achieves a dual improvement in computational efficiency and prediction accuracy but also constructs an efficient, reliable, and sustainably evolving intelligent control system for complex dynamic environments, providing a highly practical and low-maintenance edge intelligent solution for the thermal management system of new energy vehicles. Attached Figure Description

[0015] Figure 1 This is the main flowchart of a real-time control method for the optimal displacement of a variable displacement compressor in a motorhome air conditioner.

[0016] Figure 2 This is a sub-flowchart of a method for real-time control of the optimal displacement of a variable displacement compressor in a motorhome air conditioner.

[0017] Figure 3This is another sub-flowchart of a method for real-time control of the optimal displacement of a variable displacement compressor in a motorhome air conditioner. Detailed Implementation

[0018] Embodiments of the present invention are described in detail below, examples of which 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.

[0019] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0020] like Figure 1 As shown, this application provides a method for real-time control of the optimal displacement of a variable displacement compressor in a motorhome air conditioner, specifically including: S1: Based on the multi-condition training data of the cloud-based teacher model, extract the set of condition labels for different operating environments. The condition labels include high-temperature cooling, low-temperature heating and rapid cooling modes. Construct a condition classification rule table according to the mapping relationship between compressor displacement and energy efficiency ratio under each condition.

[0021] S2: Based on the operating condition classification rule table, a student model is constructed that includes a shared feature extraction layer and a dedicated prediction head structure. The shared feature extraction layer is used to extract general time-series features of the outside temperature, the target temperature inside the vehicle, and the current compressor speed, forming a unified feature vector output.

[0022] S3: Based on the unified feature vector and the working condition classification rule table, a gated routing module with dynamic sparse activation capability is designed. This module generates the corresponding path activation weight vector by calculating the similarity score between the input features and each working condition category, so as to determine the prediction head branch of the current optimal match.

[0023] S4: Input the path activation weight vector into the student model, activate only the prediction head branch whose weight exceeds the preset threshold, and the remaining branches enter a low-power sleep state, thereby forming a sparse inference path and reducing the amount of floating-point operations in the forward computation process.

[0024] S5: Based on the output soft label sequence of the teacher model under various working conditions, hierarchical knowledge inheritance training is performed on the student model. The soft label cross-entropy loss is used to optimize the overall output distribution, and the intermediate layer feature matching loss is introduced to constrain the output of the shared feature extraction layer, so that it approximates the feature response of the corresponding layer of the teacher model.

[0025] S6: Deploy the student model trained by hierarchical knowledge inheritance to the RV edge control device. During real-time operation, collect environmental perception parameters and input them into the shared feature extraction layer to obtain a unified feature vector under the current working condition, which serves as the basis for judgment by the gating routing module.

[0026] S7: Determine whether the path activation weight vector output by the gated routing module points to a single dominant branch. If it exists and its weight value is higher than the set activation threshold, then trigger the execution process of the corresponding prediction head and output the optimal displacement suggestion value for that branch.

[0027] S8: Based on the historical prediction error sequence cached locally, monitor the deviation trend of the current active branch. When the absolute value of the error rises above the adaptive threshold within multiple consecutive sampling periods, start the local fine-tuning mechanism and update the gradient of the last layer weight parameters of the prediction head with a small sample to maintain the performance of the edge model.

[0028] Step S1: Based on the multi-condition training data of the cloud-based teacher model, extract a set of operating condition labels for different operating environments. These labels include high-temperature cooling, low-temperature heating, and rapid cooling modes. Then, construct an operating condition classification rule table based on the mapping relationship between compressor displacement and energy efficiency ratio under each operating condition. Specifically, this includes: S1.1: Obtain the multi-condition training data sequence accumulated by the cloud-based teacher model in the historical operation cycle. The training data includes the outside temperature, the target temperature inside the vehicle, the current compressor speed and the corresponding optimal displacement output value. Based on the mapping relationship between the input parameter combination and the system energy efficiency ratio, execute the clustering analysis algorithm to identify typical operating modes with significant differences.

[0029] The cloud-based teacher model employs an "encoder + decoder" architecture. It utilizes a deep bidirectional LSTM encoder, composed of three stacked bidirectional LSTM layers to capture temporal dynamics. Each LSTM layer contains both forward and backward networks. The forward network processes the sequence from past to present, capturing positive causal relationships; the backward network processes the sequence in reverse, helping the model understand how the current state is "prepared" by recent history. The final hidden states of both networks are concatenated to form a comprehensive contextual encoding for each time step.

[0030] The use of three stacked layers aims to construct a hierarchical feature representation. The bottom layer LSTM (first layer) learns basic temporal patterns (such as the rate of temperature change and the frequency of rotational speed fluctuations); the middle layer (second layer) combines these basic patterns to form more complex operating condition segment features (such as "steady-state operation after rapid heating"); the top layer (third layer) integrates all segments and extracts a high-level abstract feature vector representing the overall operating condition of the entire time window.

[0031] The number of hidden units in each LSTM layer is set to 128. This dimension strikes a balance between model capacity and computational cost, sufficient to encode complex information. A Dropout layer with a Dropout rate of 0.2 is introduced after each LSTM layer to randomly discard some neuron outputs during training. This serves as a strong regularization method, effectively preventing overfitting to the training data and enhancing the model's generalization ability.

[0032] The decoder uses a non-linear mapping head, and the high-level feature vector output by the encoder is fed into a regression head consisting of a 3-layer fully connected network.

[0033] The layer structure and dimensions include: the first fully connected layer (FC1) reduces the feature vector dimension to 64 and introduces non-linearity using the ReLU activation function; the second layer (FC2) further compresses it to 32, also using ReLU; the final output layer (FC3) maps the dimension to 1, i.e., the displacement prediction value. This "funnel-shaped" structure helps to gradually focus on the information most relevant to the regression objective.

[0034] Feature fusion: In addition to temporal features, the model also directly concatenates some key static or instantaneous state parameters (such as the current voltage of the vehicle battery and the air conditioning system mode signal) after the feature vector output by the LSTM encoder, and inputs them together into the fully connected network. This ensures that the model can simultaneously consider temporal dynamics and key instantaneous states.

[0035] Input time window: The model sets a fixed-length sliding time window (e.g., the past 10 minutes, with a sampling interval of 1 minute, for a total of 10 time steps). The input vector for each time step includes: outside temperature, actual inside temperature, target inside temperature, compressor speed, current compressor displacement, and system high and low pressure.

[0036] Output and Supervision Signals: The model's supervision label (i.e., the "true value of optimal displacement") is generated through offline calculation. Specifically, in the cloud, using a digital twin of the RV air conditioning system containing a detailed thermodynamic model, combined with historical operating data, and with the objective of "maximizing the system's coefficient of performance (COP)," a model predictive control (MPC) optimization algorithm is run to calculate the theoretically globally optimal displacement sequence at each moment. This sequence serves as the "gold standard" for the teacher model's learning.

[0037] The training paradigm is as follows: The model is trained using a smoothed L1 loss, which is less sensitive to outliers than the mean squared error (MSE), making training more stable. Optimization uses the AdamW optimizer, whose weight decay strategy further prevents overfitting. The initial learning rate is set to 3e-4 and dynamically adjusted using a cosine annealing scheduling strategy.

[0038] The system acquires historical training data sequences from the cloud-based teacher model, and combines these with external temperature signals, target internal temperature signals, and current compressor speed signals stored in the system's environmental perception module, along with the optimal displacement suggestion value output by the teacher model, to form a multi-dimensional input-output correlated sample set. Timestamps are used to strictly align various signals, and sliding window segmentation processing is performed to achieve synchronous matching of input parameters and corresponding displacement values ​​in the time domain.

[0039] A multi-parameter feature combination strategy (parameters: outside temperature, target inside temperature, compressor speed) is adopted to construct the input feature vector, and the system energy efficiency ratio is introduced as additional label information. Calculated using the following formula: =

[0040] in, The cooling or heating capacity provided by the system within a specific operating cycle. This represents the electrical power consumed by the compressor during this cycle. Furthermore, this energy efficiency ratio label establishes a mapping relationship between input features and output displacement in the performance dimension, forming feature-performance data pairs for pattern recognition.

[0041] A K-means clustering algorithm based on Euclidean distance (parameter: the number of clusters k is determined based on the inflection point analysis of the energy efficiency ratio distribution) is used to perform unsupervised classification on the feature-performance dataset, obtaining initial typical pattern cluster partitioning results. Furthermore, standardization processing (parameters: zero mean, unit variance) is introduced to eliminate the scale influence of features under different dimensions, improving the clustering algorithm's ability to equally weight temperature and rotational speed features.

[0042] The silhouette coefficient evaluation method (parameter value range: [-1,1]) is used to quantitatively evaluate the inter-class separation and intra-class compactness of the initial clustering results. The K value is adjusted according to the evaluation results until the clustering scheme corresponding to the maximum silhouette coefficient is obtained, so as to ensure that the identified patterns are statistically significant.

[0043] By analyzing the characteristic vectors of cluster centers, typical environmental parameters and displacement characteristics of each pattern cluster are analyzed, and a set of operating modes exhibiting differentiated temperature gradients and energy efficiency curve shapes is extracted, providing a data foundation for subsequent semantic generation of operating condition labels. Through the above clustering analysis algorithm, the historical operating data from the previous step is transformed into pattern cluster data reflecting differences in operating conditions, achieving preliminary operating condition classification for different operating environments.

[0044] For example, in a certain RV air conditioning system, 30 consecutive days of operating data were collected, with a daily data sampling interval of 1 second, resulting in approximately 2.59 million records. Input features included the range of outside temperature within the vehicle. The target temperature range inside the vehicle is between [degrees Celsius]. Between degrees Celsius, the compressor speed range is Between RPMs, the optimal displacement value for real-time power and output is recorded simultaneously. The energy efficiency ratio is calculated using the formula... Calculation, where It is obtained by multiplying the enthalpy difference between the air at the fan outlet and the air at the inlet in the circulation cycle by the mass flow rate. Data was directly obtained from the electricity metering module. After zero-mean unit variance standardization, K-means clustering was performed with k=3, resulting in three pattern clusters with an average silhouette coefficient of 0.68, indicating good inter-cluster separation. Analysis of the cluster centers revealed that the first cluster exhibited characteristics of high external temperature, high speed, and high displacement; the second cluster showed low external temperature, low speed, and medium displacement; and the third cluster exhibited a medium external temperature, large temperature difference, and high-speed displacement variation. This pattern segmentation remained stable in the validation set, providing a reliable basis for the semantic definition of subsequent operating condition labels.

[0045] S1.2: Generate a set of operating condition labels based on the clustering results. Each operating condition label corresponds to a specific heat load scenario. Use expert experience rules to semantically label the clusters to form three discrete operating condition categories: high-temperature cooling, low-temperature heating, and rapid cooling mode. These categories serve as the functional division basis for subsequent model branch design.

[0046] Based on the cluster data of typical operating mode output by the S1.1 sub-step, the cluster center vector analysis method (parameters: mean vector of samples within the cluster, distance matrix between clusters) is used to achieve a global characterization of the feature distribution within each cluster.

[0047] Furthermore, by using the Euclidean distance metric algorithm between clusters (parameter: feature vector of each cluster center), the similarity and separability between different clusters are quantitatively evaluated, and the inter-cluster difference score is obtained.

[0048] Furthermore, the environmental parameters of the cluster center are thermodynamically quantified using the heat load calculation formula, as follows:

[0049] in, For heat load, For airflow, The specific heat capacity of air, The outside temperature of the vehicle. The target temperature inside the vehicle.

[0050] Furthermore, based on the heat load quantification results, an expert experience rule matching algorithm (parameters: heat load range threshold, historical operating condition label library) is used to semantically label clusters with specific heat load characteristics and generate a preliminary set of operating condition labels.

[0051] Furthermore, the accuracy of the preliminary working condition label set is verified by using a label consistency verification algorithm (parameters: label repetition rate, conflict rate), and the final semantic annotation results are output, including three discrete working condition categories: high temperature cooling, low temperature heating, and rapid cooling mode.

[0052] Through the multi-stage algorithm processing described above, the cluster feature mapping is transformed into an interpretable set of working condition labels, realizing the functional division of the operating mode and providing a clear input basis for the subsequent model branch design.

[0053] For example, in a RV air conditioning operation data analysis, cluster analysis yielded three cluster center feature vectors: [35, 22, 1800], [5, 28, 1500], and [30, 15, 2400], with units of °C, °C, and rpm, respectively. Using Euclidean distance to calculate the inter-cluster dissimilarity, the distance between the first and second clusters was found to be 15.2, the distance between the first and third clusters was 7.5, and the distance between the second and third clusters was 13.1. Substituting the cluster center data into the heat load formula, and taking an air flow rate m of 0.8 kg / s and an air specific heat capacity c of 1.005 kJ / (kg·°C), the heat load of the first cluster was... The calculated heat load was 10.46 kW, matching the high-temperature cooling mode; the second cluster's heat load was -18.54 kW, matching the low-temperature heating mode; and the third cluster's heat load was 12.06 kW, matching the rapid cooling mode. Label consistency verification showed a conflict rate of 0, generating the final operating condition label set. The energy efficiency boundary conditions corresponding to the three types of labels—high-temperature cooling, low-temperature heating, and rapid cooling—were significant in the validation set, improving the accuracy of subsequent model branch decisions.

[0054] S1.3: Calculate the nonlinear function relationship curve between compressor displacement and system energy efficiency ratio under each operating condition category, extract the distribution characteristics of energy efficiency extreme points for each operating condition based on the least squares fitting method, and generate a set of quantitative indicators reflecting the optimal operating range to define the high-efficiency working boundary.

[0055] Based on the completed set of operating condition labels and the corresponding training data sequence, a nonlinear curve fitting algorithm (parameters: spline interpolation or polynomial regression, and the fitting order is dynamically determined according to the data distribution characteristics) is used to model the functional relationship between compressor displacement and system energy efficiency ratio under each operating condition category.

[0056] Furthermore, by using the least squares fitting method (parameters: the fitting objective function is to minimize the sum of squares of the difference between energy efficiency ratio and displacement, and the initial weights are all set to 1), a smooth approximation of each fitting curve is achieved, and the coefficient matrix of the function expression for each type of working condition is obtained.

[0057] Furthermore, by solving for the zeros of the first derivative of the analytic function within the interval, a set of extreme points of the energy efficiency ratio is generated as a candidate set of optimal displacement points; the derivative process adopts a symbolic computation method to avoid estimation errors caused by numerical difference.

[0058]

[0059] in, This refers to the compressor displacement. This corresponds to the system energy efficiency ratio. , , The fitting coefficients are denoted as .

[0060] Furthermore, by calculating the formula for the first derivative of the function:

[0061] And order The extreme point is obtained:

[0062] This is the displacement value used to maximize energy efficiency.

[0063] Furthermore, statistical distribution analysis is performed on the set of extreme points for each type of operating condition to form a set of energy efficiency extreme point distribution characteristics, including the mean, standard deviation, and distribution density function estimation. The output is a set of quantitative indicators reflecting the optimal operating range, which is used to define the boundary of efficient operation.

[0064] The above algorithm transforms the functional relationship result from the previous step into an analytical extreme point index, and constructs the optimal displacement value range for high-temperature cooling, low-temperature heating and rapid cooling modes, thereby achieving the technical effect of efficient operation under various conditions.

[0065] For example, under a high-temperature cooling condition where the outside temperature is 38℃ and the target inside temperature is 24℃, the collected displacement-energy efficiency ratio data are (displacement: 15, 20, 25, 30, 35; energy efficiency ratio: 2.8, 3.2, 3.5, 3.4, 3.1). A second-order polynomial regression is used to obtain the fitted equation. The first derivative is Setting the derivative to zero, we get =22.5 L / min. Repeating the above calculations for low-temperature heating and rapid cooling conditions, the optimal displacements of 23.1 L / min and 28.4 L / min were obtained, respectively, forming a distribution feature set of energy efficiency extreme points. In the control system, this range of values ​​is used as the high-efficiency boundary parameter input to the operating condition classification rule table, achieving energy saving and stability improvement of the compressor in real-time control.

[0066] S1.4: Based on the quantitative index set and the input parameter range of the working condition category, construct a working condition classification rule table, wherein each rule includes the input parameter threshold range, the corresponding working condition label and the recommended displacement adjustment direction. Use the decision tree algorithm to formally express the classification logic and output a set of parsable classification criteria.

[0067] Based on the quantitative index set of each working condition category and its corresponding input parameter range output in the previous step S1.3, a rule extraction algorithm (parameters: input parameter threshold range, working condition label, optimal displacement adjustment direction) is used to generate an initial set of rule entries from the quantitative index set.

[0068] For example, in the RV air conditioning compressor control scenario, the outside temperature threshold range for the high-temperature cooling mode is set to... The target temperature threshold range inside the vehicle is [degrees Celsius]. The temperature range is [degrees Celsius], and the compressor speed threshold range is [range]. For rpm, it is recommended to adjust the displacement to increase it. In low-temperature heating mode, the outside temperature threshold range is set to... The target temperature threshold range inside the vehicle is [degrees Celsius]. The temperature range is [degrees Celsius], and the compressor speed threshold range is [range]. For rpm, the recommended displacement adjustment direction is to maintain or fine-tune. In rapid cooling mode, the outside temperature threshold range is... The target temperature threshold range inside the vehicle is [degrees Celsius]. The temperature range is [degrees Celsius], and the compressor speed threshold range is [range]. The recommended displacement adjustment direction is to significantly increase the displacement, given the rpm. After inputting the above rule parameters into the decision tree algorithm, the root node splits into three branches based on the outside temperature threshold range, leading to high-temperature cooling, low-temperature heating, and rapid cooling modes, respectively. The second-level nodes of each branch further refine the judgment based on the target temperature inside the vehicle, and the leaf nodes directly output the corresponding mode label and displacement adjustment direction. The verification results show that the pattern recognition and adjustment direction output maintain high accuracy under different operating condition sample inputs, significantly improving the real-time performance of the RV air conditioning system's operating condition judgment and the accuracy of energy efficiency decision-making.

[0069] S1.5: Perform consistency verification and boundary conflict detection on the working condition classification rule table, evaluate the classification accuracy based on the cross-validation method, and if there is an overlapping area that leads to the risk of misjudgment, introduce a fuzzy membership function to optimize the criterion transition area and generate the final version of the working condition classification rule table with robust discrimination capability.

[0070] The completed working condition classification rule table is input to a consistency verification processing module. The rule number, input parameter threshold range, and corresponding working condition label are set as key verification objects. A hash-based rule matching algorithm (parameters: rule key-value pair set, hash bucket number 256) is used to quickly compare the logical consistency among all rule entries. This method compares the endpoint values ​​of the input parameter range for each rule to detect whether there are mutually inclusive or conflicting interval combinations, and marks rule pairs that may cause classification conflicts.

[0071] Furthermore, cross-validation (parameters: K-fold number set to 10, training set / validation set ratio 9:1) is used to evaluate classification accuracy. The rule table is matched with historically labeled working condition data for testing, the accuracy index for each fold is calculated, and the average is taken as the overall classification performance evaluation value. Further, the criterion transition region is optimized using a fuzzy membership function, and the formula is constructed using a membership trigonometric function:

[0072] in, This is the lower limit of the transition zone. This is the upper limit of the transition zone. The input parameter value is μ(x), which is the membership degree of parameter x in the transition region and is used to smooth the result of the conflict region determination.

[0073] By mapping fuzzy membership function, the hard decision result of the conflict interval is transformed into continuous membership value, and the activation function of the corresponding rule criterion is reconstructed to form a smooth transition at the endpoint of the interval, thereby achieving robust optimization of the rule table.

[0074] By using a chain-like process of consistency verification, boundary conflict detection, cross-validation, and fuzzy membership optimization, the initial version of the working condition classification rule table is transformed into a final version of the rule table that is resistant to the risk of boundary fuzziness, thereby improving the stability and generalization ability of working condition discrimination.

[0075] For example, in the initial rule table stored in the cloud, the outside temperature threshold range for the high-temperature cooling condition rule is [30, 40]℃, and the outside temperature threshold range for the low-temperature heating condition rule is [35, 45]℃. A hash mapping algorithm is used to map the rule number and parameter threshold range to a hash bucket, and it is detected that the endpoint ranges of the two rules overlap. Using the interval overlap calculation formula, let... =30, =40, =35, =45, resulting in an O value of 5, which is determined to be a conflict event. Using 10-fold cross-validation, after fusing the fuzzy membership function, the lower limit 'a' of the transition region is set to 35, and the upper limit 'b' to 40. The membership curve smoothly increases from 0 to 1 in the [35, 40] interval, significantly improving the recognition stability at the conflict boundary. In validation set testing, the optimized rule table correctly identifies samples with a temperature of 37℃ as boundary high-temperature cooling conditions, avoiding cross-validation errors and ultimately achieving a significant improvement in classification performance across the entire operating range.

[0076] Step S2: Based on the operating condition classification rule table, a student model is constructed that includes a shared feature extraction layer and a dedicated prediction head structure. The shared feature extraction layer is used to extract common time-series features of the outside temperature, the target inside temperature, and the current compressor speed, forming a unified feature vector output. Specifically, this includes: S2.1: Based on the classification logic of high-temperature cooling, low-temperature heating and rapid cooling modes defined in the working condition classification rule table, analyze the overlap and distinguishability of the distribution of time series input data of outside temperature, inside target temperature and current compressor speed under each working condition in the feature space. Use principal component analysis algorithm to perform dimensionality reduction processing on multidimensional inputs to identify the low-dimensional latent space structure common to cross working conditions and obtain a transferable general temporal feature subspace.

[0077] Based on the classification logic of high-temperature cooling, low-temperature heating and rapid cooling modes defined in the working condition classification rule table, a time series distribution analysis method (parameters: outside temperature, inside target temperature, current compressor speed) is used to construct the distribution matrix of input data in a multi-dimensional feature space.

[0078] Furthermore, by using a feature space overlap measurement algorithm (parameters: sample covariance matrix, Euclidean distance metric), the overlap between input feature clusters under different working conditions is calculated, and a dataset of discrimination evaluation indicators is obtained.

[0079] Furthermore, the principal component analysis (PCA) algorithm (parameters: standardization method, covariance matrix solution method) is used to reduce the dimensionality of the multidimensional input feature matrix and generate feature ranking results.

[0080] Furthermore, principal component vectors are extracted using an eigenvalue decomposition algorithm (parameter: covariance matrix C), and a feature contribution rate sequence is generated to determine the number of dimensions in the low-dimensional latent space.

[0081] Furthermore, a low-dimensional mapping function is constructed based on the selected top K principal components to map the original time series features to a general time series feature subspace, and a set of potential feature vectors with cross-condition transfer capability is obtained.

[0082] By using principal component analysis for dimensionality reduction, the feature distribution analysis results from the previous step are transformed into a transferable general temporal feature subspace, thus realizing the input basis required for the design of a shared feature extraction layer.

[0083] S2.2: Based on the identified general temporal feature subspace, a shared feature extraction layer architecture is designed. A stacked one-dimensional convolutional neural network is used to extract local patterns from the original environmental perception temporal data. Nonlinear enhancement is performed through batch normalization and modified linear unit activation function to generate a primary spatiotemporal feature map with translation invariance, which serves as the basic input for subsequent high-level semantic modeling.

[0084] Based on the general temporal feature subspace parameters identified in the previous sub-step, a shared feature extraction layer architecture is constructed using a stacked one-dimensional convolutional neural network. By setting the convolutional kernel size and stride, local pattern extraction of the original environmental perception temporal data is achieved, ensuring multi-scale capture of short-term fluctuation patterns of external temperature, internal target temperature, and compressor speed sequences.

[0085] Furthermore, through a batch normalization algorithm (parameter: channel direction mean μ) c With variance σ c In batch calculations, the scaling factor γ is learned. c With translation factor β c Normalization of the convolution output stabilizes the feature distribution and accelerates model convergence, while suppressing the risks of gradient vanishing and exploding.

[0086] Furthermore, a nonlinear enhancement mechanism is introduced at each normalized output unit using the modified linear unit (ReLU) activation function. The input parameter value is obtained by executing the formula on the input x.

[0087] This approach achieves linear preservation of features in the positive interval and nullification of features in the negative interval, thereby enhancing the network's ability to express diverse environmental features.

[0088] Furthermore, by using a multi-layered stacked convolution-normalization-activation combination structure and different convolution kernel sizes and dilation coefficients, pattern analysis is performed on the input temporal data within different receptive fields to generate a primary spatiotemporal feature map that has translation invariance and contains high and low frequency components.

[0089] Through the aforementioned algorithm chain, the local patterns of the original time-series data are transformed into primary spatiotemporal feature tensors that have undergone nonlinear enhancement and scale fusion, thus providing a robust input foundation for subsequent high-level semantic modeling.

[0090] For example, in the RV air conditioning compressor control scenario, for three time-series data points—outside temperature, target inside temperature, and compressor speed—sampled at a frequency of 1Hz, the parameters of the first convolutional group in the shared feature extraction layer are set as follows: kernel length 7, stride 1, number of input channels 3, and number of output channels 32. The parameters of the second convolutional group are set as follows: kernel length 5, stride 1, dilation coefficient 2, and number of output channels 64. Batch normalization uses ε as... The activation function output is zero for negative inputs and retains its original value for positive inputs. The input samples are the temperature and rotation speed sequences of the most recent 60 seconds. After processing by convolution group one, a feature map of size (32×54) is obtained. After processing by convolution group two, a feature map of size (64×50) is obtained. The batch normalized output mean is stable around 0.0, and the variance is close to 1.0. Finally, by stacking the two sets of feature maps and concatenating the channels, a primary spatiotemporal feature map of size (96×50) is formed, containing multi-scale temperature change waveforms and rotation speed fluctuation patterns. This map can be directly input into the long short-term memory network encoding layer to achieve subsequent generation of unified feature vectors and efficient working condition discrimination.

[0091] S2.3: Perform long short-term memory network encoding on the primary spatiotemporal feature map to capture the dynamic trend and periodic dependence of the change process between the outside temperature and the target temperature, output the temporal hidden state sequence containing historical state information, and perform a fully connected mapping on the hidden state vector of the final time step to generate a unified feature vector of fixed dimension as an intermediate representation for working condition discrimination.

[0092] S2.4: Based on the energy efficiency ratio-displacement mapping characteristics of each mode in the working condition classification rule table, construct multiple dedicated prediction head structures. Each prediction head is based on an independent feedforward neural network branch, which optimizes the output space for specific working conditions such as high-temperature cooling, low-temperature heating, or rapid cooling. Its input is connected to the unified feature vector output by the shared feature extraction layer, realizing the mapping transformation from general representation to dedicated decision.

[0093] The input conditions include the unified feature vector output after processing by the shared feature extraction layer, and the energy efficiency ratio-displacement mapping characteristics corresponding to the high temperature cooling, low temperature heating and rapid cooling modes predefined in the working condition classification rule table.

[0094] A feature mapping analysis method (parameters: unified feature vector dimension, number of operating condition categories) is employed to map the unified feature vector as a high-dimensional input to the optimization decision space corresponding to each operating condition, generating pattern-specific initial feature weight templates. Furthermore, a feedforward neural network construction method (parameters: input dimension and number of hidden layer nodes are set according to the optimization needs of each operating condition) is used to design a dedicated prediction head structure for optimizing the characteristics of a single operating condition, resulting in an independent network topology for each dedicated prediction head.

[0095] Furthermore, a parameter initialization strategy is adopted (parameters: mean and variance of weights based on the corresponding working condition branches of the cloud-based teacher model) to achieve adaptive initialization of the weights of each dedicated prediction head network and generate an initial prediction state consistent with the characteristics of the teacher model. Furthermore, through a connection mapping configuration method (parameters: shared feature extraction layer output node index, prediction head input node index), a unidirectional binding between the input ends of each dedicated prediction head and a unified feature vector is achieved, and a complete general-to-dedicated path mapping table is generated.

[0096] By using the operating condition characteristic optimization algorithm (parameters: energy efficiency ratio-displacement curve fitting coefficient, loss function type), the independent structure of the prediction head in the previous step is transformed into a decision sub-model with the ability to respond to the extreme value of energy efficiency under the corresponding operating condition, thereby realizing the mapping transformation from shared representation to displacement output prediction under specific operating conditions.

[0097] For example, in the high-temperature cooling condition of a motorhome air conditioning system, the unified feature vector dimension is set to 64, the number of condition categories is 3, the number of hidden layer nodes in the high-temperature cooling prediction head is set to 128, and the number of nodes in the low-temperature heating and rapid cooling prediction heads are set to 96 and 112, respectively. A feedforward neural network is used, with the input layer receiving a 64-dimensional unified feature vector, processed by two layers of fully connected networks with ReLU activation. The number of output layer nodes equals the number of selectable displacement levels, for example, 5 displacement levels, and the output is a probability distribution. During parameter initialization, the mean of the high-temperature cooling prediction head weight matrix is ​​set to 0.01, and the variance is 0.002, obtained based on the statistical values ​​of similar condition weights from the teacher model. The connection mapping configuration method directly maps the 1st to 64th output nodes of the shared feature extraction layer to the input nodes of the high-temperature cooling prediction head, ensuring no information loss. In the condition characteristic optimization stage, the fitting coefficient of the energy efficiency ratio-displacement curve is obtained by the least squares method, for example, the compressor displacement. Energy efficiency ratio The relationship can be represented as:

[0098] in, , , The fitted coefficients are used as input parameters for the prediction head loss function to optimize the output space, making it closer to the energy efficiency extreme point under the corresponding operating conditions. When this scheme is implemented, the deviation between the displacement recommendation value output by the high-temperature refrigeration prediction head and the displacement corresponding to the actual energy efficiency extreme point is significantly reduced. The low-temperature heating and rapid cooling prediction heads also achieve significantly improved prediction accuracy under the corresponding operating conditions. The overall compressor control strategy exhibits higher energy efficiency stability in real-time operation.

[0099] S2.5: The connection relationship between the shared feature extraction layer and each dedicated prediction head is modularly encapsulated to form a pluggable hierarchical model topology. The parameters of the shared feature extraction layer are completely shared across all operating conditions, while each prediction head only participates in gradient updates in its corresponding operating condition. This completes the structural decoupling of the classification logic, ensuring that the model has a unified feature expression capability while supporting fine-grained branch control.

[0100] The connection relationship between the unified feature vector output by the shared feature extraction layer and the input of each dedicated prediction head is constructed using a modular encapsulation method (parameters: connection strategy matrix, feature dimension mapping rule), thereby achieving the structural independence of the hierarchical model.

[0101] Furthermore, by using a dependency graph parsing algorithm (parameters: node type identifier, edge weight coefficient), the topological separation of the shared feature extraction layer parameter set and the prediction head parameter set is achieved, and a directed acyclic graph structure containing only unidirectional data flow from the shared layer to each prediction head is generated, thus confining the gradient path within its respective dedicated branch during the training process.

[0102] Furthermore, a parameter sharing and locking mechanism (parameters: shared layer weight index table, update mask) is adopted to achieve global uniformity of gradient backpropagation of the shared feature extraction layer under all working conditions, while each prediction head weight only participates in gradient update when its matching working condition training sample appears, thereby preventing branch parameter drift caused by cross-working condition training.

[0103] Furthermore, a plug-in / plug-out management program driven by a working condition mapping table (parameters: branch identifier, load / unload instruction set) enables dynamic loading and release of the prediction head structure during the inference or training phase, reducing runtime resource consumption of inactive branches and supporting online replacement or optimization of branches.

[0104] By employing a layered encapsulation and parameter update isolation strategy, the classification logic results from the previous step are transformed into a maintainable model module relationship table, thereby achieving a refined combination control of unified feature representation capabilities and branch decision-making.

[0105] like Figure 2As shown, step S3 involves designing a gated routing module with dynamic sparse activation capability based on the unified feature vector and the working condition classification rule table. This module generates corresponding path activation weight vectors by calculating the similarity scores between the input features and each working condition category, thereby determining the current optimal matching prediction head branch. Specifically, this includes: S3.1: Based on the high-temperature cooling, low-temperature heating and rapid cooling mode categories defined in the working condition classification rule table, a similarity measurement function that can map a unified feature vector to the working condition space is constructed. This function uses a weighted cosine similarity algorithm to match and calculate the unified feature vector with the template features of each working condition. The template features are generated by the average value of typical features accumulated by the cloud teacher model in the corresponding working condition over a long period of time, so as to obtain the initial matching degree score vector of each working condition category.

[0106] Based on the unified feature vector output by the shared feature extraction layer and the set of working condition categories in the working condition classification rule table, a weighted cosine similarity algorithm (parameters: unified feature vector dimension, weight coefficient setting and working condition template feature vector) is used to calculate the matching degree between the unified feature vector and the template feature vector of each working condition category.

[0107] Furthermore, by using the working condition template feature vector construction method (parameter: long-term running feature sample set of the cloud teacher model under the corresponding working condition), the template feature vector is generated, and the typical feature mean dataset of each working condition category is obtained.

[0108] Furthermore, a standardization processing algorithm (parameters: feature mean and variance) is adopted to achieve dimensional normalization of the unified feature vector and the working condition template features, so that the interference of dimensional differences is eliminated in the similarity calculation process, and normalized feature vector pairs are generated.

[0109] Furthermore, the matching degree between the unified feature vector and the feature vector of a certain working condition template is calculated using the weighted cosine similarity formula. By performing the above weighted cosine similarity calculation on all working condition categories, a complete initial matching degree score vector is generated to reflect the similarity level between the unified feature vector and the template features of each working condition category.

[0110] By using a weighted cosine similarity algorithm, the unified feature vector from the previous step is transformed into a matching score for each working condition category, thus providing the initial path matching basis for the gated routing module.

[0111] For example, when the RV's air conditioning system is operating in a high-temperature summer environment, and the outside temperature is... ℃, target temperature inside the vehicle is ℃, compressor speed is Under RPM conditions, the uniform feature vector dimension is set to The weight coefficients for each dimension are set from 0.5 to 1.5 depending on the importance of the operating condition. The mean template feature vector accumulated by the cloud-based teacher model under high-temperature cooling mode is... The array is a dimensional array, where each dimension has been standardized. The matching degree between the unified feature vector and the high-temperature refrigeration template features is calculated, and the similarity value is obtained using the above formula. The matching degree between the low-temperature heating mode and the rapid cooling mode is respectively and In this case, the initial matching degree vector is [0.92, 0.15, 0.30], reflecting the strong matching between the current input conditions and the high-temperature refrigeration template. This output will be used for the normalization and working condition attribution confidence generation process in the next step S3.2, which significantly improves the accuracy and stability of working condition discrimination.

[0112] S3.2: Normalize the initial matching score vector and use the Softmax function to convert it into a probability distribution form of the work condition attribution confidence vector, which serves as the preliminary result of the path activation weight vector. Each dimension corresponds to the activation probability of a dedicated prediction head branch, ensuring that the output has interpretability and numerical stability, and providing a quantitative basis for subsequent dynamic routing decisions.

[0113] S3.3: Introducing an environmental sensitivity adjustment factor, dynamically adjusting the weight sensitivity of each operating condition category based on the real-time input difference between the outside temperature and the target temperature inside the vehicle, and performing secondary optimization of the operating condition assignment confidence vector through multiplicative modulation to enhance the discrimination robustness of the gated routing module under extreme temperature differences or transitional operating conditions, and outputting the path activation weight vector after environmental compensation.

[0114] S3.4: Input the path activation weight vector after environmental compensation into the sparse selection logic unit, perform a threshold comparison operation to determine whether the weight of each branch exceeds the preset activation threshold, and generate a binary activation mask sequence, where '1' indicates triggering the corresponding prediction head branch and '0' indicates maintaining the dormant state, thereby forming a controllable sparse activation mode, which serves as the final control command output of the gated routing module.

[0115] Using the path activation weight vector after environmental compensation as input, a sparse selection logic unit based on threshold comparison (parameter: preset activation threshold τ) is used to determine the activation state of the working condition branch.

[0116] Furthermore, by comparing the relationship between each element in the path activation weight vector and the threshold τ, element-wise binarization mapping is performed to obtain a binary activation mask sequence dataset with a length equal to the number of branches, where the element value is... The index position corresponds to the prediction head branch that needs to be activated, and the element value is... The index position corresponds to the prediction head branch that needs to be dormant.

[0117] Furthermore, a logic gate control algorithm (parameter: binary activation mask sequence) is used to perform NAND gate combination operations on the running state signals of all branches, so that only activation of the flag is allowed. One branch keeps the data path open, while the other branches cut off the input data stream link and enter a sleep mode for processing.

[0118] Furthermore, by utilizing Boolean index mapping relationships, the mask sequence is... Mapped to a run enable signal, The signal is mapped to a run-disable signal and the signal set is bound to the corresponding prediction head branch execution unit. The clock supply to the computation core of the branch is triggered or turned off by controlling the instruction bus, thus forming a sparse execution control effect.

[0119] By combining sparse selection logic with activation threshold determination, the path activation weight vector after environmental compensation is transformed into a binary activation mask that can directly drive the branch module, thereby achieving controllable output of dynamic sparse activation mode, improving the energy utilization efficiency of edge devices under multiple operating conditions and maintaining high-performance prediction accuracy.

[0120] For example, in a certain RV air conditioning system operation scenario, the path activation weight vector after environmental compensation is [0.82, 0.35, 0.91], and the preset activation threshold τ is set to... When performing the threshold comparison operation, the weights of branches 1 (0.82 ≥ 0.8), 3 (0.91 ≥ 0.8), and 2 (0.35 < 0.8) are calculated. Binary mapping generates a binary activation mask sequence [1, 0, 1], representing the activation of branches 1 and 3, and the dormancy of branch 2. This mask sequence is input to the logic selection unit. Branches 1 and 3 receive a unified feature vector and initiate inference operations, while the input and computation core clock of branch 2 are turned off, significantly reducing static power consumption. In this scenario, the prediction latency is reduced to one-third of the original scheme, the floating-point operations in the inference process are significantly reduced, the overall energy efficiency is significantly improved, and the prediction output maintains an accuracy level close to that of the fully activated case.

[0121] S3.5: A branch execution priority queue is jointly constructed based on the binary activation mask sequence and the path activation weight vector. When multiple branches are activated at the same time, they are sorted according to their weights and a preemptive execution strategy is set to ensure that the high-confidence branches complete the output of the optimal displacement suggestion value first, thereby improving the system's response accuracy and resource scheduling efficiency in complex and ever-changing environments.

[0122] like Figure 3As shown, step S4 involves inputting the path activation weight vector into the student model, activating only the prediction head branch whose weights exceed a preset threshold, while the remaining branches enter a low-power sleep state, thereby forming a sparse inference path and reducing the amount of floating-point operations during the forward computation process. Specifically, this includes: S4.1: Based on the path activation weight vector output by the gated routing module, obtain the working condition matching score corresponding to each prediction head branch, wherein the path activation weight vector is a soft weight distribution sequence generated by normalizing the similarity score, which serves as the input condition for judging the branch activation state.

[0123] S4.2: The path activation weight vector is binarized according to the preset activation threshold to generate a branch activation mask matrix. The corresponding position of the element with a weight value greater than or equal to the activation threshold is set to 1, indicating that the corresponding prediction head needs to be activated; the other positions are set to 0, indicating that the corresponding branch enters a low-power sleep state, so as to form a sparse inference control signal.

[0124] The activation determination process is performed on the path activation weight vector. The input object is the path activation weight vector after environmental compensation, and its elements correspond to the current activation probability values ​​of each prediction head branch in the student model.

[0125] A threshold comparison algorithm (parameter: preset activation threshold τ) is used to perform a comparison operation between each weight element and the threshold τ, and output a Boolean judgment result matrix as a preliminary activation state marker.

[0126] Furthermore, by using a binarization mapping method (parameter: comparison result matrix), the Boolean value "true" in the judgment result matrix is ​​mapped to a numerical value. "False" is mapped to numerical value And generate a binary vector that corresponds one-to-one with the prediction head branch index.

[0127] Furthermore, through a matrix reconstruction algorithm (parameters: binary vector and branch topology index table), the binary vector is expanded into a branch activation mask matrix with the same size as the model branch structure, and its rows and columns correspond to the on / off states of the prediction head branch and its internal execution nodes.

[0128] Furthermore, the branch activation mask matrix is ​​subjected to consistency verification by the logic operation unit to ensure that the activation bits are correctly mapped to the prediction head branch input path, thus avoiding the activation signal from triggering the wrong branch.

[0129] By using the aforementioned binarization discrimination and matrix construction processing methods, the continuous path activation weight vector from the previous step is transformed into a discrete sparse inference control signal, thereby achieving the expected technical effect of activating the prediction head branch and suspending the remaining branches as needed based on the dynamic judgment results.

[0130] For example, in the edge device of the RV air conditioning control system, a preset activation threshold τ is set as... The path activation weight vector is [ , , The threshold comparison algorithm is used to perform the following operation on the first element. If the condition is true, execute the following on the second element. If the condition is false, execute the following on the third element. If the condition is true, then after binarization mapping, the result is [ , , A 3×N branch activation mask matrix is ​​generated by combining a matrix reconstruction algorithm with a three-branch topology index table, where the first and third rows are all... Indicates full activation, line 2 This indicates a hibernation phase. During the scheduling phase, only the first and third dedicated prediction heads receive the output of the shared feature extraction layer. The second prediction head cuts off the memory access path for the weight parameters and shuts down the core clock. This significantly reduces the system's floating-point operations and shortens the inference latency, while maintaining the continuity and stability of optimal displacement prediction.

[0131] S4.3: Input the branch activation mask matrix into the execution scheduling unit of the student model to control the running switch state of each prediction head sub-network in the model computation graph. Only the prediction head branch with a mask value of 1 is allowed to receive the unified feature vector from the shared feature extraction layer and start its local forward inference process to limit the scale of neural network parameters actually involved in the computation.

[0132] The branch activation mask matrix generated by binarization discrimination is input into the execution scheduling unit of the student model. The graph computation dependency parsing method (parameters: mask matrix, model computation graph structure description file) is used to achieve precise control over the switching state of each prediction head sub-network.

[0133] Furthermore, by using a directed acyclic graph traversal algorithm (parameters: node identifier = prediction head branch ID, edge weight = data flow channel priority), data flow paths are established only for prediction head branches with a mask value of 1, and the tensor transmission path between branches with a mask value of 0 and the shared feature extraction layer is blocked, thus preventing inactive branches from participating in the operation.

[0134] Furthermore, a unified feature vector input mapping mechanism is adopted (parameters: feature vector dimension = fixed, mapping method = direct tensor binding) to selectively bind the unified feature vector output by the shared feature extraction layer to the input of the activated prediction head according to the mask matrix, ensuring that the local forward inference process is executed only in the necessary branches.

[0135] Furthermore, the computation graph runtime optimization algorithm (parameters: batch size = 1, inference mode = sparse execution) is used to perform operator fusion and memory prefetch optimization on the prediction head sub-networks participating in the computation, thereby reducing the number of times intermediate features are exchanged between GPU memory and cache, thus limiting the scale of neural network parameters actually participating in the computation.

[0136] By using the graph computation dependency parsing and runtime optimization methods described above, the sparsification control signal from the previous step is transformed into a dynamically executable model subgraph instance, enabling selective inference and energy efficiency improvement of the edge student model under low power conditions.

[0137] For example, during the execution of the student model of the RV air conditioning edge control device, the activation threshold is set to 0.65, and the branch activation mask matrix is ​​[1,0,1], indicating that the high-temperature cooling prediction head and the rapid cooling prediction head are activated, while the low-temperature heating prediction head is dormant. The execution scheduling unit loads the computation graph structure description file and parses out the node ID set {H1,H3} of the corresponding prediction head. The directed acyclic graph traversal algorithm deletes node H2 and its input edges, while retaining the complete data flow path of nodes H1 and H3. The unified feature vector output by the shared feature extraction layer has a dimension of 128 and is directly bound to the input ports of nodes H1 and H3. The runtime optimization algorithm executes the operator fusion strategy when the batch size is 1, merging the convolution and activation operations into a single kernel call and submitting prefetch instructions to preload the weight cache. Finally, the parameter size involved in inference is reduced from 2.6M in the complete model to 0.87M, and the inference time is shortened to 40% of the original, significantly improving execution efficiency while maintaining the continuity of displacement prediction.

[0138] S4.4: Perform low-power management operations on the prediction head branch that is in a dormant state, including cutting off the memory access path of its weight parameters, pausing the update of related registers, and turning off the clock supply of the corresponding computing core, so as to reduce the static power consumption and resource consumption caused by redundant data reading, thereby optimizing the overall energy efficiency ratio.

[0139] S4.5: Generate a candidate set of optimal displacement suggestions based on the local inference results of the activated prediction head branch, and perform weighted fusion processing by combining the dominant branch weight strength in the path activation weight vector to output the final compressor target displacement command, ensuring that the output continuity and control stability are maintained under sparse activation conditions.

[0140] Step S5: Based on the output soft-label sequences of the teacher model under various working conditions, hierarchical knowledge inheritance training is performed on the student model. This involves optimizing the overall output distribution using soft-label cross-entropy loss and introducing intermediate layer feature matching loss to constrain the output of the shared feature extraction layer, making it approximate the feature response of the corresponding layer in the teacher model. Specifically, this includes: S5.1: Based on the original input data and corresponding soft label sequences generated by the cloud-based teacher model under various working conditions such as high-temperature cooling, low-temperature heating and rapid cooling, the supervision signal required for student model training is obtained; wherein the soft label sequence is the probability distribution of the softmax output of the last layer of the teacher model, reflecting the confidence of the energy efficiency ratio under different displacement suggestions, and serving as the target distribution for subsequent knowledge distillation.

[0141] S5.2: Perform soft label cross-entropy loss calculation on the final output of the student model. That is, perform KL divergence minimization optimization on the displacement probability distribution output by the student model under the current input conditions and the soft label sequence provided by the teacher model to reduce the distribution difference between the two on the optimal displacement suggestion and improve the fidelity of the overall decision distribution of the student model.

[0142] The displacement probability distribution output by the student model under the current input conditions is optimized using the soft label cross-entropy minimization method based on Kullback-Leibler divergence (KL divergence) to compare it with the soft label sequence provided by the teacher model (parameter: probability distribution P). s This represents the student model output, with probability distribution P. t (This represents the soft label of the teacher model, with C categories), to achieve a close approximation of the optimal displacement suggestion probability distribution between the two.

[0143] Furthermore, normalization ensures P s With P t To satisfy the probability distribution validity constraint, the predicted probabilities of each category must be summed and normalized so that the sum of the probabilities of all categories is strictly equal to the sum of the probabilities of all categories. And ensure that each element is non-negative, thereby avoiding numerical overflow problems during gradient calculation.

[0144] Furthermore, the KL divergence is calculated as the loss function using the following MathML formula:

[0145] in, Let be the predicted probability of the teacher model for displacement category i. Let be the predicted probability of the student model for displacement category i. This is the loss value. The total number of categories, This is a summation operation across all categories.

[0146] Furthermore, the gradient backpropagation algorithm (parameters: optimizer is Adam, learning rate is 1e-4, momentum parameters β1=0.9, β2=0.999) is used to calculate the gradient of the loss function L with respect to each parameter of the student model on the current batch of samples, and update the weight matrices of the output layer and the prediction head network to realize the transformation of the model output probability distribution to P.t Convergence of the distribution.

[0147] Furthermore, the decreasing trend of L value after each training batch is evaluated through a dynamic monitoring mechanism of loss value. If the decrease of L value tends to be stable for multiple consecutive batches, the learning rate is adjusted to reduce the step size, so as to refine the parameter convergence process and avoid overfitting, thereby achieving stable approximation of the output distribution under various working conditions.

[0148] By using soft-label cross-entropy and KL divergence minimization, the supervision signal from the previous step is transformed into a fidelity improvement index of the student model in the displacement probability distribution space, thereby achieving stable and high-precision prediction output of the student model under multiple operating conditions.

[0149] For example, under high-temperature cooling conditions in a motorhome air conditioning system, the input parameters are: outside temperature 38℃, target inside temperature 25℃, and current compressor speed 2800rpm. The unified feature vector generated by the shared feature extraction layer has a dimension of 128. The soft label sequence output by the teacher model is [0.05, 0.15, 0.55, 0.25], and the current output of the student model is [0.12, 0.10, 0.50, 0.28]. The number of categories C is 4, and after normalization, both satisfy the condition that the sum of probabilities equals 1 / 2. Substituting into the formula, calculate the KL divergence loss value:

[0150] Numerical calculations yielded L to be approximately 0.015. After backpropagation and Adam optimization to update the output layer weights, the distribution difference between the student model's displacement suggestions and the teacher model's results for this operating condition on the test set was significantly reduced. The compressor's energy efficiency ratio and comfort remained at a high level, verifying the practicality and robustness of this method in low-computing-power scenarios for edge devices.

[0151] S5.3: Based on the intermediate activation feature maps of the shared feature extraction layer in the teacher model under multiple input conditions, obtain its high-dimensional representation in the general temporal feature space; use the L2 regularization loss function to perform channel-by-channel feature matching on the output of the corresponding shared feature extraction layer in the student model, forcing the basic backbone network of the student model to learn the same low-level feature abstraction ability as the teacher model.

[0152] Based on the results of the teacher model under various typical working conditions, the intermediate activation feature maps of its shared feature extraction layer at each time step are obtained, forming a high-dimensional feature representation matrix covering scenarios such as high-temperature cooling, low-temperature heating, and rapid cooling.

[0153] A feature normalization method (parameters: zero mean, unit variance) is used to normalize the intermediate activation feature maps of the teacher model channel by channel, eliminating the matching bias caused by the difference in feature amplitude under different working conditions, and providing a data basis with a unified scale for subsequent similarity measurement.

[0154] By using a channel resampling algorithm (parameter: consistent channel order mapping table), the consistency of channel indexes between the teacher model and the student model in the output of the shared feature extraction layer is guaranteed, thereby enabling the channel-by-channel matching process to be executed bit-to-bit.

[0155] An L2 regularized loss function is constructed based on the Euclidean distance metric, and the channel-by-channel difference is calculated between the output of the shared feature extraction layer of the student model and the output of the corresponding layer of the teacher model.

[0156] Furthermore, by using the gradient backpropagation method, the weight parameters of the shared feature extraction layer of the student model are updated based on the L2 regularized loss function mentioned above, thereby achieving forced alignment training of the abstraction ability of the underlying features and gradually approximating the general temporal feature space representation of the teacher model.

[0157] By using the above-mentioned channel-by-channel feature matching and weight update processing method, the similarity of feature maps is transformed into an optimizable loss value, thereby achieving a high degree of consistency in the low-level feature abstraction ability of the student model under various working conditions.

[0158] S5.4: The soft-label cross-entropy loss and the intermediate layer feature matching loss are weighted and fused according to preset weight coefficients to construct a joint optimization objective function; based on this joint loss function, backpropagation and gradient update are performed on all trainable parameters of the student model to achieve end-to-end hierarchical knowledge inheritance from output distribution to intermediate representation.

[0159] The soft-label cross-entropy loss and the intermediate layer feature matching loss are numerically normalized separately, and a weighted fusion method is used (parameters: the set of weight coefficients [w1, w2] are derived from the training set performance evaluation results) to construct a composite loss function. Furthermore, a linear combination strategy is used to merge the two loss terms into a unified expression, the specific calculation formula of which is: in This represents the soft-label cross-entropy loss value. This represents the intermediate layer feature matching loss value, achieved by selecting an appropriate value. and Achieve a balance between the two subtasks.

[0160] The gradient backpropagation algorithm (parameters: batch size B, learning rate η, momentum factor μ) is used to solve for the derivative of the joint loss function with respect to all trainable parameters of the student model. Furthermore, based on the chain rule, the partial derivatives of the total loss function with respect to the parameters of each layer are expanded, where the gradient for updating the parameters of the shared feature extraction layer is a linear superposition of the output layer gradient of the soft-label loss and the feature layer gradient of the intermediate layer loss in the parameter space according to their weight ratios. Finally, the parameter vector is updated using stochastic gradient descent. The following iterative formula is used: in This is the joint gradient vector for the current batch, modified by the momentum term to accelerate convergence and reduce gradient oscillations.

[0161] By employing parameter recalibration and weight decay mechanisms in the batch normalization layer, overfitting is suppressed while maintaining the model's generalization ability under different working conditions. During the update process, a partial freezing strategy is implemented for the parameters of each dedicated prediction head, unfreezing and updating their weight matrices only when samples from the corresponding working condition are used in training, thus ensuring the working condition specificity of hierarchical knowledge inheritance.

[0162] By using the weighted fusion and global gradient update processing methods described above, the dual supervision signals of soft label and feature matching in the previous step are effectively transformed into a unified parameter optimization driver, achieving a consistent learning effect from the overall output distribution to the intermediate representation.

[0163] For example, during the training of the optimal displacement prediction model for a motorhome air conditioning system, a total of 6000 samples were selected for three operating conditions: high-temperature cooling, low-temperature heating, and rapid cooling. The soft-label loss weights were used for... The feature matching loss weight is set to 0.65. Set to 0.35. Use batch size B=128, learning rate... =0.002, momentum factor μ=0.9. For high-temperature refrigeration samples, the batch average of soft-label cross-entropy loss is 0.45, and the average of intermediate layer feature matching loss is 0.30. The total loss for each batch is calculated according to the weighted fusion formula: The resulting loss value is 0.3925. Under this loss, gradient backpropagation is performed, and the calculated update magnitude of the shared feature extraction layer weights is approximately 2.4 × 10⁻⁶. - ³, the update amplitude of the dedicated prediction head is approximately 1.1 × 10⁻⁶. - ³. After 50 training cycles, the displacement prediction bias of the three operating conditions in the validation set was significantly reduced, and the energy efficiency ratio improvement effect remained stable under different operating conditions, indicating that the weighted fusion and global parameter update method has a significant performance improvement effect in hierarchical knowledge inheritance.

[0164] S5.5: After each training cycle, evaluate the student model's displacement prediction accuracy and energy efficiency ratio gain on the validation set for each operating condition, and compare it with the teacher model's performance benchmark; if the performance gap steadily converges within multiple consecutive cycles and meets the deployment threshold requirements, then the hierarchical knowledge inheritance training is considered complete, and the final student model parameters are output for edge deployment.

[0165] After receiving the student model parameter state data after training the joint optimization objective function, an independent performance measurement method based on the validation set and working condition evaluation is adopted (parameters: validation set dataset partitioning scheme, working condition category label set) to achieve independent performance measurement for three types of working conditions: high temperature cooling, low temperature heating and rapid cooling.

[0166] Furthermore, by using the displacement prediction accuracy calculation method (parameters: predicted output sequence, actual displacement label sequence), the prediction accuracy of each working condition mode on the validation set is statistically analyzed, and an accuracy index matrix classified by working condition is obtained.

[0167] Furthermore, an energy efficiency ratio gain calculation algorithm (parameters: predicted displacement sequence, actual operating energy efficiency ratio sequence, and baseline energy efficiency ratio) is used to quantitatively evaluate the energy-saving effect under various operating conditions. The energy efficiency ratio gain is calculated using the following formula:

[0168] in, For energy efficiency ratio, This represents the energy efficiency ratio predicted by the student model for the given engine displacement. This represents the baseline energy efficiency ratio of the teacher model.

[0169] Furthermore, through a performance gap comparison algorithm (parameters: accuracy index matrix, energy efficiency ratio gain matrix, teacher model benchmark index), the performance difference between the student model and the teacher model is quantitatively analyzed on a periodic basis, and a performance gap time series is generated.

[0170] Furthermore, by using a performance convergence determination method (parameters: performance gap time series, convergence threshold, number of consecutive cycles), the convergence of the student model training process is automatically monitored, and a training completion determination signal is generated.

[0171] By using the performance convergence determination results, the performance gap analysis of the previous step is transformed into deployment adaptation determination data, thereby achieving the technical effect of the student model entering the edge deployment stage.

[0172] For example, the multi-condition verification dataset for the RV air conditioning system includes three scenarios: high-temperature cooling, low-temperature heating, and rapid cooling. The verification sample sizes are configured as 1000, 800, and 600 respectively. Real displacement labels are obtained through sensor acquisition and filtering. For the high-temperature cooling mode, the student model's predicted displacement sequence, compared to the real labels, has an accuracy of 0.92; the teacher model's accuracy is 0.94. In the energy efficiency ratio gain calculation, under the high-temperature cooling mode... It is 4.8. The value is 4.85, and the calculated gain is... for In low-temperature heating mode, the accuracy rate was 0.91, while the teacher model's accuracy rate was 0.93. It is 5.2. The gain is 5.18. In rapid cooling mode, the accuracy rate is 0.90, the teacher model accuracy rate is 0.92, and the energy efficiency ratio gain is [missing value]. When the time series fluctuation value of the difference between five consecutive training cycles is lower than the convergence threshold of 0.02, a training completion judgment signal is triggered, and an adaptation parameter file is output. After deployment and verification, it maintains stable operation on the RV embedded controller and maintains prediction performance and energy-saving effect close to that of the teacher model under multiple working conditions.

[0173] Step S6: The student model trained with hierarchical knowledge inheritance is deployed to the RV edge control device. During real-time operation, environmental perception parameters are collected and input into the shared feature extraction layer to obtain a unified feature vector under the current operating conditions, which serves as the judgment basis for the gating routing module. Specifically, this includes: S6.1: Based on the student model structure and parameter configuration trained in the cloud and optimized through hierarchical knowledge inheritance, perform model serialization processing to generate a lightweight model file compatible with the instruction set of edge computing devices, so as to support deployment and loading on low-computing-power embedded controllers.

[0174] Based on the student model structure and parameter configuration trained in the cloud and optimized through hierarchical knowledge inheritance, a model structure parsing method (parameters: network layer definition, weight tensor shape, activation function type) is used to achieve layer-by-layer decomposition and metadata extraction of the internal computation graph and weight matrix of the student model.

[0175] Furthermore, through the instruction set mapping algorithm (parameters: instruction set architecture supported by the RV edge controller, multi-threaded execution support level, memory access strategy), the operation nodes of the original computation graph are converted into operator descriptions compatible with the target hardware, and intermediate representation data of the computation graph after architecture adaptation is obtained.

[0176] Furthermore, a quantization compression method (parameters: weight precision bit width, activation value clamping range, symmetric or asymmetric quantization mode) is adopted to convert floating-point weights and intermediate activation values ​​into low-bit fixed-point representations and generate a set of quantized weight tensors, thereby significantly reducing the model file size and runtime memory usage.

[0177] Furthermore, by using a serialization encoding algorithm (parameters: file format standard, metadata index table, compression dictionary), the quantized weight tensor set and the intermediate representation of the computation graph are binary encoded according to a preset file format, and a lightweight model file that can be parsed at high speed is generated.

[0178] Furthermore, a checksum embedding and integrity verification method (parameters: CRC32 or MD5 checksum algorithm) is adopted to write the corresponding checksum value at the end of the model file and generate a deployment file version with integrity verification capability to ensure the correctness of data during the loading process.

[0179] By using serialization compression and instruction set adaptation, the student model parameters and structural configuration from the previous step are transformed into lightweight model files compatible with the instruction set of edge computing devices, achieving the expected technical effect of efficient deployment and loading on low-computing-power embedded controllers.

[0180] S6.2: Burn the lightweight model file to the non-volatile storage unit of the edge control device of the RV air conditioning system, start the model loading process, perform memory mapping and cache pre-setting of the weight parameters of each layer of the model, generate an executable inference engine instance, and provide a running foundation for subsequent real-time inference.

[0181] The student model file, optimized through hierarchical knowledge inheritance, is used as input data. The hardware platform type, operating system version, and instruction set architecture parameters of the edge control device are set to ensure that the model file format is fully matched with the target platform.

[0182] A firmware burning toolchain (parameters: target device storage address offset, page erase / write cycle, flash memory access latency) is used to write lightweight model files into the non-volatile storage unit of the RV air conditioning system edge control device, thereby achieving persistent storage of the model after the device is powered off.

[0183] Furthermore, through a memory mapping algorithm (parameters: page size, starting address, access permissions), the burned model file is mapped to the device's random access memory space according to the hierarchical structure, providing direct addressing capability for the weights of each neural network layer, thereby reducing the I / O access latency of the subsequent inference process.

[0184] Furthermore, by pre-caching (parameters: number of pre-cached layers, cache block size, replacement strategy), the frequently called convolutional kernel weights and activation function lookup tables in the model are loaded into the hardware cache register, reducing the number of operations that access non-volatile memory units and improving the weight loading speed.

[0185] Furthermore, the inference engine is invoked to build the API, generating executable computation graph instances based on the hierarchical relationships of the model, setting the execution order and dependency constraints of nodes, and realizing efficient data flow between each prediction branch and the shared feature extraction layer.

[0186] Through the initialization logic of the inference engine, the memory mapping results and cached preset contents are transformed into structured data that can directly participate in low-level instructions such as matrix multiplication and convolution operations, thereby enabling the model to perform real-time inference on edge devices and providing a stable operating foundation for real-time environmental perception data processing.

[0187] For example, in a motorhome air conditioning controller based on the ARM Cortex-A53 architecture and running a Linux embedded system, the model serialization format is selected as ONNX, and the target platform instruction set is configured as ARMv8-A through a cross-compilation toolchain. During the programming stage, the model file is written to the 0x1A0000 address segment of the device's on-chip flash memory, with a page erase / write cycle of 5ms and an access latency of 50ns. During the loading stage, memory mapping is used to map the weights of the convolutional layers and LSTM layers to a contiguous address space starting at 0x80000000 in RAM, with each page being 4KB in size and read-only access. The caching pre-set strategy selects to pre-cache the weights of the first three convolutional layers, with a cache block size of 256 bytes and an LRU replacement strategy. During the inference engine construction process, the shared feature extraction layer is set as a global node, the three dedicated prediction head branches are set as parallel-executed subgraphs, and data dependencies are distributed by a unified feature vector node. During execution, the temperature and speed data collected by the environmental perception module can complete the generation of a unified feature vector and be passed into the prediction branch within 50ms, achieving an end-to-end inference latency of less than 200ms, which significantly improves the real-time control capability and response speed of the RV air conditioning system.

[0188] S6.3: Based on the environmental perception module integrated with edge devices, it acquires three input signals in real time: outside temperature, inside target temperature and current compressor speed. It performs noise reduction filtering and normalization on the raw sensor data to generate a standardized time-series input vector, which serves as the input condition for the shared feature extraction layer.

[0189] S6.4: Input the standardized temporal input vector into the shared feature extraction layer in the student model, perform hierarchical feature transformation through multi-layer convolution and temporal modeling operations, extract general thermodynamic dynamic features across time windows step by step, and finally output a high-dimensional unified feature vector as an intermediate representation for gated routing decisions.

[0190] The denoised and normalized time-series input vector is input into the shared feature extraction layer of the student model. A multi-layer one-dimensional convolutional neural network (parameters: kernel size of 3, stride of 1, and number of channels of 64) is used to achieve spatial expansion and feature encoding of local patterns at different time scales.

[0191] Furthermore, by batch normalization and modifying the ReLU activation function of the linear unit (parameter: negative slope of 0.01), the numerical distribution of the convolution output is normalized and the nonlinear expressive power is increased, thus obtaining the primary spatiotemporal feature map.

[0192] Furthermore, a Long Short-Term Memory (LSTM) encoding operation is employed (parameters: 128 hidden units, time step length equal to the input vector length) to capture the dynamic trends and periodic dependencies of the primary feature map over time, and to generate corresponding temporal hidden states at each time step.

[0193] Furthermore, a fully connected mapping is performed on the hidden state vector of the final time step (parameter: output dimension is 256) to realize the transformation from embedded temporal information to a unified feature vector of fixed dimension, and to ensure that different input sequences are comparable in the feature space.

[0194] Furthermore, a feature fusion mechanism is employed to concatenate and weight the features extracted from the convolutional layer and the LSTM layer, and the fused unified feature vector is calculated using the following formula:

[0195] in, To ultimately unify the feature vectors, For convolutional features, Features of LSTM and To integrate the weighting coefficients, they are set proportionally based on the performance of the model validation set.

[0196] This fusion processing method transforms the convolutional and temporal features from the previous step into unified high-dimensional general thermodynamic dynamic features, thereby achieving the intermediate representation required for operating condition discrimination and gated routing decision-making.

[0197] For example, in the edge control node of the RV air conditioning system, the sampling frequency of the outside temperature is set to 1Hz, the sampling frequency of the target temperature inside the vehicle is set to 1Hz, and the sampling frequency of the compressor speed is set to 5Hz. After synchronous interpolation and normalization, a standardized temporal input vector of length 60 is obtained. Local temporal patterns are extracted using a three-layer one-dimensional convolutional neural network. Each layer has a kernel size of 3 and a stride of 1. The first layer has 32 channels, the second layer has 64, and the third layer has 128. After batch normalization and ReLU activation, the output primary feature map has a dimension of 60×128. This map is then encoded using LSTM with 128 hidden units, resulting in a final time-step hidden state vector of dimension 128. This vector is then mapped using a fully connected layer to output a 256-dimensional feature vector. The fusion weights are set... =0.6, =0.4, and by weighting and combining the convolutional features and LSTM features using the above formula, a fused 256-dimensional unified feature vector is obtained. In this embodiment, the unified feature vector shows significantly improved operating condition recognition accuracy and discrimination stability in the subsequent similarity matching calculation of the gated routing module, supporting the compressor displacement prediction to maintain efficient and stable control performance in actual operation.

[0198] S6.5: Pass the unified feature vector to the gated routing module as the input basis for its path selection mechanism to support the subsequent activation branch determination based on similarity matching, and ensure that the selection of sparse inference path of the model has working condition adaptability and real-time response capability.

[0199] Step S7: Determine whether the path activation weight vector output by the gated routing module points to a single dominant branch. If it exists and its weight value is higher than the set activation threshold, then trigger the execution process of the corresponding prediction head and output the optimal displacement suggestion value for that branch. Specifically, this includes: S7.1: Obtain the path activation weight vector output by the gated routing module. This vector contains the activation weight values ​​corresponding to each dedicated prediction head branch. Perform dominant branch discrimination processing based on this vector to identify whether a clear operating mode has been entered.

[0200] S7.2: Normalize the elements in the path activation weight vector, calculate the weight ratio of each branch, determine the maximum weight value and its corresponding index position, and generate the maximum activation intensity index and candidate dominant branch identifier as the basis for branch selection.

[0201] S7.3: Compare the maximum activation intensity index with the preset activation threshold. If the former is higher than the latter, it is determined that there is an activatable dominant prediction branch, and a branch activation confirmation signal is formed; otherwise, all prediction heads remain dormant and no displacement output process is triggered.

[0202] The input conditions are the maximum activation intensity index calculated by the S7.2 sub-step and the preset activation threshold parameter, both of which are derived from the parsing results of the path activation weight vector by the gating routing module.

[0203] A comparison calculation method (parameters: maximum activation intensity index, preset activation threshold) is used to determine the activatability of the current candidate dominant branch.

[0204] Furthermore, by using the difference calculation method (parameters: maximum activation intensity index, preset activation threshold), the discrimination amplitude is quantified, and activation margin data or dormancy retention determination results are obtained.

[0205] Furthermore, a threshold determination logic (parameter: activation margin data) is adopted to generate a binary activation flag signal and form a branch activation confirmation signal or a dormancy hold signal.

[0206] Furthermore, the state machine update method (parameter: binary activation flag signal) is used to update the state register of the current operating mode, ensuring that once it is determined that activation is not possible, all prediction head branches remain in a dormant state and displacement output is not triggered.

[0207] By using the threshold comparison and state control processing methods described above, the matching judgment result of the previous step is transformed into a clear branch activation confirmation signal, thereby achieving precise trigger control of the sparse execution path of the student model.

[0208] For example, suppose the maximum activation intensity index is The preset activation threshold is The difference calculation method is used: The activation margin is obtained as Based on the threshold determination logic, if the activation margin is greater than zero and the maximum activation intensity index is higher than the preset threshold, a branch activation confirmation signal is generated, and the dominant branch activation bit in the status register is updated to a high level. In another case, if the maximum activation intensity index is... The difference If the value is negative, activation is deemed impossible, a sleep hold signal is output, and the dominant branch bit of the status register remains low, ensuring that all prediction head branches enter a low-power sleep mode. This example effectively distinguishes different activation states through a quantization comparison process. In the embedded controller of a real RV air conditioning system, it was verified that this method can significantly improve the stability of operating condition discrimination and the reliability of output path selection.

[0209] S7.4: After receiving the branch activation confirmation signal, locate the corresponding dedicated prediction head branch according to the candidate dominant branch identifier, call the model parameters of the branch and load the current unified feature vector as input, perform forward inference operation, and generate the optimal displacement suggestion value sequence under the branch.

[0210] S7.5: The generated optimal displacement recommendation value sequence is passed to the compressor control module as the input basis for real-time control commands. At the same time, the prediction head branch number and timestamp activated in this inference are marked for data association in subsequent error monitoring and local fine-tuning mechanism.

[0211] Step S8: Based on the historical prediction error sequence cached locally, monitor the deviation trend of the currently activated branch. When the absolute value of the error rises above the adaptive threshold within multiple consecutive sampling periods, activate the local fine-tuning mechanism, performing small-sample gradient updates only on the final layer weight parameters of the prediction head to maintain the performance of the edge-end model. Specifically, this includes: S8.1: Obtain the residual data between the optimal displacement suggestion value output by the currently active prediction head and the actual operating displacement of the compressor fed back by the actual system. Calculate the absolute value of the prediction error for each cycle based on the residual data, and write the absolute value of the prediction error into a circular buffer in chronological order to form a historical prediction error sequence, so as to form a quantifiable tracking input for the deviation trend of the model output.

[0212] S8.2: Perform linear regression analysis within a sliding window based on the historical prediction error sequence, calculate the slope of error change, and determine whether the prediction error shows a monotonically increasing trend within the current N consecutive sampling periods; if the slope is greater than the preset initial threshold, trigger the deviation increase status flag as a prerequisite for subsequent adaptive threshold determination.

[0213] S8.3: Dynamically adjust the error trend judgment threshold based on the current operating environment parameters to generate an adaptive threshold; specifically, use the outside temperature, the inside temperature difference load and the compressor's cumulative running time as input variables, and output the upper limit of the allowable error growth under the corresponding operating conditions through a preset nonlinear mapping function, so as to avoid the fixed threshold from being falsely triggered under changing operating conditions.

[0214] The set of input variables required to construct the adaptive threshold judgment logic based on the current operating environment parameters includes three types of data sources: outside temperature, inside temperature difference load, and compressor cumulative running time, to ensure that the judgment parameters cover external climate conditions, indoor load status, and equipment aging degree.

[0215] A multivariate normalization method (parameters: mean centering and unit variance scaling are performed on each input variable) is adopted to achieve comparability of parameters with different dimensions within the same computational domain.

[0216] Furthermore, a working condition-tolerance error growth upper limit model is constructed through a nonlinear mapping function (parameters: the order of the polynomial basis function is set to 3, and the interaction term includes the product of temperature and load) to realize the transformation of environmental state to adaptive threshold and obtain the basic threshold prediction results under each working condition.

[0217] Furthermore, a weighted modulation algorithm (parameters: temperature weight coefficient α = 0.45, load weight coefficient β = 0.35, runtime weight coefficient γ = 0.20) is used to weight and fuse the nonlinear mapping output to generate a comprehensive threshold score, ensuring the balance of judgment under the combined effect of multiple factors.

[0218] Furthermore, the comprehensive threshold score is subjected to time series steady-state processing using a smoothing filtering method (parameters: sliding window size of 5, filter type of Gaussian weighted average) to generate a final adaptive threshold for comparison with the slope of the prediction error.

[0219] The basic threshold prediction result is calculated using the following mathematical expression:

[0220] in, The normalized outside temperature. For the normalized in-vehicle temperature difference load, This represents the normalized cumulative runtime of the compressor. This is a pre-defined third-order polynomial nonlinear mapping function.

[0221] By using the above-mentioned nonlinear mapping and weighted fusion processing method, the deviation change slope judgment condition of the previous step is transformed into a dynamic adaptive threshold, thereby achieving the accuracy of error trend judgment and the ability to prevent false triggering under different operating conditions.

[0222] For example, in a scenario where the RV's air conditioning system is operating under high-temperature cooling conditions in summer, with an outside temperature of 38°C, a target temperature difference load of 8K inside the vehicle, and a cumulative compressor runtime of 520 hours, the input temperature, load, and runtime variables are normalized to obtain... =0.92、 =0.61、 =0.48. Perform polynomial nonlinear mapping function. The initial threshold prediction result was 0.74. Subsequently, a weighted fusion was performed using weighting coefficients α=0.45, β=0.35, and γ=0.20, resulting in a comprehensive threshold score of 0.71. After applying a sliding window Gaussian smoothing filter, the final adaptive threshold stabilized at 0.70. Under this condition, when the historical prediction error slope exceeded 0.70 and persisted for M judgment cycles, the system accurately triggered a local fine-tuning mechanism, significantly improving the sensitivity and stability of performance degradation detection under high-temperature load conditions.

[0223] S8.4: Compare the current error change slope with the adaptive threshold. If the former continuously exceeds the latter for M consecutive judgment cycles, it is confirmed that the current active branch has a risk of performance degradation. A local fine-tuning trigger signal is generated, and the top-level prediction head corresponding to the branch is locked as the target module to be updated.

[0224] S8.5: Based on the K most recent input feature vectors and their corresponding true displacement labels cached locally, perform mini-batch gradient descent update on the final layer weight parameters of the target module to be updated; specifically: construct a lightweight loss function and backpropagate to calculate the gradient, only update the weight matrix of the last fully connected layer of the prediction head, and complete the knowledge correction and performance recovery of the local path of the edge model.

[0225] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.

[0226] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.

[0227] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for real-time control of the optimal displacement of a variable displacement compressor in a motorhome air conditioner, characterized in that, Specifically, it includes: S1: Based on the multi-condition training data of the cloud-based teacher model, extract the set of condition labels for different operating environments, and construct a condition classification rule table according to the mapping relationship between compressor displacement and energy efficiency ratio under each condition; S2: Based on the working condition classification rule table, a student model containing a shared feature extraction layer and a dedicated prediction head structure is constructed. The shared feature extraction layer is used to extract general time-series features of the outside temperature, the target temperature inside the vehicle, and the current compressor speed, forming a unified feature vector output. S3: Based on the unified feature vector and the working condition classification rule table, a gated routing module with dynamic sparse activation capability is designed. This module generates the corresponding path activation weight vector by calculating the similarity score between the input features and each working condition category. S4: Input the path activation weight vector into the prediction head structure of the student model, and only activate the prediction head branches whose weights exceed a preset threshold; S5: Perform hierarchical knowledge inheritance training on the student model; S6: Deploy the student model trained by hierarchical knowledge inheritance to the RV edge control device, collect environmental perception parameters in real time and input them into the shared feature extraction layer to obtain a unified feature vector under the current working condition, which serves as the basis for judgment of the gated routing module; S7: Determine whether the path activation weight vector output by the gated routing module points to a single dominant branch. If it exists and its weight value is higher than the set activation threshold, then trigger the execution process of the corresponding prediction head and output the optimal displacement suggestion value for that branch.

2. The method for real-time control of optimal displacement of a variable displacement compressor in a motorhome air conditioner according to claim 1, characterized in that, Step S7 is followed by: S8: Based on the historical prediction error sequence cached locally, monitor the deviation trend of the current active branch. When the absolute value of the error rises above the adaptive threshold within multiple consecutive sampling periods, start the local fine-tuning mechanism and update the gradient of the last layer weight parameters of the prediction head with a small sample to maintain the performance of the edge model.

3. The method for real-time control of optimal displacement of a variable displacement compressor in a motorhome air conditioner according to claim 1, characterized in that, The operating condition labels mentioned in step S1 include high-temperature cooling, low-temperature heating, and rapid cooling modes.

4. The method for real-time control of optimal displacement of a variable displacement compressor in a motorhome air conditioner according to claim 1, characterized in that, The multi-condition training data mentioned in step S1 includes the outside temperature, the target inside temperature, the current compressor speed, and the corresponding optimal displacement output value.

5. The method for real-time control of optimal displacement of a variable displacement compressor in a motorhome air conditioner according to claim 1, characterized in that, Each rule in the operating condition classification rule table in step S1 includes an input parameter threshold range, a corresponding operating condition label, and a recommended displacement adjustment direction.

6. The method for real-time control of optimal displacement of a variable displacement compressor in a motorhome air conditioner according to claim 1, characterized in that, The student model in S2 constructs multiple dedicated prediction head structures, each prediction head based on an independent feedforward neural network branch.

7. The method for real-time optimal displacement control of a variable displacement compressor for a motorhome air conditioner according to claim 1, characterized in that, Step S3 specifically includes: Based on the categories of high-temperature cooling, low-temperature heating and rapid cooling modes defined in the working condition classification rule table, a similarity measurement function is constructed to match the unified feature vector with the features of each working condition template to obtain the initial matching degree score vector for each working condition category. The initial matching score vector is normalized and then converted into a probability distribution-based work condition attribution confidence vector using the Softmax function. An environmental sensitivity adjustment factor is introduced, and the weight sensitivity of each operating condition category is dynamically adjusted based on the real-time input difference between the outside temperature and the target temperature inside the vehicle. The operating condition assignment confidence vector is optimized twice by multiplicative modulation, and the path activation weight vector after environmental compensation is output. The path activation weight vector after environmental compensation is input into the sparse selection logic unit, a threshold comparison operation is performed to determine whether the weight of each branch exceeds the preset activation threshold, and a binary activation mask sequence is generated as the final control command output of the gated routing module.

8. The method for real-time optimal displacement control of a variable displacement compressor for a motorhome air conditioner according to claim 7, characterized in that, Step S3 also includes: A branch execution priority queue is constructed by jointly using binary activation mask sequences and path activation weight vectors. When multiple branches are activated at the same time, they are sorted according to their weights and a preemptive execution strategy is set to ensure that branches with high confidence are given priority to complete the output of the optimal displacement suggestion value.

9. The method for real-time control of optimal displacement of a variable displacement compressor in a motorhome air conditioner according to claim 1, characterized in that, Step S4 specifically includes: Based on the path activation weight vector output by the gated routing module, obtain the working condition matching score corresponding to each prediction head branch; The path activation weight vector is binarized according to a preset activation threshold to generate a branch activation mask matrix. The elements with weight values ​​greater than or equal to the activation threshold are set to 1, indicating that the corresponding prediction head needs to be activated; the remaining elements are set to 0, indicating that the corresponding branch enters a low-power sleep state, so as to form a sparse inference control signal. The branch activation mask matrix is ​​input into the execution scheduling unit of the student model to control the running switch state of each prediction head sub-network in the model computation graph. Only the prediction head branch with a mask value of 1 is allowed to receive the unified feature vector from the shared feature extraction layer and start its local forward inference process. Perform low-power management operations on the prediction head branch that is in a dormant state, including cutting off the memory access path of its weight parameters, pausing the update of related registers, and shutting down the clock supply to the corresponding computing core; Based on the local inference results of the activated prediction head branch, a candidate set of optimal displacement suggestions is generated, and then weighted and fused with the dominant branch weight strength in the path activation weight vector to output the final compressor target displacement command.

10. The method for real-time optimal displacement control of a variable displacement compressor for a motorhome air conditioner according to claim 9, characterized in that, The path activation weight vector mentioned in step S4 is a soft weight distribution sequence generated by normalizing the similarity scores.