Temperature and humidity compensation method, system, equipment, medium and product
By pre-training a multi-scale prediction model to compensate for nonlinear errors in temperature and humidity data, and using an improved radial basis function neural network to capture multi-scale features, the problem of sensor measurement error is solved and higher-precision temperature and humidity compensation is achieved.
Patent Information
- Application Number
- CN202511010931.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-09-16
AI Technical Summary
Existing temperature and humidity sensors have nonlinear errors, resulting in inaccurate temperature and humidity measurements. Hardware correction methods are costly and have limited accuracy, and software compensation methods such as curve fitting and neural network methods have model accuracy issues.
A pre-trained multi-scale prediction model is used to perform nonlinear error compensation on temperature and humidity data. By obtaining the original data, an improved radial basis function neural network is used to capture multi-scale features for error compensation.
It improves the accuracy and reliability of temperature and humidity measurement, enhances the precision of nonlinear error compensation, and solves the problems of subjectivity in manually setting scales and capturing global and local features.
Smart Images

Figure CN120651284A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of sensor technology, and in particular to a temperature and humidity compensation method, system, equipment, medium and product. Background Art
[0002] With the development of sensor technology, sensors have found widespread application, including but not limited to industrial production, logistics and transportation, environmental monitoring, and medical diagnosis. Temperature and humidity sensors often have errors between their output temperature and humidity values and the actual temperature and humidity values. This error requires compensation to improve the accuracy and reliability of temperature and humidity measurements.
[0003] To address the temperature and humidity compensation issues of temperature and humidity sensors, scholars at home and abroad have conducted extensive research. Currently, the main approaches include hardware implementation and software compensation. Hardware correction uses electronic circuits and components for correction, while software compensation methods primarily include curve fitting and neural network methods.
[0004] However, due to the complexity of the compensation circuit of hardware correction, the excessive number of factors affecting the circuit, and the limited compensation accuracy, it is necessary to find the cause of the error according to the actual application. It is necessary to avoid the introduction of error sources as much as possible through ultra-high component design, sophisticated manufacturing, and precise installation. This method is expensive and limited by the current level. Software compensation method has become a hot topic of research. The curve fitting method and linear regression method are greatly affected by the fitting model parameters and have model accuracy issues. The radial basis function neural network (RBF) commonly used in neural networks is a local approximation network that cannot accurately predict global data and faces the difficulty of global optimality and local optimality. Summary of the Invention
[0005] The present invention provides a temperature and humidity compensation method, system, equipment, medium and product to achieve the measurement of alternating current magnetic field intensity.
[0006] According to a first aspect of the present invention, a temperature and humidity compensation method is provided, the method comprising:
[0007] Get the original temperature and humidity data;
[0008] Nonlinear temperature and humidity error compensation is performed on the temperature and humidity data based on a pre-trained multi-scale prediction model to obtain final temperature and humidity data.
[0009] According to a second aspect of the present invention, there is provided a temperature and humidity compensation device, the device comprising:
[0010] Data acquisition module, used to obtain original temperature and humidity data;
[0011] The data compensation module is used to perform nonlinear temperature and humidity error compensation on the temperature and humidity data based on a pre-trained multi-scale prediction model to obtain final temperature and humidity data.
[0012] According to a third aspect of the present invention, a computer device is provided. The computer device is used as an execution subject of each module in the temperature and humidity compensation device according to any embodiment of the present invention, and includes:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the temperature and humidity compensation method described in any embodiment of the present invention.
[0016] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the temperature and humidity compensation method described in any embodiment of the present invention when executed.
[0017] According to a fifth aspect of the present invention, an embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the temperature and humidity compensation method of any embodiment of the present invention.
[0018] The technical solution of the embodiments of the present invention obtains the original temperature and humidity data and performs nonlinear temperature and humidity error compensation on this data based on a pre-trained multi-scale prediction model to obtain the final temperature and humidity data. This pre-trained multi-scale prediction model simultaneously captures the characteristics of temperature and humidity data at different scales, resolving the subjectivity of manually setting the scale while simultaneously capturing both global and local characteristics. This improves the accuracy of the pre-trained multi-scale prediction model's nonlinear temperature and humidity error compensation, thus achieving nonlinear temperature and humidity error compensation for the sensor.
[0019] The technical solution of the embodiment of the present invention is illustrated by the accompanying drawings
[0020] Figure 1 This is a flow chart of a temperature and humidity compensation method provided according to the first embodiment of the present invention;
[0021] Figure 2 This is an example flow chart of a temperature and humidity compensation method provided according to the first embodiment of the present invention;
[0022] Figure 3 This is a schematic structural diagram of a temperature and humidity compensation device provided according to the second embodiment of the present invention;
[0023] Figure 4 It is a structural diagram of a computer device implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The present invention will be further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.
[0025] Example 1
[0026] Figure 1 A flowchart of a temperature and humidity compensation method is provided for embodiment 1 of the present invention. This embodiment is applicable to the error compensation of nonlinear temperature and humidity values. The method can be executed by a temperature and humidity compensation device, and the temperature and humidity compensation device can be executed by a computer device as the execution body of each module.
[0027] like Figure 1 As shown, the method includes:
[0028] S110: Obtain original temperature and humidity data.
[0029] In this embodiment, temperature and humidity data can be understood as the uncompensated temperature and humidity values collected by the temperature and humidity sensors. The nonlinear temperature and humidity compensation issue with temperature and humidity sensors refers to the nonlinear relationship between the sensor output and input, which results in errors between the temperature and humidity output values of the temperature and humidity sensors and the actual temperature and humidity values. Compensation is required to improve the accuracy and reliability of temperature and humidity measurements.
[0030] Specifically, the processor may receive temperature values and humidity values collected by associated sensors to form original temperature and humidity data.
[0031] S120 , performing nonlinear temperature and humidity error compensation on the temperature and humidity data based on the pre-trained multi-scale prediction model to obtain final temperature and humidity data.
[0032] In this embodiment, the pre-trained multi-scale prediction model can be understood as a pre-trained prediction model that can capture multi-scale features. The final temperature and humidity data can be understood as the compensated temperature and humidity values.
[0033] Specifically, the processor can input the temperature and humidity data into a pre-trained multi-scale prediction model, capture the global and local characteristics of the temperature and humidity data through the pre-trained multi-scale prediction model, perform nonlinear temperature and humidity error compensation on the temperature and humidity data, and obtain the output result of the model as the final temperature and humidity data.
[0034] The technical solution of the embodiments of the present invention obtains the original temperature and humidity data and performs nonlinear temperature and humidity error compensation on this data based on a pre-trained multi-scale prediction model to obtain the final temperature and humidity data. This pre-trained multi-scale prediction model simultaneously captures the characteristics of temperature and humidity data at different scales, resolving the subjectivity of manually setting the scale while simultaneously capturing both global and local characteristics. This improves the accuracy of the pre-trained multi-scale prediction model's nonlinear temperature and humidity error compensation, thus achieving nonlinear temperature and humidity error compensation for the sensor.
[0035] Furthermore, based on the above embodiment, the training steps of the pre-trained compensation network model can be refined as follows:
[0036] a1. Obtain the temperature and humidity training dataset and generate a sample dataset, which includes a training set and a test set.
[0037] In this embodiment, the temperature and humidity training dataset can be understood as data consisting of temperature and humidity values collected by multiple temperature and humidity sensors and their corresponding true values. The sample dataset can be understood as a dataset used to train the prediction model, including a training set and a test set. The training set is used for model training data, and the test set is used for verification data.
[0038] Specifically, the processor can obtain a temperature and humidity training data set, preprocess the data in the temperature and humidity training data set, for example, by using data normalization and outlier processing, and divide it into a training set and a test set to generate a sample data set.
[0039] b1. Process the sample data set through the initial multi-scale prediction model to determine the weighted multi-scale features.
[0040] Among them, the initial multi-scale prediction model is an improved radial basis function neural network RBF model, and the network structure can be: input layer: dual input X = [x1, x2], hidden layer: K center points, each center point has M scales, output layer: dual output Y = [y1, y2], and the StandardScaler method can be used to standardize the input and output (μ is the mean 0, σ is the standard deviation 1) Weighted multi-scale features can be understood as the result of integrating features extracted at different scales.
[0041] Specifically, the processor may input the training set into the initial multi-scale prediction model, and first perform data processing on the input data through the hidden layer in the initial multi-scale prediction model to determine the weighted multi-scale features.
[0042] c1. Train the initial multi-scale prediction model based on the weighted multi-scale features and the test set until the training conditions are met to obtain a pre-trained compensation network model.
[0043] In this embodiment, the training condition can be understood as the condition that characterizes the end of training, for example, it can be a threshold condition of the degree of difference between the set true value and the test value, for example, it can be the mean square error MSE reflecting the degree of difference between the estimator and the estimated value being less than the threshold i, etc.
[0044] Specifically, the weighted multi-scale features can be processed by the initial multi-scale prediction model to determine the predicted value, and the degree of difference between the predicted value and the corresponding true value in the test set can be calculated to determine the evaluation index of the model. The evaluation index is compared with the training conditions. If the training conditions are met, the training is terminated and the current multi-scale prediction model is used as a pre-trained compensation network model. If the training conditions are not met, the model parameters of the initial multi-scale prediction model are changed and the weighted multi-scale feature extraction step is returned to continue training the multi-scale prediction model.
[0045] Furthermore, based on the above embodiment, the steps of processing the sample data set and determining the weighted multi-scale features can be refined as follows:
[0046] Determine the center point of the training set; for each center point, determine the average distance between each center point and its nearest neighbor center points; and determine the weighted multi-scale features of each training data based on the training data in the training set, the average distance, and a preset scale factor set.
[0047] In this embodiment, the center point can be understood as a specific point in each cluster. The other nearest neighbor center points can be understood as the other center points closest to the center point. The average distance can be understood as the average of the distances between the center point and the other nearest neighbor center points. The preset scale factor set can be understood as a set of multiple set scale factors, and the scale factor can be understood as a parameter used to adjust the feature scale during the feature extraction process.
[0048] Specifically, a clustering algorithm within the multi-scale prediction model can be used to determine multiple center points within the training set. For each center point, the average distance between each center point and its nearest neighboring center points is determined. Based on the training data in the training set, the average distance, and a preset set of scaling factors, a weighted multi-scale feature is determined for each training data point.
[0049] For example, the center point can be determined by the K-means clustering algorithm:
[0050]
[0051] Where N is the number of samples, K is the number of center points, and i is the number of iterations.
[0052] For each center point c i, calculate the average distance to its k nearest neighbors:
[0053]
[0054] in, It is c i The jth nearest neighbor center point of .
[0055] The weighted multi-scale features of each training data are determined based on the training data, average distance and preset scale factor set in the training set, including:
[0056] Determine the distance between the training data in the training set and each center point; determine the multi-scale features of each training data based on each distance and a preset scale factor set; for each center point, determine the sum of the features of the center point at all scales based on the multi-scale features; based on the feature sum, weight the multi-scale features; perform weighted merging based on the weights and the multi-scale features to obtain weighted multi-scale features.
[0057] In this embodiment, distance can be understood as the distance between each training data point in the training set relative to different center points. Multi-scale features can be understood as features under different scale factors. The weight of the multi-scale feature can be understood as the weight value used to adjust the proportion of different center points.
[0058] Specifically, the multi-scale prediction model can be used to determine the distance between the training data in the training set and each center point. According to each distance and a preset scale factor set, the multi-scale features of each training data are determined. For each center point, the sum of the features of the center point at all scales is determined according to the multi-scale features, and the weight of the multi-scale features is determined according to the feature sum. The weighted combination of the multi-scale features and the multi-scale features is performed to obtain the weighted multi-scale features.
[0059] For example, the input training data X and the center point c can be calculated by the following formula: i Distance:
[0060] d i (x)=\left‖{xc i}\right‖
[0061] Multi-scale feature matrix Defined as:
[0062]
[0063] Among them, the characteristics of each training data under different scale factors are: Among them, f s is the scale factor.
[0064] The characteristics and e of each center point at all scales can be calculated by the following formula i (x):
[0065]
[0066] The weight w of multi-scale features i (x) is:
[0067]
[0068] After weighted merging features, we can get weighted multi-scale features h s (x):
[0069]
[0070] Furthermore, based on the above embodiment, the steps of training the initial multi-scale prediction model according to the weighted multi-scale features and the test set until the training conditions are met and obtaining the pre-trained compensation network model can be refined as follows:
[0071] Based on the weighted multi-scale features, a design matrix is constructed through the initial multi-scale prediction model; ridge regression is performed based on the design matrix to obtain a weight matrix; linear prediction is performed based on the weight matrix and the design matrix to determine the prediction result; the prediction result is verified based on the test set to obtain a verification result; if the verification result meets the end condition, the current multi-scale prediction model is used as the pre-trained compensation network model; otherwise, return to the step of determining the weighted multi-scale features and continue model training.
[0072] In this embodiment, the design matrix can be understood as a matrix composed of weighted multi-scale features of all training data. Ridge regression can be understood as a method for solving multicollinearity problems in linear regression. The weight matrix can be understood as a method for characterizing the weighted relationship between different variables and can be used for linear transformation. The prediction result can be understood as the obtained predicted value. The verification result can be understood as a result used to characterize the prediction accuracy of the model, for example, which can be determined by an evaluation index.
[0073] Specifically, a design matrix is constructed based on the weighted multi-scale features through the initial multi-scale prediction model, and a ridge regression solution is performed based on the design matrix to obtain a weight matrix. Linear prediction is performed based on the weight matrix and the design matrix to determine the prediction result. The processor can verify the prediction result based on the test set to obtain a verification result; if the verification result meets the end condition, the current multi-scale prediction model is used as the pre-trained compensation network model. Otherwise, return to the step of determining the weighted multi-scale features, and determine other center points by adjusting the parameters of the above-mentioned clustering algorithm to generate different weighted multi-scale features and continue model training until the verification result meets the end condition. At this time, the optimal center point position is found, the cycle ends, and the pre-trained compensation network model is obtained.
[0074] For example, the design matrix H(x) is:
[0075] H(x)=[h1(x),h2(x),…,h s (x),1]
[0076] Ridge regression solves the weight matrix:
[0077] W=(H T H+λI) -1 H T Y
[0078] Where H is the design matrix of all training samples, Y is the normalized output matrix, and λ is the regularization parameter.
[0079] The technical solution of the embodiment of the present invention obtains temperature and humidity sensor data as a sample data set, selects a center point on the training data using a clustering method through an initial multi-scale prediction model, calculates the average distance from each center point to its k nearest neighbor centers, calculates the distance from the training data to the center point, and generates multi-scale features. The sum of the features of each center point at all scales and the weight are calculated. After merging the weighted features, a weighted multi-scale feature is obtained. A design matrix is constructed for the weighted multi-scale feature and a denormalized linear prediction is performed. The weighted multi-scale feature is verified using a test set in the sample data set. If the verification fails, the weighted multi-scale feature determination step is returned to the step of obtaining the trained multi-scale prediction model until the verification passes. The trained multi-scale prediction model is used as a pre-trained compensation network model to achieve sensor nonlinear temperature and humidity error compensation. Traditional RBF networks generally use fixed scale (or bandwidth) parameters or use a global method (such as the average of the distances between all center points) to determine the scale. However, the present invention calculates the sum of the feature values of each center point at all scales and uses attention weights to weight the multi-scale features of each center point to obtain a weighted feature sum at each scale. In this way, the model can dynamically select the most relevant center points based on the input samples and fuse their multi-scale features. In this way, the same center point can simultaneously capture features of different scales (local and global), enhancing the expressiveness of the model and thereby improving the accuracy of the pre-trained compensation network model in compensating for nonlinear temperature and humidity errors.
[0080] For example, to facilitate understanding of the present invention, a specific example is used as an illustration, and the steps may include:
[0081] S201, obtain a temperature and humidity dataset and preprocess it, dividing it into a training set and a test set to obtain a sample dataset;
[0082] S202, determining a center point based on the training set;
[0083] S203, determining the average distance between each center point and its nearest neighbor center points, that is, determining the adaptive basic scale;
[0084] S204, performing multi-scale feature extraction on the training data based on the distance between the training data and the center point in combination with a preset scale factor set to obtain multi-scale features;
[0085] S205: Perform weighted merging based on the multi-scale features and the corresponding multi-scale feature weights to determine weighted multi-scale features;
[0086] S206, performing prediction based on the weighted multi-scale features and determining a prediction result;
[0087] S207: Determine whether the current multi-scale prediction model meets the termination condition based on the prediction results and the test set; if so, jump to step S208; if not, jump to step S202;
[0088] S208: Use the current multi-scale prediction model as a pre-trained compensation network model.
[0089] Example 2
[0090] Figure 3 This is a schematic diagram of the structure of a temperature and humidity compensation device provided in the second embodiment of the present invention. Figure 3 As shown, the device includes: a data acquisition module 31 and a data compensation module 32.
[0091] Data acquisition module 31, used to obtain original temperature and humidity data;
[0092] The data compensation module 32 is used to perform nonlinear temperature and humidity error compensation on the temperature and humidity data based on a pre-trained multi-scale prediction model to obtain final temperature and humidity data.
[0093] The technical solution of the embodiments of the present invention obtains the original temperature and humidity data and performs nonlinear temperature and humidity error compensation on this data based on a pre-trained multi-scale prediction model to obtain the final temperature and humidity data. This pre-trained multi-scale prediction model simultaneously captures the characteristics of temperature and humidity data at different scales, resolving the subjectivity of manually setting the scale while simultaneously capturing both global and local characteristics. This improves the accuracy of the pre-trained multi-scale prediction model's nonlinear temperature and humidity error compensation, thus achieving nonlinear temperature and humidity error compensation for the sensor.
[0094] Furthermore, the device also includes: a model training module.
[0095] The model training module includes:
[0096] A first determining unit is configured to obtain a temperature and humidity training data set and generate a sample data set, wherein the sample data set includes a training set and a test set;
[0097] A second determining unit is configured to perform data processing on the sample data set using an initial multi-scale prediction model to determine weighted multi-scale features;
[0098] The third determining unit is configured to train the initial multi-scale prediction model according to the weighted multi-scale features and the test set until a training condition is met, thereby obtaining a pre-trained compensation network model.
[0099] Among them, the initial multi-scale prediction model is an improved radial basis function neural network RBF model.
[0100] Furthermore, the second determining unit includes:
[0101] A first determining subunit, configured to determine the center point of the training set;
[0102] A second determining subunit is configured to determine, for each of the central points, an average distance between the central point and its nearest neighboring central points;
[0103] The third determining subunit is configured to determine the weighted multi-scale features of each training data according to the training data in the training set, the average distance, and a preset scale factor set.
[0104] The third determining subunit is specifically configured to:
[0105] Determining the distance between the training data in the training set and each of the center points;
[0106] Determining a multi-scale feature of each training data according to each of the distances and a preset scale factor set;
[0107] For each of the center points, determining the sum of the features of the center point at all scales according to the multi-scale features;
[0108] Determining the weight of the multi-scale feature of the center point according to the feature sum;
[0109] A weighted combination is performed according to the weight and the multi-scale feature to obtain a weighted multi-scale feature.
[0110] Furthermore, the third determining unit is specifically configured to:
[0111] constructing a design matrix based on the weighted multi-scale features using the initial multi-scale prediction model;
[0112] Perform ridge regression based on the design matrix to obtain a weight matrix;
[0113] Perform linear prediction based on the weight matrix and the design matrix to determine a prediction result;
[0114] Verifying the prediction result according to the test set to obtain a verification result;
[0115] If the verification result meets the end condition, the current multi-scale prediction model is used as the pre-trained compensation network model;
[0116] Otherwise, return to the step of determining the weighted multi-scale features and continue model training.
[0117] The temperature and humidity compensation device provided in the embodiment of the present invention can execute the temperature and humidity compensation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0118] The above embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and replacements made by technicians in this field on the basis of the present invention fall within the scope of protection required by the present invention.
[0119] Example 3
[0120] Figure 4 A schematic diagram of the structure of a computer device 40 that can be used to implement an embodiment of the present invention is shown. The computer device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The computer device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0121] like Figure 4 As shown, computer device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 and a random access memory (RAM) 44, communicatively connected to at least one processor 41. The memory stores a computer program executable by the at least one processor, and processor 41 can perform various appropriate actions and processes according to the computer program stored in read-only memory (ROM) 42 or loaded from storage unit 48 into random access memory (RAM) 43. Various programs and data required for the operation of computer device 40 can also be stored in RAM 43. Processor 41, ROM 42, and RAM 43 are interconnected via bus 44. An input / output (I / O) interface 45 is also connected to bus 44.
[0122] A number of components in the computer device 40 are connected to the I / O interface 45, including an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a magnetic disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the computer device 40 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0123] Processor 41 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. Processor 41 executes the various methods and processes described above, such as the temperature and humidity compensation method.
[0124] In some embodiments, the temperature and humidity compensation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed on the computer device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the temperature and humidity compensation method described above can be performed. Alternatively, in other embodiments, the processor 41 can be configured to execute the temperature and humidity compensation method in any other appropriate manner (for example, by means of firmware).
[0125] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0127] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0128] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0129] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0130] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0131] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0132] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A temperature and humidity compensation method, characterized in that: include: Get the original temperature and humidity data; Nonlinear temperature and humidity error compensation is performed on the temperature and humidity data based on a pre-trained multi-scale prediction model to obtain final temperature and humidity data.
2. The method according to claim 1, characterized in that The training steps of the pre-trained compensation network model include: Obtain a temperature and humidity training data set and generate a sample data set, wherein the sample data set includes a training set and a test set; performing data processing on the sample data set using an initial multi-scale prediction model to determine weighted multi-scale features; The initial multi-scale prediction model is trained according to the weighted multi-scale features and the test set until a training condition is met, thereby obtaining a pre-trained compensation network model.
3. The method according to claim 2, characterized in that The processing of the sample data set to determine weighted multi-scale features includes: determining a center point of the training set; For each of the center points, determining the average distance between each center point and its nearest neighboring center points; A weighted multi-scale feature of each training data is determined according to the training data in the training set, the average distance and a preset scale factor set.
4. The method according to claim 3, characterized in that Determining the weighted multi-scale features of each training data according to the training data in the training set, the average distance, and a preset scale factor set includes: Determining the distance between the training data in the training set and each of the center points; Determining a multi-scale feature of each training data according to each of the distances and a preset scale factor set; For each of the center points, determining the sum of the features of the center point at all scales according to the multi-scale features; Determining the weight of the multi-scale feature of the center point according to the feature sum; A weighted combination is performed according to the weight and the multi-scale feature to obtain a weighted multi-scale feature.
5. The method according to claim 2, characterized in that The initial multi-scale prediction model is trained according to the weighted multi-scale features and the test set until a training condition is met to obtain a pre-trained compensation network model, including: constructing a design matrix based on the weighted multi-scale features using the initial multi-scale prediction model; Perform ridge regression based on the design matrix to obtain a weight matrix; Perform linear prediction based on the weight matrix and the design matrix to determine a prediction result; Verifying the prediction result according to the test set to obtain a verification result; If the verification result meets the end condition, the current multi-scale prediction model is used as the pre-trained compensation network model; Otherwise, return to the step of determining the weighted multi-scale features and continue model training.
6. The method according to any one of claims 2 to 5, characterized in that The initial multi-scale prediction model is an improved radial basis function neural network RBF model.
7. A temperature and humidity compensation device, characterized in that: include: Data acquisition module, used to obtain original temperature and humidity data; The data compensation module is used to perform nonlinear temperature and humidity error compensation on the temperature and humidity data based on a pre-trained multi-scale prediction model to obtain final temperature and humidity data.
8. A computer device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the temperature and humidity compensation method according to claims 1-6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the temperature and humidity compensation method according to claims 1-6 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the temperature and humidity compensation method according to any one of claims 1 to 6 is implemented.