Methods, apparatus, equipment and storage media for hardening treatment of castings
By constructing a vector regression model and Fisher algorithm projection, the chemical composition of castings can be quickly determined, solving the problems of time-consuming, labor-intensive, and resource-wasting methods in existing technologies, and achieving efficient adjustment of casting hardness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SINO TRUK JINAN POWER CO LTD
- Filing Date
- 2022-12-29
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, when customizing castings with specific hardness, the 'trial and error method' is used, which is time-consuming, labor-intensive, and wasteful of resources, and it is impossible to quickly find castings that meet the hardness requirements.
By acquiring the Brinell hardness and chemical composition of historical castings, a vector regression model is constructed using a genetic algorithm to screen out the target chemical elements that have the greatest impact on Brinell hardness. Then, the Fisher algorithm is used to project the chemical composition of these elements onto a two-dimensional plane to determine the target projection distribution range, thereby quickly finding the chemical composition that meets the preset hardness.
It enables the rapid identification of chemical compositions corresponding to different casting hardnesses, saving testing time and reducing costs.
Smart Images

Figure CN116049656B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data mining technology, and in particular to a method, apparatus, equipment and storage medium for hardening castings. Background Technology
[0002] With the increasing demand for customized automobiles, various castings with different hardness are required to complete the customization process. Since the chemical composition of castings affects their hardness, it is necessary to adjust the chemical composition of castings to meet the requirements of different hardness levels during automobile customization.
[0003] In existing technologies, the production of new materials with specific hardness is usually done using a "trial and error" method, which means that castings are first made according to a certain chemical composition, and then the hardness of the castings is tested to see if it meets the requirements.
[0004] However, the existing "trial and error method" has the drawbacks of being time-consuming, labor-intensive, and wasteful of resources because it requires the casting to be made first, and the casting may not meet the hardness requirements; if it does not meet the requirements, a new casting needs to be made. Summary of the Invention
[0005] This application provides a casting hardness treatment method, apparatus, equipment, and storage medium to solve the defects of the existing "trial and error method" in finding new castings with a hardness lower than the preset hardness, which is time-consuming, labor-intensive, and wasteful of resources.
[0006] In a first aspect, this application provides a method for hardening castings, including:
[0007] Obtain historical attribute information of multiple historical castings, including the Brinell hardness and chemical composition of the castings;
[0008] The target chemical element is obtained by constructing a vector regression model based on a genetic algorithm. The target chemical element contributes more to the Brinell hardness than other chemical elements.
[0009] Obtain multiple first historical castings with Brinell hardness less than a preset hardness and multiple second historical castings with hardness greater than or equal to the preset hardness;
[0010] The target chemical components corresponding to the target chemical elements of the first historical casting and the second historical casting are projected onto a two-dimensional plane using the Fisher algorithm to obtain the target projection distribution range. If the projection point of the target chemical component of the new casting onto the two-dimensional plane is located within the target projection distribution range, then the Brinell hardness of the new casting meets the preset requirements.
[0011] Optionally, the vector regression model constructed based on the genetic algorithm to obtain the target chemical element includes:
[0012] The search process involves randomly selecting the chemical composition of historical castings and the corresponding Brinell hardness using a genetic algorithm.
[0013] Modeling process: Using the chemical composition of the historical castings as independent variables and the Brinell hardness as the target variable, a vector regression model of the casting hardness is established using the support vector regression algorithm.
[0014] Obtain the loss function of the vector regression model. If the loss function does not converge, repeat the search process and the modeling process until the loss function converges. Stop the iteration and take the chemical element corresponding to the chemical component at the time of convergence as the target chemical element.
[0015] Optionally, the step of projecting the target chemical components corresponding to the target chemical elements of the first historical casting and the second historical casting onto a two-dimensional plane using the Fisher algorithm to obtain the target projection distribution range includes:
[0016] The target chemical components corresponding to the target chemical elements of the first historical casting and the second historical casting are projected onto a two-dimensional plane using the Fisher algorithm, resulting in multiple projection points distributed on the two-dimensional plane. The projection distributions of the first historical casting and the second historical casting on the two-dimensional plane are different.
[0017] Obtain the distribution range of the projection points of the first historical casting on the two-dimensional plane, and use the distribution range as the target projection distribution range.
[0018] Optionally, the step of projecting the target chemical composition corresponding to the target chemical elements of the first historical casting and the second historical casting onto a two-dimensional plane using the Fisher algorithm includes:
[0019] The abscissa of the target chemical component in the two-dimensional plane is obtained according to the first linear combination;
[0020] The ordinate of the target chemical component in the two-dimensional plane is obtained according to the second linear combination;
[0021] The first linear combination and the second linear combination are used to make the projection distributions of the first historical casting and the second historical casting different on the two-dimensional plane.
[0022] Optionally, the first linear combination includes a first linear scalar for each target chemical component, and the second linear combination includes a second linear scalar for each target chemical component.
[0023] Optionally, obtaining the distribution range of the projection points of the first historical casting on the two-dimensional plane includes:
[0024] Obtain the projection boundary points of the first historical casting on the two-dimensional plane; wherein, the projection boundary points include horizontal coordinate boundary points and vertical coordinate boundary points;
[0025] The distribution interval is obtained based on the horizontal coordinate boundary point and the vertical coordinate boundary point.
[0026] Optionally, obtaining the distribution interval based on the horizontal coordinate boundary point and the vertical coordinate boundary point includes:
[0027] If the projection point distribution of the second historical casting is adjacent to the projection point distribution of the first historical casting in the vertical coordinate direction, then the vertical coordinate boundary of the distribution interval is determined according to the vertical coordinate boundary point.
[0028] The horizontal coordinate boundary points are expanded outward to obtain new horizontal coordinate boundary points, and the horizontal coordinate boundaries of the distribution interval are determined based on the new horizontal coordinate boundary points.
[0029] Secondly, this application provides a casting hardening treatment apparatus, comprising:
[0030] The acquisition module is used to acquire historical attribute information of multiple historical castings, including the Brinell hardness and chemical composition of the castings;
[0031] The processing module is used to obtain the target chemical element based on the vector regression model constructed by the genetic algorithm, wherein the target chemical element contributes more to the Brinell hardness than other chemical elements.
[0032] The acquisition module is also used to acquire a plurality of first historical castings with a Brinell hardness less than a preset hardness and a plurality of second historical castings with a hardness greater than or equal to the preset hardness.
[0033] The processing module is further configured to project the target chemical components corresponding to the target chemical elements of the first historical casting and the second historical casting onto a two-dimensional plane using the Fisher algorithm to obtain a target projection distribution range; wherein, if the projection point of the target chemical component of the new casting onto the two-dimensional plane is located within the target projection distribution range, then the Brinell hardness of the new casting meets the preset requirements.
[0034] Optionally, the processing module is specifically used for
[0035] The search process involves randomly selecting the chemical composition of historical castings and the corresponding Brinell hardness using a genetic algorithm.
[0036] Modeling process: Using the chemical composition of the historical castings as independent variables and the Brinell hardness as the target variable, a vector regression model of the casting hardness is established using the support vector regression algorithm.
[0037] Obtain the loss function of the vector regression model. If the loss function does not converge, repeat the search process and the modeling process until the loss function converges. Stop the iteration and take the chemical element corresponding to the chemical component at the time of convergence as the target chemical element.
[0038] Optionally, the processing module is specifically used to project the target chemical components corresponding to the target chemical elements of the first historical casting and the second historical casting onto a two-dimensional plane using the Fisher algorithm, to obtain multiple projection points distributed on the two-dimensional plane, wherein the projection distributions of the first historical casting and the second historical casting on the two-dimensional plane are different.
[0039] The acquisition module is further configured to acquire the distribution range of the projection points of the first historical casting on the two-dimensional plane, and use the distribution range as the target projection distribution range.
[0040] Optionally, the acquisition module is further configured to acquire the abscissa of the target chemical component in the two-dimensional plane according to a first linear combination; and acquire the ordinate of the target chemical component in the two-dimensional plane according to a second linear combination; wherein the first linear combination and the second linear combination are used to make the projection distribution of the first historical casting and the second historical casting different in the two-dimensional plane.
[0041] Optionally, the first linear combination includes a first linear scalar for each target chemical component, and the second linear combination includes a second linear scalar for each target chemical component.
[0042] Optionally, the acquisition module is further configured to acquire the projection boundary points of the first historical casting on the two-dimensional plane; wherein the projection boundary points include horizontal coordinate boundary points and vertical coordinate boundary points; and acquire the distribution range based on the horizontal coordinate boundary points and the vertical coordinate boundary points.
[0043] Optionally, the device further includes: a determining module;
[0044] The determining module is used to determine the ordinate boundary of the distribution interval based on the ordinate boundary point when the projection point distribution of the second historical casting is adjacent to the projection point distribution of the first historical casting in the ordinate direction.
[0045] The processing module is also used to expand the horizontal coordinate boundary point to obtain a new horizontal coordinate boundary point.
[0046] The determining module is also used to determine the horizontal coordinate boundary of the distribution interval based on the new horizontal coordinate boundary point.
[0047] Thirdly, this application provides a casting hardening treatment apparatus, comprising:
[0048] Memory;
[0049] processor;
[0050] The memory stores computer-executed instructions;
[0051] The processor executes computer execution instructions stored in the memory to implement the casting hardness treatment method as described in the first aspect and various possible implementations of the first aspect above.
[0052] Fourthly, this application provides a computer storage medium storing computer execution instructions thereon, which are executed by a processor to implement the casting hardening treatment method as described in the first aspect and various possible implementations of the first aspect.
[0053] This application provides a method for hardness treatment of castings. The method involves acquiring historical attribute information from multiple historical castings, including the Brinell hardness and chemical composition of the castings; obtaining target chemical elements based on a vector regression model constructed using a genetic algorithm; acquiring multiple first historical castings with Brinell hardness less than a preset hardness and multiple second historical castings with Brinell hardness greater than or equal to the preset hardness; projecting the target chemical composition corresponding to the target chemical element of the first and second historical castings onto a two-dimensional plane using the Fisher algorithm to obtain a target projection distribution range; wherein, if the projection point of the target chemical composition of a new casting onto the two-dimensional plane is located within the target projection distribution range, then the Brinell hardness of the new casting meets the preset requirements; thus, the chemical composition corresponding to different casting hardnesses can be quickly found, saving experimental time and reducing costs. Attached Figure Description
[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0055] Figure 1 This is the flow chart of the casting hardening treatment method provided in this application. Figure 1 ;
[0056] Figure 2 This is the flow chart of the casting hardening treatment method provided in this application. Figure 2 ;
[0057] Figure 3 This is a schematic diagram of the loss function of the vector regression model provided in this application;
[0058] Figure 4 This is a two-dimensional projection diagram of the target chemical component provided in this application.
[0059] Figure 5 This is the flow chart of the casting hardening treatment method provided in this application. Figure 3 ;
[0060] Figure 6 This is a schematic diagram of the casting hardening treatment device provided in this application;
[0061] Figure 7 This is a schematic diagram of the casting hardening treatment equipment provided in this application.
[0062] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0064] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein.
[0065] As people's living standards improve, the demand for customized automobiles is increasing. Customizing automobiles requires the use of various castings with different hardness levels. Since the chemical composition of the castings affects their hardness, the chemical composition of the castings needs to be adjusted to meet the requirements of different hardness levels during automobile customization.
[0066] In existing technologies, the production of new materials with specific hardness is usually done using a "trial and error" method, which means that castings are first made according to a certain chemical composition, and then the hardness of the castings is tested to see if it meets the requirements.
[0067] However, the existing "trial and error method" has the drawbacks of being time-consuming, labor-intensive, and wasteful of resources because it requires the casting to be made first, and the casting may not meet the hardness requirements; if it does not meet the requirements, a new casting needs to be made.
[0068] To address the aforementioned issues, this application provides a method for processing casting hardness. By acquiring the Brinell hardness and chemical composition of historical castings, and using a genetic algorithm to construct a vector regression model to obtain the target chemical element with the greatest influence on Brinell hardness, the Fisher algorithm is employed to project the target chemical elements corresponding to the target chemical components of historical castings with different hardnesses onto a two-dimensional plane, obtaining target projection intervals. Based on these target projection intervals, the target chemical composition of the new casting is determined, thereby enabling the production of castings with a preset hardness. This method can identify the chemical element with the greatest influence on casting hardness, and then deduce the correspondence between hardness and target chemical composition based on the target chemical components and hardness of the target chemical elements in historical castings. This allows for the rapid identification of the chemical composition corresponding to different casting hardnesses, saving experimental time and reducing costs.
[0069] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0070] Figure 1 The flow chart of the casting hardening treatment method provided in the embodiments of this application Figure 1 .like Figure 1 As shown, the casting hardening treatment method provided in this embodiment includes:
[0071] S101: Obtain historical attribute information of multiple historical castings, including the Brinell hardness and chemical composition of the castings.
[0072] The chemical composition of a casting refers to the content of chemical elements used in its production. For example, the chemical composition of casting 1 is: Cu (copper): 0.319g / 100g, Si (silicon): 2.43g / 100g, indicating that every 100g of casting 1 contains 0.319g of Cu and 2.43g of Si. Currently, 23 chemical elements are known to be present in castings: Cu, Si, Mn, Sn, Cr, C, Ni, Mo, S, Mg, Al, P, Ti, V, Pb, As, Ce, Bi, Zr, Sb, B, La, and Nb.
[0073] The principle of Brinell hardness testing is to apply a specific test force F (N) to press a hardened steel ball or cemented carbide ball with a diameter D (mm) into the surface of the metal being tested. After maintaining the pressure for a specified time, the test force is removed, and the average diameter d (mm) of the indentation is measured using a reading microscope. The Brinell hardness HB value is then calculated using a formula, or the HB value can be found in a prepared Brinell hardness table based on d. The determination of Brinell hardness is existing technology; please refer to the existing technical records for details.
[0074] S102: Based on the vector regression model constructed by the genetic algorithm, the target chemical element is obtained, and the contribution of the target chemical element to the Brinell hardness is greater than that of other chemical elements.
[0075] Among them, the genetic algorithm is a randomized search method that evolved from the evolutionary laws of the biological world (survival of the fittest, the genetic mechanism of natural selection). The genetic algorithm can select candidate solutions with higher fitness and discard those with lower fitness. For details on the computation process of the genetic algorithm in this embodiment, please refer to existing genetic algorithm computation processes.
[0076] In this step, a vector regression model can be established based on a genetic algorithm, and the hardness and chemical composition of historical castings can be input into the vector regression model to obtain the target chemical elements. There are multiple target chemical elements, such as copper (Cu), tin (Sn), silicon (Si), manganese (Mn), and chromium (Cr).
[0077] Understandably, the target chemical element refers to the chemical element that has a significant impact on hardness. The essence of this step is to use a genetic algorithm to screen the chemical elements of historical castings, thereby selecting the target chemical element with the strongest adaptability (and greatest impact).
[0078] S103: Obtain a plurality of first historical castings with Brinell hardness less than a preset hardness and a plurality of second historical castings with hardness greater than or equal to the preset hardness.
[0079] The preset hardness can be, for example, a hardness set by the user. Historical castings can be categorized, with those having a hardness lower than the preset hardness designated as first-generation historical castings, and those having a hardness greater than or equal to the preset hardness designated as second-generation historical castings. The purpose of this step is to categorize the castings.
[0080] For example: if a user needs to produce castings with a hardness less than 238HB, the preset hardness is 238HB, the first historical casting is a historical casting with a hardness less than 238HB, and the second historical casting is a historical casting with a hardness greater than or equal to 238HB.
[0081] S104: The target chemical components corresponding to the target chemical elements of the first historical casting and the second historical casting are projected onto a two-dimensional plane using the Fisher algorithm to obtain the target projection distribution range; wherein, if the projection point of the target chemical component of the new casting onto the two-dimensional plane is located within the target projection distribution range, then the Brinell hardness of the new casting meets the preset requirements.
[0082] Fisher's algorithm, also known as Fisher's linear discrimination, mainly works by projecting the given training sample set onto a straight line, making the projection points of similar samples as close as possible and the projection points of dissimilar samples as far apart as possible. Thus, when classifying new samples, they are projected onto the same straight line, and the category of the new sample is determined based on the position of the projection points.
[0083] There are multiple target chemical components corresponding to the target chemical elements. In this step, the target chemical components of the first historical casting and the second historical casting are projected onto a two-dimensional plane. The horizontal and vertical coordinates of the two-dimensional plane can be, for example, the sum of multiple target chemical components, or multiple target chemical components set according to preset rules. This application does not limit this, as long as multiple target chemical components can be projected onto the two-dimensional plane.
[0084] Since the projection is performed using the Fisher algorithm, the representation on the two-dimensional plane is as follows: the chemical components of multiple first historical castings are projected close to each other on the two-dimensional plane, the chemical components of multiple second historical castings are projected close to each other on the two-dimensional plane, and the projection distances between the chemical components of the first historical castings and the chemical components of the second historical castings on the two-dimensional plane are relatively far.
[0085] For example, when the target chemical elements are copper (Cu), tin (Sn), silicon (Si), manganese (Mn), and chromium (Cr), the target chemical composition of the historical castings is five. The first historical casting is a historical casting with a hardness lower than a preset hardness produced by the target chemical composition corresponding to the above five target chemical elements, and the second historical casting is a historical casting with a hardness greater than or equal to the preset hardness produced by the target chemical composition corresponding to the above five target chemical elements. In this case, it is necessary to project the five-dimensional target chemical composition onto a two-dimensional plane. Since the target chemical composition of each historical casting is different, the projection positions of different historical castings on this two-dimensional plane are also different. Furthermore, since the influence of the target chemical elements on hardness is constant, the projection distribution ranges of the first historical casting with a hardness lower than the preset hardness and the second historical casting with a hardness greater than or equal to the preset hardness on this two-dimensional plane are also different. Therefore, the target projection distribution range can be determined based on the projection distribution ranges of the first and second historical castings on this two-dimensional plane. Preferably, since current vehicle customization generally requires castings with lower hardness, the target projection distribution range can, for example, be the projection distribution range of the first historical casting.
[0086] The casting hardness processing method provided in this embodiment obtains historical attribute information of multiple historical castings, including the Brinell hardness and chemical composition of the castings; obtains a target chemical element based on a vector regression model constructed using a genetic algorithm, wherein the target chemical element contributes more to the Brinell hardness than other chemical elements; obtains multiple first historical castings with Brinell hardness less than a preset hardness and multiple second historical castings with Brinell hardness greater than or equal to the preset hardness; projects the target chemical composition corresponding to the target chemical element of the first historical castings and the second historical castings onto a two-dimensional plane using the Fisher algorithm to obtain a target projection distribution range; wherein, if the projection point of the target chemical composition of a new casting onto the two-dimensional plane is located within the target projection distribution range, then the Brinell hardness of the new casting meets the preset requirements; thereby, the chemical composition corresponding to different casting hardnesses can be quickly found, saving experimental time and reducing costs.
[0087] Figure 2 The flow chart of the casting hardening treatment method provided in the embodiments of this application Figure 2 This embodiment is... Figure 1 Based on the examples, the method for hardening castings is described in detail. For example... Figure 2 As shown, the casting hardening treatment method provided in this embodiment includes:
[0088] S201: Obtain historical attribute information for multiple historical castings.
[0089] Step S201 is similar to step S101 above, and will not be repeated here.
[0090] S202: Execute the search process: randomly select the chemical composition of historical castings and the Brinell hardness corresponding to the chemical composition using a genetic algorithm.
[0091] The search process targets multiple historical castings. The Brinell hardness corresponding to the chemical composition is the Brinell hardness of the historical casting. In the search process, a genetic algorithm is used to randomly select a predetermined number of chemical compositions corresponding to 23 chemical elements from the historical castings, along with their corresponding Brinell hardnesses.
[0092] For example: randomly select 5 chemical elements (Cu, Si, Mn, Sn, Ni) from 23 chemical elements to determine their corresponding chemical composition and the corresponding Brinell hardness of the casting.
[0093] S203: Execute the modeling process: Using the chemical composition of the historical casting as the independent variable and the Brinell hardness as the target variable, a vector regression model of the casting hardness is established using the support vector regression algorithm.
[0094] In this process, after randomly selecting chemical components and their corresponding Brinell hardness, the chemical components and their corresponding Brinell hardness are input into a vector regression model. A vector regression model for the casting hardness is then established, with the chemical component as the independent variable and the Brinell hardness as the target variable.
[0095] S204: Obtain the loss function of the vector regression model. If the loss function does not converge, repeat the search process and the modeling process until the loss function converges, stop the iteration, and take the chemical element corresponding to the chemical component at the time of convergence as the target chemical element.
[0096] The chemical composition is input into the vector regression model, which outputs the estimated hardness calculated based on the input chemical composition. Then, the loss function is obtained based on the estimated hardness and the Brinell hardness corresponding to the chemical composition.
[0097] Figure 3 This is a schematic diagram of the loss function of the vector regression model given in this embodiment. Figure 3 As shown, the horizontal axis of the loss function represents Brinell hardness (i.e., the hardness of historical castings), and the vertical axis represents the estimated hardness calculated based on the chemical composition. This loss function can, for example, estimate the average relative error between hardness and Brinell hardness.
[0098] If the loss function fails to converge, it indicates that the current vector regression model lacks sufficient predictive power and cannot accurately predict hardness based on chemical composition. In this case, the vector regression model also cannot accurately identify the chemical components that significantly affect hardness. Therefore, the search and modeling processes need to be repeated until the loss function converges, at which point the iteration stops.
[0099] If the loss function converges, it indicates that the current vector regression model can accurately predict hardness based on the chemical composition, meaning that the current chemical composition has a significant impact on hardness. Therefore, the chemical element corresponding to the chemical composition at the point of convergence can be used as the target chemical element.
[0100] For example: Five chemical elements (Cu, Si, Mn, Sn, Ni) are randomly selected from 23 chemical elements, along with their corresponding Brinell hardness for the casting. The chemical compositions of Cu, Si, Mn, Sn, and Ni are input into a vector regression model to obtain the estimated hardness. If the estimated hardness differs significantly from the Brinell hardness, meaning the loss function has not converged, Ni can be replaced with other chemical elements, and the modeling process can be repeated. When five chemical elements (Cu, Si, Mn, Sn, Cr) are selected, along with their corresponding Brinell hardness for the casting, and input into the vector regression model, the estimated hardness is close to the Brinell hardness, meaning the loss function has converged. Therefore, the target chemical elements are determined to be Cu, Si, Mn, Sn, and Cr.
[0101] S205: Obtain a plurality of first historical castings with Brinell hardness less than a preset hardness and a plurality of second historical castings with hardness greater than or equal to the preset hardness.
[0102] Step S205 is similar to step S103 above, and will not be described again here.
[0103] S206: Using the Fisher algorithm, the target chemical elements corresponding to the target chemical components of the first historical casting and the second historical casting are projected onto a two-dimensional plane to obtain multiple projection points distributed on the two-dimensional plane.
[0104] Specifically, the target chemical groups corresponding to the target chemical elements of the first and second historical castings are projected onto a two-dimensional plane according to the Fisher algorithm to obtain the projection points of the target chemical components of each historical casting.
[0105] It is understandable that the projection distribution of the first and second historical castings on this two-dimensional plane is different.
[0106] Optionally, the specific implementation of projecting the target chemical element onto a two-dimensional plane can be as follows: obtaining the abscissa of the target chemical component in the two-dimensional plane according to a first linear combination; and obtaining the ordinate of the target chemical component in the two-dimensional plane according to a second linear combination.
[0107] The first linear combination and the second linear combination are used to make the projection distributions of the first historical casting and the second historical casting different on the two-dimensional plane. The first linear combination includes a first linear scalar for each target chemical component, and the second linear combination includes a second linear scalar for each target chemical component.
[0108] Figure 4 This is a two-dimensional projection diagram of the target chemical component given in this embodiment. For example... Figure 4 As shown, the horizontal axis of the two-dimensional projection represents the first linear combination, and the vertical axis represents the second linear combination. Circular projection points represent the projection points of the first historical casting, and square projection points represent the projection points of the second historical casting.
[0109] The first linear combination X can be expressed by the following formula:
[0110] X = A1a1 + B1b1 + ... + N1n1
[0111] Where A1, B1...N1 are linear scalars, a1, b1...n1 are different target chemical components, N is the last linear scalar corresponding to the total number of target chemical components, and n is the last target chemical component corresponding to the total number of target chemical components, where n is greater than or equal to 1.
[0112] For example, when there are 5 target chemical components (Cu, Si, Mn, Sn, Cr), N is E, which is the last (5th) linear scalar; n is Cr, which is also the last (5th) target chemical component. Then...
[0113] X = A1Cu + B1Si + C1Mn + D1Sn + E1Cr
[0114] The second linear combination Y can be expressed by the following formula:
[0115] Y = A2a1 + B2b1 + ... + N2n1
[0116] Where A2, B2...N2 are linear scalars, a1, b1...n1 are different target chemical components, N is the last linear scalar corresponding to the total number of target chemical components, and n is the last target chemical component corresponding to the total number of target chemical components, and n is greater than or equal to 1.
[0117] For example, when there are 5 target chemical components (Cu, Si, Mn, Sn, Cr), N is E, which is the last (5th) linear scalar; n is Cr, which is also the last (5th) target chemical component. Then...
[0118] Y = A₂Cu + B₂Si + C₂Mn + D₂Sn + E₂Cr
[0119] It is understandable that the linear scalars A1, B1...N1 and A2, B2...N2 in the above formula may be the same or different. In the above formula, the determination of the linear scalars is to ensure that a first historical casting with a hardness less than a preset hardness and a second historical casting with a hardness greater than or equal to a preset hardness can be projected onto different positions on a two-dimensional plane. That is, to make the projection points of the first historical casting as close as possible, the projection points of the second historical casting as close as possible, and the projection points of the first historical casting and the second historical casting as far apart as possible. The specific method for determining the linear scalars is similar to the algorithm for determining the projection direction in existing Fisher linear discriminant analysis. This embodiment projects the multidimensional component onto a two-dimensional plane. This application does not limit the specific method for determining the linear scalars, as long as the multidimensional component can be projected onto a two-dimensional plane, and the projection points of the first historical casting and the second historical casting are as close as possible, and the projection points of the first historical casting and the second historical casting are as far apart as possible.
[0120] By substituting the target chemical component into the first and second linear combinations mentioned above, the projection points of the historical castings on the two-dimensional plane can be obtained.
[0121] S207: Obtain the distribution range of the projection points of the first historical casting on the two-dimensional plane, and use the distribution range as the target projection distribution range.
[0122] In this process, after obtaining the projection points of the first historical casting and the second historical casting on the two-dimensional plane, the distribution range of the projection points of the first historical casting on the two-dimensional plane is obtained. Since the castings required for car customization have low hardness, the distribution range of the first historical casting with a hardness lower than the preset hardness can be used as the target projection distribution range.
[0123] In this step, for example, the boundary coordinates of the target projection distribution range can be determined based on the projection points of the historical castings located at the boundary in the first historical casting, or the concentrated area of the projection points of the first historical casting can be used as the target projection distribution range. This application does not impose any special restrictions on this.
[0124] See also Figure 4 The circular projection point is the projection point of the first historical casting, according to Figure 4 It can be seen that the projection points of the first historical casting are mainly concentrated at the bottom of the projection diagram, that is, the area within the frame.
[0125] Since most of the projection points within the target projection distribution range are projection points of the first historical casting, as long as the projection of the target chemical composition of the new cast iron produced is within the target projection distribution range on the two-dimensional plane, a new cast iron with a strength lower than the preset strength can be obtained.
[0126] The casting hardness processing method provided in this embodiment obtains the loss function of a vector regression model. When the loss function converges, the target chemical element is determined. Based on the distribution of projection points of the first historical casting with a hardness lower than the preset hardness on a two-dimensional plane, the target projection distribution interval is determined. Thus, when manufacturing a new casting with a hardness lower than the preset hardness, it is only necessary to ensure that the projection points of the target chemical component of the new casting on the two-dimensional plane are within the target projection distribution interval to make the Brinell hardness of the new casting meet the preset requirements. This method avoids the time-consuming, labor-intensive, and resource-wasting defects of the existing "trial and error method" in finding new castings with a hardness lower than the preset hardness. It achieves rapid identification of the chemical components corresponding to different casting hardnesses, saves experimental time, and reduces costs.
[0127] Figure 5 The flow chart of the casting hardening treatment method provided in the embodiments of this application Figure 3 This embodiment is... Figure 2 Based on the embodiments, the distribution range of the projection points of the first historical casting on the two-dimensional plane is described in detail. For example... Figure 5 As shown, the casting hardening treatment method provided in this embodiment includes:
[0128] S301: Obtain the projection boundary points of the first historical casting on a two-dimensional plane; wherein, the projection boundary points include horizontal coordinate boundary points and vertical coordinate boundary points.
[0129] Among them, the projection boundary point refers to the projection point with the smallest x-coordinate, smallest y-coordinate, largest x-coordinate, and largest y-coordinate among all the first historical castings.
[0130] The purpose of obtaining the projection boundary points of the first historical casting in this step is to determine the approximate location of the target projection distribution range, so as to adjust the horizontal and vertical coordinates based on the approximate location.
[0131] S302: When the projection point distribution of the second historical casting is adjacent to the projection point distribution of the first historical casting in the vertical coordinate direction, the vertical coordinate boundary of the distribution interval is determined according to the vertical coordinate boundary point.
[0132] Where the projection point distribution of the second historical casting and the projection point distribution of the first historical casting are adjacent in the vertical axis direction, that is... Figure 4 In the scenario shown, the projection points of the second historical casting are mostly distributed in the upper half of the projection diagram, while the projection points of the first historical casting are mostly distributed in the lower half. Therefore, it can be assumed that the distribution of projection points of the second historical casting is adjacent to that of the first historical casting in the vertical axis direction. In this case, the vertical axis boundary points can be used as the vertical axis boundaries of the target projection distribution range.
[0133] S303: Expand the horizontal coordinate boundary points to obtain new horizontal coordinate boundary points, and determine the horizontal coordinate boundary of the distribution interval based on the new horizontal coordinate boundary points.
[0134] Since the projection point distribution of the second historical casting and the first historical casting are not adjacent in the horizontal axis direction, the horizontal axis boundary points can be expanded outward to obtain new horizontal axis boundary points. These new boundary points are then used to determine the horizontal axis boundary of the target projection distribution range. This is done to ensure that the target projection distribution range includes more first historical castings while providing some redundancy for the target chemical composition of the new castings to be produced.
[0135] The casting hardness processing method provided in this embodiment, by processing the horizontal and vertical coordinate boundaries differently, makes the distribution range of the projection points of the first historical castings on the two-dimensional plane more accurate, thereby enabling the determined target projection distribution range to include more first historical castings, providing conditions for the subsequent production of new castings with hardness less than the preset hardness.
[0136] Figure 6 This is a schematic diagram of the casting hardening treatment device provided in this application. Figure 6 As shown, this application provides a casting hardening treatment apparatus 300, which includes:
[0137] The acquisition module 301 is used to acquire historical attribute information of multiple historical castings, including the Brinell hardness and chemical composition of the castings;
[0138] Processing module 302 is used to obtain a target chemical element based on a vector regression model constructed by a genetic algorithm, wherein the target chemical element contributes more to the Brinell hardness than other chemical elements;
[0139] The acquisition module 302 is also used to acquire a plurality of first historical castings with Brinell hardness less than a preset hardness and a plurality of second historical castings with hardness greater than or equal to the preset hardness.
[0140] The processing module 302 is further configured to project the target chemical components corresponding to the target chemical elements of the first historical casting and the second historical casting onto a two-dimensional plane using the Fisher algorithm to obtain a target projection distribution range; wherein, if the projection point of the target chemical component of the new casting onto the two-dimensional plane is located within the target projection distribution range, then the Brinell hardness of the new casting meets the preset requirements.
[0141] Optionally, the processing module 302 is specifically used for
[0142] The search process involves randomly selecting the chemical composition of historical castings and the corresponding Brinell hardness using a genetic algorithm.
[0143] Modeling process: Using the chemical composition of the historical castings as independent variables and the Brinell hardness as the target variable, a vector regression model of the casting hardness is established using the support vector regression algorithm.
[0144] Obtain the loss function of the vector regression model. If the loss function does not converge, repeat the search process and the modeling process until the loss function converges. Stop the iteration and take the chemical element corresponding to the chemical component at the time of convergence as the target chemical element.
[0145] Optionally, the processing module 302 is specifically used to project the target chemical components corresponding to the target chemical elements of the first historical casting and the second historical casting onto a two-dimensional plane using the Fisher algorithm to obtain multiple projection points distributed on the two-dimensional plane, wherein the projection distributions of the first historical casting and the second historical casting on the two-dimensional plane are different.
[0146] The acquisition module 301 is further configured to acquire the distribution range of the projection points of the first historical casting on the two-dimensional plane, and use the distribution range as the target projection distribution range.
[0147] Optionally, the acquisition module 301 is further configured to acquire the abscissa of the target chemical component in the two-dimensional plane according to a first linear combination; and acquire the ordinate of the target chemical component in the two-dimensional plane according to a second linear combination; wherein the first linear combination and the second linear combination are used to make the projection distribution of the first historical casting and the second historical casting different in the two-dimensional plane.
[0148] Optionally, the first linear combination includes a first linear scalar for each target chemical component, and the second linear combination includes a second linear scalar for each target chemical component.
[0149] Optionally, the acquisition module 301 is further configured to acquire the projection boundary points of the first historical casting on the two-dimensional plane; wherein the projection boundary points include horizontal coordinate boundary points and vertical coordinate boundary points; and acquire the distribution range based on the horizontal coordinate boundary points and the vertical coordinate boundary points.
[0150] Optionally, the device further includes: a determining module 303;
[0151] The determining module 303 is used to determine the ordinate boundary of the distribution interval based on the ordinate boundary point when the projection point distribution of the second historical casting is adjacent to the projection point distribution of the first historical casting in the ordinate direction.
[0152] The processing module 302 is also used to perform outward expansion processing on the horizontal coordinate boundary point to obtain a new horizontal coordinate boundary point;
[0153] The determining module 303 is also used to determine the horizontal coordinate boundary of the distribution interval based on the new horizontal coordinate boundary point.
[0154] Figure 7 This is a schematic diagram of the casting hardening treatment equipment provided in this application. Figure 7 As shown, this application provides a casting hardening treatment device 400, which includes: a receiver 401, a transmitter 402, a processor 403, and a memory 404.
[0155] Receiver 401 is used to receive instructions and data;
[0156] Transmitter 402 is used to send commands and data;
[0157] Memory 404 is used to store instructions executed by the computer;
[0158] The processor 403 is used to execute computer execution instructions stored in the memory 404 to implement the various steps of the casting hardness treatment method in the above embodiments. For details, please refer to the relevant descriptions in the foregoing embodiments of the casting hardness treatment method.
[0159] Alternatively, the memory 404 can be either standalone or integrated with the processor 403.
[0160] When the memory 404 is set up independently, the electronic device also includes a bus for connecting the memory 404 and the processor 403.
[0161] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the casting hardening treatment method performed by the casting hardening treatment device described above.
[0162] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0163] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
Claims
1. A method for hardening castings, characterized in that, include: Obtain historical attribute information of multiple historical castings, including the Brinell hardness and chemical composition of the castings; The target chemical element is obtained by constructing a vector regression model based on a genetic algorithm. The target chemical element contributes more to the Brinell hardness than other chemical elements. Obtain multiple first historical castings with Brinell hardness less than a preset hardness and multiple second historical castings with hardness greater than or equal to the preset hardness; The target chemical components corresponding to the target chemical elements of the first historical casting and the second historical casting are projected onto a two-dimensional plane using the Fisher algorithm, resulting in multiple projection points distributed on the two-dimensional plane. The projection distributions of the first historical casting and the second historical casting on the two-dimensional plane are different. Obtain the projection boundary points of the first historical casting on the two-dimensional plane; wherein, the projection boundary points include horizontal coordinate boundary points and vertical coordinate boundary points; If the projection point distribution of the second historical casting is adjacent to the projection point distribution of the first historical casting in the vertical coordinate direction, then the vertical coordinate boundary of the distribution interval is determined according to the vertical coordinate boundary point. The horizontal coordinate boundary points are expanded to obtain new horizontal coordinate boundary points. The horizontal coordinate boundary of the distribution range is determined based on the new horizontal coordinate boundary points, and the distribution range is used as the target projection distribution range. If the projection point of the target chemical composition of the new casting onto the two-dimensional plane is located within the target projection distribution range, then the Brinell hardness of the new casting meets the preset requirements.
2. The method according to claim 1, characterized in that, The vector regression model constructed based on the genetic algorithm yields the target chemical element, including: The search process involves randomly selecting the chemical composition of historical castings and the corresponding Brinell hardness using a genetic algorithm. Modeling process: Using the chemical composition of the historical castings as independent variables and the Brinell hardness as the target variable, a vector regression model of the casting hardness is established using the support vector regression algorithm. Obtain the loss function of the vector regression model. If the loss function does not converge, repeat the search process and the modeling process until the loss function converges. Stop the iteration and take the chemical element corresponding to the chemical component at the time of convergence as the target chemical element.
3. The method according to claim 1, characterized in that, The step of projecting the target chemical composition corresponding to the target chemical elements of the first historical casting and the second historical casting onto a two-dimensional plane using the Fisher algorithm includes: The abscissa of the target chemical component in the two-dimensional plane is obtained according to the first linear combination; The ordinate of the target chemical component in the two-dimensional plane is obtained according to the second linear combination; The first linear combination and the second linear combination are used to make the projection distributions of the first historical casting and the second historical casting different on the two-dimensional plane.
4. The method according to claim 3, characterized in that, The first linear combination includes a first linear scalar for each target chemical component, and the second linear combination includes a second linear scalar for each target chemical component.
5. A casting hardening treatment device, characterized in that, The device includes: The acquisition module is used to acquire historical attribute information of multiple historical castings, including the Brinell hardness and chemical composition of the castings; The processing module is used to obtain the target chemical element based on the vector regression model constructed by the genetic algorithm, wherein the target chemical element contributes more to the Brinell hardness than other chemical elements. The acquisition module is also used to acquire a plurality of first historical castings with a Brinell hardness less than a preset hardness and a plurality of second historical castings with a hardness greater than or equal to the preset hardness. The processing module is further configured to project the target chemical components corresponding to the target chemical elements of the first historical casting and the second historical casting onto a two-dimensional plane using the Fisher algorithm, obtaining multiple projection points distributed on the two-dimensional plane, wherein the projection distributions of the first historical casting and the second historical casting on the two-dimensional plane are different; obtain the projection boundary points of the first historical casting on the two-dimensional plane; wherein the projection boundary points include horizontal coordinate boundary points and vertical coordinate boundary points; if the projection point distribution of the second historical casting is adjacent to the projection point distribution of the first historical casting in the vertical coordinate direction, then the vertical coordinate boundary of the distribution interval is determined according to the vertical coordinate boundary points; perform outward expansion processing on the horizontal coordinate boundary points to obtain new horizontal coordinate boundary points, determine the horizontal coordinate boundary of the distribution interval according to the new horizontal coordinate boundary points, and take the distribution interval as the target projection distribution interval; wherein, if the projection points of the target chemical components of the new casting onto the two-dimensional plane are located within the target projection distribution interval, then the Brinell hardness of the new casting meets the preset requirements.
6. A casting hardness treatment device, characterized in that, include: Memory; processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the casting hardness treatment method as described in any one of claims 1-4.
7. A computer storage medium, characterized in that, The computer storage medium stores computer execution instructions, which, when executed by a processor, are used to implement the casting hardness treatment method as described in any one of claims 1-4.