Aluminum alloy casting quality real-time prediction method and system based on Internet of Things

Through the Internet of Things technology, the production data of aluminum alloy castings is collected in real time, and the dual prediction model and difference trend correction technology are used to solve the problem of insufficient accuracy in the quality prediction of aluminum alloy castings in the existing technology, achieving higher prediction accuracy and better practical application effects.

CN120181646AActive Publication Date: 2025-06-20JIAOZUO YIRUI ALLOY MATERIAL CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510231478.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-20
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

In the prior art, there are limitations in the accuracy of the quality prediction model of aluminum alloy castings, and it is difficult to effectively improve the quality prediction accuracy of aluminum alloy castings in practical applications.

Method used

Data from the production process of aluminum alloy castings is collected in real time through IoT technology, and prediction is performed using a dual prediction model (LSTM network and XGBoost regression model), combining the difference trend to correct the prediction results to improve the accuracy of the prediction.

Benefits of technology

It significantly improves the accuracy of aluminum alloy casting quality prediction, covers different time particle sizes, improves the prediction accuracy of each time particle size, and can predict casting quality at different time steps, ensuring that the prediction results better reflect the actual situation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120181646A_ABST
    Figure CN120181646A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things, and discloses an Internet of Things-based aluminum alloy casting quality real-time prediction method and system, and the method comprises the steps: transmitting collected first data in a production process of an aluminum alloy casting to a data processing unit in real time through an Internet of Things technology; extracting a specific attribute by preprocessing the first data, and generating second data in the production process of the aluminum alloy casting; based on the historical first data and the historical second data, training a first prediction model and a second prediction model, and respectively obtaining a first prediction result and a second prediction result; based on historical second data, calculating and based on the first difference trend and the second difference trend, judging whether the prediction result needs to be corrected, and when the prediction result needs to be corrected, calculating and based on the correction value of the prediction result, correcting the prediction result; and calculating and predicting the quality of the aluminum alloy casting based on a trend line of the first data along with time change. According to the method, the accuracy of aluminum alloy casting quality prediction can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet of Things technology, and particularly to a real-time prediction method and system for the quality of aluminum alloy castings based on the Internet of Things. Background Art

[0002] In the production process of aluminum alloy castings, quality control is of crucial importance. Traditional quality inspection methods usually rely on post-production inspection, that is, inspection is carried out after the casting is produced. This method is not only inefficient, but also once problems are found, a large number of defective products and waste of production costs are often caused. With the development of Internet of Things technology, it has become possible to monitor various parameters in the production process in real time, which provides a technical basis for real-time prediction of the quality of aluminum alloy castings.

[0003] A similar prior art is the Chinese patent application with the publication number CN116823054A, which discloses a real-time prediction method for the manufacturing quality of aluminum alloy castings based on data mining, including: based on the results of mold flow analysis, installing temperature, pressure, contact, and multi-functional gas sensors on the casting mold; when manufacturing aluminum alloy castings, the above sensors are used to collect the temperature, pressure, contact time of molten aluminum at multiple positions of the mold in real time, as well as the pressure, composition, humidity, and temperature of the cavity gas, so as to construct a set of manufacturing process parameters; inputting the set of manufacturing process parameters into a pre-trained manufacturing quality prediction model to predict whether the corresponding aluminum alloy casting quality is qualified; the pre-trained manufacturing quality prediction model is obtained by mining the relationship between the historical parameters of the aluminum alloy casting manufacturing process and the aluminum alloy casting quality data.

[0004] Another similar prior art is the Chinese patent application with the publication number CN116468160A, which discloses a quality prediction method for aluminum alloy die-castings based on production big data, belonging to the field of quality prediction of automotive die-castings. It includes: 1) the equipment acquisition unit obtains the production parameter data during the die-casting process, and the manual inspection unit obtains the quality index data, and integrates the parameter data and the quality index data into an original data set; 2) preprocess the data in combination with the business, including duplicate data, missing values, and outliers, and perform key feature selection for quality prediction; (3) use the stacking integration method to combine different machine learning algorithms to improve the generalization ability and accuracy of the fusion model, and finally predict the quality of the die-casting based on the real-time collected production data to obtain specific results.

[0005] However, although both of the above two inventions use advanced prediction models to predict the quality of aluminum alloy castings, in practical applications, the accuracy of a single prediction model often has certain limitations. Summary of the Invention

[0006] To solve the above technical problems, the present application provides a method and system for real-time prediction of the quality of aluminum alloy castings based on the Internet of Things, which is used to improve the accuracy of the quality prediction of aluminum alloy castings.

[0007] In the first aspect, the present application provides a method for real-time prediction of the quality of aluminum alloy castings based on the Internet of Things. The method includes:

[0008] Step S1: Through Internet of Things technology, the first data collected by each type of sensor during the production process of aluminum alloy castings is transmitted to the data processing unit in real time;

[0009] Step S2: Preprocess the first data, extract specific attributes that can reflect the quality of aluminum alloy castings from the first data, and generate the second data during the production process of the aluminum alloy castings based on the specific attributes;

[0010] Step S3: Based on the historical first data and historical second data, train the first prediction model and the second prediction model, input the real-time obtained first data and second data into the first prediction model and the second prediction model respectively, and obtain the first prediction result and the second prediction result respectively;

[0011] Step S4: Based on the historical second data, calculate and judge whether the prediction result needs to be corrected based on the first difference trend and the second difference trend. When correction is required, calculate and correct the prediction result based on the correction amount of the prediction result. The prediction result includes the first prediction result and the second prediction result;

[0012] Step S5: Based on the first data, the historical first data, the first prediction result and the second prediction result, calculate and predict the quality of the aluminum alloy casting based on the trend line of the first data changing with time.

[0013] Combined with the first aspect, in the first implementation manner of the first aspect of the present application, in step S4, calculating the first difference trend includes:

[0014] Obtain the data of the first time period from the historical second data as the third data, obtain the third prediction result corresponding to the third data based on the first prediction model, obtain the fourth prediction result corresponding to the third data based on the second prediction model, calculate the first prediction average value of the third prediction result and the fourth prediction result, calculate the first difference between the first prediction average value and the quality of the aluminum alloy casting corresponding to the third data, and calculate the difference trend of the first difference changing with time based on the first difference.

[0015] Combined with the first aspect, in the second implementation manner of the first aspect of the present application, in step S4, calculating the second difference trend includes:

[0016] Obtain the data of the second time period from the historical second data as the fourth data. The end time point of the second time period is the same as the end time point of the first time period, and the length of the second time period is equal to 1 / M of the length of the first time period, where M represents a positive integer greater than or equal to 2 and less than or equal to H / 2, and H represents the data volume of the historical second data;

[0017] Based on the first prediction model and the second prediction model, respectively obtain the fifth prediction result and the sixth prediction result corresponding to the fourth data, calculate the second prediction average value of the fifth prediction result and the sixth prediction result, calculate the second difference between the second prediction average value and the quality of the aluminum alloy casting corresponding to the fourth data, and based on the second difference, calculate the difference trend of the second difference changing with time.

[0018] Combined with the first aspect, in the third implementation manner of the first aspect of the present application, in step S4, judging whether the prediction result needs to be corrected based on the first difference trend and the second difference trend includes:

[0019] Obtain the first correction direction of the prediction result in the first difference trend and the second correction direction in the second difference trend. If the directions of the first correction direction and the second correction direction are the same, it is determined that the prediction result needs to be corrected, otherwise the prediction result does not need to be corrected.

[0020] Combined with the first aspect, in the fourth implementation manner of the first aspect of the present application, in step S4, calculate the correction amount of the prediction result and correct the prediction result based on the correction amount, including:

[0021] When the prediction result needs to be corrected, calculate the weighted average value of the first difference trend and use it as the correction amount of the prediction result, and correct the prediction result based on the correction amount.

[0022] Combined with the first aspect, in the fifth implementation manner of the first aspect of the present application, in step S5, calculating the trend line of the first data changing with time includes:

[0023] Take the time in the historical first data as the first variable and any data item in the historical first data as the second variable, and calculate the average value of the first variable and the average value of the second variable respectively;

[0024] Calculate the first distance between each data value in the historical first data and the average value of the first variable, and the second distance between the second variable and the average value of the second variable;

[0025] Calculate the inclination degree of the trend line of the second variable changing with the first variable and the intersection point of the trend line of the first data changing with the first variable and the y-axis. Based on the intersection point of the trend line of the first data changing with the first variable and the y-axis and the inclination degree of the trend line of the second variable changing with the first variable, calculate the trend line of the first data changing with the first variable according to Formula 1: y = α + x·b, where y represents the prediction result, x represents the corresponding time point, α represents the intersection point of the trend line of the first data changing with the first variable and the y-axis, and b represents the inclination degree of the trend line of the second variable changing with the first variable.

[0026] Combined with the first aspect, in the sixth implementation manner of the first aspect of the present application, in step S5, calculating the upper and lower floating intervals of the prediction result includes:

[0027] Based on the data volume of the historical first data, determine the upper and lower floating degrees of the prediction result, count the data volume of the historical first data, and calculate the average value and standard deviation of the historical first data;

[0028] Based on the upper and lower floating degrees of the prediction result and the data volume of the historical first data, determine the critical value corresponding to the upper and lower floating intervals;

[0029] According to Formula 2: Calculate the standard error of the average value of the historical first data, where c represents the standard error of the average value of the historical first data, s represents the standard deviation of the historical first data, and n represents the data volume of the historical first data;

[0030] Based on the average value of the historical first data, the standard error, and the critical value corresponding to the upper and lower floating intervals, according to Formula 3: Calculate the upper and lower limits of the floating interval, where represents the average value of the historical first data, Z represents the critical value corresponding to the upper and lower floating intervals, and β represents the upper and lower floating degree.

[0031] Combined with the first aspect, in the seventh implementation manner of the first aspect of the present application, calculating the inclination degree of the trend line of the second variable changing with the first variable includes:

[0032] According to Formula 4: Calculate the inclination degree of the trend line of the second variable changing with the first variable, where b represents the inclination degree of the trend line of the second variable changing with the first variable, d1 represents the first distance, d2 represents the second distance, n represents the number of all data values of the first variable or the second variable corresponding in the historical first data, and i represents the data value of the i-th first variable or the second variable in the historical first data.

[0033] In combination with the first aspect, in the eighth implementation manner of the first aspect of the present application, calculating the intersection point of the trend line of the first data changing with the first variable and the y-axis includes:

[0034] Based on Formula 5: α = v2 - b * v1, calculate the intersection point of the trend line of the first data changing with the first variable and the y-axis, where v1 represents the average value of the first variable and v2 represents the average value of the second variable.

[0035] In a second aspect, the present application provides an Internet of Things-based real-time quality prediction system for aluminum alloy castings, and the system includes:

[0036] A data acquisition unit, configured to transmit the first data in the production process of the aluminum alloy casting collected by each type of the sensors to the data processing unit in real time through Internet of Things technology;

[0037] An attribute extraction unit, configured to preprocess the first data, extract specific attributes that can reflect the quality of the aluminum alloy casting from the first data, and generate second data in the production process of the aluminum alloy casting based on the specific attributes;

[0038] A first prediction unit, configured to train a first prediction model and a second prediction model based on historical first data and historical second data, input the real-time obtained first data and second data into the first prediction model and the second prediction model respectively, and obtain a first prediction result and a second prediction result respectively;

[0039] A correction unit, configured to calculate based on the historical second data, judge whether the prediction result needs to be corrected based on the first difference trend and the second difference trend, and when correction is required, calculate and correct the prediction result based on the correction amount of the prediction result, where the prediction result includes the first prediction result and the second prediction result;

[0040] A second prediction unit, configured to calculate based on the first data, the historical first data, the first prediction result and the second prediction result, and predict the quality of the aluminum alloy casting based on the trend line of the first data changing with time.

[0041] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0042] In the technical solution provided by this application, through the Internet of Things technology, the first data in the production process of aluminum alloy castings collected by each type of sensor is transmitted to the data processing unit in real time, providing a basis for the real-time prediction of casting quality; by preprocessing the first data and extracting specific attributes that can reflect the quality of aluminum alloy castings from the first data, the second data in the production process of aluminum alloy castings is generated based on the specific attributes, improving the quality of the input data of the prediction model and reducing the risk of overfitting in the generation of specific attributes; based on the historical first data and historical second data, the first prediction model and the second prediction model are trained, and the real-time obtained first data and second data are respectively input into the first prediction model and the second prediction model to obtain the first prediction result and the second prediction result respectively. By using a dual-model for prediction, different time granularities can be covered, the prediction accuracy of each time granularity can be improved, and the quality of castings at different time steps can also be predicted, thereby improving the prediction accuracy of the quality of castings at each time step.

[0043] It also calculates based on the historical second data and, based on the first difference trend and the second difference trend, determines whether the prediction result needs to be corrected. When correction is required, it calculates and corrects the prediction result based on the correction amount of the prediction result. The prediction result includes the first prediction result and the second prediction result. By combining the two difference trends to correct the predicted value, the accuracy of the prediction can be improved, ensuring that the prediction result can better reflect the actual situation and adapt to future changes. Based on the first data, historical first data, first prediction result, and second prediction result, it calculates and, based on the trend line of the first data changing over time, predicts the quality of aluminum alloy castings. This helps enterprises understand potential problems in the production process in advance and take corresponding measures for adjustment and optimization. Through the cooperation of the above steps in this application, the accuracy of predicting the quality of aluminum alloy castings can be significantly improved, providing strong support for the production quality control of aluminum alloy castings. Brief Description of the Drawings

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for description in the embodiments. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0045] Figure 1 It is the flowchart of the steps of the method for real-time prediction of the quality of aluminum alloy castings based on the Internet of Things in Embodiment 1 of this application;

[0046] Figure 2 It is the schematic diagram of sensor deployment on the production line of aluminum alloy castings based on the Internet of Things in Embodiment 1 of this application;

[0047] Figure 3This is a trend chart of the difference between the predicted average value and the actual quality in Embodiment 1 of the present application;

[0048] Figure 4 Schematic diagram of the real-time quality prediction system for aluminum alloy castings based on the Internet of Things in Embodiment 2 of the present application. Detailed implementation manners

[0049] Embodiments of the present application provide a real-time quality prediction method and system for aluminum alloy castings based on the Internet of Things. Terms such as "first", "second", "third", "fourth", etc. (if any) in the specification, claims and the above-mentioned drawings of the present application are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order different from that illustrated or described herein. In addition, the terms "include" or "have" 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 does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these process, method, product or device.

[0050] Embodiment 1:

[0051] For ease of understanding, the specific process of the embodiments of the present application will be described below. Please refer to Figure 1 One embodiment of the real-time quality prediction method for aluminum alloy castings based on the Internet of Things in the embodiments of the present application includes:

[0052] Install various types of sensors at key positions on the aluminum alloy casting production line. As Figure 2 shown, install a high-precision thermocouple (temperature sensor) and a spectrometer (composition analysis sensor) in the furnace area of the aluminum alloy casting production line to monitor the temperature (±1°C accuracy) and composition (such as Si, Mg content) of the molten aluminum alloy in real time. Arrange distributed temperature sensors (such as one node every 10 cm) and pressure sensors in the mold area to collect the dynamic changes of the temperature gradient on the mold surface and the pouring pressure. The sampling frequency can be set according to requirements. For example, the sampling frequency is 100 Hz. Use an infrared thermal imager (optical sensor) to monitor the surface temperature field of the casting in the cooling area, and record the cooling water flow rate and temperature through a flow meter. It can be recorded every 5 seconds or 10 seconds at intervals. The number and type of installed sensors are not specifically limited. The real-time quality prediction method for aluminum alloy castings is implemented by performing the following steps.

[0053] Step S1: Through Internet of Things technology, transmit the first data collected by each type of sensor during the production process of aluminum alloy castings to the data processing unit in real time.

[0054] Specifically, during data transmission, all sensors use the MQTT protocol to transmit timestamped data to the edge computing node in real time through the industrial Internet of Things gateway, and ensure that the data latency is less than or equal to 50 ms. The high-frequency data stream provides a basis for the real-time prediction of the quality of castings. For example, it can detect abnormal fluctuations in the furnace temperature (such as a deviation of ±20°C) in a timely manner to prevent overburning or under-melting of the alloy. Among them, the first data includes the time point and the corresponding furnace temperature, mold temperature, cooling water temperature, pouring pressure, cooling water pressure, aluminum alloy composition, impurity content, and the quality of aluminum alloy castings. The first data is time series data.

[0055] Step S2: Preprocess the first data, extract specific attributes that can reflect the quality of aluminum alloy castings from the first data, and generate the second data during the production process of aluminum alloy castings based on the specific attributes.

[0056] Specifically, the preprocessing of the first data includes median filtering of the temperature data using a sliding window to eliminate instantaneous noise (such as spikes caused by poor thermocouple contact), and Z-score standardization of the pressure data to eliminate the difference in dimensions. Denoising the first data can improve the quality of the model input data and reduce the risk of overfitting in the generation of specific attributes. The specific attributes include the average temperature / average pressure, temperature / pressure change rate, and temperature / pressure fluctuation range within a preset time period. For the furnace temperature, the generation of specific attributes is to calculate the moving average (reflecting the steady-state trend) and standard deviation (characterizing the fluctuation range) within 10 minutes. For the pouring pressure, it is to extract the pressure change rate (ΔP / Δt) to identify abnormal pouring speeds. For the composition data, it is to reduce the dimension through principal component analysis (PCA) and extract the weight ratio of key alloy components (such as Si content) to impurities (such as Fe content).

[0057] Step S3: Based on the historical first data and historical second data, train the first prediction model and the second prediction model, and input the real-time obtained first data and second data into the first prediction model and the second prediction model respectively to obtain the first prediction result and the second prediction result.

[0058] Specifically, the first prediction model can adopt an LSTM network, input parameters such as real-time furnace temperature and pouring pressure, predict the surface defect probability (such as porosity and shrinkage porosity) of the current batch of aluminum alloy castings, and the output time step can be Δt = 5 minutes. The second prediction model can be based on the XGBoost regression model, input historical composition data (such as the Si / Mg ratio in the past 24 hours) and cooling rate, and predict the mechanical properties (such as tensile strength) of the castings within the next 8 hours. Among them, during model training, a dataset containing 100,000 groups of historical production data can be used, and the dataset is divided into an 80% training set and a 20% validation set, and cross-validation is used to optimize hyperparameters (such as the number of hidden layer nodes of LSTM and the learning rate of XGBoost). Using a dual-model for prediction can cover different time granularities, improve the prediction accuracy of each time granularity, and can also predict the quality of castings at different time steps, thereby improving the prediction accuracy of the casting quality at each time step. Among them, the quality of the aluminum alloy casting at the first time point output by the first prediction model is used as the first prediction result, and the quality of the aluminum alloy casting at the second time point output by the second prediction model is used as the second prediction result.

[0059] Step S4: Based on the historical second data, calculate and based on the first difference trend and the second difference trend, determine whether the prediction result needs to be corrected. When correction is needed, calculate and correct the prediction result based on the correction amount of the prediction result. The prediction result includes the first prediction result and the second prediction result.

[0060] Specifically, after obtaining the first prediction result (i.e., the quality of the aluminum alloy casting based on the output of the first prediction model) and the second prediction result (the result based on the output of the second prediction model, combined with the prediction of specific attributes), a prediction value correction step is introduced to improve the accuracy of the prediction. First, calculate the first difference trend of the prediction model using historical data to reflect the overall change of the prediction difference of the model in the past period of time; then, calculate the second difference trend based on the current real-time data and historical data to reflect the change of the prediction difference of the model in the near future. Combine the first difference trend and the second difference trend to determine whether the above prediction value needs to be corrected. If the two trend directions are the same (for example, both show that the prediction value is too low or too high), then the prediction value may need to be corrected. If correction is needed, calculate the correction amount, which can be determined based on the first difference trend, the second difference trend, and preset correction parameters, and will be described in detail below. After calculating the correction amount, correct the first prediction result and the second prediction result to obtain the corrected prediction value. Combining the two difference trends to correct the prediction value is to comprehensively consider the performance of the model on different time scales, improve the accuracy and reliability of the prediction, and ensure that the prediction result can better reflect the actual situation and adapt to future changes.

[0061] Step S5: Based on the first data, historical first data, the first prediction result, and the second prediction result, calculate and based on the trend line of the first data changing over time, predict the quality of the aluminum alloy casting.

[0062] Specifically, based on the corrected predicted values of the time series, calculate the regression line to reflect the changing trend of the predicted values over time and other variables. Using the regression line and the corrected predicted values to predict the future trend of the quality of the aluminum alloy casting helps the enterprise to understand potential problems in the production process in advance and take corresponding measures for adjustment and optimization. Evaluate the prediction result according to the trend line of the first data (which may be historical data of various parameters or indicators related to the production of aluminum alloy castings) changing over time. The trend line can reflect the overall trend of the data over time and other variables, but it cannot completely determine the specific future values because there will always be some random fluctuations or factors not considered. To quantify this uncertainty, a floating range can be calculated, which can be determined based on the slope and intercept of the trend line and the volatility of the data (such as the standard deviation). Usually, a confidence level (such as 95%) is selected, and then calculate the range within which the predicted value may fall at this confidence level, and that range is the floating range of the prediction result. The floating range can give a reasonable range of the predicted value. Next, use the trend line of the first data changing over time and a preset threshold to predict the quality of the aluminum alloy casting. The quality of the aluminum alloy casting includes multiple aspects, such as appearance quality, dimensional accuracy, mechanical properties, casting shrinkage rate, and alloy composition, etc. During the prediction process, if the predicted value of a certain aspect exceeds the preset threshold, it is considered that there may be a problem with the quality of this aspect, and corresponding preventive measures or production parameters are adjusted to ensure the quality. This solution provides strong support for the production of aluminum alloy castings by calculating the floating range of the prediction result and predicting the quality of the aluminum alloy casting based on the trend line and the preset threshold.

[0063] In the embodiments of the present application, through the cooperation between the above steps, the accuracy of predicting the quality of aluminum alloy castings can be significantly improved, providing strong support for the production quality control of aluminum alloy castings.

[0064] Further, in step S4, calculating the first difference trend includes:

[0065] Obtain the data of the first time period from the historical second data as the third data, based on the first prediction model, obtain the third prediction result corresponding to the third data, obtain the fourth prediction result corresponding to the third data based on the second prediction model, calculate the first prediction average value of the third prediction result and the fourth prediction result, calculate the first difference between the first prediction average value and the quality of the aluminum alloy casting corresponding to the third data, and based on the first difference, calculate the difference trend of the first difference changing over time.

[0066] Specifically, by combining the results of the first prediction model and the second prediction model, the difference between the first predicted average value related to the quality of the aluminum alloy casting and the actual quality is calculated, as Figure 3 shown; based on the changing trend of this difference over time, more accurate error analysis and trend prediction are provided for the quality prediction of the aluminum alloy casting, and the errors generated by the prediction model in different time periods are obtained.

[0067] Furthermore, in step S4, calculating the second difference trend includes:

[0068] Obtain the data of the second time period from the historical second data as the fourth data. The end time point of the second time period is the same as the end time point of the first time period, and the length of the second time period is equal to 1 / M of the length of the first time period. M represents a positive integer greater than or equal to 2 and less than or equal to H / 2, and H represents the data volume of the historical second data, with a value range of 1000 to 1 million;

[0069] Based on the first prediction model and the second prediction model, obtain the fifth prediction result and the sixth prediction result corresponding to the fourth data respectively, calculate the second predicted average value of the fifth prediction result and the sixth prediction result, calculate the second difference between the second predicted average value and the quality of the aluminum alloy casting corresponding to the fourth data, and based on the second difference, calculate the difference trend of the second difference changing with time.

[0070] Specifically, first, select the data of a specific second time period from the historical second data as the fourth data. The selection of the second time period is conditional: the end time point of the second time period is the same as that of the first time period, and its length is equal to 1 / M of the length of the first time period, where M is a positive integer greater than or equal to 2 and less than or equal to H / 2, and H represents the total amount of historical second data. Ensuring that the second time period is aligned with the first time period in time, and at the same time, the length of the second time period is controllable and relatively short, which helps to observe and analyze the changing trend of data over time more carefully. Next, based on the already trained first prediction model and second prediction model, obtain the fifth prediction result and the sixth prediction result corresponding to the fourth data respectively. These two prediction models can capture the characteristics and laws of data from different angles and levels, thereby improving the accuracy and reliability of prediction. Then, calculate the second prediction average value of the fifth prediction result and the sixth prediction result. The average value can be regarded as a comprehensive manifestation of the prediction results of the two models for the fourth data. Next, calculate the second difference between the second prediction average value and the actual aluminum alloy casting quality corresponding to the fourth data. The difference reflects the difference or error between the prediction result and the actual quality. Finally, based on this second difference, calculate the difference trend of its change over time. Through trend analysis, the changing law of the prediction error over time can be revealed, thereby providing a basis for correcting the prediction result. By comparing the prediction results and the actual quality in different time periods, a more accurate basis for correcting the error can be provided.

[0071] Furthermore, in step S4, judging whether the prediction result needs to be corrected based on the first difference trend and the second difference trend includes:

[0072] Obtain the first correction direction of the prediction result in the first difference trend and the second correction direction in the second difference trend. If the directions of the first correction direction and the second correction direction are the same, it is determined that the prediction result needs to be corrected; otherwise, the prediction result does not need to be corrected.

[0073] Specifically, first, determine the prediction results corresponding to two time points and their respective correction directions in the first difference trend and the second difference trend. The first time point can be understood as the time point relatively close to the current time for the current prediction, and the corresponding prediction result is obtained through the first prediction model. The second time point can be understood as the time point relatively far from the current time for the current prediction, and the corresponding prediction result is obtained through the second prediction model. Then, check the performance of this prediction result in the first difference trend. The first difference trend reflects the change trend of the difference between the prediction result and the actual quality within a relatively long time period (i.e., the first time period). If the prediction result shows a direction that needs to be adjusted (such as continuously being too high or too low) in the first difference trend, record this direction at this time and use it as the first correction direction. Then, similarly, check the performance of this prediction result in the second difference trend. The second difference trend is calculated based on data within a shorter time period (i.e., the second time period), and it provides a more detailed view of the change of the prediction error over time. If the prediction result also shows the same adjustment requirement as the first correction direction in the second difference trend, it further strengthens the signal that the prediction result may need to be corrected. Finally, compare the first correction direction and the second correction direction. If the two directions are the same, it means that the prediction result shows a consistent error trend both in the long time period and the short time period. Therefore, it is determined that the prediction result needs to be corrected. On the contrary, if the two correction directions are different, or one of the directions has no clear adjustment requirement, then it is considered that the current prediction result does not need to be corrected immediately. By combining the difference trend analysis within different time periods, the correction amount required for the prediction result can be calculated more accurately.

[0074] Further, in step S4, calculating the correction amount of the prediction result and correcting the prediction result based on the correction amount includes:

[0075] When the prediction result needs to be corrected, calculate the weighted average of the first difference trend and use it as the correction amount of the prediction result, and correct the prediction result based on the correction amount.

[0076] Specifically, when the prediction result is determined to require correction, first calculate the weighted average of the first difference trend. This step involves weighting the differences between the prediction results and the actual quality within a first time period (e.g., the past few hours or days). The purpose of weighting is to give higher weights to data closer to the current time point because such data can better reflect the current production status and trends. After calculating the weighted average, this value is determined as the correction amount for the prediction result. Next, correct the prediction result based on this correction amount. The correction process may involve simple mathematical operations, such as adding the correction amount to the original prediction result or adjusting it according to a specific correction algorithm. The corrected prediction result is closer to the actual quality, thereby improving the accuracy and reliability of the prediction. Taking aluminum alloy die-casting production as an example, assume that the prediction result at a certain moment is that the quality of the casting is qualified. However, based on the analysis of the first difference trend, it is found that the prediction results have generally been on the high side in the past period (i.e., the predicted quality is better than the actual quality). At this time, by calculating the weighted average of the first difference trend, a negative correction amount is obtained, indicating that the prediction result needs to be adjusted downward. After applying this correction amount to the original prediction result, the corrected prediction result may be closer to the actual quality situation, thus avoiding potential quality problems caused by overly optimistic predictions. By providing a mechanism for dynamically adjusting the prediction result, monitoring and analyzing the difference trend between the prediction result and the actual quality in real time, this application can timely detect prediction errors and take corresponding correction measures. It not only improves the accuracy and reliability of the prediction but also provides a more refined quality control means for the production process of aluminum alloy castings.

[0077] Further, in step S5, calculating the trend line of the first data changing with time includes:

[0078] Taking the time in the historical first data as the first variable and any one data item in the historical first data as the second variable, and respectively calculating the average value of the first variable and the average value of the second variable;

[0079] Calculating the first distance between each data value in the historical first data and the average value of the first variable corresponding to the first variable, and the second distance between the second variable and the average value of the second variable;

[0080] Calculating the inclination degree of the trend line of the second variable changing with the first variable and the intersection point of the trend line of the first data changing with the first variable and the y-axis. Based on the intersection point of the trend line of the first data changing with the first variable and the y-axis and the inclination degree of the trend line of the second variable changing with the first variable, calculate the trend line of the first data changing with the first variable according to formula 1: y = α + x·b, where y represents the prediction result, x represents the corresponding time point, α represents the intersection point of the trend line of the first data changing with the first variable and the y-axis, and b represents the inclination degree of the trend line of the second variable changing with the first variable.

[0081] Specifically, calculating the inclination degree of the trend line of the second variable changing with the first variable includes:

[0082] Based on Formula 4: Calculate the inclination degree of the trend line of the second variable changing with the first variable, where b represents the inclination degree of the trend line of the second variable changing with the first variable, d1 represents the first distance, d2 represents the second distance, n represents the number of data values corresponding to all the first variables or second variables in the historical first data, and i represents the data value of the i-th first variable or second variable in the historical first data.

[0083] Calculating the intersection point of the trend line of the first data changing with the first variable and the y-axis includes:

[0084] Based on Formula 5: α = v2 - b * v1, calculate the intersection point of the trend line of the first data changing with the first variable and the y-axis, where v1 represents the average value of the first variable and v2 represents the average value of the second variable.

[0085] Furthermore, in step S5, calculating the upper and lower floating intervals of the prediction result includes:

[0086] Based on the data volume of the historical first data, determine the degree of upper and lower floating of the prediction result, count the data volume of the historical first data, and calculate the average value and standard deviation of the historical first data;

[0087] Based on the degree of upper and lower floating of the prediction result and the data volume of the historical first data, determine the critical value corresponding to the upper and lower floating intervals;

[0088] Based on Formula 2: Calculate the standard error of the average value of the historical first data, where c represents the standard error of the average value of the historical first data, s represents the standard deviation of the historical first data, and n represents the data volume of the historical first data;

[0089] Based on the average value, standard error of the historical first data and the critical value corresponding to the upper and lower floating intervals, based on Formula 3: Calculate the upper and lower limits of the floating interval, where, represents the average value of the historical first data, Z represents the critical value corresponding to the upper and lower floating intervals, and β represents the degree of upper and lower floating.

[0090] Embodiment 2:

[0091] The above described the method for real-time prediction of the quality of aluminum alloy castings based on the Internet of Things in the embodiments of the present application. Next, the system for real-time prediction of the quality of aluminum alloy castings based on the Internet of Things in the embodiments of the present application will be described. Please refer to Figure 4 One embodiment of the system for real-time prediction of the quality of aluminum alloy castings based on the Internet of Things in the embodiments of the present application includes:

[0092] A data acquisition unit, configured to transmit, in real time, the first data in the production process of aluminum alloy castings collected by each type of sensor to a data processing unit through Internet of Things technology;

[0093] An attribute extraction unit, configured to preprocess the first data, extract specific attributes that can reflect the quality of aluminum alloy castings from the first data, and generate the second data in the production process of aluminum alloy castings based on the specific attributes;

[0094] A first prediction unit, configured to train a first prediction model and a second prediction model based on historical first data and historical second data, input the real-time acquired first data and second data into the first prediction model and the second prediction model respectively, and obtain a first prediction result and a second prediction result respectively;

[0095] A correction unit, configured to calculate based on historical second data, and determine whether the prediction result needs to be corrected based on a first difference trend and a second difference trend. When correction is required, calculate and correct the prediction result based on the correction amount of the prediction result. The prediction result includes the first prediction result and the second prediction result;

[0096] A second prediction unit, configured to calculate based on the first data, historical first data, first prediction result and second prediction result, and predict the quality of aluminum alloy castings based on the trend line of the first data changing with time.

[0097] Through the collaborative cooperation of the above-mentioned various components, the accuracy of predicting the quality of aluminum alloy castings is significantly improved, providing strong support for the production quality control of aluminum alloy castings.

[0098] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described system, system and unit can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0099] If the integrated unit is implemented in the form of 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 this 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 enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0100] As described above, the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of various embodiments of this application.

Claims

1. A real-time prediction method for aluminum alloy casting quality based on the Internet of Things, characterized in that: The method comprises: Step S1: using the Internet of Things technology, the first data collected by each type of sensor in the aluminum alloy casting production process is transmitted to the data processing unit in real time; Step S2: preprocessing the first data, extracting specific attributes that can reflect the quality of the aluminum alloy casting from the first data, and generating second data in the production process of the aluminum alloy casting based on the specific attributes; Step S3: training a first prediction model and a second prediction model based on the historical first data and the historical second data, inputting the first data and the second data acquired in real time into the first prediction model and the second prediction model respectively, and obtaining a first prediction result and a second prediction result respectively; Step S4: Based on the second historical data, calculate and determine whether the prediction result needs to be corrected based on the first difference trend and the second difference trend; if correction is needed, calculate and correct the prediction result based on the correction amount of the prediction result, wherein the prediction result includes the first prediction result and the second prediction result; Step S5: Based on the first data, the historical first data, the first prediction result and the second prediction result, calculate and predict the quality of the aluminum alloy casting based on a trend line of the first data changing over time.

2. The method according to claim 1, characterized in that: In step S4, calculating the first difference trend includes: Acquire data of a first time period from the historical second data as third data, acquire a third prediction result corresponding to the third data based on the first prediction model, acquire a fourth prediction result corresponding to the third data based on the second prediction model, calculate a first prediction average of the third prediction result and the fourth prediction result, calculate a first difference between the first prediction average and the quality of the aluminum alloy casting corresponding to the third data, and calculate a difference trend of the first difference over time based on the first difference.

3. The method according to claim 2, characterized in that In step S4, calculating the second difference trend includes: acquiring data of a second time period from the historical second data as fourth data, the time point at which the second time period ends is the same as the time point at which the first time period ends, the length of the second time period is equal to 1 / M of the length of the first time period, M represents a positive integer greater than or equal to 2 and less than or equal to H / 2, and H represents the data volume of the historical second data; Based on the first prediction model and the second prediction model, the fifth prediction result and the sixth prediction result corresponding to the fourth data are respectively obtained, the second prediction average of the fifth prediction result and the sixth prediction result is calculated, the second difference between the second prediction average and the aluminum alloy casting quality corresponding to the fourth data is calculated, and based on the second difference, the difference trend of the second difference over time is calculated.

4. The method according to claim 1, characterized in that: In the step S4, judging whether the prediction result needs to be corrected based on the first difference trend and the second difference trend includes: Obtain a first correction direction of the prediction result in the first difference trend and a second correction direction in the second difference trend respectively. If the first correction direction and the second correction direction are the same, determine that the prediction result needs to be corrected, otherwise the prediction result does not need to be corrected.

5. The method according to claim 1, characterized in that In the step S4, calculating the correction amount of the prediction result, and correcting the prediction result based on the correction amount, includes: When the prediction result needs to be corrected, a weighted average value of the first difference trend is calculated and used as a correction amount of the prediction result, and the prediction result is corrected based on the correction amount.

6. The method according to claim 1, characterized in that In the step S5, calculating the trend line of the first data changing over time includes: Taking the time in the first historical data as a first variable and any data item in the first historical data as a second variable, respectively calculating the average value of the first variable and the average value of the second variable; Calculate a first distance between the first variable and an average value of the first variable, and a second distance between the second variable and an average value of the second variable corresponding to each data value in the historical first data; Calculate the inclination of the trend line of the second variable changing with the first variable and the intersection of the trend line of the first data changing with the first variable and the y-axis. Based on the intersection of the trend line of the first data changing with the first variable and the y-axis and the inclination of the trend line of the second variable changing with the first variable, calculate the trend line of the first data changing with the first variable based on Formula 1: y=α+x·b, wherein y represents the prediction result, x represents the corresponding time point, α represents the intersection of the trend line of the first data changing with the first variable and the y-axis, and b represents the inclination of the trend line of the second variable changing with the first variable.

7. The method according to claim 1, characterized in that In step S5, calculating the upper and lower floating ranges of the prediction results includes: Based on the data volume of the first historical data, determining the degree of fluctuation of the prediction result, counting the data volume of the first historical data, and calculating the average value and standard deviation of the first historical data; Determining a critical value corresponding to an upper and lower floating interval based on the degree of the upper and lower floating of the prediction result and the data volume of the first historical data; Based on Formula 2: Calculating the standard error of the average value of the historical first data, where c represents the standard error of the average value of the historical first data, s represents the standard deviation of the historical first data, and n represents the data volume of the historical first data; Based on the average value of the first historical data, the standard error and the critical value corresponding to the upper and lower floating ranges, based on Formula 3: Calculate the upper and lower limits of the floating interval, where represents the average value of the historical first data, Z represents the critical value corresponding to the upper and lower floating interval, and β represents the upper and lower floating degree.

8. The method according to claim 6, characterized in that Calculating the inclination of the trend line of the second variable changing with the first variable includes: Based on Formula 4: Calculate the inclination of the trend line of the second variable changing with the first variable, where b represents the inclination of the trend line of the second variable changing with the first variable, d1 represents the first distance, d2 represents the second distance, n represents the number of data values ​​corresponding to all the first variables or second variables in the historical first data, and i represents the data value of the i-th first variable or second variable in the historical first data.

9. The method according to claim 6, characterized in that Calculating the intersection point of a trend line of the first data changing with the first variable and the y-axis includes: Based on Formula 5: α=v2-b*v1, the intersection of the trend line of the first data changing with the first variable and the y-axis is calculated, v1 represents the average value of the first variable, and v2 represents the average value of the second variable.

10. A real-time prediction system for aluminum alloy casting quality based on the Internet of Things, used to implement the method according to any one of claims 1 to 9, characterized in that: The system includes the following modules: A data acquisition unit, used to transmit the first data in the production process of the aluminum alloy castings collected by each type of sensor to a data processing unit in real time through the Internet of Things technology; an attribute extraction unit, configured to preprocess the first data, extract specific attributes that can reflect the quality of the aluminum alloy casting from the first data, and generate second data in the production process of the aluminum alloy casting based on the specific attributes; A first prediction unit, used to train a first prediction model and a second prediction model based on the historical first data and the historical second data, input the first data and the second data acquired in real time into the first prediction model and the second prediction model respectively, and obtain a first prediction result and a second prediction result respectively; a correction unit, configured to calculate based on the historical second data, and based on the first difference trend and the second difference trend, determine whether the prediction result needs to be corrected, and when correction is needed, calculate and correct the prediction result based on the correction amount of the prediction result, wherein the prediction result includes the first prediction result and the second prediction result; The second prediction unit is used to calculate and predict the quality of the aluminum alloy casting based on a trend line of the first data changing over time based on the first data, the historical first data, the first prediction result and the second prediction result.

Citation Information

Patent Citations

  • Hub low-pressure casting quality monitoring method and device and electronic equipment

    CN113510234A

  • Power load prediction method for realizing error correction mechanism based on LSTM-XGBoost

    CN116739118A

  • Aluminum alloy casting manufacturing quality real-time prediction method based on data mining

    CN116823054A

  • Integrated aluminum alloy structural part casting quality prediction method, electronic equipment and medium

    CN117649906A

  • Continuous casting slab longitudinal crack prediction method based on gradient lifting tree

    CN118211143A