Temperature prediction method, state detection method, and related devices and media

CN121188378BActive Publication Date: 2026-09-18ZHEJIANG LEAPPOWER TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511049847.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2026-09-18
Estimated Expiration
2045-07-28

AI Technical Summary

Benefits of technology

[0029]The above scheme describes a temperature prediction model for predicting the temperature of a target device. This model is trained using a first error and a second error constructed from the first sample detection data of at least one correlation factor. Each correlation factor affects the temperature of the target device. The first error is determined based on the difference between the predicted temperature of the first sample detection data output by the temperature prediction model and the labeled temperature of the first sample detection data. By constructing the first error to train the temperature prediction model, it learns the mapping relationship between at least one correlation factor and the temperature of the target device. The second error is determined based on the difference between the sample features of the first sample detection data and the sample reconstruction features of the first sample detection data output by the temperature prediction model. The second error measures the temperature prediction model's ability to reconstruct the sample features of the first sample detection data. By constructing the second error to train the temperature prediction model, it learns the intrinsic relationships and data distribution patterns among at least one correlation factor. The temperature prediction model trained in this way can directly predict a target temperature close to the actual temperature of the target device based on the target detection data of at least one correlation factor under varying environmental conditions, thus improving the accuracy of the temperature prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121188378B_ABST
    Figure CN121188378B_ABST
Patent Text Reader

Abstract

The application discloses a temperature prediction method, a state detection method, and related equipment and media. The temperature prediction method comprises the following steps: obtaining target detection data of at least one correlation factor; and predicting a target prediction temperature of a target device based on the target detection data by using a temperature prediction model. The temperature prediction model is obtained by training based on a first error and a second error. The first error is determined based on the difference between a sample prediction temperature of first sample detection data of the at least one correlation factor and a sample labeled temperature of the first sample detection data. The second error is determined based on the difference between a sample feature of the first sample detection data and a sample reconstructed feature of the first sample detection data. The sample prediction temperature of the first sample detection data and the sample reconstructed feature of the first sample detection data are both output by the temperature prediction model for the first sample detection data. In this way, the accuracy of the temperature prediction result of the target device can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial equipment monitoring technology, and in particular to a temperature prediction method, a condition detection method, and related equipment and media. Background Technology

[0002] In industrial settings, the temperature of a target device typically affects its operational status and lifespan. Accurately predicting the temperature of a target device allows for real-time monitoring of its condition, preventing overheating damage and ensuring it operates within a safe temperature range. This, in turn, improves the device's reliability and extends its lifespan.

[0003] Therefore, how to accurately predict the temperature of the target device has become an urgent technical problem to be solved. Summary of the Invention

[0004] The main technical problem addressed by this application is to provide a temperature prediction method, a state detection method, and related equipment and media, which can improve the accuracy of temperature prediction results for target devices.

[0005] To address the aforementioned technical problems, this application provides a temperature prediction method, comprising: acquiring target detection data of at least one correlation factor, each correlation factor affecting the temperature of a target device; and using a temperature prediction model to predict the target predicted temperature of the target device based on the target detection data. The temperature prediction model is trained using a first error and a second error. The first error is determined based on the difference between the sample predicted temperature corresponding to the first sample detection data of at least one correlation factor and the sample labeled temperature corresponding to the first sample detection data. The second error is determined based on the difference between the sample features of the first sample detection data and the sample reconstruction features of the first sample detection data. Both the sample predicted temperature and the sample reconstruction features of the first sample detection data are output by the temperature prediction model for the first sample detection data.

[0006] Optionally, training the temperature prediction model using a first error and a second error includes: obtaining a training dataset for the current training period, the training dataset including several first sample detection data of at least one correlation factor; inputting the sample features of the first sample detection data into the temperature prediction model to obtain the sample predicted temperature of the first sample detection data and the sample reconstructed features of the first sample detection data output by the temperature prediction model; determining the first error by using the difference between the sample predicted temperature of the first sample detection data and the sample labeled temperature of the first sample detection data; and determining the second error by using the difference between the sample features of the first sample detection data and the sample reconstructed features of the first sample detection data; combining the first error and the second error to obtain the training loss; and adjusting the network parameters of the temperature prediction model using the training loss until the training conditions are met, thereby ending the training steps of the current training period.

[0007] Optionally, the temperature prediction model includes a first encoding network, a second encoding network, a prediction network, and a decoding network. The first sample detection data is input into the temperature prediction model to obtain the predicted temperature of the first sample detection data and the sample reconstruction features of the first sample detection data. This includes: encoding the sample features of the first sample detection data using the first encoding network to obtain first encoded features; encoding the sample features of the first sample detection data using the second encoding network to obtain second encoded features; predicting the temperature of the first sample detection data using the prediction network to obtain the predicted temperature of the first sample detection data; and decoding the second encoded features using the decoding network to obtain the sample reconstruction features of the first sample detection data.

[0008] Optionally, the first error is determined by the difference between the predicted temperature of the first sample detection data and the labeled temperature of the first sample detection data, including: determining a first difference between the predicted temperature of the first sample detection data and the labeled temperature of the first sample detection data; determining the first error using a first method in response to the absolute value of the first difference being less than or equal to a preset parameter; and determining the first error using a second method in response to the absolute value of the first difference being greater than the preset parameter; wherein the first method and the second method are different, and both the first method and the second method use the first difference to determine the loss.

[0009] Optionally, determining the first error using a first method includes: multiplying the square of the first difference by a first preset coefficient as the first error; and / or determining the first error using a second method includes: multiplying a preset parameter by the absolute value of the first difference to obtain a first product; multiplying the square of the preset parameter by a second preset coefficient to obtain a second product; and using the difference between the first product and the second product as the first error.

[0010] Optionally, determining the second error by utilizing the difference between the sample features of the first sample detection data and the sample reconstruction features of the first sample detection data includes: determining the second difference between the sample reconstruction features of the first sample detection data and the sample features of the first sample detection data; and taking the product of the transpose of the second difference and the inverse covariance matrix of the second difference as the second error.

[0011] Optionally, the training loss is obtained by combining the first error and the second error, including: determining the sum of the errors of the first error and the second error as the training loss.

[0012] Optionally, the training steps of adjusting the network parameters of the temperature prediction model using the training loss until the training conditions are met, thereby ending the training cycle, include: determining the gradient of the current iteration using the training loss and the network parameters of the current iteration; adjusting the gradient and the base learning rate of the current iteration to obtain the adjusted gradient and the adjusted learning rate of the current iteration; adjusting the network parameters of the current iteration using the adjusted gradient and the adjusted learning rate of the current iteration to obtain the adjusted network parameters of the current iteration; determining whether the training conditions are met; if the training conditions are met, ending the training cycle; if the training conditions are not met, using the adjusted network parameters of the current iteration as the network parameters for the next iteration, and re-executing the determination of the gradient of the current iteration and subsequent steps using the training loss and the network parameters of the current iteration.

[0013] Optionally, the gradient of the current iteration is adjusted to obtain the adjusted gradient of the current iteration, including: combining the first moment estimate of the previous iteration and the gradient of the current iteration to determine the first moment estimate of the current iteration; correcting the first moment estimate of the current iteration using the first correction parameter of the current iteration to obtain the corrected first moment estimate of the current iteration; and adjusting the gradient of the current iteration using the first correction coefficient of the current iteration and the corrected first moment estimate of the current iteration to obtain the adjusted gradient of the current iteration.

[0014] And / or, adjust the base learning rate for the current iteration to obtain the adjusted learning rate for the current iteration, including: determining the second moment estimate for the current iteration by combining the square of the gradient of the current iteration and the second moment estimate of the previous iteration; correcting the second moment estimate for the current iteration using the second correction parameter of the current iteration to obtain the corrected second moment estimate for the current iteration; and adjusting the base learning rate for the current iteration using the corrected second moment estimate for the current iteration to obtain the adjusted learning rate for the current iteration.

[0015] And / or, adjust the network parameters of the current iteration using the adjustment gradient and the adjustment learning rate of the current iteration to obtain the adjusted network parameters of the current iteration, including: multiplying the adjustment learning rate of the current iteration by the adjustment gradient of the current iteration to obtain a third product; and using the difference between the network parameters of the current iteration and the third product as the adjusted network parameters of the current iteration.

[0016] Optionally, after the training steps of the current training cycle are completed, the method further includes:

[0017] The temperature prediction model is validated using the validation dataset of the current training period to obtain the validation loss for the current training period. It is then determined whether the validation loss of the current training period is less than the minimum recording loss. If the validation loss of the current training period is less than the minimum recording loss, the minimum recording loss is updated to the validation loss of the current training period, and the target count is reset. If the validation loss of the current training period is greater than or equal to the minimum recording loss, the target count is increased by a pre-designed value. Next, it is determined whether preset conditions are met. These preset conditions include: the target count is less than a counting threshold and the total number of current training periods is less than a period number threshold. If the preset conditions are met, the training dataset and validation dataset for the next training period are obtained, and the next training period is used as the new current training period. The training of the temperature prediction model using the training dataset of the current training period and the validation of the temperature prediction model using the validation dataset of the current training period are re-executed to obtain the validation loss for the current training period and subsequent steps. If the preset conditions are not met, the training of the temperature prediction model is considered complete.

[0018] Optionally, after the training steps of the current training cycle are completed and before retraining the temperature prediction model using the training dataset of the current training cycle, the method further includes: decaying the base learning rate of the current training cycle; and using the decayed base learning rate of the current training cycle as the base learning rate of the new current training cycle.

[0019] Optionally, the target detection data includes first detection values ​​of each correlation factor at several different detection times. After acquiring target detection data of at least one correlation factor, and before using a temperature prediction model to predict the target predicted temperature of the target device based on the target detection data, the method further includes: for each correlation factor, acquiring several second detection values ​​of the correlation factor within a first detection window corresponding to each first detection value; for each first detection value of each correlation factor, using several second detection values ​​corresponding to the first detection value to determine the abnormal detection range corresponding to the first detection value; in response to the first detection value being within the abnormal detection range, retaining the value of the first detection value; in response to the first detection value being outside the abnormal detection range, statistically analyzing several second detection values ​​of the first detection value to obtain a first central tendency characterization value, and using the first central tendency characterization value as the detection value updated from the first detection value.

[0020] Optionally, the anomaly detection range includes an upper bound and a lower bound. The anomaly detection range corresponding to the first detection value is determined using several second detection values ​​corresponding to the first detection value. This includes: statistically analyzing several second detection values ​​of the first detection value to obtain a second central tendency representation value and a first dispersion representation value; determining a fourth product of a first adjustment coefficient and the first dispersion representation value, and determining a fifth product of a second adjustment coefficient and the first dispersion representation value; using the sum of the second central tendency representation value and the fourth product as the upper bound for anomaly detection of the first detection value; and using the difference between the second central tendency representation value and the fifth product as the lower bound for anomaly detection of the first detection value.

[0021] Optionally, obtaining several second detection values ​​of the correlation factor within the first detection window corresponding to each first detection value includes: for each first detection value of the correlation factor, obtaining several third detection values ​​of the correlation factor within the second detection window of the first detection value; statistically analyzing the several third detection values ​​of the first detection value to obtain a second dispersion characterization value; in response to the second dispersion characterization value meeting a preset dispersion condition, using the several third detection values ​​of the first detection value as several second detection values ​​of the first detection value; in response to the second dispersion characterization value not meeting the preset dispersion condition, adjusting the window width of the second detection window to obtain a new second detection window, and re-executing the steps of obtaining several third detection values ​​of the correlation factor within the second detection window of the first detection value and subsequent steps.

[0022] Optionally, the target device is an inverter in the motor drive assembly of a vehicle, and the temperature of the inverter is the combined temperature of multiple power switching transistors in the inverter. At least one of the following correlation factors is included: the coolant inlet temperature of the motor drive assembly, the speed of the coolant pump, the oil pump temperature, the speed of the oil pump, the input voltage of the inverter, the input current of the inverter, and the motor torque.

[0023] And / or, after training the temperature prediction model, the temperature prediction model is lightweighted and then deployed to the target device.

[0024] To address the aforementioned technical problems, another technical solution adopted in this application is: providing a state detection method, the method comprising: acquiring target detection data of at least one correlation factor, each correlation factor affecting the temperature of a target device; inputting the target features of the target detection data into a temperature prediction model to obtain at least one of the target predicted temperature of the target device and the target reconstruction features of the target detection data; determining the state of the target device using at least one of a first target error and a second target error; wherein the first target error is determined based on the difference between the target predicted temperature and the actual detection temperature of the target device, and the second target error is determined based on the difference between the target features of the target detection data and the target reconstruction features of the target detection data.

[0025] Optionally, determining the state of the target device using at least one of the first target error and the second target error includes: determining that the target device is abnormal and outputting an abnormality prompt message in response to at least one of the first target error and the second target error satisfying an abnormality condition; determining that the target device is not abnormal in response to neither the first target error nor the second target error satisfying an abnormality condition; wherein the abnormality condition includes: the error being greater than or equal to the corresponding preset error threshold.

[0026] Optionally, determining the state of the target device using at least one of the first target error and the second target error includes: determining a first error range to which the first target error belongs and a second error range to which the second target error belongs; wherein the first error range is one of several first preset error ranges and the second error range is one of several second preset error ranges; and determining target health status data corresponding to the first error range and the second error range based on a preset mapping relationship; wherein the preset mapping relationship is a mapping relationship between the first preset error range, the second preset error range, and the preset health status data.

[0027] To solve the above-mentioned technical problems, another technical solution adopted in this application is: to provide an electronic device, including a memory and a processor coupled to each other, wherein the memory stores program instructions; and the processor is used to execute the program instructions stored in the memory to implement the above-mentioned temperature prediction method or the above-mentioned state detection method.

[0028] To solve the above-mentioned technical problems, another technical solution adopted in this application is to provide a computer-readable storage medium for storing program instructions that can be executed by a processor to implement the above-mentioned temperature prediction method or the above-mentioned state detection method.

[0029] The above scheme describes a temperature prediction model for predicting the temperature of a target device. This model is trained using a first error and a second error constructed from the first sample detection data of at least one correlation factor. Each correlation factor affects the temperature of the target device. The first error is determined based on the difference between the predicted temperature of the first sample detection data output by the temperature prediction model and the labeled temperature of the first sample detection data. By constructing the first error to train the temperature prediction model, it learns the mapping relationship between at least one correlation factor and the temperature of the target device. The second error is determined based on the difference between the sample features of the first sample detection data and the sample reconstruction features of the first sample detection data output by the temperature prediction model. The second error measures the temperature prediction model's ability to reconstruct the sample features of the first sample detection data. By constructing the second error to train the temperature prediction model, it learns the intrinsic relationships and data distribution patterns among at least one correlation factor. The temperature prediction model trained in this way can directly predict a target temperature close to the actual temperature of the target device based on the target detection data of at least one correlation factor under varying environmental conditions, thus improving the accuracy of the temperature prediction results. Attached Figure Description

[0030] Figure 1 This is a schematic flowchart of an embodiment of the temperature prediction method provided in this application;

[0031] Figure 2 This is a flowchart illustrating another embodiment of the temperature prediction method provided in this application;

[0032] Figure 3 This is a schematic flowchart of an embodiment of the training method for the temperature prediction model provided in this application;

[0033] Figure 4 This is a schematic diagram of the network structure of the temperature prediction model provided in this application;

[0034] Figure 5 This is a schematic diagram of the LSTM network structure provided in this application;

[0035] Figure 6 This is a flowchart illustrating an embodiment of the state detection method provided in this application;

[0036] Figure 7 This is a schematic diagram of the framework of an embodiment of the temperature prediction device provided in this application;

[0037] Figure 8 This is a schematic diagram of the framework of an embodiment of the state detection device provided in this application;

[0038] Figure 9This is a schematic diagram of the framework of an embodiment of the electronic device provided in this application;

[0039] Figure 10 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. All other embodiments obtained by those of ordinary skill in the art using the embodiments of this application without creative effort are within the scope of protection of this application.

[0041] It should be noted that the term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The terms "first" and "second" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. The term "multiple" in this application means at least two, such as two, three, etc. The term "several" in this application means at least two. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0042] Please see Figure 1 , Figure 1 This is a schematic flowchart of an embodiment of the temperature prediction method provided in this application, which is used to predict the temperature of a target device. Figure 1 As shown, the method includes the following steps:

[0043] S11: Obtain target detection data for at least one associated factor.

[0044] At least one correlation factor is a factor other than the temperature of the target device, and each correlation factor affects the temperature of the target device. It is understood that the temperature change of the target device is caused by the individual or combined effects of at least one correlation factor, and a change in the correlation factor may cause a change in the temperature of the target device.

[0045] In one embodiment, the target detection data for at least one correlation factor includes first detection values ​​of each correlation factor at several different detection times. The several first detection values ​​of each correlation factor are obtained by detecting corresponding sensors.

[0046] In one implementation scenario, the target device is the inverter in the motor drive assembly of a vehicle, and the temperature of the inverter is the combined temperature of multiple power switching transistors in the inverter.

[0047] In this implementation scenario, the inverter is a three-phase inverter. Three-phase inverters typically employ a three-phase bridge topology, comprising six power switches: three in the upper bridge arm and three in the lower bridge arm. The inverter's temperature is the combined temperature of the three power switches located in the upper bridge arm.

[0048] For example, the temperature of the inverter is the average temperature of the three power switches located on the upper arm of the bridge.

[0049] For example, the power switching transistor is an IGBT (Insulated Gate Bipolar Transistor), the inverter can also be called an IGBT module, and the temperature of the inverter can also be called the case temperature of the IGBT module.

[0050] In this implementation scenario, at least one correlation factor includes at least one of the following: the coolant inlet temperature of the motor drive assembly, the speed of the cooling water pump, the temperature of the oil pump, the speed of the oil pump, the input voltage of the inverter, the input current of the inverter, and the motor torque. In a specific application, at least one correlation factor simultaneously includes the coolant inlet temperature of the motor drive assembly, the speed of the cooling water pump, the temperature of the oil pump, the speed of the oil pump, the input voltage of the inverter, the input current of the inverter, and the motor torque.

[0051] The thermal management of the motor drive assembly is achieved through a water-cooling circuit and an oil-cooling circuit. The oil-cooling circuit is used for heat exchange with the water-cooling circuit. The cooling water pump is located in the water-cooling circuit, and the oil pump is located in the oil-cooling circuit. The input voltage and input current of the inverter are the voltage and current on the inverter bus, respectively. For example, the motor is a permanent magnet synchronous motor.

[0052] On the one hand, temperature directly affects the switching performance and conduction losses of the power switching transistors in the inverter. Excessive junction temperature of the power switching transistors can lead to overheating, performance degradation, and even inverter malfunctions. Accurately predicting inverter temperature changes allows for real-time monitoring of the inverter's status, preventing overheating damage and ensuring operation within a safe temperature range, thereby extending the inverter's lifespan and improving its reliability. On the other hand, inverter temperature is closely related to power loss; higher operating temperatures increase energy consumption and reduce energy efficiency. Predicting inverter temperature allows for optimized heat dissipation design and control strategies, improving overall system efficiency. Furthermore, inverter temperature prediction is crucial for efficient thermal management, effectively guiding the design and dynamic adjustment of related cooling systems and preventing malfunctions caused by excessive temperature. Furthermore, inverter failures are usually closely related to temperature. High temperatures accelerate material aging and affect inverter performance. Due to its high heat dissipation density and complex chip packaging structure, insufficient heat dissipation can lead to performance degradation or even device failure. Real-time monitoring of inverter temperature can provide a basis for inverter health assessment and lifespan prediction.

[0053] It should be noted that in other implementation scenarios, the target device can also be other devices that need to acquire temperature, such as other high-power power electronic devices. This embodiment does not specifically limit the target device. Furthermore, it is understood that different target devices will result in different at least one correlation factor.

[0054] S12: The target predicted temperature of the target device is predicted using a temperature prediction model based on the target detection data of at least one correlation factor. The temperature prediction model is trained using the first error and the second error.

[0055] In step S12, during the training phase, a first error and a second error are constructed using the first sample detection data of at least one correlation factor. The training loss is then determined by combining the first and second errors to adjust the network parameters of the temperature prediction model, thereby completing the training of the temperature prediction model. In the application phase, the trained temperature prediction model is used to predict the target predicted temperature of the target device based on the target detection data of at least one correlation factor. Specifically, the target features corresponding to the target detection data of at least one correlation factor are obtained, and these target features are input into the temperature prediction model to obtain the target predicted temperature of the target device output by the temperature prediction model. Here, the target features are multi-dimensional matrix features corresponding to the target detection data of at least one correlation factor.

[0056] The first error is determined based on the difference between the predicted temperature of the first sample detection data output by the temperature prediction model and the labeled temperature of the first sample detection data.

[0057] The second error is determined based on the difference between the sample features of the first sample detection data and the reconstructed sample features of the first sample detection data output by the temperature prediction model. The sample features of the first sample detection data are the features in multi-dimensional matrix form corresponding to the first sample detection data. The reconstructed sample features of the first sample detection data are the features obtained by the temperature prediction model through feature reconstruction of the sample features of the first sample detection data, and these reconstructed features are similar to the sample features of the first sample detection data. After inputting the sample features of the first sample detection data into the temperature prediction model, the model attempts to reconstruct reconstructed features similar to the input features by understanding the core patterns of the first sample detection data for at least one correlated factor.

[0058] In this embodiment, the temperature prediction model for predicting the temperature of the target device is trained using a first error and a second error constructed from the first sample detection data of at least one correlation factor. Each correlation factor affects the temperature of the target device. The first error is determined based on the difference between the predicted temperature of the first sample detection data output by the temperature prediction model and the labeled temperature of the first sample detection data. By constructing the first error to train the temperature prediction model, the model can learn the mapping relationship between at least one correlation factor and the temperature of the target device. The second error is determined based on the difference between the sample features of the first sample detection data and the sample reconstruction features of the first sample detection data output by the temperature prediction model. The second error measures the temperature prediction model's ability to reconstruct the sample features of the first sample detection data. By constructing the second error to train the temperature prediction model, the model can learn the intrinsic relationships and data distribution patterns among at least one correlation factor. The temperature prediction model trained in this way can directly predict a target temperature close to the actual temperature of the target device based on the target detection data of at least one correlation factor under varying environmental conditions, improving the accuracy of the temperature prediction results.

[0059] Please see Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of the temperature prediction method provided in this application, which is used to predict the temperature of a target device. Figure 2 As shown, the method includes the following steps:

[0060] S21: Obtain target detection data for at least one associated factor.

[0061] The target detection data for at least one correlation factor includes the first detection value of each correlation factor at several different detection times. The relevant details of the correlation factors can be found in step S11 above, and will not be repeated here.

[0062] S22: Filter the target detection data for at least one correlation factor.

[0063] In step S22, several first detection values ​​of each correlation factor are filtered. These several first detection values ​​of the correlation factor can be expressed as follows: This can be represented as a one-dimensional sequence. Where x... i Represents the i-th correlation factor. This represents the nth first detection value of the i-th correlation factor.

[0064] For each correlation factor, several first detection values ​​of the correlation factor are filtered, which further includes the following steps:

[0065] Step 1: Obtain several second detection values ​​of the correlation factor within the first detection window of each first detection value.

[0066] In one embodiment, the first detection window slides with a step size of 1 starting from the first first detection value of the correlation factor, and the first detection window for each first detection value of the correlation factor is centered on each first detection value.

[0067] In one embodiment, the first detection window for each first detection value is identical. For example, the first detection window for each first detection value is [jk, j+k], meaning the window width of the first detection window for each first detection value is (2k+1). Here, j is the position index of the j-th first detection value of the correlation factor, and k can be set according to actual needs. In this case, the several second detection values ​​corresponding to the current first detection value of the correlation factor include: the k detection values ​​before the current first detection value, the current first detection value, and the k detection values ​​after the current first detection value.

[0068] It should be noted that if the first detection value is positioned too early or too late, the first detection window for that value may be truncated, resulting in insufficient data acquisition. For example, if the first detection value is as described above... So The first detection window will be truncated to [1, j+k]; the first detection value is as described above. So The first detection window will be truncated to [jk,n]. Therefore, to further improve the filtering effect, data padding can be performed on the truncated first detection window. For example, the average value of all existing second detection values ​​in the truncated first detection window can be calculated, and the average value can be assigned to all the second detection values ​​at the remaining missing positions.

[0069] In another embodiment, the first detection window for each first detection value is adaptively adjusted according to the actual situation. In this embodiment, for each first detection value of the correlation factor, obtaining several second detection values ​​of the correlation factor within the first detection window of the first detection value further includes the following sub-steps:

[0070] Sub-step one: Obtain several third detection values ​​of the correlation factor within the second detection window of the first detection value.

[0071] The second detection window for the first detection value is also centered on the first detection value. Initially, the second detection window for the first detection value is preset, for example, [jw,j+w], where j is the position index of the j-th first detection value of the correlation factor, and w can be set according to actual needs.

[0072] Sub-step two involves statistically analyzing several third detection values ​​of the first detection value to obtain the second dispersion characterization value.

[0073] In some examples, the second dispersion characterization value can be the standard deviation, variance, etc., corresponding to several third detection values ​​of the first detection value.

[0074] Sub-step three: Determine whether the second discreteness characterization value meets the preset discrete conditions.

[0075] The preset discrete condition is that the discreteness characterization value is less than a preset threshold. The preset threshold can be set according to actual needs. When the second discreteness characterization value is less than the preset threshold, it is determined that the second discreteness characterization value meets the preset discrete condition; when the second discreteness characterization value is greater than or equal to the preset threshold, it is determined that the second discreteness characterization value does not meet the preset discrete condition.

[0076] If the second discreteness characterization value meets the preset discrete conditions, then proceed to sub-step four.

[0077] If the second discreteness characterization value does not meet the preset discrete conditions, then proceed to sub-step five.

[0078] Sub-step four: Several third detection values ​​of the first detection value are used as several second detection values ​​of the first detection value.

[0079] When the second discreteness characterization value meets the preset discrete conditions, the fluctuation of several third detection values ​​representing the first detection value is small, and there is no need to adjust the second detection window of the first detection value. The second detection window of the first detection value is the first detection window of the first detection value. At this time, several third detection values ​​of the first detection value can be used as the aforementioned several second detection values ​​of the first detection value.

[0080] Sub-step five: Adjust the window width of the second detection window for the first detection value to obtain a new second detection window.

[0081] When the second discreteness representation value does not meet the preset discrete conditions, the fluctuations of several third detection values ​​representing the first detection value are large, requiring adjustment of the second detection window of the first detection value. For example, the window width of the second detection window of the first detection value is increased to obtain a new second detection window, such as increasing the w value mentioned in sub-step one.

[0082] Furthermore, after executing sub-step five, sub-step one is executed again.

[0083] Step 2: For each first detection value of the correlation factor, use several second detection values ​​corresponding to the first detection value to determine the anomaly detection range corresponding to the first detection value.

[0084] The anomaly detection range includes an upper bound and a lower bound.

[0085] In one embodiment, determining the anomaly detection range corresponding to the first detection value using a plurality of second detection values ​​corresponding to the first detection value further includes the following sub-steps:

[0086] Sub-step one involves statistically analyzing several second detection values ​​of the first detection value to obtain the second central tendency characterization value and the first dispersion characterization value.

[0087] In some examples, the second central tendency representation value can be the average, median (i.e., the value in the middle after sorting by size), mode, etc., corresponding to several second detection values ​​of the first detection value.

[0088] In some examples, the first dispersion characterization value can be the standard deviation, variance, etc., corresponding to several second detection values ​​of the first detection value.

[0089] Sub-step two: determine the fourth product of the first adjustment coefficient and the first dispersion characterization value, and determine the fifth product of the second adjustment coefficient and the first dispersion characterization value.

[0090] The first adjustment coefficient and the second adjustment coefficient may be the same or different. The specific first adjustment coefficient and the second adjustment coefficient can be preset according to actual needs.

[0091] Sub-step three: the sum of the second central tendency representation value and the fourth product is used as the upper bound for anomaly detection of the first detection value, and the difference between the second central tendency representation value and the fifth product is used as the lower bound for anomaly detection of the first detection value.

[0092] In a specific application, the upper and lower bounds of the anomaly detection for the first detection value are expressed by the following formulas:

[0093]

[0094] Wherein, upbound and downbound represent the upper and lower bounds of the anomaly detection for the first detection value, respectively. l σ1 and l σ2 These represent the second central tendency value, the first dispersion value, the first adjustment coefficient, and the second adjustment coefficient, respectively. Specifically, it is the median value corresponding to several second detection values ​​of the first detection value. Specifically, it is the standard deviation corresponding to several second test values ​​of the first test value. At this point, Further calculations are performed using the following formula:

[0095]

[0096] Where, x p This is the p-th second detection value corresponding to the first detection value.

[0097] Step 3: Determine whether the first detection value is within the corresponding anomaly detection range.

[0098] If the first detection value is greater than or equal to the lower bound of the anomaly detection and less than or equal to the upper bound of the anomaly detection, then the first detection value is determined to be within the corresponding anomaly detection range, and the first detection value is considered normal. At this point, proceed to step four.

[0099] If the first detection value is less than the lower bound of the anomaly detection or greater than the upper bound of the anomaly detection, then the first detection value is determined to be outside the corresponding anomaly detection range, and the first detection value is an anomaly. In this case, proceed to step five.

[0100] Step 4: Retain the value of the first detection.

[0101] Step 5: Statistically analyze several second detection values ​​of the first detection value to obtain the first central tendency characterization value, and use the first central tendency characterization value as the updated detection value of the first detection value.

[0102] In some examples, the first central tendency representation value can be the average, median (i.e., the value in the middle after sorting by size), mode, etc., corresponding to several second detection values ​​of the first detection value.

[0103] It should be noted that the first central tendency representation value and the aforementioned second central tendency representation value can be the same, such as both being the median of several second detection values ​​corresponding to the first detection value. Alternatively, the first central tendency representation value and the aforementioned second central tendency representation value can be different, such as the first central tendency representation value being the average of several second detection values ​​corresponding to the first detection value, and the second central tendency representation value being the median of several second detection values ​​corresponding to the first detection value.

[0104] S23: Using the target detection data of at least one correlation factor after filtering, the target predicted temperature of the target device is predicted by the temperature prediction model.

[0105] In this embodiment, the target detection data of at least one correlation factor is first filtered, and then the temperature prediction model is used to predict the target predicted temperature of the target device based on the target detection data of at least one correlation factor after filtering. This can eliminate occasional sampling data mutations and prevent outliers from interfering with temperature prediction, making the target predicted temperature of the target device more accurate, thereby further improving the accuracy of the temperature prediction result of the target device.

[0106] Please see Figure 3 , Figure 3 This is a flowchart illustrating an embodiment of the training method for the temperature prediction model provided in this application. It should be noted that if substantially the same result is obtained, the method of this application is not necessarily identical. Figure 3 The illustrated process sequence is limited. For example... Figure 3 As shown, the method includes the following steps:

[0107] S301: Obtain the training dataset for the current training cycle. The training dataset includes several first sample detection data of at least one correlation factor.

[0108] Each first sample detection data point includes the first sample detection values ​​of each correlation factor at several different first sample detection times. Furthermore, each first sample detection data point also includes the corresponding sample labeled temperature of the target device (i.e., the actual temperature of the target device).

[0109] Furthermore, before executing step S302, the detection data of each first sample can be filtered. The step of filtering the detection data of each first sample is the same as the step of filtering the target detection data; for details, please refer to [link to relevant documentation]. Figure 2 The embodiments shown are not described in detail here.

[0110] Furthermore, before performing step S302, the detection data of each first sample can be standardized. The first sample detection data can be standardized using the following formula:

[0111]

[0112] Among them, X std X represents the first sample test data after standardization, α represents the first sample test data without standardization, β represents the mean of the first sample test data, and β represents the standard deviation of the first sample test data.

[0113] By standardizing each first sample detection data, each first sample detection data can be converted into a distribution with a mean of 0 and a variance of 1. After standardization, each first sample detection data has the same scale, which can reduce the impact of inconsistencies in the dimensions between features.

[0114] Furthermore, after preprocessing each first sample detection data such as filtering and standardization, each first sample detection data is processed into the form of a feature matrix to obtain the sample features of each first sample detection data.

[0115] S302: Input the sample features of the first sample detection data into the temperature prediction model to obtain the sample predicted temperature of the first sample detection data and the sample reconstruction features of the first sample detection data output by the temperature prediction model.

[0116] Figure 4 This is a schematic diagram of the network structure of the temperature prediction model provided in this application. (Example:) Figure 4 As shown, the temperature prediction model includes a first encoding network, a second encoding network, a prediction network, and a decoding network. The first encoding network and the second encoding network can be the same encoding network or two independent encoding networks; this embodiment does not specifically limit this.

[0117] In one embodiment, the temperature prediction model is an AE-LSTM (AutoEncoder Long Short-Term Memory) model. In this embodiment, the first encoding network and the second encoding network are the same LSTM encoder (i.e., an encoder composed of LSTM networks), the prediction network is composed of fully connected layers, and the decoding network is an LSTM decoder (i.e., a decoder composed of LSTM networks).

[0118] Figure 5This is a schematic diagram of the LSTM network structure provided in this application. The LSTM network addresses the vanishing and exploding gradient problems by introducing three gates (input gate, forget gate, and output gate) and a memory unit. The input and forget gates control the input and forgetting of information, the output gate controls the output of information, and the memory unit stores historical information and updates it according to the control of the input and forget gates. Through these operations, the LSTM network can selectively retain or forget historical information, thereby better capturing long-term dependencies. The advantages of the LSTM network are its ability to handle long sequences and its strong memory capacity, as shown in the following formula:

[0119] f t =Sigmoid(W f ·[x t ,g t-1 ])

[0120] u t =Sigmoid(W u ·[x t ,g t-1 ])

[0121] Y t =Tanh(W Y ·[x t ,(r t *g t-1 )])

[0122] V t =f t *V t-1 +u t *Y t

[0123] o t =Sigmoid(W o ·[x t ,g t-1 ])

[0124] g t =o t *Tanh(V t )

[0125] In an LSTM network, the forget gate receives the output V of the previous LSTM unit. t-1 Then, the relevant content will be selected to be retained or discarded. Specifically, the filtering of feature information is done by using a forgetting factor f. t With the last unit's state output V t-1 Determined by multiplication, f t By short-term memory g t-1 and the input data x at time t t Calculated. Wf W u W Y and W o These represent the weights of the corresponding neural network layers. t Update the value for the cell state, u t Used to control the use of Y t Which feature information is used to update V? t-1 After obtaining the updated cell state V t Then, the output gate uses the Sigmoid function to determine the cell status V. t Which part needs to be output, and then processed by the Tanh layer on V? t The process is performed, and finally, the required output information is obtained through multiplication.

[0126] In other implementations, the first encoding network, the second encoding network, and the decoding network can also be implemented using CNN (Convolutional Neural Network), GRU (Gate Recurrent Unit), ESN (Echo State Network), Transformer, or Transformer variants. GRU is similar to LSTM networks but has lower computational complexity, making it more suitable for resource-constrained industrial environments. ESN reduces computational overhead by fixing some parameters while retaining strong temporal modeling capabilities. Transformer variants use lightweight time-series Transformers, retaining the multi-head attention mechanism to capture global temporal dependencies, but pruning the architecture to improve inference efficiency. These networks can be flexibly selected based on actual performance and efficiency requirements.

[0127] In other implementations, the prediction network can also be implemented using SVM (Support Vector Machine), Random Forest, or GBDT (Gradient Boosting Decision Tree). SVM captures nonlinear relationships through kernel functions and is suitable for temperature prediction modeling with small amounts of high-quality data. Random Forest, an ensemble method based on decision trees, can predict temperature changes through multivariate feature modeling and importance analysis. GBDT improves prediction accuracy while maintaining computational efficiency, and can be used for real-time temperature prediction. It is suitable for industrial scenarios with small data volumes or limited equipment resources and can basically meet prediction needs. For example, GBDT can be XGBoost, LightGBM, etc.

[0128] In this embodiment, step S302 further includes the following steps:

[0129] Step 1: Encode the sample features of the first sample detection data using a first coding network to obtain the first coding features; and encode the sample features of the first sample detection data using a second coding network to obtain the second coding features.

[0130] It should be noted that if the first coding network and the second coding network are the same coding network, then the first coding feature and the second coding feature are the same coding feature. If the first coding network and the second coding network are two independent coding networks, then the first coding feature and the second coding feature are two independent coding features.

[0131] Step 2: Use the prediction network to predict the temperature of the first encoded feature to obtain the predicted temperature of the first sample detection data.

[0132] Step 3: Use the decoding network to decode the second encoded features to obtain the sample reconstruction features of the first sample detection data.

[0133] S303: Determine the first error by using the difference between the predicted temperature of the first sample detection data and the labeled temperature of the first sample detection data.

[0134] In one embodiment, the step of determining the first error includes: determining a first difference between the predicted temperature of the first sample detection data and the labeled temperature of the first sample detection data; determining whether the absolute value of the first difference is less than or equal to a preset parameter; if the absolute value of the first difference is less than or equal to the preset parameter, it indicates that the error is small, and the first error is determined using a first method; if the absolute value of the first difference is greater than the preset parameter, it indicates that the error is large, and the first error is determined using a second method. The preset parameter is a hyperparameter, and the optimal hyperparameter can be selected through cross-validation. Cross-validation can be referred to in the relevant content of existing methods, and will not be explained in detail here.

[0135] The first method is different from the second method, and both the first method and the second method use the first difference to determine the loss.

[0136] In a specific example, the step of determining the first error using the first method includes: multiplying the square of the first difference by a first preset coefficient as the first error. For example, the first preset coefficient is 1 / 2.

[0137] In a specific example, the steps of determining the first error using the second method include: multiplying a preset parameter by the absolute value of the first difference to obtain a first product; multiplying the square of the preset parameter by a second preset coefficient to obtain a second product; and taking the difference between the first product and the second product as the first error. For example, the second preset coefficient is 1 / 2.

[0138] In this embodiment, the first error can be expressed by the following formula:

[0139]

[0140] Among them, L δ (y,f(x) represents the first error, y represents the sample labeled temperature of the first sample detection data, f(x) represents the sample predicted temperature of the first sample detection data, (yf(x)) represents the first difference, and δ represents the preset parameter.

[0141] In this embodiment, the first error is determined by combining the first method and the second method: when the first difference is less than or equal to a preset parameter, the first method is used to determine the first error; when the first difference is greater than the preset parameter, the second method is used to determine the first error. The first error determined by the first method is in the form of a mean squared error (MSE) morphology (i.e., similar to mean squared error), which is more sensitive to small errors. Furthermore, the second error determined by the second method is in the form of a mean absolute error (MAE) morphology (i.e., similar to mean absolute error), which exhibits stronger robustness to outliers. By combining the first method and the second method to determine the first error, which is more reliable and accurate, the training of the temperature prediction model can be made more stable, further improving the training effect of the temperature prediction model.

[0142] It should be noted that in other embodiments, other methods may be used to measure the first error, such as using a single mean square error or a single mean absolute error.

[0143] S304: Determine the second error by utilizing the difference between the sample features of the first sample detection data and the sample reconstruction features of the first sample detection data.

[0144] In one embodiment, the second error is measured by Mahalanobis distance. The step of determining the second error further includes: determining a second difference between the sample reconstruction features of the first sample detection data and the sample features of the first sample detection data; and taking the product of the transpose of the second difference and the inverse covariance matrix of the second difference as the second error.

[0145] The second error in this embodiment can be expressed by the following formula:

[0146]

[0147] in, Let x represent the sample reconstruction features of the first sample detection data, and let x represent the sample features of the first sample detection data. This represents the second difference. This represents the inverse covariance matrix of the second difference.

[0148] It should be noted that other methods may be used to measure the second error in other implementations, which will not be listed here.

[0149] S305: Combine the first error and the second error to obtain the training loss.

[0150] In one implementation, the sum of the errors of the first error and the second error is used as the training loss.

[0151] In another embodiment, the first error and the second error are weighted, and the weighted error is used as the training loss. The weighting coefficients of the first error and the second error may be the same or different, and the weighting coefficients of the first error and the second error may be preset according to the relative importance of the two errors. For example, the weighting coefficient of the first error is greater than the weighting coefficient of the second error. Or, for another example, the weighting coefficient of the first error is equal to the weighting coefficient of the second error.

[0152] S306: Adjust the network parameters of the temperature prediction model using the training loss until the training conditions are met, thus ending the training cycle.

[0153] The network parameters of the temperature prediction model include the weights of each model in the temperature prediction model.

[0154] In one embodiment, the network parameters of the temperature prediction model are adjusted using the Nadam optimization algorithm. Compared to other optimization algorithms, the Nadam optimization algorithm combines adaptive moment estimation (Adam) and the Nesterov acceleration gradient algorithm to achieve faster parameter iterative updates. Step S306 further includes the following steps:

[0155] Step 1: Use the training loss and the network parameters of the current iteration to determine the gradient of the current iteration.

[0156] In step one, the gradients of the network parameters of each layer of the temperature prediction model are calculated by backpropagation starting from the training loss, and used as the gradient of the current iteration.

[0157] Step 2: Adjust the gradient and the base learning rate for the current iteration to obtain the adjusted gradient and the adjusted learning rate for the current iteration.

[0158] In one example, the gradient of the current iteration is adjusted to obtain the adjusted gradient of the current iteration, which further includes the following sub-steps:

[0159] Sub-step one: Combine the first-order moment estimate from the previous iteration with the gradient from the current iteration to determine the first-order moment estimate for the current iteration.

[0160] The process of sub-step one can be represented by the following formula:

[0161] m t =β1m t-1 +(1-β1)g t

[0162] Where, m t m t-1 and g t The first-order moment estimates of the current iteration, the first-order moment estimates of the previous iteration, and the gradient of the current iteration are represented respectively, where t represents the current iteration and β1 represents the first preset correction coefficient. The first preset correction coefficient is used to control the forgetting rate of historical gradients. It is the initial value for the first correction coefficient in subsequent iterations, and its specific value is preset according to actual needs. For example, the first preset correction coefficient is 0.9.

[0163] Sub-step two involves using the first correction parameter of the current iteration to correct the first moment estimate of the current iteration, thus obtaining the corrected first moment estimate of the current iteration.

[0164] The process of obtaining the corrected first-order moment estimate for the current iteration can be represented by the following formula:

[0165]

[0166] in, This represents the corrected first-order moment estimate for the current iteration. This represents the first correction coefficient for the current iteration round, and It gradually decreases as iterations proceed.

[0167] Sub-step three: Use the first correction coefficient of the current iteration and the corrected first moment of the current iteration to estimate and adjust the gradient of the current iteration, and obtain the adjusted gradient of the current iteration.

[0168] The process of obtaining the adjustment gradient for the current iteration can be represented by the following formula:

[0169]

[0170] Among them, g′ t This represents the adjustment gradient for the current iteration.

[0171] In one example, the base learning rate for the current iteration is adjusted to obtain the adjusted learning rate for the current iteration, which further includes the following sub-steps:

[0172] Sub-step one: Combine the square of the gradient of the current iteration and the second moment estimate of the previous iteration to determine the second moment estimate of the current iteration.

[0173] The process of obtaining the second-order moment estimate for the current iteration can be represented by the following formula:

[0174]

[0175] Among them, V t and V t-1 The numbers represent the second-order moment estimates of the current iteration and the previous iteration, respectively, and β2 represents the second preset correction coefficient. The second preset correction coefficient controls the forgetting rate of the squared historical gradient. It is the initial value for the second correction coefficient in subsequent iterations, and its specific value is preset according to actual needs. For example, the second preset correction coefficient is 0.99.

[0176] Sub-step two involves using the second correction parameter of the current iteration to correct the second moment estimate of the current iteration, thus obtaining the corrected second moment estimate of the current iteration.

[0177] The process of obtaining the corrected second-order moment estimate for the current iteration can be represented by the following formula:

[0178]

[0179] in, This represents the corrected second-order moment estimate for the current iteration. This represents the second correction coefficient for the current iteration round.

[0180] Sub-step three: Use the corrected second moment estimate of the current iteration to adjust the base learning rate of the current iteration, and obtain the adjusted learning rate of the current iteration.

[0181] In sub-step three, the corrected second-order moment estimate of the current iteration is used to adaptively adjust the learning rate in the current iteration. The process of obtaining the adjusted learning rate for the current iteration can be represented by the following formula:

[0182]

[0183] Where, α′ t α represents the adjusted learning rate for the current iteration. tε represents the base learning rate for the current iteration round, and ε represents the third preset correction coefficient. The specific value of ε can be preset according to actual needs.

[0184] Step 3: Adjust the network parameters for the current iteration using the adjusted gradient and the adjusted learning rate for the current iteration to obtain the adjusted network parameters for the current iteration.

[0185] Step three, the step of obtaining the adjusted network parameters for the current iteration, further includes: multiplying the adjusted learning rate for the current iteration by the adjusted gradient for the current iteration to obtain a third product; and using the difference between the network parameters for the current iteration and the third product as the adjusted network parameters for the current iteration. The process of obtaining the adjusted network parameters for the current iteration can be represented by the following formula:

[0186] θ′ t =θ t -α′ t g′ t

[0187] Where, θ′ t θ represents the adjustment of network parameters in the current iteration round. t α′ represents the network parameters in the current iteration round. t g′ t This represents the third product.

[0188] Step 4: Determine whether the training conditions are met.

[0189] For example, a training condition could be that the training loss is less than a preset loss threshold. The preset loss threshold is a small threshold that is set in advance.

[0190] For example, the training condition could be that the total number of iterations reaches a preset threshold, which can be set in advance according to actual needs.

[0191] For example, a training condition could also be that the training loss converges, i.e., minimizing the training loss.

[0192] If the training conditions are not met in step four, proceed to step five. If the training conditions are met, proceed to step six.

[0193] Step 5: Use the adjusted network parameters of the current iteration as the network parameters for the next iteration.

[0194] Specifically, the aforementioned θ′ t As θ t+1 This serves as the network parameter for the next iteration. After executing step five, step one is executed again to determine the gradient of the current iteration and its subsequent steps in the new iteration using the training loss and the network parameters of the current iteration.

[0195] Step six: End the training for the current training cycle.

[0196] In this embodiment, after the training steps of the current training cycle are completed, steps S307 to S313 can be further executed.

[0197] S307: Validate the temperature prediction model using the validation dataset of the current training period to obtain the validation loss for the current training period.

[0198] The validation dataset for the current training cycle includes several second-sample detection data points for at least one correlation factor. Each second-sample detection data point includes the second-sample detection values ​​for each correlation factor at several different second-sample detection times. Furthermore, each second-sample detection data point has a corresponding sample-labeled temperature for the target device.

[0199] In one embodiment, for the validation dataset of the current training period, the validation loss is obtained for each second sample detection data in the validation dataset. The steps for obtaining the validation loss corresponding to the second sample detection data are the same as those for obtaining the training loss described above, and are omitted in detail here. Further, the validation losses of each second sample detection data in the validation dataset are combined to obtain the training loss for the current training period. For example, the average validation loss corresponding to the validation losses of each second sample detection data in the validation dataset is used as the training loss for the current training period.

[0200] S308: Determine whether the validation loss of the current training cycle is less than the minimum recording loss.

[0201] Initially, the minimum record loss can be set to a relatively large loss value.

[0202] If the validation loss of the current training cycle is less than the minimum recording loss, then proceed to step S309.

[0203] If the validation loss of the current training cycle is greater than or equal to the minimum recording loss, then proceed to step S310.

[0204] S309: Update the minimum record loss to the validation loss of the current training cycle and reset the target count.

[0205] The target count is used to record the number of consecutive instances where the validation loss does not decrease. Initially, the target count is 0.

[0206] S310: Increase the target count by the pre-designed value.

[0207] For example, the preset count value is 1.

[0208] S311: Determine whether the preset conditions are met.

[0209] The preset conditions include: the target count is less than a counting threshold and the total number of current training cycles is less than a cycle count threshold. For example, the counting threshold is 10 and the cycle count threshold is 100.

[0210] If the preset conditions are met, then proceed to step S312.

[0211] If the preset conditions are not met, proceed to step S313.

[0212] S312, the next training cycle is used as the new current training cycle.

[0213] After executing step S312, obtain the new training dataset and validation dataset for the current training cycle, and re-execute the training of the temperature prediction model using the training dataset of the current training cycle and the validation of the temperature prediction model using the validation dataset of the current training cycle, to obtain the validation loss of the current training cycle and its subsequent steps.

[0214] In this embodiment, possible working conditions in reality can be simulated, and a large amount of sample detection data under these working conditions can be collected to form a sample dataset. The sample dataset can then be further divided to obtain the aforementioned training dataset and validation dataset.

[0215] In this embodiment, after the training steps of the current training cycle are completed, and before retraining the temperature prediction model using the training dataset of the current training cycle (i.e., before starting a new training cycle), the method further includes: decaying the base learning rate of the current training cycle; and using the decayed base learning rate of the current training cycle as the base learning rate of the new current training cycle. That is, the base learning rate is decayed after each training cycle.

[0216] In one implementation, the base learning rate is decayed using ExponentialLR (exponential decay strategy), meaning the base learning rate decays exponentially. In this implementation, the decayed base learning rate for the current training cycle can be expressed by the following formula:

[0217] α t =α0*γ t

[0218] Where α0 represents the initial learning rate and γ represents the decay factor. For example, the initial learning rate is set to 0.00001.

[0219] It should be noted that in other implementations, other attenuation strategies can also be used to attenuate the base learning rate, such as using Cosine Annealing. For details, please refer to the known prior art, which will not be explained in detail here.

[0220] S313, confirm that the training of the temperature prediction model is complete.

[0221] In step S313, after training the temperature prediction model is completed, the network parameters of the current temperature prediction model are saved, thereby obtaining the trained temperature prediction model.

[0222] In this embodiment, during the training of the temperature prediction model, the network parameters of the temperature prediction model are adjusted using a training loss determined by combining the first and second errors. This method enables the temperature prediction model to construct a complex nonlinear relationship between at least one correlation factor and the temperature of the target device. This allows the model to make accurate temperature predictions and maintain high accuracy even under varying environmental conditions, making it suitable for complex and variable working environments. It also improves the generalization and adaptability of the temperature prediction model, meeting the high-precision requirements for target device temperature prediction in industrial scenarios. Furthermore, the trained temperature prediction model can perform rapid inference calculations, making it suitable for online and real-time applications, such as dynamic temperature monitoring during electric vehicle operation.

[0223] In this embodiment, when the validation dataset no longer decreases (i.e., performance no longer improves) for several consecutive training cycles, the training of the temperature prediction model is terminated in a timely manner. On the one hand, this can prevent the temperature prediction model from overfitting. On the other hand, it can also reduce the time required for the temperature prediction model to complete training and improve the training effect of the temperature prediction model.

[0224] In this embodiment, the learning rate is adjusted twice during the entire training process of the temperature prediction model. Specifically, in each iteration of each training cycle, the base learning rate is adaptively adjusted using a modified second-order distance (MOR) estimate. A smaller MOR estimate is obtained when the MOR estimate is larger, and a larger MOR estimate is obtained when the MOR estimate is smaller. Furthermore, at the end of each training cycle, the base learning rate is decayed. A larger base learning rate is used in the early stages of training for rapid convergence, while a smaller learning rate is used in the later stages to fine-tune the network parameters. Through this two-stage learning rate adjustment mechanism, the temperature prediction model can achieve rapid and stable convergence.

[0225] Please see Figure 6 , Figure 6This is a flowchart illustrating an embodiment of the state detection method provided in this application. The method is used to predict the state of a target device using a temperature prediction model. The temperature prediction model can employ... Figure 3 The training method shown was used to train the equipment.

[0226] like Figure 6 As shown, the method includes the following steps:

[0227] S61: Obtain target detection data for at least one correlation factor, each of which affects the temperature of the target device.

[0228] S62: Input the target features of the target detection data into the temperature prediction model to obtain at least one of the target predicted temperature of the target device and the target reconstruction features of the target detection data.

[0229] S63: Determine the state of the target device using at least one of the first target error and the second target error.

[0230] The first target error is determined based on the difference between the predicted target temperature and the actual detection temperature of the target device. For example, the first target error could be the MSE error. The actual detection temperature of the target device can be obtained by detecting it using a corresponding temperature sensor.

[0231] The second target error is determined based on the difference between the target features in the target detection data and the target reconstruction features in the target detection data. For example, the second target error can be calculated using Mahalanobis distance.

[0232] In one embodiment, only the target predicted temperature of the target device output by the temperature prediction model is obtained, and only the first target error is obtained, and the state of the target device is determined using the first target error.

[0233] In another embodiment, only the target reconstruction features of the target detection data output by the temperature prediction model are acquired, and only the second target error is acquired, and the state of the target device is determined using the second target error.

[0234] In another embodiment, the target predicted temperature of the target device output by the temperature prediction model and the target reconstruction features of the target detection data are obtained simultaneously, as well as the first target error and the second target error are obtained simultaneously, and the state of the target device is determined by combining the first target error and the second target error.

[0235] In one embodiment, a first target error and a second target error are simultaneously acquired, and the state of the target device includes a normal state and an abnormal state (i.e., the target device is faulty). In this embodiment, the step of determining the state of the target device further includes: if at least one of the first target error and the second target error meets the abnormal condition, then it is determined that the target device is abnormal, and an abnormality prompt message is output; if neither the first target error nor the second target error meets the abnormal condition, then it is determined that the target device is not abnormal, i.e., the target device is in a normal state.

[0236] The abnormal conditions include: the error being greater than or equal to the corresponding preset error threshold. The preset error threshold corresponding to the first target error is different from the preset error threshold corresponding to the second target error, and both preset error thresholds are preset according to the actual situation.

[0237] Anomaly alerts relevant personnel to detect an anomaly in the target device, facilitating timely maintenance. For example, the anomaly alert can be output to a terminal device. This terminal device can be a mobile phone, laptop, desktop computer, smart wearable device, or in-vehicle terminal, etc., and this example does not specifically limit the terminal device.

[0238] Understandably, when the target device's temperature is within its normal range, the first target error is small. In this case, the target predicted temperature of the target device by the temperature prediction model is close to the actual temperature of the target device. However, when the target device's temperature rises sharply, causing it to deviate from its normal range, the actual temperature of the target device deviates from the learning range of the temperature prediction model. In this case, the difference between the target predicted temperature of the target device predicted by the temperature prediction model according to normal logic and the actual temperature of the target device is large, i.e., the first target error is large. Therefore, the first target error can be used as a criterion for determining whether the target device is abnormal.

[0239] Understandably, the anomaly of the target device does not occur suddenly; its development is a gradual process. In the early stages of the target device anomaly, the correlation factor of the target device exhibits abnormal changes. Since the impact on the target device's temperature is relatively small at this stage, the target device's temperature may still be within the normal range, making it difficult to directly determine whether the target device is abnormal based on its actual temperature. Only when the abnormal change in the correlation factor is more significant will the target device's temperature change significantly, thus deviating from the abnormal temperature range. When the correlation factor of the target device changes normally, the temperature prediction model can accurately construct the target reconstruction features, resulting in a small second target error. However, when the correlation factor of the target device changes abnormally, the difference between the target reconstruction features of the target detection data reconstructed by the temperature prediction model according to normal logic and the target features of the target detection data is large, i.e., the second target error is large. Therefore, the second target error can be used as a criterion for determining whether the target device is abnormal, and can be used to detect potential anomalies in the target device.

[0240] Furthermore, in this embodiment, when an anomaly is detected in the target device, the potential root cause of the anomaly can be further located. Specifically, the target detection data of at least one correlation factor can be analyzed to determine which correlation factor(s) caused the anomaly in the target device.

[0241] In another embodiment, a first target error and a second target error are acquired simultaneously, and the state of the target device is the health state of the target device. In this embodiment, the step of determining the state of the target device further includes: determining a first error range to which the first target error belongs and a second error range to which the second target error belongs; and determining the target health state data corresponding to the first error range and the second error range based on a preset mapping relationship.

[0242] The first error range is one of several first preset error ranges, and the second error range is one of several second preset error ranges. The preset mapping relationship is a mapping relationship between the first preset error range, the second preset error range, and preset health status data. This preset mapping relationship can be pre-defined according to actual needs. The preset health status data can be a classification of health status levels. A higher health status level indicates a healthier target device; a lower health status level indicates a less healthy target device and a greater likelihood of abnormalities. Alternatively, the preset health status data can also be a health score. A higher health score indicates a healthier target device; a lower health score indicates a less healthy target device and a greater likelihood of abnormalities.

[0243] In related technologies, only the temperature estimation of the target device is usually considered, while the health assessment and anomaly identification of the target device are ignored. This may lead to maintenance measures being taken only after the target device has an abnormal temperature or a potential failure has occurred, thus delaying the best time to deal with the problem.

[0244] In this embodiment, the temperature prediction of the target device is integrated with the status detection of the target device. Through this integrated framework, not only can the temperature of the target device be predicted with high accuracy, but also the health assessment and anomaly identification of the target device can be performed. Potential faults of the target device can be detected in advance, reducing sudden failures and maintenance costs, improving the reliability and safety of the target device operation, and enhancing the level of intelligent monitoring in industrial scenarios.

[0245] Optionally, in one embodiment, after training the temperature prediction model, the model can be further lightweighted and then deployed to the target device. Once the temperature prediction model is deployed on the target device, it can be used to predict the temperature and detect the status of the target device.

[0246] In one embodiment, lightweighting the temperature prediction model may include compressing the temperature prediction model and converting it to a preset format. For example, the preset format is the ONNX format, which is a highly efficient format.

[0247] In some implementations, the target device may be a cloud server, or it may be a device controller (i.e., an edge node) corresponding to the device where the target device is located. For example, if the target device is an inverter in the motor drive assembly of a vehicle, then the target device may be a motor controller (such as an MCU) in the motor drive assembly.

[0248] Deploying a lightweight temperature prediction model to the target device can significantly reduce the computational overhead and storage requirements of the target device, enabling efficient real-time inference of the temperature prediction model under limited hardware conditions and improving the operating efficiency of the target device.

[0249] Furthermore, if the target device is multi-core, the process of using the temperature prediction model to predict the temperature of the target device can be performed in multiple threads to further improve prediction efficiency and real-time performance.

[0250] Optionally, in one embodiment, considering that the computing and storage capabilities of the cloud server are higher than those of the device controller at the edge node, to further improve the accuracy of temperature prediction and state detection, the trained temperature prediction model may not be lightweighted; instead, the full version of the temperature prediction model may be directly deployed to the cloud server. In a real-world scenario, the cloud server communicates with the device controller to obtain target detection data for at least one correlation factor, and uses the temperature prediction model to predict the target predicted temperature of the target device based on the target detection data for at least one correlation factor. It also performs state detection on the target device by combining the obtained first target error and second target error. Furthermore, the temperature prediction results and state detection results can be sent back to the device controller.

[0251] Please see Figure 7 , Figure 7 This is a schematic diagram of a framework of an embodiment of the temperature prediction device provided in this application. In this embodiment, the temperature prediction device 70 includes a first acquisition module 71 and a temperature prediction module 72. The first acquisition module 71 is used to acquire target detection data of at least one correlation factor, each correlation factor affecting the temperature of the target device. The temperature prediction module 72 is used to predict the target predicted temperature of the target device based on the target detection data using a temperature prediction model.

[0252] The temperature prediction model is trained using a first error and a second error. The first error is determined based on the difference between the predicted temperature of the sample corresponding to the first sample detection data and the labeled temperature of the sample corresponding to the first sample detection data, which is based on at least one correlation factor. The second error is determined based on the difference between the sample features of the first sample detection data and the sample reconstruction features of the first sample detection data. Both the predicted temperature of the first sample detection data and the sample reconstruction features of the first sample detection data are output by the temperature prediction model for the first sample detection data.

[0253] Optionally, the temperature prediction device 70 further includes a training module 73. The training module 73 is used to acquire the training dataset for the current training cycle, the training dataset including several first sample detection data of at least one correlation factor; input the sample features of the first sample detection data into the temperature prediction model to obtain the sample predicted temperature of the first sample detection data and the sample reconstructed features of the first sample detection data output by the temperature prediction model; determine a first error using the difference between the sample predicted temperature of the first sample detection data and the sample labeled temperature of the first sample detection data; and determine a second error using the difference between the sample features of the first sample detection data and the sample reconstructed features of the first sample detection data; combine the first error and the second error to obtain the training loss; and adjust the network parameters of the temperature prediction model using the training loss until the training conditions are met, thereby ending the training steps of the current training cycle.

[0254] Optionally, the temperature prediction model includes a first encoding network, a second encoding network, a prediction network, and a decoding network. The training module 73 is used to encode the sample features of the first sample detection data using the first encoding network to obtain first encoded features; and to encode the sample features of the first sample detection data using the second encoding network to obtain second encoded features; to predict the temperature of the first sample detection data using the prediction network; and to decode the second encoded features using the decoding network to obtain the sample reconstruction features of the first sample detection data.

[0255] Optionally, the training module 73 is used to determine a first difference between the predicted temperature of the first sample detection data and the labeled temperature of the first sample detection data; in response to the absolute value of the first difference being less than or equal to a preset parameter, a first error is determined using a first method; in response to the absolute value of the first difference being greater than the preset parameter, a first error is determined using a second method; wherein the first method and the second method are different, and both the first method and the second method use the first difference to determine the loss.

[0256] Optionally, the training module 73 is used to multiply the square of the first difference by the first preset coefficient as the first error; and / or, the training module 73 is used to multiply the preset parameter by the absolute value of the first difference to obtain the first product; multiply the square of the preset parameter by the second preset coefficient to obtain the second product; and use the difference between the first product and the second product as the first error.

[0257] Optionally, the training module 73 is used to determine a second difference between the sample reconstruction features of the first sample detection data and the sample features of the first sample detection data; and to take the product of the transpose of the second difference and the inverse covariance matrix of the second difference as the second error.

[0258] Optionally, the training module 73 is used to determine the sum of the errors of the first error and the second error as the training loss.

[0259] Optionally, the training module 73 is used to determine the gradient of the current iteration using the training loss and the network parameters of the current iteration; adjust the gradient and the base learning rate of the current iteration to obtain the adjusted gradient and the adjusted learning rate of the current iteration; adjust the network parameters of the current iteration using the adjusted gradient and the adjusted learning rate of the current iteration to obtain the adjusted network parameters of the current iteration; determine whether the training conditions are met; if the training conditions are met, the training steps of the current training cycle are terminated; if the training conditions are not met, the adjusted network parameters of the current iteration are used as the network parameters of the next iteration, and the process of determining the gradient of the current iteration and its subsequent steps using the training loss and the network parameters of the current iteration is repeated.

[0260] Optionally, the training module 73 is used to combine the first-order moment estimate of the previous iteration and the gradient of the current iteration to determine the first-order moment estimate of the current iteration; to correct the first-order moment estimate of the current iteration using the first correction parameter of the current iteration to obtain the corrected first-order moment estimate of the current iteration; and to adjust the gradient of the current iteration using the first correction coefficient of the current iteration and the corrected first-order moment estimate of the current iteration to obtain the adjusted gradient of the current iteration.

[0261] And / or, training module 73 is used to combine the square of the gradient of the current iteration and the second-order distance estimate of the previous iteration to determine the second-order distance estimate of the current iteration; to correct the second-order distance estimate of the current iteration using the second correction parameter of the current iteration to obtain the corrected second-order distance estimate of the current iteration; and to adjust the base learning rate of the current iteration using the corrected second-order distance estimate of the current iteration to obtain the adjusted learning rate of the current iteration.

[0262] And / or, training module 73 is used to multiply the adjusted learning rate of the current iteration round by the adjusted gradient of the current iteration round to obtain a third product; and to use the difference between the network parameters of the current iteration round and the third product as the adjusted network parameters of the current iteration round.

[0263] Optionally, after the training steps of the current training cycle are completed, the training module 73 is further configured to validate the temperature prediction model using the validation dataset of the current training cycle to obtain the validation loss of the current training cycle; determine whether the validation loss of the current training cycle is less than the minimum recording loss; if the validation loss of the current training cycle is less than the minimum recording loss, update the minimum recording loss to the validation loss of the current training cycle and reset the target count; if the validation loss of the current training cycle is greater than or equal to the minimum recording loss, increase the target count by a pre-designed value; determine whether preset conditions are met; wherein, the preset conditions include: the target count is less than the counting threshold and the total number of current training cycles is less than the cycle number threshold; if the preset conditions are met, obtain the training dataset and validation dataset of the next training cycle, take the next training cycle as the new current training cycle, and re-execute the training of the temperature prediction model using the training dataset of the current training cycle and the validation of the temperature prediction model using the validation dataset of the current training cycle to obtain the validation loss of the current training cycle and its subsequent steps; if the preset conditions are not met, determine that the training of the temperature prediction model is complete.

[0264] Optionally, after the training steps of the current training cycle are completed and before the temperature prediction model is retrained using the training dataset of the current training cycle, the training module 73 is also used to decay the base learning rate of the current training cycle; and use the decayed base learning rate of the current training cycle as the base learning rate of the new current training cycle.

[0265] Optionally, the target detection data includes first detection values ​​of each correlation factor at several different detection times, and the temperature prediction device 70 further includes a filtering module 74. After the first acquisition module 71 acquires target detection data of at least one correlation factor, and before the temperature prediction module 72 uses the temperature prediction model to predict the target predicted temperature of the target device based on the target detection data, the filtering module 74 is used to acquire several second detection values ​​of each correlation factor within a first detection window corresponding to each first detection value; for each first detection value of each correlation factor, using several second detection values ​​corresponding to the first detection value, determine the abnormal detection range corresponding to the first detection value; in response to the first detection value being within the abnormal detection range, retain the value of the first detection value; in response to the first detection value being outside the abnormal detection range, statistically analyze several second detection values ​​of the first detection value to obtain a first central tendency characterization value, and use the first central tendency characterization value as the detection value updated from the first detection value.

[0266] Optionally, the anomaly detection range includes an upper bound and a lower bound. The filtering module 74 is used to statistically analyze several second detection values ​​of the first detection value to obtain a second central tendency representation value and a first dispersion representation value; determine a fourth product of a first adjustment coefficient and the first dispersion representation value, and determine a fifth product of a second adjustment coefficient and the first dispersion representation value; use the sum of the second central tendency representation value and the fourth product as the upper bound for anomaly detection of the first detection value; and use the difference between the second central tendency representation value and the fifth product as the lower bound for anomaly detection of the first detection value.

[0267] Optionally, the filtering module 74 is used to obtain several third detection values ​​of the correlation factor within a second detection window of the first detection value for each first detection value of the correlation factor; to perform statistics on the several third detection values ​​of the first detection value to obtain a second dispersion characterization value; in response to the second dispersion characterization value meeting a preset dispersion condition, to use the several third detection values ​​of the first detection value as several second detection values ​​of the first detection value; in response to the second dispersion characterization value not meeting the preset dispersion condition, to adjust the window width of the second detection window to obtain a new second detection window, and to re-execute the steps of obtaining several third detection values ​​of the correlation factor within the second detection window of the first detection value and subsequent steps.

[0268] Optionally, the target device is an inverter in the motor drive assembly of a vehicle, and the temperature of the inverter is the combined temperature of multiple power switching transistors in the inverter. At least one of the following correlation factors is included: the coolant inlet temperature of the motor drive assembly, the speed of the coolant pump, the oil pump temperature, the speed of the oil pump, the input voltage of the inverter, the input current of the inverter, and the motor torque.

[0269] And / or, the temperature prediction device 70 also includes a model lightweighting module 75. After training the temperature prediction model is completed, the model lightweighting module 75 is used to lightweight the temperature prediction model and deploy the lightweighted temperature prediction model to the target device.

[0270] It should be noted that the device in this embodiment can perform the steps in the aforementioned temperature prediction method. For detailed explanations of the relevant content, please refer to the aforementioned method section, which will not be repeated here.

[0271] Please see Figure 8 , Figure 8 This is a schematic diagram of a framework of an embodiment of the state detection device provided in this application. In this embodiment, the state detection device 80 includes a second acquisition module 81, a prediction module 82, and a state detection module 83. The second acquisition module 81 is used to acquire target detection data of at least one correlation factor, each correlation factor affecting the temperature of the target device. The prediction module 82 is used to input the target features of the target detection data into a temperature prediction model to obtain at least one of the target predicted temperature of the target device and the target reconstruction features of the target detection data. The state detection module 83 is used to determine the state of the target device using at least one of a first target error and a second target error. The first target error is determined based on the difference between the target predicted temperature and the actual detection temperature of the target device, and the second target error is determined based on the difference between the target features of the target detection data and the target reconstruction features of the target detection data.

[0272] Optionally, the state detection module 83 is used to determine that the target device is abnormal and output an abnormal prompt message in response to at least one of the first target error and the second target error satisfying the abnormal condition; and to determine that the target device is not abnormal in response to neither the first target error nor the second target error satisfying the abnormal condition; wherein the abnormal condition includes: the error is greater than or equal to the corresponding preset error threshold.

[0273] Optionally, the state detection module 83 is used to determine the first error range to which the first target error belongs and the second error range to which the second target error belongs; wherein, the first error range is one of several first preset error ranges and the second error range is one of several second preset error ranges; based on a preset mapping relationship, the target health status data corresponding to the first error range and the second error range are determined; wherein, the preset mapping relationship is a mapping relationship between the first preset error range, the second preset error range and the preset health status data.

[0274] It should be noted that the device in this embodiment can perform the steps in the aforementioned state detection method. For a detailed description of the relevant content, please refer to the aforementioned method section, which will not be repeated here.

[0275] Please see Figure 9 , Figure 9 This is a schematic diagram of a framework of an embodiment of the electronic device provided in this application. In this embodiment, the electronic device 90 includes a memory 91 and a processor 92.

[0276] Processor 92 can also be referred to as CPU (Central Processing Unit). Processor 92 may be an integrated circuit chip with signal processing capabilities. Processor 92 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. A general-purpose processor can be a microprocessor, or processor 92 can be any conventional processor 92, etc.

[0277] The memory 91 in the electronic device 90 is used to store the program instructions required for the processor 92 to run.

[0278] The processor 92 is used to execute program instructions to implement the temperature prediction method or state detection method in this application.

[0279] Please see Figure 10 , Figure 10This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium provided in this application. The computer-readable storage medium 100 of this application embodiment stores program instructions 101, which, when executed, implement the temperature prediction method or state detection method provided in this application. The program instructions 101 can be formed into a program file and stored in the aforementioned computer-readable storage medium 100 in the form of a software product, so that a computer device (which may be a personal computer, server, or network device, etc.) can execute all or part of the steps of the methods of various embodiments of this application. The aforementioned computer-readable storage medium 100 includes various media capable of storing program code, such as a USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or terminal devices such as computers, servers, mobile phones, and tablets.

[0280] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0281] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0282] In the several embodiments provided in this application, it should be understood that the disclosed methods, apparatuses, and systems can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or units may be electrical, mechanical, or other forms.

[0283] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0284] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0285] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0286] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A temperature prediction method, characterized in that, The method includes: Target detection data of at least one correlation factor is obtained, each of which affects the temperature of the target device; the target device is the inverter in the motor drive assembly of a vehicle, the temperature of the inverter is the combined temperature of multiple power switching transistors in the inverter, and the at least one correlation factor includes at least one of the following: coolant inlet temperature of the motor drive assembly, speed of the coolant pump, oil pump temperature, speed of the oil pump, input voltage of the inverter, input current of the inverter, and motor torque; The target predicted temperature of the target device is obtained by using a temperature prediction model based on the target detection data. The temperature prediction model includes a first encoding network, a second encoding network, a prediction network, and a decoding network. The first encoding network and the second encoding network are two independent encoding networks. The first encoding network is used to encode the sample features of the first sample detection data of the at least one correlation factor to obtain a first encoded feature. The second encoding network is used to encode the sample features of the first sample detection data to obtain a second encoded feature. The prediction network is used to predict the temperature of the first sample detection data to obtain the predicted temperature of the first sample detection data. The decoding network is used to decode the second encoded feature to obtain the reconstructed features of the first sample detection data. The temperature prediction model is trained using a first error and a second error. The first error is determined based on the difference between the predicted temperature of the first sample detection data and the labeled temperature of the first sample detection data. The second error is determined based on the difference between the sample features of the first sample detection data and the reconstructed features of the first sample detection data.

2. The method according to claim 1, characterized in that, Training the temperature prediction model using the first error and the second error further includes: Obtain the training dataset for the current training period, wherein the training dataset includes several first sample detection data of the at least one correlation factor; The training loss is obtained by combining the first error and the second error; The network parameters of the temperature prediction model are adjusted using the training loss until the training conditions are met, thus ending the training step of the current training cycle.

3. The method according to claim 2, characterized in that, The step of determining the first error by using the difference between the sample predicted temperature from the first sample detection data and the sample labeled temperature from the first sample detection data includes: Determine a first difference between the predicted temperature of the first sample detection data and the labeled temperature of the first sample detection data; In response to the absolute value of the first difference being less than or equal to a preset parameter, the first error is determined using a first method; In response to the absolute value of the first difference being greater than the preset parameter, the first error is determined using a second method; The first method is different from the second method, and both the first method and the second method use the first difference to determine the loss.

4. The method according to claim 3, characterized in that, The determination of the first error using the first method includes: The product of the square of the first difference and the first preset coefficient is taken as the first error; And / or, determining the first error using the second method includes: Multiply the preset parameter by the absolute value of the first difference to obtain the first product; Multiply the square of the preset parameter by the second preset coefficient to obtain the second product; The difference between the first product and the second product is taken as the first error.

5. The method according to claim 2, characterized in that, The step of determining the second error by utilizing the difference between the sample features of the first sample detection data and the sample reconstruction features of the first sample detection data includes: Determine the second difference between the sample reconstruction features of the first sample detection data and the sample features of the first sample detection data; The product of the transpose of the second difference and the inverse covariance matrix of the second difference is taken as the second error.

6. The method according to claim 2, characterized in that, The training loss is obtained by combining the first error and the second error, including: The sum of the errors of the first error and the second error is determined as the training loss.

7. The method according to claim 2, characterized in that, The step of adjusting the network parameters of the temperature prediction model using the training loss until the training conditions are met, thereby ending the training cycle, includes: Using the training loss and the network parameters of the current iteration, determine the gradient of the current iteration; The gradient and the base learning rate of the current iteration are adjusted to obtain the adjusted gradient and the adjusted learning rate of the current iteration. The network parameters for the current iteration are adjusted using the adjusted gradient and the adjusted learning rate of the current iteration, thus obtaining the adjusted network parameters for the current iteration. Determine whether the training conditions are met; If the training conditions are met, the training steps for the current training cycle will end. If the training conditions are not met, the adjusted network parameters of the current iteration are used as the network parameters for the next iteration, and the process of determining the gradient of the current iteration and its subsequent steps using the training loss and the network parameters of the current iteration is repeated.

8. The method according to claim 7, characterized in that, Adjust the gradient for the current iteration to obtain the adjusted gradient for the current iteration, including: By combining the first-order moment estimate from the previous iteration and the gradient from the current iteration, the first-order moment estimate for the current iteration is determined. The first-order moment estimate of the current iteration is corrected by using the first correction parameter of the current iteration to obtain the corrected first-order moment estimate of the current iteration. The gradient of the current iteration is estimated and adjusted using the first correction coefficient and the corrected first moment of the current iteration, thus obtaining the adjusted gradient of the current iteration. And / or, adjust the base learning rate for the current iteration to obtain the adjusted learning rate for the current iteration, including: The second moment estimate for the current iteration is determined by combining the square of the gradient of the current iteration with the second moment estimate of the previous iteration. The second correction parameter of the current iteration is used to correct the second moment estimate of the current iteration, so as to obtain the corrected second moment estimate of the current iteration. The base learning rate for the current iteration is adjusted using the corrected second moment estimate of the current iteration, thus obtaining the adjusted learning rate for the current iteration. And / or, the step of adjusting the network parameters of the current iteration using the adjusted gradient and the adjusted learning rate of the current iteration to obtain the adjusted network parameters of the current iteration includes: The third product is obtained by multiplying the adjusted learning rate of the current iteration with the adjusted gradient of the current iteration. The difference between the network parameters of the current iteration and the third product is used as the adjusted network parameters for the current iteration.

9. The method according to claim 2, characterized in that, After completing the training steps of the current training cycle, the method further includes: The temperature prediction model is validated using the validation dataset of the current training period to obtain the validation loss for the current training period. Determine whether the validation loss of the current training cycle is less than the minimum recording loss; If the validation loss of the current training period is less than the minimum recording loss, then the minimum recording loss is updated to the validation loss of the current training period, and the target count is reset. If the validation loss of the current training cycle is greater than or equal to the minimum recording loss, then the target count is increased by a pre-designed value. Determine whether preset conditions are met; wherein, the preset conditions include: the target count is less than the count threshold and the total number of current training cycles is less than the number of cycles threshold; If the preset conditions are met, the training dataset and validation dataset for the next training cycle are obtained, the next training cycle is taken as the new current training cycle, and the training of the temperature prediction model using the training dataset of the current training cycle and the validation of the temperature prediction model using the validation dataset of the current training cycle are re-executed to obtain the validation loss of the current training cycle and its subsequent steps. If the preset conditions are not met, then the training of the temperature prediction model is considered complete.

10. The method according to claim 9, characterized in that, After the training step of the current training cycle ends, and before the retraining of the temperature prediction model using the training dataset of the current training cycle is performed, the method further includes: Decrease the base learning rate for the current training cycle; Use the decayed base learning rate of the current training cycle as the base learning rate of the new current training cycle.

11. The method according to claim 1, characterized in that, The target detection data includes the first detection values ​​of each of the correlation factors at several different detection times. After acquiring the target detection data of at least one correlation factor, and before using a temperature prediction model to predict the target predicted temperature of the target device based on the target detection data, the method further includes: For each of the aforementioned correlation factors, obtain a number of second detection values ​​for each correlation factor within a first detection window corresponding to each first detection value; For each of the first detection values ​​of the associated factors, the abnormal detection range corresponding to the first detection value is determined by using the plurality of second detection values ​​corresponding to the first detection value. In response to the first detection value being within the anomaly detection range, the value of the first detection value is retained; In response to the first detection value being outside the anomaly detection range, the first detection value is statistically analyzed for several second detection values ​​to obtain a first central tendency characterization value, and the first central tendency characterization value is used as the updated detection value of the first detection value.

12. The method according to claim 11, characterized in that, The anomaly detection range includes an upper bound and a lower bound. Determining the anomaly detection range corresponding to the first detection value using the plurality of second detection values ​​corresponding to the first detection value includes: Statistical analysis is performed on the several second detection values ​​of the first detection value to obtain a second central tendency characterization value and a first dispersion characterization value; Determine the fourth product of the first adjustment coefficient and the first dispersion characterization value, and determine the fifth product of the second adjustment coefficient and the first dispersion characterization value; The sum of the second central tendency representation value and the fourth product is used as the upper bound for anomaly detection of the first detection value; The difference between the second central tendency representation value and the fifth product is used as the lower bound for anomaly detection of the first detection value.

13. The method according to claim 11, characterized in that, The step of obtaining a plurality of second detection values ​​of the correlation factor within a first detection window corresponding to each of the first detection values ​​includes: For each of the first detection values ​​of the correlation factor, obtain a number of third detection values ​​of the correlation factor within a second detection window of the first detection value; By statistically analyzing the several third detection values ​​of the first detection value, a second dispersion characterization value is obtained; In response to the second discreteness characterization value meeting the preset discreteness condition, the plurality of third detection values ​​of the first detection value are used as the plurality of second detection values ​​of the first detection value; In response to the second discreteness characterization value not conforming to the preset discreteness condition, the window width of the second detection window is adjusted to obtain a new second detection window, and the steps of obtaining several third detection values ​​of the correlation factor within the second detection window of the first detection value and subsequent steps are re-executed.

14. The method according to claim 1, characterized in that, After training the temperature prediction model, the temperature prediction model is lightweighted and then deployed to the target device.

15. A state detection method, characterized in that, The method includes: Target detection data of at least one correlation factor is obtained, each of which affects the temperature of the target device; the target device is the inverter in the motor drive assembly of a vehicle, the temperature of the inverter is the combined temperature of multiple power switching transistors in the inverter, and the at least one correlation factor includes at least one of the following: coolant inlet temperature of the motor drive assembly, speed of the coolant pump, oil pump temperature, speed of the oil pump, input voltage of the inverter, input current of the inverter, and motor torque; The target features of the target detection data are input into a temperature prediction model to obtain the target predicted temperature of the target device and the target reconstructed features of the target detection data. The temperature prediction model includes a first encoding network, a second encoding network, a prediction network, and a decoding network, where the first and second encoding networks are two independent encoding networks. The first encoding network is used to encode the sample features of the first sample detection data for the at least one correlation factor to obtain a first encoded feature. The second encoding network is used to encode the sample features of the first sample detection data to obtain a second encoded feature. The prediction network is used to predict the temperature of the first encoded feature to obtain the sample predicted temperature of the first sample detection data. The decoding network is used to decode the second encoded feature to obtain the sample reconstructed features of the first sample detection data. The temperature prediction model is trained using a first error and a second error. The first error is determined based on the difference between the sample predicted temperature corresponding to the first sample detection data and the sample labeled temperature corresponding to the first sample detection data. The second error is determined based on the difference between the sample features of the first sample detection data and the sample reconstructed features of the first sample detection data. The state of the target device is determined using at least one of a first target error and a second target error; wherein the first target error is determined based on the difference between the target predicted temperature and the actual detection temperature of the target device, and the second target error is determined based on the difference between the target features of the target detection data and the target reconstruction features of the target detection data.

16. The method according to claim 15, characterized in that, Determining the state of the target device using at least one of the first target error and the second target error includes: In response to at least one of the first target error and the second target error satisfying the abnormal condition, it is determined that the target device is abnormal, and an abnormality prompt message is output; Since neither the first target error nor the second target error satisfies the abnormal condition, it is determined that the target device is not abnormal. The abnormal conditions include: the error is greater than or equal to the corresponding preset error threshold.

17. The method according to claim 15, characterized in that, Determining the state of the target device using at least one of the first target error and the second target error includes: Determine a first error range to which the first target error belongs and a second error range to which the second target error belongs; wherein, the first error range is one of several first preset error ranges, and the second error range is one of several second preset error ranges; Based on a preset mapping relationship, the target health status data corresponding to the first error range and the second error range are determined; wherein, the preset mapping relationship is the mapping relationship between the first preset error range, the second preset error range and the preset health status data.

18. An electronic device, characterized in that, Including interconnected memory and processor, The memory stores program instructions; The processor is used to execute program instructions stored in the memory to implement the temperature prediction method according to any one of claims 1-14 or the state detection method according to any one of claims 15 to 17.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program instructions that can be executed by a processor to implement the temperature prediction method according to any one of claims 1-14 or the state detection method according to any one of claims 15-17.

Citation Information

Patent Citations

  • Abnormal state detection method and device, equipment and storage medium

    CN119246990A

  • Anomaly detection method and apparatus for temporal actions, electronic device, and storage medium

    WO2025124164A1