Temperature sensing error correction method and system combined with machine learning
By combining machine learning with an error cause analysis model, environmental impact information is collected synchronously, temperature sensing error correlation factors are generated and feature transformation is performed, solving the real-time and accuracy problems of sensor error calibration in traditional methods, and realizing real-time dynamic correction of temperature measurement and improvement of data accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-03
AI Technical Summary
Traditional temperature sensor error calibration methods cannot adapt to dynamic changes under different environmental conditions, resulting in large output data errors, which affect the accuracy of decision-making and control. Furthermore, regular manual inspection and adjustment consume a lot of manpower and resources and cannot be corrected in real time.
By combining machine learning with an error cause analysis model, environmental impact information is collected simultaneously to generate factors related to temperature sensing errors, simulate error patterns and perform feature transformation, and finally generate corrected temperature data through an error cancellation mode.
It enables real-time and dynamic correction of temperature sensing errors, significantly improving the accuracy and reliability of temperature measurement and reducing the consumption of manpower and material resources.
Smart Images

Figure CN121786771A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, and more specifically, to a method and system for correcting temperature sensing errors by incorporating machine learning. Background Technology
[0002] In the field of temperature measurement, temperature sensors, as key devices for acquiring temperature information, are widely used in numerous scenarios such as industrial production, environmental monitoring, and healthcare. However, in practical applications, the raw temperature data output by temperature sensors often contains errors. These errors are influenced by a variety of complex factors, such as rapid changes in ambient temperature, aging of sensor components, and external electromagnetic interference. Traditional methods for handling temperature sensing errors typically employ simple calibration techniques, such as linear calibration based on fixed parameters, or periodic manual inspection and adjustment. However, these methods have significant limitations. Linear calibration based on fixed parameters cannot adapt to the dynamic changes of sensors under different environmental conditions and is difficult to accurately reflect the true extent of the error; periodic manual inspection and adjustment not only consume a large amount of manpower and resources but also cannot correct errors in real time, resulting in significant errors remaining in the sensor output data during the inspection interval, thus affecting the accuracy of various decisions and controls based on temperature data. Therefore, developing a method that can effectively, in real time, and accurately correct temperature sensing errors is urgently needed. Summary of the Invention
[0003] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, embodiments of the present invention provide a temperature sensing error correction method incorporating machine learning, the method comprising: Acquire raw temperature data output by the temperature sensor, and simultaneously collect environmental impact information related to the raw temperature data. The environmental impact information and the raw temperature data have the same time stamp. The raw temperature data and environmental impact information are input into the pre-trained error cause analysis model, and the correlation factor mining module of the error cause analysis model generates temperature sensing error correlation factors. The error morphology simulation module of the error cause analysis model is invoked to generate an error simulation morphology corresponding to the original temperature data based on the temperature sensing error correlation factors. The error simulation morphology is transformed by the offset mode generation module of the error cause analysis model, and the error offset mode is output. The original temperature data and the error cancellation mode are input into the correction execution module of the error cause analysis model, the error cancellation operation is performed, and the corrected temperature data is output.
[0004] In another aspect, embodiments of the present invention also provide a temperature sensing error correction system incorporating machine learning, including a processor and a machine-readable storage medium connected to the processor. The machine-readable storage medium is used to store programs, instructions, or code, and the processor is used to execute the programs, instructions, or code in the machine-readable storage medium to implement the above-described method.
[0005] Based on the above, this invention provides a comprehensive and relevant data foundation for error correction by simultaneously collecting raw temperature data and environmental impact information with the same time stamp. This accurately captures various factors affecting temperature sensing errors, significantly improving the accuracy and comprehensiveness of error analysis compared to traditional methods relying solely on single temperature data. Using a pre-trained error cause analysis model, a correlation factor mining module generates correlation factors for temperature sensing errors, deeply analyzing the root causes of errors. An error morphology simulation module generates an error simulation morphology corresponding to the raw temperature data based on these correlation factors, accurately simulating the specific manifestations of the error, making error correction more targeted. An error cancellation mode generation module performs feature transformation on the error simulation morphology and outputs an error cancellation mode. This mode fully considers the characteristics and variation patterns of the error, effectively canceling the error components in the raw temperature data. Finally, a correction execution module combines the raw temperature data with the error cancellation mode, performs the error cancellation operation, and outputs the corrected temperature data, achieving precise correction of temperature sensing errors. This invention forms a complete error correction system capable of real-time and dynamic correction of temperature sensing errors, significantly improving the accuracy and reliability of temperature measurement. Attached Figure Description
[0006] Figure 1 This is a schematic diagram of the execution flow of the temperature sensing error correction method combined with machine learning provided in an embodiment of the present invention.
[0007] Figure 2 This is a schematic diagram of exemplary hardware and software components of a temperature sensing error correction system that combines machine learning, provided in an embodiment of the present invention. Detailed Implementation
[0008] The present invention will now be described in detail with reference to the accompanying drawings. Figure 1 This is a flowchart illustrating a temperature sensing error correction method incorporating machine learning according to an embodiment of the present invention. The following is a detailed description of this temperature sensing error correction method incorporating machine learning.
[0009] Step S110: Obtain the raw temperature data output by the temperature sensor, and simultaneously collect environmental impact information related to the raw temperature data. The environmental impact information has the same time stamp as the raw temperature data.
[0010] In industrial production workshops, temperature sensors continuously output raw temperature data at fixed time intervals. This raw temperature data is transmitted to a data acquisition device via the sensor's signal output interface. The data acquisition device performs analog-to-digital conversion on the transmitted signal to obtain the raw temperature data in digital form. Simultaneously, environmental impact information related to the raw temperature data is collected. This environmental impact information includes humidity data, air pressure data, vibration frequency data, and electromagnetic interference intensity data within the workshop. Humidity data is collected by humidity sensors installed in the workshop, air pressure data by air pressure sensors, vibration frequency data by vibration sensors, and electromagnetic interference intensity data by electromagnetic interference monitoring equipment. Each piece of environmental impact information is acquired by its corresponding acquisition device and transmitted to the data acquisition device, which adds the same timestamp as the raw temperature data to each piece of environmental impact information.
[0011] Step S120: Input the raw temperature data and environmental impact information into the pre-trained error cause analysis model, and generate temperature sensing error correlation factors through the correlation factor mining module of the error cause analysis model.
[0012] The acquired raw temperature data and environmental impact information with the same time stamp are input into a pre-trained error cause analysis model. This model is deployed on an industrial control server with sufficient computing power to support its operation. The correlation factor mining module in the error cause analysis model first performs preliminary preprocessing on the input raw temperature data and environmental impact information to remove noise and outliers. Then, it performs feature extraction and correlation analysis on the processed data to uncover the correlation factors that lead to temperature sensing errors.
[0013] Step S121: Input the raw temperature data into the temperature feature extraction unit of the correlation factor mining module, perform time-series feature decomposition processing, and generate a temperature change feature sequence.
[0014] The raw temperature data is input into the temperature feature extraction unit of the correlation factor mining module. This unit processes the raw temperature data using a sliding window approach. The size of the sliding window is set according to the acquisition interval of the raw temperature data and actual needs. The window slides sequentially along the time axis of the raw temperature data, covering a certain number of consecutive raw temperature data points with each slide. For each raw temperature data point within the sliding window, the temperature feature extraction unit calculates statistical characteristics such as the mean, variance, maximum, and minimum values of the temperature data within that window, and also calculates dynamic characteristics such as the difference and rate of change between temperature data in adjacent windows. These statistical and dynamic characteristics are arranged in chronological order to generate a temperature change feature sequence.
[0015] Step S122: Input the environmental impact information into the environmental feature conversion unit of the correlation factor mining module, perform information structuring processing, and generate environmental feature vectors.
[0016] Environmental impact information is input into the environmental feature conversion unit of the correlation factor mining module. This unit first classifies and processes different types of environmental impact information. For example, numerical environmental impact information such as humidity data and air pressure data is directly preserved in its numerical form, periodic data such as vibration frequency data is converted into frequency domain features, and non-numerical data such as electromagnetic interference intensity data is converted into corresponding numerical codes. Then, the environmental feature conversion unit combines the features of the different types of processed environmental impact information in a preset order to form a multi-dimensional vector, namely the environmental feature vector.
[0017] Step S123: Input the temperature change feature sequence and environmental feature vector into the cross-analysis unit of the correlation factor mining module to perform correlation modeling processing between feature dimensions and generate a correlation feature matrix.
[0018] Temperature change feature sequences and environmental feature vectors are input into the cross-analysis unit of the correlation factor mining module. This unit first performs dimensionality matching on the temperature change feature sequences and environmental feature vectors to ensure that they can be correlated in terms of dimensions. Then, the cross-analysis unit performs matrix multiplication on the temperature change feature sequences and environmental feature vectors to obtain an initial correlation matrix. Next, the cross-analysis unit normalizes the initial correlation matrix, mapping the element values in the matrix to a specific range to eliminate dimensional differences between different features.
[0019] Step S1231: Extract the temperature fluctuation features of each time node in the temperature change feature sequence to generate a temperature fluctuation feature set.
[0020] The temperature fluctuation features at each time point are extracted from the temperature change feature sequence. For the temperature data at each time point, the differences between the temperature at that time point and the previous time point, the differences between the temperature at that time point and the next time point, and the differences between the temperature at that time point and the mean of the entire temperature change feature sequence are calculated. Simultaneously, the fluctuation amplitude of the temperature at that time point within the sliding window is calculated, i.e., the difference between the maximum and minimum temperature values within the window. These differences and fluctuation amplitudes are combined to generate the temperature fluctuation features for each time point. The temperature fluctuation features of all time points constitute the temperature fluctuation feature set.
[0021] Step S1232: Extract the state change features of each environmental factor in the environmental feature vector to generate an environmental state feature set.
[0022] The state change characteristics of each environmental factor are extracted from the environmental feature vector. For each environmental factor's feature value, the differences between this feature value and the corresponding feature value at the previous time point, the difference between this feature value and the corresponding feature value at the next time point, and the difference between this feature value and the mean of the corresponding environmental factor feature values in the entire environmental feature vector are calculated. Simultaneously, the changing trend of this environmental factor's feature value is analyzed, such as whether it is an upward trend, a downward trend, or a stable trend. These differences and changing trends are combined to generate the state change characteristics of each environmental factor. The state change characteristics of all environmental factors constitute the environmental state feature set.
[0023] Step S1233: Input the temperature fluctuation feature set and the environmental state feature set into the time alignment sub-unit of the cross-analysis unit, perform matching processing in the time dimension, and generate synchronous feature pairs.
[0024] The temperature fluctuation feature set and the environmental state feature set are input into the time-series alignment subunit of the cross-analysis unit. This subunit first reads the timestamp carried by each temperature fluctuation feature and environmental state feature. Then, the time-series alignment subunit sorts the temperature fluctuation features and environmental state features according to the order of their timestamps. For temperature fluctuation features and environmental state features with the same timestamp, they are combined to form a synchronization feature pair. If there are timestamp mismatches, the time-series alignment subunit uses interpolation to supplement the data to ensure that each time point has a corresponding synchronization feature pair.
[0025] Step S1234: Perform correlation strength analysis on each pair of synchronous features to determine the degree of correlation between changes in environmental state and temperature fluctuations.
[0026] For each pair of synchronous features, a correlation strength analysis was performed, and the correlation coefficient was used to determine the degree of correlation between changes in environmental state and temperature fluctuations. The correlation coefficient was calculated based on the temperature fluctuation characteristic values and environmental state characteristic values in the synchronous feature pair. The correlation coefficient was obtained by calculating the covariance and standard deviation of these two values. A higher correlation coefficient indicates a stronger correlation between changes in environmental state and temperature fluctuations.
[0027] Step S1235: Arrange the correlation degree of all synchronous feature pairs according to the time order of the temperature change feature sequence and the dimensional order of the environmental feature vector to generate an initial correlation matrix.
[0028] The correlation degree of all synchronous feature pairs is arranged according to the temporal order of the temperature change feature sequence and the dimensional order of the environmental feature vector. The temporal order of the temperature change feature sequence is used as the row index of the initial correlation matrix, and the dimensional order of the environmental feature vector is used as the column index of the initial correlation matrix. The correlation degree value of each synchronous feature pair is filled into the corresponding row and column position in the initial correlation matrix to generate the initial correlation matrix.
[0029] Step S1236: The initial correlation matrix is enhanced by the matrix enhancement sub-unit of the cross-analysis unit to highlight the matrix elements with significant correlation and generate the correlation feature matrix.
[0030] The matrix enhancement subunit of the cross-analysis unit performs feature enhancement processing on the initial association matrix. First, an association degree threshold is set, determined based on practical experience and requirements. Then, the matrix enhancement subunit iterates through each element in the initial association matrix. If the element's value is greater than the association degree threshold, the element's value is multiplied by an enhancement coefficient greater than 1 to highlight its importance; if the element's value is less than or equal to the association degree threshold, the element's value is left unchanged or multiplied by a decay coefficient less than 1. After this processing, an association feature matrix is generated.
[0031] Step S124: The correlation feature matrix is processed by the factor identification unit of the correlation factor mining module to extract patterns and identify key influencing factors related to temperature sensing error.
[0032] The factor identification unit of the correlation factor mining module performs pattern extraction processing on the correlation feature matrix. First, it uses a clustering algorithm to cluster the elements in the correlation feature matrix. The clustering algorithm divides the elements into different categories based on their correlation strength values, with each category representing a correlation pattern. Then, the factor identification unit analyzes the characteristics of each category to determine the correlation between the corresponding environmental factors and temperature fluctuation characteristics. Next, the factor identification unit calculates the correlation between each category and temperature sensing error. The correlation strength calculation is based on the magnitude and variation of temperature sensing error when that category appears in historical data. Finally, the factor identification unit filters out the categories related to temperature sensing error based on the correlation strength; the environmental factors corresponding to these categories are the key influencing factors.
[0033] For example, step S1241: Perform feature dimension compression processing on the associated feature matrix to reduce redundant feature dimensions and generate a compressed feature matrix.
[0034] To compress the dimensionality of the correlation feature matrix, Principal Component Analysis (PCA) is employed. PCA first calculates the covariance matrix of the correlation feature matrix, then performs eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors. Next, based on the magnitude of the eigenvalues, the first few eigenvectors are selected, as the principal components corresponding to these eigenvectors can explain most of the variance in the correlation feature matrix. Finally, matrix multiplication is performed between the correlation feature matrix and the selected eigenvectors to obtain the compressed feature matrix, which has a smaller dimension than the correlation feature matrix.
[0035] Step S1242: Extract salient feature patterns from the compressed feature matrix and generate a set of salient patterns.
[0036] To extract salient feature patterns from a compressed feature matrix, first, the absolute value of each element in the compressed feature matrix is calculated. Then, a salient feature threshold is set, which is determined based on the overall distribution of the compressed feature matrix. Each element in the compressed feature matrix is iterated through; if the absolute value of an element is greater than the salient feature threshold, the feature combination corresponding to the row and column containing that element is determined as a salient feature pattern. All salient feature patterns that meet the criteria constitute a salient pattern set.
[0037] Step S1243: Analyze the correlation between each significant pattern and the temperature sensing error, and generate the pattern correlation degree.
[0038] To analyze the correlation between each significant pattern and temperature sensing error, the following steps were taken: First, the temperature sensing error values corresponding to the occurrence of each significant pattern in historical data were collected. Then, the mean and variance of the temperature sensing error values for each significant pattern were calculated. The mean reflects the average influence of the significant pattern on the temperature sensing error, while the variance reflects the stability of the influence. Next, correlation analysis was used to calculate the correlation coefficient between the eigenvalues of the significant patterns and the temperature sensing error values. A higher correlation coefficient indicates a stronger correlation between the significant pattern and the temperature sensing error. Finally, the mean, variance, and correlation coefficient were combined to generate the pattern correlation degree for each significant pattern.
[0039] Step S1244: Based on the pattern correlation degree, select salient patterns with significant correlation and generate a key pattern set.
[0040] Based on pattern relevance, salient patterns with a high degree of correlation are selected. First, a pattern relevance threshold is set, determined based on actual needs and historical data. Then, each salient pattern in the salient pattern set is iterated over; if the pattern relevance of a salient pattern is greater than the relevance threshold, that salient pattern is retained. All retained salient patterns constitute the key pattern set.
[0041] Step S1245: Analyze the key pattern set, extract the basic factors of the patterns that constitute the key pattern set, and generate a basic factor set.
[0042] To analyze the set of key patterns, the structure of each key pattern is first analyzed to determine the environmental factors and temperature fluctuation characteristics it contains. Then, the environmental factors corresponding to each key pattern are extracted; these environmental factors constitute the basic factors of that key pattern. Finally, the basic factors of all key patterns are combined to generate a set of basic factors.
[0043] Step S1246: Sort the set of basic factors by importance, retain the basic factors with higher importance, and identify the key influencing factors related to temperature sensing error.
[0044] The importance ranking of the set of basic factors was performed using the Analytic Hierarchy Process (AHP). AHP first established a hierarchical model, with the basic factors as the criterion layer and temperature sensing error as the target layer. Then, a judgment matrix was constructed, where each element represents the relative importance of the influence of two basic factors on the temperature sensing error. Next, the eigenvalues and eigenvectors of the judgment matrix were calculated; the eigenvectors are the weight vectors of the basic factors. Finally, the basic factors in the set were ranked according to their weight vectors, retaining those with higher weights. These basic factors are the key influencing factors related to temperature sensing error.
[0045] Step S125: Input the key influencing factors into the feature integration unit of the correlation factor mining module, perform information aggregation processing, and generate temperature sensing error correlation factors.
[0046] Key influencing factors are input into the feature integration unit of the correlation factor mining module. This unit first encodes the features of each key influencing factor, converting them into numerical feature vectors. Then, the feature integration unit aggregates these feature vectors using a weighted summation method, with weights determined based on the importance of the key influencing factors. Finally, the aggregated result is converted into a specific format to generate temperature sensing error correlation factors.
[0047] Step S130: Call the error morphology simulation module of the error cause analysis model to generate an error simulation morphology corresponding to the original temperature data based on the temperature sensing error correlation factors.
[0048] The error morphology simulation module of the error cause analysis model is invoked. This module first reads the temperature sensing error correlation factors and the original temperature data. Then, based on the temperature sensing error correlation factors, the module determines the type and magnitude of the error. The error type includes systematic error and random error, and the error magnitude is determined based on the characteristic values and historical data of key influencing factors. Next, the module adds the error to the original temperature data according to the time stamp and trend of the original temperature data, generating the error simulation morphology.
[0049] Step S131: Input the temperature sensing error correlation factors into the pattern construction unit of the error morphology simulation module, perform error formation pattern mining processing, and generate the basic error formation pattern.
[0050] The factors related to temperature sensing errors are input into the pattern building unit of the error morphology simulation module. This unit first analyzes the factors related to temperature sensing errors, determining the variation patterns of error type and magnitude for each key influencing factor. Then, the pattern building unit uses a decision tree algorithm to mine these patterns. Nodes in the decision tree represent key influencing factors, branches represent different value ranges of these factors, and leaf nodes represent the corresponding error type and magnitude. Finally, the mined patterns are converted into specific patterns, generating the basic error pattern.
[0051] Step S1311: Perform feature decomposition on the temperature sensing error correlation factors to obtain multiple independent error influencing factors.
[0052] Feature decomposition was performed on the factors related to temperature sensing error using factor analysis. The factor analysis algorithm first calculated the correlation matrix of the factors related to temperature sensing error, then extracted factors from the correlation matrix to obtain common factors and specific factors. Common factors are latent variables that can explain the correlation between multiple key influencing factors, while specific factors are variables that can only explain a single key influencing factor. Finally, the common factors and specific factors were treated as independent sub-factors of error influence.
[0053] Step S1312: Analyze the error performance characteristics corresponding to each error-affecting sub-factor and generate sub-factor error characteristics.
[0054] To analyze the error performance characteristics of each sub-factor, the following steps are taken: First, historical data on temperature sensing error at the occurrence of each sub-factor are collected. Then, statistical analysis is performed on this temperature sensing error data, calculating statistical characteristics such as the mean, variance, maximum, and minimum values of the error, while also analyzing the trend and distribution patterns of the error. Next, based on the results of the statistical analysis, the error performance characteristics corresponding to each sub-factor are determined, such as the range of error magnitude and the frequency of error changes. Finally, these characteristics are converted into numerical form to generate the sub-factor error characteristics.
[0055] Step S1313: Input all sub-factor error features into the associated modeling sub-unit of the pattern construction unit, perform interaction analysis between factors, and generate factor interaction relationships.
[0056] All sub-factor error features are input into the correlation modeling sub-unit of the pattern building unit. This sub-unit first calculates the correlation coefficient between each sub-factor error feature, reflecting the degree of linear correlation between two sub-factor error features. Then, the correlation modeling sub-unit uses regression analysis to establish a regression model between the sub-factor error features and the temperature sensing error. The coefficients of the regression model reflect the influence of the sub-factor error features on the temperature sensing error. Next, the correlation modeling sub-unit analyzes the residuals of the regression model to determine if there are any unconsidered interactions between factors. Finally, based on the correlation coefficients, regression model coefficients, and the results of the residual analysis, the factor interaction relationships are generated.
[0057] Step S1314: Based on the interaction of factors, construct the mapping logic between the sub-factors affecting the error and the error performance, and generate the initial error model.
[0058] Based on the interaction relationships between factors, a mapping logic is constructed between error influencing sub-factors and error performance. First, the influence mode of each error influencing sub-factor on error performance is determined according to the interaction relationships, such as whether it is a linear or non-linear influence. Then, a mapping function is constructed, with the characteristic values of the error influencing sub-factors as input and the corresponding error performance characteristic values as output. Finally, these mapping functions are combined to generate an initial error pattern.
[0059] Step S1315: The initial error patterns are logically integrated by the pattern integration subunit of the pattern building unit, similar error behavior logics are merged to generate integrated error patterns.
[0060] The pattern integration subunit of the pattern building unit performs logical integration processing on the initial error patterns. First, it analyzes the mapping functions in the initial error patterns to determine which mapping functions correspond to logically similar error behaviors. Then, it uses a clustering algorithm to cluster these mapping functions, grouping similar mapping functions into the same category. Next, it merges the mapping functions in each category to generate a new mapping function that represents the logical error behavior of all mapping functions in that category. Finally, it combines the merged mapping functions to generate the integrated error pattern.
[0061] Step S1316: Perform structural optimization processing on the integrated error pattern, establish the logical relationship between each component, and generate the basic error formation pattern.
[0062] The integration error pattern undergoes structural optimization. First, the logical relationships between the mapping functions in the integration error pattern are analyzed to identify which mapping functions have dependencies or conflicts. Then, the mapping functions with dependencies are sorted, and their positions are adjusted according to the dependency order. Conflicting mapping functions are modified to ensure logical consistency. Next, the structure of the integration error pattern is optimized to reduce redundant mapping functions and improve the pattern's operational efficiency. Finally, the logical relationships between the components are established, generating the basic error formation pattern.
[0063] Step S132: Extract the temporal distribution features of the original temperature data to generate temperature temporal features.
[0064] To extract the temporal distribution characteristics of the raw temperature data, firstly, Fourier transform is used to process the raw temperature data, transforming it from the time domain to the frequency domain to obtain the frequency characteristics. Then, the autocorrelation function and cross-correlation function of the raw temperature data are calculated. The autocorrelation function reflects the correlation of the raw temperature data at different time delays, while the cross-correlation function reflects the correlation between the raw temperature data and other related data. Next, the trend characteristics of the raw temperature data are analyzed, and a trend line is fitted using linear regression. The slope of the trend line represents the changing trend of the raw temperature data. Finally, the frequency characteristics, autocorrelation function, cross-correlation function, and trend characteristics are combined to generate the temperature time-series characteristics.
[0065] Step S133: Input the temperature time series characteristics into the morphology adaptation unit of the error morphology simulation module, perform time series adjustment processing on the basic error formation pattern, and generate a time series adapted error pattern.
[0066] Temperature time-series characteristics are input into the morphology adaptation unit of the error morphology simulation module. This unit first analyzes the frequency and trend characteristics of the temperature time-series characteristics to determine the variation period and trend of the original temperature data. Then, based on the variation period and trend of the original temperature data, the morphology adaptation unit adjusts the parameters of the mapping function in the basic error pattern. For example, if the variation period of the original temperature data is short, the error variation frequency is increased; if the original temperature data shows an upward trend, the magnitude of the error is adjusted to match the upward trend of the temperature. Finally, the adjusted mapping functions are combined to generate the time-series adapted error pattern.
[0067] Step S134: The error quantization unit of the error morphology simulation module performs feature transformation processing on the time-series adaptation error pattern to generate an error quantization sequence with the same dimension as the original temperature data.
[0068] The error quantization unit of the error morphology simulation module performs feature transformation processing on the time-series adaptation error pattern. First, it reads the mapping function and the time stamps of the original temperature data from the time-series adaptation error pattern. Then, the error quantization unit sequentially inputs the original temperature data into the mapping function according to the time stamps to obtain the corresponding error values. Next, the error quantization unit arranges these error values in chronological order to generate an error quantization sequence. The dimension of the error quantization sequence is the same as the dimension of the original temperature data, with each element corresponding to the error value at a specific time node in the original temperature data.
[0069] Step S135: Input the error quantization sequence into the morphology optimization unit of the error morphology simulation module, perform sequence smoothing processing, and generate an optimized error sequence.
[0070] The error quantization sequence is input into the morphology optimization unit of the error morphology simulation module. This unit uses a moving average method to smooth the error quantization sequence. The window size of the moving average method is set according to the fluctuation of the error quantization sequence and actual needs. The window slides sequentially along the time axis of the error quantization sequence, calculating the mean of the error values within the window at each slide. Then, the mean of the error values within the window is used as the error value at the center time node of that window to generate an optimized error sequence. After this processing, noise and outliers in the error quantization sequence are removed, resulting in a smoother sequence.
[0071] Step S136: Perform correlation mapping processing between the optimized error sequence and the original temperature data to generate the error simulation form corresponding to the original temperature data.
[0072] The optimized error sequence is correlated with the original temperature data. First, the time stamps of both the optimized error sequence and the original temperature data are read. Then, each error value in the optimized error sequence is correlated with the corresponding temperature value in the original temperature data based on the time stamps. Next, the correlated error values and temperature values are combined to generate an error simulation model. This simulation model is displayed in a chart format, with the horizontal axis representing time and the vertical axis representing temperature and error values. Different lines represent the original temperature data and the error simulation model, respectively.
[0073] Step S140: The error simulation morphology is transformed by the offset mode generation module of the error cause analysis model, and the error offset mode is output.
[0074] The error cause analysis model's cancellation mode generation module performs feature transformation on the error simulation morphology. This module first reads the error simulation morphology and the original temperature data. Then, it analyzes the characteristics of the error simulation morphology to determine the type and magnitude of the error. Next, based on the error type and magnitude, the module selects an appropriate cancellation method, such as compensation or correction, and determines the parameters of the cancellation method. Finally, it converts the cancellation method and parameters into a specific mode and outputs the error cancellation mode.
[0075] Step S141: Input the error simulation morphology into the feature conversion unit of the cancellation mode generation module, perform morphological feature quantization processing, and generate an error morphological feature vector.
[0076] The simulated error shape is input into the feature conversion unit of the cancellation pattern generation module. This feature conversion unit first digitizes the simulated error shape, converting each point into coordinate values. Then, it calculates the geometric features of the simulated error shape, such as length, width, and area, as well as its shape features, such as curvature and slope. Finally, it converts these geometric and shape features into numerical feature vectors, generating the error shape feature vector.
[0077] Step S142: Extract the core error features from the error morphology feature vector to generate a core error feature set.
[0078] To extract core error features from the error morphological feature vector, the variance of each feature in the vector is first calculated. Variance reflects the dispersion of the core error feature within the vector. Then, a variance threshold is set; features with variances greater than this threshold are considered core error features. Next, the feature transformation unit extracts features with variances greater than the threshold from the error morphological feature vector, generating a set of core error features.
[0079] Step S143: Input the core error feature set into the pattern construction unit of the cancellation pattern generation module, perform cancellation logic construction processing, and generate the basic cancellation pattern.
[0080] The core error feature set is input into the pattern building unit of the cancellation pattern generation module. This unit first analyzes each feature in the core error feature set to determine the error type and magnitude corresponding to that feature. Then, based on the error type and magnitude, the pattern building unit selects a suitable cancellation algorithm, such as a PID control algorithm or an adaptive filtering algorithm. Next, the pattern building unit determines the parameters of the cancellation algorithm, based on the feature values of the core error features and historical data. Finally, the cancellation algorithm and parameters are combined to generate the basic cancellation pattern.
[0081] Step S144: Call the dynamic adjustment unit of the offset mode generation module, and adjust the parameters of the basic offset mode in combination with the changing trend of the original temperature data to generate a dynamically adjusted offset mode.
[0082] The dynamic adjustment unit of the offset mode generation module is invoked. This unit first reads the trend of the original temperature data and the parameters of the basic offset mode. Then, the dynamic adjustment unit analyzes the trend of the original temperature data to determine characteristics such as the rate of temperature rise, rate of temperature fall, and settling time. Next, the dynamic adjustment unit adjusts the parameters of the basic offset mode based on these characteristics; for example, if the rate of temperature rise is rapid, the proportional coefficient of the offset algorithm is increased; if the temperature is in a stable state, the integral coefficient of the offset algorithm is decreased. Finally, the adjusted parameters are embedded into the basic offset mode to generate the dynamically adjusted offset mode.
[0083] Step S1441: Extract the changing trend of the original temperature data and generate temperature trend features.
[0084] To extract the trend of raw temperature data, a sliding window approach is first used to process the data. The size of the sliding window is set according to the data acquisition interval and actual needs, and the window slides sequentially along the time axis of the raw temperature data. For the raw temperature data within each sliding window, the mean and variance of the temperature data within that window are calculated. Then, the changes in the mean between adjacent windows are analyzed to determine the trend of the raw temperature data, such as an upward trend, a downward trend, or a stable trend. Next, the trend is converted into a numerical feature vector to generate temperature trend features.
[0085] Step S1442: Analyze the basic offset mode, determine all adjustable parameters contained in the basic offset mode, and generate a parameter list.
[0086] To analyze the basic offsetting mode, first, the code or configuration file of the basic offsetting mode is read. Then, the structure of the basic offsetting mode is analyzed to determine all the adjustable parameters it contains, such as the proportional coefficient, integral coefficient, and derivative coefficient in the PID control algorithm. Next, these adjustable parameters are extracted to generate a parameter list.
[0087] Step S1443: Input the temperature trend characteristics and parameter list into the parameter association sub-unit of the dynamic adjustment unit, establish the mapping relationship between temperature trend and model parameters, and generate a parameter association table.
[0088] Temperature trend characteristics and a parameter list are input into the parameter association subunit of the dynamic adjustment unit. This subunit first classifies the temperature trend characteristics into different categories, such as rapid increase, slow increase, rapid decrease, slow decrease, and stable. Then, the subunit analyzes the relationship between the temperature trend characteristics of each category and each parameter in the parameter list to determine the adjustment direction and magnitude. Finally, these relationships are converted into a tabular form, generating a parameter association table.
[0089] Step S1444: Based on the parameter association table, determine the adjustment direction and range of each mode parameter under the current temperature trend.
[0090] Based on the parameter association table, the adjustment direction and range of each mode parameter under the current temperature trend are determined. First, the dynamic adjustment unit reads the category of the current temperature trend, and then looks up the corresponding parameter adjustment direction and adjustment magnitude in the parameter association table. Next, the adjustment range of the parameter is determined based on the adjustment magnitude; for example, if the adjustment magnitude is an increase of 10%, then the adjustment range of the parameter is 10% of the current value. Finally, the dynamic adjustment unit determines the adjustment direction and range of each mode parameter under the current temperature trend.
[0091] Step S1445: Update each mode parameter in the parameter list according to the adjustment direction and range to generate the adjusted parameter list.
[0092] The process updates each mode parameter in the parameter list according to the adjustment direction and range. First, it reads each parameter and its corresponding adjustment direction and range. Then, it calculates the new value of the parameter based on the adjustment direction and range. For example, if the adjustment direction is "increase" and the adjustment range is 10%, the new value of the parameter is the current value multiplied by 1.1. Finally, it replaces the original parameter values with the new values, generating the adjusted parameter list.
[0093] Step S1446: Re-embed the adjusted parameter list into the corresponding position of the basic offset mode to generate a dynamically adjusted offset mode.
[0094] The adjusted parameter list is re-embedded into the corresponding positions in the basic offset pattern. First, the code or configuration file of the basic offset pattern is read to locate the parameters. Then, the parameter values in the adjusted parameter list replace the corresponding parameter values in the basic offset pattern. Next, the modified basic offset pattern is compiled or interpreted to ensure that the pattern can function correctly. Finally, the dynamically adjusted offset pattern is generated.
[0095] Step S145: Input the dynamically adjusted offset mode into the mode integration unit of the offset mode generation module, perform logical coherence processing, and generate an integrated offset mode.
[0096] The dynamically adjusted offsetting pattern is input into the pattern integration unit of the offsetting pattern generation module. This unit first analyzes the logical relationships between the various parts of the dynamically adjusted offsetting pattern to identify logical conflicts or inconsistencies. Then, the pattern integration unit modifies the conflicting or inconsistent parts to ensure logical consistency. Next, the unit optimizes the structure of the dynamically adjusted offsetting pattern, reducing redundancy and improving its operational efficiency. Finally, an integrated offsetting pattern is generated.
[0097] Step S146: Perform time-series adaptation processing on the integrated offset mode to make it consistent with the time stamp of the original temperature data, and output the error offset mode.
[0098] The integrated offset mode undergoes timing adaptation processing. First, the timestamps of the integrated offset mode and the original temperature data are read. Then, the mode integration unit adjusts the runtime of the integrated offset mode based on the timestamps of the original temperature data, ensuring that the integrated offset mode runs at the corresponding time points. Next, the mode integration unit timestamps the output of the integrated offset mode to ensure consistency with the timestamps of the original temperature data. Finally, the error offset mode is output.
[0099] Step S150: Input the original temperature data and error cancellation mode into the correction execution module of the error cause analysis model, perform the error cancellation operation, and output the corrected temperature data.
[0100] The original temperature data and the error cancellation pattern are input into the correction execution module of the error cause analysis model. This module first reads the timestamps of the original temperature data and the error cancellation pattern. Then, based on the timestamps, the correction execution module applies the cancellation value from the error cancellation pattern to the corresponding original temperature data. For example, if the cancellation value is positive, it is subtracted from the original temperature data; if the cancellation value is negative, it is added to the original temperature data. Next, the correction execution module verifies the temperature data after applying the cancellation value to ensure its reasonableness. Finally, it outputs the corrected temperature data.
[0101] Figure 2 The illustration shows exemplary hardware and software components of a temperature sensing error correction system 100 incorporating machine learning, which can implement the ideas of this application, according to some embodiments of this application. For example, a processor 120 may be used in the temperature sensing error correction system 100 incorporating machine learning and to perform the functions described in this application.
[0102] The temperature sensing error correction system 100 incorporating machine learning can be a general-purpose server or a special-purpose server; both can be used to implement the temperature sensing error correction method incorporating machine learning of this application. Although only one server is shown in this application, for convenience, the functions described in this application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0103] For example, the temperature sensing error correction system 100 incorporating machine learning may include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and various forms of storage media 140, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the temperature sensing error correction system 100 incorporating machine learning may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The methods of this application can be implemented according to these program instructions. The temperature sensing error correction system 100 incorporating machine learning also includes an I / O interface 150 between the computer and other input / output devices.
[0104] For ease of explanation, only one processor is described in the temperature sensing error correction system 100 incorporating machine learning. However, it should be noted that the temperature sensing error correction system 100 incorporating machine learning in this application may also include multiple processors, and therefore the steps performed by one processor as described in this application may also be performed jointly by multiple processors or individually. For example, if the processor of the temperature sensing error correction system 100 incorporating machine learning performs steps A and B, it should be understood that steps A and B may also be performed jointly by two different processors or individually by one processor. For example, the first processor performs step A, the second processor performs step B, or the first processor and the second processor jointly perform steps A and B.
[0105] Furthermore, this embodiment of the invention also provides a readable storage medium, wherein computer-executable instructions are preset in the readable storage medium, and when the processor executes the computer-executable instructions, the temperature sensing error correction method combined with machine learning is implemented as described above.
[0106] It should be noted that, in order to simplify the description of the present invention and thus help to understand one or more embodiments of the invention, multiple features may sometimes be grouped into one embodiment, drawing or description thereof in the foregoing description of the embodiments of the present invention.
Claims
1. A temperature sensing error correction method combining machine learning, characterized in that, The method includes: Acquire raw temperature data output by the temperature sensor, and simultaneously collect environmental impact information related to the raw temperature data. The environmental impact information and the raw temperature data have the same time stamp. The raw temperature data and environmental impact information are input into the pre-trained error cause analysis model, and the correlation factor mining module of the error cause analysis model generates temperature sensing error correlation factors. The error morphology simulation module of the error cause analysis model is invoked to generate an error simulation morphology corresponding to the original temperature data based on the temperature sensing error correlation factors. The error simulation morphology is transformed by the offset mode generation module of the error cause analysis model, and the error offset mode is output. The original temperature data and the error cancellation mode are input into the correction execution module of the error cause analysis model, the error cancellation operation is performed, and the corrected temperature data is output.
2. The temperature sensing error correction method combining machine learning according to claim 1, characterized in that, The process involves inputting raw temperature data and environmental impact information into a pre-trained error cause analysis model. The model's correlation factor mining module then generates correlation factors for temperature sensing errors, including: The raw temperature data is input into the temperature feature extraction unit of the correlation factor mining module, and time-series feature decomposition processing is performed to generate a temperature change feature sequence. The environmental impact information is input into the environmental feature transformation unit of the correlation factor mining module for information structuring processing to generate environmental feature vectors. The temperature change feature sequence and environmental feature vector are input into the cross-analysis unit of the correlation factor mining module to perform correlation modeling processing between feature dimensions and generate a correlation feature matrix. By using the factor identification unit of the correlation factor mining module to perform pattern extraction processing on the correlation feature matrix, key influencing factors related to temperature sensing error are identified. Key influencing factors are input into the feature integration unit of the correlation factor mining module for information aggregation processing to generate correlation factors of temperature sensing error.
3. The temperature sensing error correction method combining machine learning according to claim 2, characterized in that, The step of inputting the temperature change feature sequence and environmental feature vector into the cross-analysis unit of the correlation factor mining module to perform correlation modeling processing between feature dimensions and generate a correlation feature matrix includes: Extract the temperature fluctuation features at each time point in the temperature change feature sequence to generate a temperature fluctuation feature set; Extract the state change features of each environmental factor from the environmental feature vector to generate an environmental state feature set; The temperature fluctuation feature set and the environmental state feature set are input into the time alignment sub-unit of the cross-analysis unit for matching processing in the time dimension, generating synchronous feature pairs. For each pair of synchronous features, correlation strength analysis was performed to determine the degree of correlation between changes in environmental state and temperature fluctuations. Arrange the correlation degree of all synchronous feature pairs according to the time order of the temperature change feature sequence and the dimensional order of the environmental feature vector to generate an initial correlation matrix; The matrix enhancement subunit of the cross-analysis unit performs feature enhancement processing on the initial correlation matrix, highlighting the corresponding matrix elements with significant correlation, and generating a correlation feature matrix.
4. The temperature sensing error correction method combining machine learning according to claim 1, characterized in that, The error morphology simulation module of the error cause analysis model generates an error simulation morphology corresponding to the original temperature data based on the temperature sensing error correlation factors, including: The factors related to temperature sensing error are input into the pattern construction unit of the error morphology simulation module to perform error formation pattern mining and generate basic error formation patterns. Extract the temporal distribution features of the raw temperature data to generate temperature temporal features; The temperature time series characteristics are input into the morphology adaptation unit of the error morphology simulation module to perform time series adjustment processing on the basic error formation pattern and generate a time series adapted error pattern. The error quantization unit of the error morphology simulation module performs feature transformation processing on the time-series adaptation error pattern to generate an error quantization sequence with the same dimension as the original temperature data. The error quantization sequence is input into the morphology optimization unit of the error morphology simulation module for sequence smoothing to generate an optimized error sequence. The optimized error sequence is correlated and mapped with the original temperature data to generate an error simulation form corresponding to the original temperature data.
5. The temperature sensing error correction method combining machine learning according to claim 4, characterized in that, The pattern construction unit of the error morphology simulation module inputs temperature sensing error correlation factors into the error formation simulation module to perform error formation pattern mining processing and generate basic error formation patterns, including: Characteristic decomposition was performed on the factors associated with temperature sensing errors to obtain multiple independent error influencing factors. Analyze the error performance characteristics corresponding to each error sub-factor and generate sub-factor error characteristics; Input all sub-factor error characteristics into the associated modeling sub-unit of the pattern construction unit, perform interaction analysis and processing between factors, and generate factor interaction relationships; Based on the interaction of factors, a mapping logic between error-influencing sub-factors and error performance is constructed to generate an initial error pattern. The initial error patterns are logically integrated by the pattern integration subunit of the pattern building unit, merging similar error behavior logic to generate integrated error patterns. The integrated error pattern is structurally optimized to establish the logical relationships between its components and generate a basic error formation pattern.
6. The temperature sensing error correction method combining machine learning according to claim 1, characterized in that, The pre-training process of the error cause analysis model includes: Collect raw temperature data, environmental impact information, and corresponding standard temperature data for training in various application scenarios to construct a model training sample set. The model training sample set is divided into a training sample subset, a validation sample subset, and a test sample subset. The training sample subset is used for model parameter learning, the validation sample subset is used for parameter adjustment during model training, and the test sample subset is used for final model performance verification. Initialize the network parameters of the error cause analysis model and set the iteration conditions for model training; Input the samples from the training sample subset into the initial error cause analysis model, perform temperature sensing error correlation factor generation, error simulation pattern generation, error cancellation pattern generation and error cancellation operation, and output the corrected temperature data predicted by the model. The model prediction bias is generated by comparing the corrected temperature data predicted by the model with the corresponding standard temperature data. Based on the model prediction bias, adjust the network parameters of the error cause analysis model; Repeat the model training process until the prediction bias of the error cause analysis model on the validation sample subset reaches the expected range, then stop training. The performance of the trained error cause analysis model is verified using a subset of test samples to confirm its error correction effect in different scenarios, thus forming a pre-trained error cause analysis model.
7. The temperature sensing error correction method combining machine learning according to claim 6, characterized in that, The adjustment of network parameters based on model prediction bias and error cause analysis model includes: The model prediction bias is decomposed into the bias components corresponding to the correlation factor mining module, error morphology simulation module, offsetting pattern generation module, and correction execution module. For each deviation component, determine the corresponding network layer of the error cause analysis model and generate the layer deviation correspondence; Based on the layer bias correspondence, analyze the degree of influence of each network layer parameter on the corresponding bias component; Based on the magnitude of the impact, determine the order of parameter adjustment for each network layer, prioritizing the adjustment of parameters with a significant impact; The parameters of each network layer are updated in the order of adjustment, with the update magnitude matching the degree of impact. After parameter adjustment, the model prediction is performed again using samples from the training sample subset, and the new model prediction bias is calculated. If the new model prediction bias is less than the model prediction bias before adjustment, the adjusted network parameters are retained; if the new model prediction bias is greater than or equal to the model prediction bias before adjustment, the network parameters before adjustment are restored and the adjustment range is redefined. Repeat the parameter adjustment process until the model prediction deviation meets the expected requirements.
8. The temperature sensing error correction method combining machine learning according to claim 1, characterized in that, The error cancellation mode generation module, which uses the error cause analysis model to perform feature transformation on the error simulation morphology and outputs the error cancellation mode, includes: The feature conversion unit of the error simulation morphology input cancellation mode generation module is used to perform morphological feature quantization processing to generate an error morphological feature vector. Extract the core error features from the error morphology feature vector to generate a core error feature set; The core error feature set is input into the pattern construction unit of the cancellation pattern generation module, and the cancellation logic construction process is performed to generate the basic cancellation pattern. The dynamic adjustment unit of the offset mode generation module is invoked, and the parameters of the basic offset mode are adjusted in combination with the changing trend of the original temperature data to generate a dynamically adjusted offset mode. The dynamically adjusted offset mode is input into the mode integration unit of the offset mode generation module, and logical coherence processing is performed to generate an integrated offset mode. The integrated offset mode is time-adapted to match the time stamp of the original temperature data, and the error offset mode is output.
9. The temperature sensing error correction method combining machine learning according to claim 8, characterized in that, The dynamic adjustment unit of the invocation cancellation mode generation module, in conjunction with the changing trend of the original temperature data, performs parameter adjustment processing on the basic cancellation mode to generate a dynamically adjusted cancellation mode, including: Extract the changing trends of the raw temperature data and generate temperature trend features; Analyze the basic offset pattern, determine all adjustable parameters included in the basic offset pattern, and generate a parameter list; The temperature trend characteristics and parameter list are input into the parameter association sub-unit of the dynamic adjustment unit to establish the mapping relationship between temperature trend and model parameters, and generate a parameter association table. Based on the parameter correlation table, determine the adjustment direction and range of each mode parameter under the current temperature trend; The parameters of each mode in the parameter list are updated according to the adjustment direction and range to generate the adjusted parameter list; The adjusted parameter list is re-embedded into the corresponding position of the basic offset mode to generate a dynamically adjusted offset mode.
10. A temperature sensing error correction system incorporating machine learning, characterized in that, The temperature sensing error correction system combining machine learning includes a processor and a memory, the memory and the processor are connected, the memory is used to store programs, instructions or code, and the processor is used to execute the programs, instructions or code in the memory to implement the temperature sensing error correction method combining machine learning as described in any one of claims 1-9.