Method, device, electronic device and storage medium for optimizing whole milk powder production
By acquiring nutritional data from milk tanks and utilizing complementary grouping and precise process parameter calculations, the production of whole milk powder was optimized. This solved the problem of balancing quality and economic benefits in whole milk powder production, achieving automated and standardized production, and improving product quality stability and economic efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INNER MONGOLIA MENGNIU DAIRY IND (GROUP) CO LTD
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-05
AI Technical Summary
In the production of whole milk powder, it is difficult to balance product quality and economic benefits. Existing technologies rely on human experience and lack scientific data-driven and intelligent decision-making mechanisms, resulting in a lack of reliable data support for decision-making during the production process, making it difficult to achieve precise process control and optimization.
By acquiring nutritional data from multiple milk tanks, and based on complementary grouping and precise process parameter calculations, the production of whole milk powder is automated and standardized. The production batch is optimized using a centroid clustering algorithm, and the composition of the raw milk is precisely adjusted to achieve the target nutritional content by combining the maximum separable fat content and lactose addition.
It significantly improved the stability of whole milk powder product quality, avoided quality problems caused by experience-based judgment errors, and achieved cost reduction and efficiency improvement by optimizing the use of raw milk and precisely controlling the process, thus balancing product quality and economic benefits.
Smart Images

Figure CN121809783B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of dairy product manufacturing technology, and in particular to an optimized method, apparatus, electronic device, and storage medium for whole milk powder production. Background Technology
[0002] As people's living standards continue to improve, their requirements for the nutritional value and safety of dairy products are also increasing. Whole milk powder, as an important dairy product, requires strict control over various indicators during its production process to ensure product quality and safety.
[0003] In related technologies, the production of whole milk powder generally faces the challenge of balancing product quality control with economic benefits. For example, milk powder production decisions rely on manual experience, raw material utilization is low, cost control is rudimentary, and process adjustments are imprecise.
[0004] Therefore, how to balance product quality and economic benefits in the production of whole milk powder has become a technical problem that the industry urgently needs to solve. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, and storage medium for optimizing the production of whole milk powder, which addresses the technical problem of balancing product quality and economic benefits during the production of whole milk powder.
[0006] This application provides an optimized method for the production of whole milk powder, including:
[0007] Obtain nutritional data of raw milk from multiple milk tanks;
[0008] Based on the complementarity of the nutritional composition data of the raw milk in each milk tank, the multiple milk tanks are grouped to obtain the production batch corresponding to each milk tank; the difference between the nutritional composition data of the raw milk after mixing of each production batch and the target nutritional composition data is less than the preset difference; the target nutritional composition data is determined based on the whole milk powder product specifications.
[0009] Based on the differences between the nutritional composition data of raw milk in each production batch and the target nutritional composition data, process adjustment parameters for adjusting the nutritional composition of raw milk in each production batch are determined.
[0010] Based on the process adjustment parameters for each production batch, whole milk powder is produced from the raw milk of each production batch.
[0011] In some embodiments, grouping the multiple milk tanks based on the complementarity of nutritional data of the raw milk in each milk tank to obtain the production batch corresponding to each milk tank includes:
[0012] A number of candidate groups are determined, and centroid clustering is performed for each candidate group to divide the multiple milk tanks into multiple groups; the distance between each milk tank in the centroid clustering is determined based on the complementarity between the nutritional composition data of the raw milk in each milk tank.
[0013] After clustering at the centroids corresponding to the number of candidate groups, the evaluation index for each candidate group is determined. The evaluation index includes the silhouette coefficient for evaluating the rationality of the clustering structure and the intra-batch mixing error for evaluating the degree of deviation between the raw milk mixed in each group and the target nutrient data.
[0014] Based on the grouping evaluation index corresponding to each candidate group number, the optimal group number is determined from the multiple candidate group numbers, and the production batch corresponding to each milk tank is determined based on the grouping result corresponding to the optimal group number.
[0015] In some embodiments, the distances between individual milk cans in the centroid cluster are determined based on the following steps:
[0016] Based on the nutritional data of the raw milk in the two milk tanks, the absolute difference in the values of each nutritional indicator between the two milk tanks is calculated, and the absolute difference is weighted and summed based on the weight coefficients corresponding to each nutritional indicator to obtain the weighted difference between the two milk tanks; the weight coefficients are used to reflect the importance of the nutritional indicators.
[0017] Based on the complementarity between the nutritional composition data of the raw milk in the two milk tanks, a complementary direction factor between the two milk tanks is determined.
[0018] The distance between the two milk tanks is determined by combining the weighted difference and complementary direction factor.
[0019] In some embodiments, determining the complementary direction factor between the two milk tanks based on the complementarity of the nutritional composition data of the raw milk in the two milk tanks includes:
[0020] The nutritional composition data of raw milk in each milk can is compared with the target nutritional composition data to obtain a deviation vector representing the direction and magnitude of the deviation of the nutritional composition of raw milk in each milk can.
[0021] Based on the cosine similarity between the deviation vectors of the two milk cans, the complementary direction factor between the two milk cans is determined.
[0022] In some embodiments, determining process adjustment parameters for adjusting the nutritional composition of raw milk in each production batch based on the difference between the nutritional composition data of each production batch and the target nutritional composition data includes:
[0023] Based on the differences between the nutritional composition data of raw milk from each production batch and the target nutritional composition data, the maximum separable fat content and / or lactose addition amount are determined.
[0024] Based on the maximum separable fat content and / or the lactose addition amount, process adjustment parameters are determined for adjusting the nutritional composition of raw milk in each production batch.
[0025] In some embodiments, the nutritional data includes at least one of total milk volume, protein content, lipid content, and non-fat solids content;
[0026] After obtaining the nutritional composition data of raw milk from multiple milk tanks, the method further includes:
[0027] The nutritional composition data of the raw milk in the multiple milk tanks are preprocessed; the preprocessing includes at least one of missing value processing, outlier processing and normalization processing.
[0028] In some embodiments, the method further includes:
[0029] The nutritional composition data of raw milk in each milk tank, the production batch corresponding to each milk tank, and the process adjustment parameters of each production batch are stored in the database.
[0030] In response to user input in the user interface, the data in the database is displayed visually.
[0031] This application provides an optimized device for whole milk powder production, comprising:
[0032] The acquisition module is used to acquire nutritional data of raw milk from multiple milk tanks;
[0033] The grouping module is used to group the multiple milk tanks based on the complementarity of the nutritional composition data of the raw milk in each milk tank, thereby obtaining the production batch corresponding to each milk tank; the difference between the nutritional composition data of the raw milk after mixing of each production batch and the target nutritional composition data is less than a preset difference; the target nutritional composition data is determined based on the whole milk powder product specifications;
[0034] The adjustment module is used to determine process adjustment parameters for adjusting the nutritional composition of raw milk in each production batch based on the difference between the nutritional composition data of each production batch and the target nutritional composition data.
[0035] The production module is used to produce whole milk powder from raw milk in each production batch by adjusting the process parameters for each production batch.
[0036] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the whole milk powder production optimization method.
[0037] This application provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the whole milk powder production optimization method described above.
[0038] The whole milk powder production optimization method, apparatus, electronic equipment, and storage medium provided in this application, based on the nutritional composition data of raw milk, transform the original production process that relied on manual experience into a data-driven, quantifiable, and standardized automated production process through scientific complementary grouping and precise process parameter calculation. This not only significantly improves the stability of whole milk powder product quality and avoids product quality problems caused by erroneous judgment, but also achieves the economic goal of cost reduction and efficiency improvement through optimized utilization of raw milk and precise control of the process, thus balancing product quality and economic benefits in the whole milk powder production process. Attached Figure Description
[0039] 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.
[0040] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart illustrating the optimized production method for whole milk powder provided in this application.
[0042] Figure 2 This is a schematic diagram of the structure of the whole milk powder production optimization device provided in this application.
[0043] Figure 3 This is a schematic diagram of the structure of the whole milk powder production system based on multi-objective optimization provided in this application.
[0044] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0045] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0046] It should be noted that the terms "first," "second," etc., used in this application 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 the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps, units, or modules is not necessarily limited to those explicitly listed, but may include other steps, units, or modules not explicitly listed or inherent to such processes, methods, products, or devices.
[0047] The following shortcomings exist in the production of whole milk powder using related technologies:
[0048] (1) Traditional whole milk powder production methods often rely on manual experience and lack scientific data-driven and intelligent decision-making mechanisms, making it difficult to simultaneously consider product quality and economic benefits.
[0049] (2) The whole milk powder production system has shortcomings in data collection and analysis, and the completeness and accuracy of the data need to be improved. This results in a lack of reliable data support for decision-making in the production process, making it difficult to achieve precise process control and optimization.
[0050] (3) The formulation design of whole milk powder often adopts a single milk source and single component formulation system, which makes it difficult to provide comprehensive and high-quality nutrients and cannot meet the diverse nutritional needs of infants and adults.
[0051] (4) The relevant technologies still have shortcomings in the optimization of protein composition and processing ratio, making it difficult to achieve precise control of protein and non-fat solids, which affects the nutritional value and quality of the product.
[0052] (5) Traditional production methods lack precise control over the addition of fat and lactose, making it difficult to effectively control costs while ensuring product quality, which limits further improvement in production efficiency.
[0053] In order to address the shortcomings of related technologies, Figure 1This is a flowchart illustrating the optimized production method for whole milk powder provided in this application, as shown below. Figure 1 As shown, the method includes steps 110, 120, 130 and 140.
[0054] Step 110: Obtain nutritional data of raw milk from multiple milk tanks.
[0055] Specifically, the entity executing the whole milk powder production optimization method provided in this application is a whole milk powder production optimization device or system. This device can be implemented through software, such as a whole milk powder production optimization program; or it can be a device executing the whole milk powder production optimization method, such as a computer or server.
[0056] Raw milk is typically stored in different physical containers, such as raw milk transport vehicles or raw milk storage tanks in factories. In this embodiment, these containers are collectively referred to as milk tanks.
[0057] Nutritional data refers to core indicators that characterize the quality and composition of raw milk in a milk can. Nutritional data should include at least: total milk volume (e.g., in kilograms or tons), protein content (e.g., percentage %), lipid content (also known as fat content, e.g., percentage %), and non-fat solids content (e.g., percentage %). Of course, nutritional data may also include, but is not limited to, other indicators that affect product quality or processing, such as lactose content, acidity, and total bacterial count.
[0058] There are various ways to obtain nutritional data. For example, the system can automatically and periodically retrieve data from Enterprise Resource Planning (ERP) or Laboratory Information Management Systems (LIMS) via an Application Programming Interface (API). Another approach is to allow operators to import data into the system via file uploads (e.g., uploading spreadsheet files containing laboratory test results). These automatic or semi-automatic methods ensure the comprehensiveness and timeliness of the data, providing a reliable data foundation for subsequent optimization calculations and overcoming the problems of incomplete and inaccurate data collection in related technologies.
[0059] Step 120: Based on the complementarity of the nutritional composition data of the raw milk in each milk tank, the multiple milk tanks are grouped to obtain the production batch corresponding to each milk tank; the difference between the nutritional composition data of the raw milk after mixing of each production batch and the target nutritional composition data is less than the preset difference; the target nutritional composition data is determined based on the whole milk powder product specifications.
[0060] Specifically, a production batch refers to a collection of raw milk from one or more milk tanks that has been mixed and then enters the subsequent production process.
[0061] Complementarity refers to the ability of different milk containers to compensate for differences in their nutritional composition, resulting in a final product that more closely resembles the ideal composition. For example, a container with a high lipid content and a container with a low lipid content are highly complementary because mixing them in a certain ratio will naturally bring the lipid content of the blended milk closer to the specifications required for the target product. Conversely, two containers with both high lipid content do not exhibit complementarity.
[0062] The grouping process can be executed by a grouping algorithm. The algorithm's inputs are the nutritional composition data of all milk cans and the target nutritional composition data. The target nutritional composition data is determined based on the final whole milk powder product specifications. For example, the whole milk powder product specifications might include: a protein content of no less than 26%, a lipid content between 26% and 42%, and a protein content of no less than 34% of non-fat solids. Therefore, the system can set the target nutritional composition data to several specific values, such as a lipid content of 29.0% and a protein content of 34.5% of non-fat solids.
[0063] The goal of the grouping algorithm is to ensure that, within each production batch, the difference between the nutritional composition data (such as weighted average lipid content, protein content, etc.) of the mixed milk from all tanks and the preset target nutritional composition data is less than a predetermined difference. This predetermined difference is an acceptable tolerance range; for example, the difference between the mixed lipid content and the target value can be set to be less than 0.5%.
[0064] By using this complementary grouping, the embodiments of this application can maximize the use of the natural differences between different batches of raw milk to form production batches with nutritional composition closest to the ideal state, laying a solid foundation for subsequent fine-tuning and greatly improving the scientific nature and efficiency of production planning.
[0065] Step 130: Based on the differences between the nutritional composition data of raw milk in each production batch and the target nutritional composition data, determine the process adjustment parameters used to adjust the nutritional composition of raw milk in each production batch.
[0066] Specifically, the process adjustment parameters mainly include the maximum separable fat content (i.e., "fat reduction") and / or the amount of lactose added. The calculation process is as follows:
[0067] The system first virtually mixes the raw milk from all tanks within the production batch and calculates the initial nutritional composition of the mixed milk. Then, it compares this initial nutritional composition with target nutritional data to identify the differences. Based on these differences, the system can determine process adjustment parameters by solving a set of material balance equations. For example, if the lipid content of the mixed milk is higher than the target value, the system will calculate how many kilograms of fat need to be separated to reduce the lipid content of the remaining milk to the target value. Simultaneously, to ensure that the proportion of protein to non-fat solids meets the target, the system may also need to calculate how many kilograms of low-cost lactose need to be added to adjust the total amount of non-fat solids.
[0068] Through this precise calculation, the embodiments of this application solve the problem of imprecise control over fat and lactose in related technologies, enabling effective cost control while ensuring product quality. For example, the separated excess fat can be sold as a high-value by-product (such as whipped cream), thereby increasing economic benefits.
[0069] Step 140: Based on the process adjustment parameters for each production batch, produce whole milk powder from the raw milk of each production batch.
[0070] Specifically, the system will convert the calculated process adjustment parameters into specific control commands that the production equipment can recognize and execute.
[0071] For example, the parameter "remove 30 kg of fat" can be converted into control signals for the centrifuge's speed, running time, or processing flow rate on the production line; the parameter "add 50 kg of lactose" can be converted into start commands and operating frequency / duration for the feeder in the lactose addition system. Upon receiving these commands, the automated equipment on the production line can automatically and precisely complete a series of processes, including adjusting the composition of the raw milk for that batch, sterilization, concentration, and spray drying, ultimately producing whole milk powder products that meet specifications.
[0072] The whole milk powder production optimization method provided in this application, based on the nutritional composition data of raw milk, transforms the original production process that relied on manual experience into a data-driven, quantifiable, and standardized automated production process through scientific complementary grouping and precise process parameter calculation. This not only significantly improves the stability of whole milk powder product quality and avoids product quality problems caused by erroneous judgment, but also achieves the economic goal of cost reduction and efficiency improvement through optimized utilization of raw milk and precise control of the process, thus balancing product quality and economic benefits in the production of whole milk powder.
[0073] It should be noted that each implementation method of this application can be freely combined, rearranged, or executed individually, and does not need to rely on or depend on a fixed execution order.
[0074] In some embodiments, based on the complementarity of nutritional composition data of the raw milk in each milk tank, multiple milk tanks are grouped to obtain the production batch corresponding to each milk tank, including:
[0075] The number of candidate groups is determined, and centroid clustering is performed for each candidate group to divide the multiple milk tanks into multiple groups; the distance between each milk tank in centroid clustering is determined based on the complementarity between the nutritional composition data of the raw milk in each milk tank.
[0076] After clustering the centroids corresponding to the number of candidate groups, the evaluation index for each candidate group is determined. The evaluation index includes the silhouette coefficient, which is used to evaluate the rationality of the cluster group structure, and the intra-batch mixing error, which is used to evaluate the degree of deviation between the raw milk mixed in each group and the target nutrient data.
[0077] Based on the grouping evaluation index corresponding to each candidate grouping quantity, the optimal grouping quantity is determined from multiple candidate grouping quantities, and the production batch corresponding to each milk tank is determined based on the grouping results corresponding to the optimal grouping quantity.
[0078] Specifically, the system will determine a reasonable range for the number of candidate groups. For example, if there are 30 milk cans to be processed, the system can set the range of the number of candidate groups K to [3, 15], that is, try to divide these 30 milk cans into 3 groups, 4 groups, 5 groups... up to 15 groups in turn.
[0079] For each candidate group size K, the system executes a centroid clustering algorithm once, dividing all milk tanks into K groups. In a specific embodiment, the centroid clustering algorithm specifically adopts the K-medoids algorithm, such as the Partitioning Around Medoids (PAM) algorithm. Choosing the K-medoids algorithm has significant technical advantages: its cluster centroids (medoids) must be actual milk tank samples in the dataset, rather than a virtual average value like in the K-means algorithm. This makes the clustering results more practically operable and interpretable. Furthermore, the K-medoids algorithm is insensitive to noise and outliers in the data, is more adaptable to fluctuations that may exist in real-world production data, and has stronger robustness.
[0080] When performing centroid clustering, the distance between milk tanks is not a simple Euclidean distance, but is specifically determined based on the complementarity of the nutritional composition data of the raw milk in each tank. Under this custom distance function, the distance between two milk tanks that can complement each other in terms of nutritional composition is calculated to be smaller. For example, a milk tank with a lipid content 1% higher than the target value and another milk tank with a lipid content 0.9% lower than the target value are "similar" in complementarity, so the distance between them will be small, and they have a very high probability of being grouped into the same group during clustering.
[0081] After performing clustering on each candidate group size K, the system will obtain multiple different grouping schemes (e.g., a grouping scheme with K=3, a grouping scheme with K=4, etc.). To evaluate which scheme is the best, this embodiment uses the silhouette coefficient and intra-batch mixing error as grouping evaluation metrics.
[0082] The silhouette coefficient is a general metric used to evaluate the rationality of cluster grouping structure. It measures the similarity (cohesion) of a cluster to its own group and its similarity (dispersion) to other groups. The silhouette coefficient ranges from -1 to 1. The closer the value is to 1, the better the cohesion and dispersion of the clustering result, i.e., the more rational the grouping structure.
[0083] Intra-batch mixing error is a custom metric tailored to actual production and business objectives. For a specific grouping scheme, the system calculates the deviation between the overall nutritional composition of the raw milk from all tanks within each group (i.e., a future production batch) and the target nutritional composition data after theoretical mixing. This deviation can be quantified, for example, as the weighted sum of squares of the deviations of each component. The smaller this metric value, the better the "inherent foundation" of each production batch formed by this grouping scheme, and the lower the cost and difficulty of subsequent adjustments.
[0084] Finally, the system comprehensively analyzes the two evaluation metrics corresponding to the number K of all candidate groups to determine the optimal number of groups. The chosen strategy is to find a balance point that results in a high profile coefficient (reasonable structure) and low intra-batch mixing error (high achievement of business objectives).
[0085] Once the optimal number of groups is determined, the system uses the corresponding centroid clustering results as the final grouping scheme. Each group in this scheme corresponds to a production batch, and all milk cans within that group are assigned to that production batch.
[0086] The whole milk powder production optimization method provided in this application can avoid the drawbacks of subjectively setting the number of production batches based on experience. By dynamically evaluating both the rationality of the cluster structure and the conformity with production targets, the optimal number of groups and grouping schemes are automatically and scientifically determined in a data-driven manner. This makes the division of production batches more scientific, adaptable, and optimal, and significantly improves the overall efficiency and economic benefits of subsequent production plans.
[0087] In some embodiments, the distances between individual milk cans in the centroid cluster are determined based on the following steps:
[0088] Based on the nutritional data of the raw milk in the two milk tanks, the absolute differences in the values of each nutritional indicator between the two milk tanks are calculated. The absolute differences are then weighted and summed based on the weight coefficients corresponding to each nutritional indicator to obtain the weighted difference between the two milk tanks. The weight coefficients are used to reflect the importance of the nutritional indicators.
[0089] Based on the complementarity between the nutritional composition data of the raw milk in the two milk tanks, the complementary direction factor between the two milk tanks is determined.
[0090] The distance between the two milk tanks is determined by combining the weighted difference and complementary direction factor.
[0091] Specifically, in clustering algorithms of related technologies, distance usually only measures numerical proximity and fails to reflect complementary relationships in business logic. This application addresses this problem by constructing a novel distance function that can simultaneously quantify numerical differences and complementary directions, enabling clustering results to highly match the actual needs of whole milk powder production.
[0092] First, the system calculates the absolute differences in various nutritional components between the two milk containers. For example, if milk container A has a lipid content of 3.8% and milk container B has a lipid content of 3.5%, then the absolute difference in their lipid content is |3.8% - 3.5%| = 0.3%. Similarly, the absolute differences in all other indicators, such as protein content and non-fat solids content, can be calculated.
[0093] Next, the system will perform a weighted sum of these absolute differences based on the weighting coefficients corresponding to each nutritional component indicator. These weighting coefficients are set to reflect the importance of different nutritional components in production control. In whole milk powder production, lipid content and the proportion of protein to non-fat solids are key control points and cost-influencing factors; therefore, their weighting coefficients can be set relatively high. For example, the weight of lipid content can be set to 0.5, the weight of protein content to 0.4, and the weight of other indicators to 0.1.
[0094] By weighted summation, a comprehensive numerical value is obtained, which is referred to as the weighted difference in this embodiment. This value reflects the overall degree of difference between the two milk cans in terms of nutritional content; the larger the value, the greater the difference in their composition. This calculation process is similar to the calculation of the weighted Manhattan distance.
[0095] The system quantifies the complementarity of two milk cans in terms of the direction of nutrient deviation by calculating a complementarity direction factor. The core idea of this factor is: if the nutrient deviations of the two milk cans relative to the target value are in opposite directions, they are strongly complementary, and the factor value should be small (which helps to reduce the final distance); if the deviations are in the same direction, they are not complementary, and the factor value should be large (which will increase the final distance).
[0096] The complementary direction factor can be a value between -1 and 1. When the value is -1, it means that they are completely complementary (for example, one is exactly 1% higher and the other is exactly 1% lower). When the value is 1, it means that they are completely in the same direction (for example, both are 1% higher).
[0097] The system combines the weighted difference and complementary direction factor calculated in the first two steps to obtain the final distance used in the clustering algorithm. In a specific embodiment, the combination operation can be a multiplication operation. For example: Distance = Weighted Difference × (1 + Complementary Direction Factor).
[0098] When two milk cans are perfectly complementary (complementary direction factor approaches -1), (1 + complementary direction factor) approaches 0, which makes the final distance very small, even if their weighted difference (numerical difference) may not be small. This encourages milk cans with complementary components to be grouped together.
[0099] When two milk tanks are not complementary at all, i.e., they deviate in the same direction (complementary direction factor approaches 1), (1 + complementary direction factor) approaches 2, which amplifies the final distance based on the weighted difference. This penalizes milk tanks with similar compositional defects, making them prone to being separated during clustering.
[0100] When there is no obvious complementary or unidirectional relationship between two milk cans (the complementary direction factor approaches 0), the final distance is approximately equal to their weighted difference.
[0101] In other implementations, the combination operation can also be in other functional forms, as long as it can reflect the modulating effect of the complementary direction factor on the weighted difference.
[0102] The whole milk powder production optimization method provided in this application creatively integrates the business logic of component complementarity in the production process into the mathematical model of distance calculation through a combination of weighted difference and complementarity direction factors. This enables the clustering algorithm to truly understand production needs, and its grouping results achieve nutritional component complementarity, providing a solid technical foundation for achieving the optimal production batch combination.
[0103] In some embodiments, a complementarity direction factor between two milk tanks is determined based on the complementarity of nutritional composition data between the raw milk in the two tanks, including:
[0104] The nutritional composition data of raw milk in each milk can is compared with the target nutritional composition data to obtain a deviation vector representing the direction and magnitude of the deviation of the nutritional composition of raw milk in each milk can.
[0105] Based on the cosine similarity between the deviation vectors of the two milk cans, the complementary direction factor between the two milk cans is determined.
[0106] Specifically, firstly, the system can represent the nutritional composition data of each milk can as a vector. For example, if we are focusing on the two indicators of lipid content and protein content, then the nutritional composition data of milk can A can be represented as the vector VA = [lipid content A, protein content A]. Similarly, the target nutritional composition data can also be represented as a target vector V = [target lipid content, target protein content].
[0107] Next, the system compares the nutritional composition data of the raw milk in each milk can with the target nutritional composition data. Specifically, it subtracts the target vector from the nutritional composition vector of the milk can to obtain the deviation vector. For example, the deviation vector DA of milk can A is calculated as follows: DA = VA - V.
[0108] This deviation vector DA precisely describes the direction and magnitude of the deviation in nutritional composition from the target value of milk can A. For example, assuming the target vector is V = [29.0, 26.5], representing the target percentages of lipids and proteins respectively, if milk can A's data is [29.2, 26.4], then its deviation vector DA = [0.2, -0.1]. This means that milk can A's lipid content is 0.2 higher than the target, and its protein content is 0.1 lower than the target. If milk can B's data is [28.7, 26.8], then its deviation vector DA = [0.3, -0.3]. This means that milk can B's lipid content is 0.3 lower than the target, and its protein content is 0.3 higher than the target.
[0109] After obtaining the deviation vector of each milk can, their complementarity can be determined by comparing the deviation vectors of two milk cans. This embodiment uses cosine similarity to perform this determination.
[0110] Cosine similarity is an index that measures the degree of similarity between two offset vectors in terms of direction. Its calculation formula is: CosineSimilarity(DA, DB) = (DA·DB) / (||DA||×||DB||).
[0111] Where DA·DB is the dot product of the vectors, and ||DA|| and ||DB|| are the moduli (lengths) of the two vectors, respectively. The range of cosine similarity is [-1, 1].
[0112] When the value is -1, it indicates that the two deviation vectors are in completely opposite directions. This corresponds to the two milk cans having completely complementary compositional defects. For example, one milk can is "high fat, low protein," and the other is exactly "low fat, high protein."
[0113] When the value is 1, it means that the two deviation vectors are in exactly the same direction. This corresponds to the two milk cans having completely identical compositional defects, with no complementarity whatsoever. For example, both milk cans are "high-fat, low-protein".
[0114] When the value is 0, it means that the two deviation vectors are orthogonal, that is, they have no direct correlation in terms of deviation.
[0115] Therefore, in this embodiment, the cosine similarity between the deviation vectors of two milk cans can be directly defined as the complementary direction factor between them.
[0116] In the above embodiment, distance = weighted difference × (1 + complementary direction factor). If the deviation vectors of milk tank A and milk tank B are in opposite directions (complementary), and the cosine similarity is -1, then 1 + (-1) = 0, and the final distance approaches 0. The clustering algorithm will try its best to group them together. If the deviation vectors of milk tank A and milk tank B are in the same direction (not complementary), and the cosine similarity is 1, then 1 + 1 = 2, and the final distance will be amplified. The clustering algorithm will tend to separate them.
[0117] The whole milk powder production optimization method provided in this application calculates the complementary direction factor by using deviation vector and cosine similarity, which can handle the complex complementary relationships of multi-dimensional nutrients, greatly improving the scientificity and accuracy of the grouping algorithm and providing high-quality input for the entire production optimization process.
[0118] In some embodiments, a greedy strategy may be employed in each round of grouping.
[0119] The greedy strategy immediately selects the container from the remaining containers that makes the current batch mixing index closest to the target value, thus quickly obtaining a feasible solution. However, to avoid the greedy strategy getting trapped in local optima, this embodiment introduces a finite backtracking mechanism: when the batch mixing error exceeds a threshold, it backtracks one step to try selecting a suboptimal container, thereby exploring a better search path. This combination ensures that the algorithm achieves a balance between solution efficiency and global optimization capability.
[0120] In some embodiments, the algorithm ensures that the grouping scheme conforms to the physical and technological limitations of the production equipment through hard constraints (such as an upper limit on the number of milk tanks per batch) and soft constraints (such as a suggested range for ingredient range). During iterative optimization, solutions that violate the constraints are either directly eliminated (hard constraints) or penalized by the objective function value (soft constraints), thereby guiding the grouping towards a feasible and efficient region. These constraints directly determine the size and internal differences of the final groupings, and are a key guarantee that the algorithm results have practical value.
[0121] In some embodiments, based on the differences between the nutritional composition data of raw milk in each production batch and the target nutritional composition data, process adjustment parameters for adjusting the nutritional composition of raw milk in each production batch are determined, including:
[0122] Based on the differences between the nutritional composition data of raw milk in each production batch and the target nutritional composition data, the maximum separable fat content and / or lactose addition amount are determined.
[0123] Based on the maximum separable fat content and / or lactose addition, process adjustment parameters are determined to adjust the nutritional composition of raw milk for each production batch.
[0124] Specifically, for a given production batch, the system first aggregates basic data such as the total amount of raw milk, total protein mass, total fat mass, and total non-fat solids mass of all milk tanks within the batch, and calculates the initial nutritional composition data of the batch after mixing.
[0125] Next, the system compares this initial nutrient composition data with the preset target nutrient composition data to identify the differences. Based on these differences, the system performs precise calculations with the dual objectives of meeting final product quality standards and maximizing economic benefits.
[0126] In one specific embodiment, the calculations mainly revolve around two core operations: defatting (separating fat) and standardization (adding excipients).
[0127] (1) Determine the maximum amount of fat that can be separated (i.e., "fat loss"):
[0128] Whole milk powder products have an upper limit requirement for lipid content. If the initial fat content of a production batch is too high after mixing, defatting is necessary. The system calculates, based on material balance equations, the maximum number of kilograms of fat that can be separated while ensuring the final product's lipid content just does not exceed (or reaches the company's internal control target value) the upper limit. This calculated value is the "maximum separable fat amount." This separated fat (usually in the form of cream) is a high-value byproduct that can be sold separately; therefore, calculating the maximum separable amount aligns with the principle of maximizing economic benefits. If the initial fat content is already within the target range or is low, the maximum separable fat amount is 0.
[0129] (2) Determine the amount of lactose added:
[0130] Another key requirement for whole milk powder product specifications is that the proportion of protein in non-fat solids must reach a lower limit (e.g., ≥34%). After separating some fat, the concentration of non-fat solids will change accordingly. Sometimes, to adjust the total amount of the final product, or to precisely adjust the proportion of protein in non-fat solids to the target value without affecting the total protein content, it is necessary to add excipients. Lactose, due to its relatively low cost and being a natural component of milk, is an ideal adjuster. The system will establish an equation to calculate how many kilograms of lactose need to be added so that the total non-fat solids, composed of protein, lactose, minerals, etc., result in a final protein percentage that precisely meets the relevant requirements. If the calculation indicates that no lactose needs to be added, the amount added is 0.
[0131] The "and / or" here means that, depending on the initial composition of the batch, it may only require fat separation, or only lactose addition, or both. For example, a high-fat, high-protein batch may only require fat separation; a batch with a suitable fat content but a high protein content in non-fat solids may require lactose addition.
[0132] The calculated maximum separable fat content and lactose addition amount are theoretical target values. These target values also need to be translated into specific process adjustment parameters that can be executed by the equipment on the production line.
[0133] For example, if the maximum separable fat amount is calculated to be 30kg, and the efficiency curve of the centrifuge used on the production line is known (i.e., the fat separation rate corresponding to different speeds / processing flow rates), then the system can convert the goal of "separating 30kg of fat" into a specific process adjustment parameter, such as "setting centrifuge A to run at speed X for Y minutes".
[0134] If the calculated "lactose addition amount" is 50kg, the system can convert this target into process adjustment parameters based on the calibration rate of the feeder in the lactose addition system, such as "start feeder B to run at frequency F for Z seconds".
[0135] Furthermore, embodiments of this application also consider various error factors in actual production, dynamically correcting and controlling process adjustment parameters in a closed-loop manner. For example, the system can embed multi-level error control algorithms:
[0136] (1) Feedforward compensation: Based on the historical performance data of the equipment (such as the historical fluctuations of centrifuge efficiency), the process parameters calculated initially are corrected in advance;
[0137] (2) Online feedback closed-loop control: Real-time component monitoring probes (such as near-infrared spectrometers) are installed at key nodes in the degreasing or additive processes (such as centrifuge outlets). The real-time detection values are compared with the target values, and the deviation is input into the proportional-integral-derivative (PID) controller. The controller can dynamically adjust equipment parameters (such as centrifuge speed) and make real-time fine adjustments to the execution process to form closed-loop control;
[0138] (3) Model prediction and tolerance management: The system has built-in model prediction error accumulation and reserves a certain safety tolerance when calculating the initial adjustment amount to ensure that even in the worst case of error superposition, the final product indicators can fall within the qualified range.
[0139] The whole milk powder production optimization method provided in this application determines process adjustment parameters based on the differences between the nutritional composition data of raw milk in each production batch and the target nutritional composition data. This greatly improves the automation level and control precision of the production process, ensures the stability and compliance rate of the quality of each batch of products, and steadily transforms theoretical cost savings and efficiency improvements into reliable real benefits.
[0140] In some embodiments, nutritional data include at least one of total milk volume, protein content, lipid content, and nonfat solids content;
[0141] After obtaining nutritional data on raw milk from multiple milk tanks, the method also includes:
[0142] Nutritional composition data of raw milk from multiple milk tanks are preprocessed; the preprocessing includes at least one of missing value handling, outlier handling, and normalization.
[0143] Specifically, in the optimization process of whole milk powder production, in order to perform effective material balance calculations and quality control, nutritional data can include at least one of the following core indicators:
[0144] (1) Total milk volume: This refers to the total volume or weight of raw milk in the milk tank and is the basis for material balance calculations;
[0145] (2) Protein content: expressed as a percentage, it is one of the core indicators that determines the nutritional value of a product and whether it meets national standards;
[0146] (3) Lipid content: also known as fat content, expressed as a percentage, is a key indicator of whole milk powder and a key point for cost control and by-product value realization;
[0147] (4) Non-fat solids content: expressed as a percentage, refers to all substances in milk other than fat and water, including protein, lactose, minerals, etc. This indicator is crucial for calculating the "proportion of protein in non-fat solids".
[0148] After obtaining the raw milk nutritional composition data from multiple milk tanks containing the aforementioned indicators, this application embodiment further includes a data preprocessing step to ensure the accuracy and robustness of subsequent calculations. The preprocessing step may specifically include one or more of the following operations:
[0149] (1) Handling missing values:
[0150] In actual data collection, equipment malfunctions, human error, or other reasons may cause data gaps for certain indicators in some milk tanks (for example, the lipid content of a certain milk tank may not be recorded). Directly deleting the entire record would result in the loss of valuable information. Therefore, the system can employ various strategies to handle missing values, such as mean imputation, median imputation, and model prediction imputation.
[0151] (2) Outlier handling:
[0152] The raw data may contain some obviously unreasonable outliers or anomalies, such as records showing a lipid content of 20% due to instrument errors or data entry mistakes (normal raw milk is far below this value). These outliers can significantly impact subsequent mean calculations and model training. The system can handle these outliers in various ways, including setting thresholds or using statistical principles to identify data points that deviate too far from the target population. Identified outliers can be deleted or corrected using methods similar to those used for handling missing values.
[0153] (3) Normalization process:
[0154] Because the dimensions and numerical ranges of various nutritional data differ greatly (for example, the total milk volume may be tens of thousands of kilograms, while the protein content is only a few percent), if normalization is not performed, indicators with large numerical ranges (such as total milk volume) will completely dominate the distance calculation, while the role of indicators with small numerical ranges (such as protein content) will be overshadowed, which is obviously not in line with business logic.
[0155] In one specific embodiment, the normalization process employs Z-score normalization. Through Z-score normalization, all indicators are transformed to the same comparable scale, ensuring that in subsequent calculations of weighted differences, each indicator is given equal importance and then plays a role based on its business significance (weight coefficient), thereby guaranteeing the scientific validity and accuracy of the clustering results.
[0156] The whole milk powder production optimization method provided in this application can effectively process raw data, providing a clean, standardized data foundation for subsequent core optimization algorithms (such as intelligent grouping and process parameter calculation). This not only improves the performance and stability of the algorithm itself, but also ensures the reliability and final effect of the entire production optimization scheme from the source.
[0157] In some embodiments, the method further includes:
[0158] The nutritional composition data of raw milk in each milk tank, the production batch corresponding to each milk tank, and the process adjustment parameters of each production batch are stored in the database.
[0159] It responds to user input in the user interface and visualizes the data in the database.
[0160] Specifically, the system will store all key data generated during the optimization process in a structured manner. This data includes at least: the nutritional composition data of the raw milk in each milk tank, the production batch corresponding to each milk tank, and the process adjustment parameters for each production batch.
[0161] This data is stored uniformly in a central database. The type of database can be selected according to actual application needs, such as a relational database or a non-relational database. By persistently storing the data, not only is data loss prevented, but more importantly, a solid data foundation is provided for quality traceability in the production process. For example, when a deviation in the quality of the final product on a certain day is discovered, managers can query the database to precisely trace back to which original milk tanks were mixed with the product, what the original grouping scheme was, and what the calculated process parameters were, thereby quickly locating the root cause of the problem.
[0162] The system will build a web-based user interface. This interface can be developed using front-end frameworks such as Streamlit, Dash, Vue, or React. Users can access this interface through a browser. When users interact with the interface (e.g., clicking buttons, selecting date ranges, entering search criteria), the system will retrieve the corresponding data from the database and display it visually in response to the user's input.
[0163] This user interface can include multiple functional modules, such as:
[0164] (1) Data Dashboard: In the form of charts (such as pie charts, bar charts, line charts) and key indicator cards, it macroscopically displays the overall situation of raw milk to be processed, the composition distribution of milk storage tanks, the pass rate of historical production batches, etc.
[0165] (2) Data import module: Provides a file upload interface or displays the API connection status, allowing users to import or view the latest raw milk data.
[0166] (3) Calculation and Optimization Module: This module provides a button that, when clicked by the user, triggers the execution of the entire algorithm for grouping and process parameter calculations in the background. The progress and logs of the calculation process can also be displayed in real time in this module.
[0167] (4) Results Display Module: After the calculation is completed, the final production grouping scheme is displayed in a clear table or card format. For example, different colors or cards are used to distinguish different production batches, and each batch clearly lists all the milk tank numbers and their core components, as well as the final process adjustment parameters calculated for that batch.
[0168] (5) Historical query module: Allows users to query historical optimization records and production data based on conditions such as date and batch number, and perform visual comparative analysis.
[0169] The whole milk powder production optimization method provided in this application presents the complex optimization process and results to users in an intuitive and easy-to-understand way, enabling managers to fully control the production planning process and continuously analyze and improve using accumulated historical data. This empowers the entire production management team with data-driven decision-making capabilities, achieving a dual improvement in production efficiency and scientific management level.
[0170] The apparatus provided in the embodiments of this application is described below. The apparatus described below can be referred to in correspondence with the method described above.
[0171] Figure 2 This is a schematic diagram of the optimized whole milk powder production device provided in this application, as shown below. Figure 2 As shown, the device includes:
[0172] The acquisition module 210 is used to acquire nutritional data of raw milk from multiple milk tanks;
[0173] Grouping module 220 is used to group multiple milk tanks based on the complementarity between the nutritional composition data of the raw milk in each milk tank, and obtain the production batch corresponding to each milk tank; the difference between the nutritional composition data of the raw milk after mixing of each production batch and the target nutritional composition data is less than the preset difference; the target nutritional composition data is determined based on the whole milk powder product specifications;
[0174] The adjustment module 230 is used to determine the process adjustment parameters for adjusting the nutritional composition of raw milk in each production batch based on the difference between the nutritional composition data of each production batch and the target nutritional composition data.
[0175] Production module 240 is used to produce whole milk powder from raw milk in each production batch based on the process adjustment parameters for each production batch.
[0176] The whole milk powder production optimization device provided in this application, based on the nutritional composition data of raw milk, transforms the original production process that relied on manual experience into a data-driven, quantifiable, and standardized automated production process through scientific complementary grouping and precise process parameter calculation. This not only significantly improves the stability of whole milk powder product quality and avoids product quality problems caused by erroneous judgment, but also achieves the economic goal of cost reduction and efficiency improvement through optimized utilization of raw milk and precise control of the process, thus balancing product quality and economic benefits in the production of whole milk powder.
[0177] Figure 3 This is a schematic diagram of the structure of the whole milk powder production system based on multi-objective optimization provided in this application, as shown below. Figure 3 As shown, the system includes a data acquisition and preprocessing module 310, a multi-objective optimization and milk tank clustering analysis module 320, a standardized process parameter calculation module 330, and a data persistence and visualization interaction module 340.
[0178] In one specific embodiment, the data acquisition and preprocessing module automatically acquires core indicator data for each milk truck entering the warehouse from the SAP system and the front-end laboratory via API interfaces, including total milk volume, protein content, lipid content, and non-fat solids content. This module cleans the raw data, handles missing and outlier values to ensure data quality, and standardizes all data formats to a standard structure, providing reliable input for subsequent algorithm calculations.
[0179] The multi-objective optimization and milk tank clustering analysis module constructs a multi-objective optimization model with the primary objectives of minimizing cost and maximizing economic benefits. It employs a mixed-integer programming algorithm to achieve intelligent control of the whole milk powder production process. This module uses the optimization model to perform intelligent clustering analysis on all milk tanks to be processed, automatically grouping tanks with complementary components to form several optimal production batches. This ensures that the basic indicators of each batch after mixing are closest to the target value.
[0180] The standardized process parameter calculation module performs refined calculations for each optimal milk tank cluster. First, while meeting the upper limit of 29.6% lipid content, it calculates the maximum amount of fat that can be removed, which is 30 kg. Then, while ensuring that protein accounts for 34% of non-fat solids, it precisely adjusts the total amount of non-fat solids by scientifically adding low-cost lactose. Finally, the above calculation results are translated into specific production equipment control parameters to guide the automated operation of the production line.
[0181] The data persistence and visualization interaction module stores all calculated optimization schemes, process parameters, and corresponding raw data completely in a MySQL database. An intuitive web interface is built using Streamlit, including a data dashboard, data import module, calculation and optimization module, results display module, and historical query module. This module enables traceability of production data and visualized information, providing comprehensive data support for production decision-making.
[0182] In another specific embodiment, the data acquisition and preprocessing module obtains core indicator data for each milk truck entering the warehouse from the front-end laboratory via file upload, including total milk weight (100 kg), protein content (3.2%), lipid content (28%), and non-fat solids content (42%). This module cleans the raw data, handles missing and outliers to ensure data quality, and standardizes all data formats to a standard structure, providing reliable input for subsequent algorithm calculations.
[0183] The multi-objective optimization and milk tank clustering analysis module constructs a multi-objective optimization model with the primary objectives of minimizing cost and maximizing economic benefits. It employs a linear programming algorithm to achieve intelligent control of the whole milk powder production process. This module uses the optimization model to perform intelligent clustering analysis on all milk tanks to be processed, automatically grouping tanks with complementary components to form several optimal production batches. This ensures that the basic indicators of each batch after mixing are closest to the target value.
[0184] The standardized process parameter calculation module performs refined calculations for each optimal milk tank cluster. First, while meeting the upper limit of 28% lipid content, it calculates the maximum amount of fat that can be removed, which is 35 kg. Then, while ensuring that protein accounts for 35% of non-fat solids, it precisely adjusts the total amount of non-fat solids by scientifically adding low-cost lactose. Finally, the above calculation results are translated into specific production equipment control parameters to guide the automated operation of the production line.
[0185] The data persistence and visualization module stores all calculated optimization schemes, process parameters, and corresponding raw data completely in a PostgreSQL database. An intuitive web interface is built using Streamlit, including a data dashboard, data import module, calculation and optimization module, results display module, and historical query module. This module enables traceability of production data and visualized information, providing comprehensive data support for production decision-making.
[0186] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor, communications interface, and memory communicate with each other via the communications bus. The processor can invoke logical commands stored in the memory to execute the methods described in the above embodiments, for example:
[0187] The process involves: acquiring nutritional data of raw milk from multiple milk tanks; grouping the milk tanks based on the complementarity of their nutritional data to obtain production batches corresponding to each tank; ensuring that the difference between the nutritional data of the mixed raw milk from each production batch and the target nutritional data is less than a preset difference; specifying the target nutritional data based on whole milk powder product specifications; determining process adjustment parameters for adjusting the nutritional composition of the raw milk in each production batch based on the difference between the nutritional data of the raw milk in each production batch and the target nutritional data; and producing whole milk powder from the raw milk in each production batch based on the process adjustment parameters.
[0188] Furthermore, the logical commands in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and 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 part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several commands to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0189] The processor in the electronic device provided in this application embodiment can call logical instructions in the memory to implement the above method. Its specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effect, which will not be repeated here.
[0190] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the methods provided in the above embodiments.
[0191] The specific implementation method is the same as the aforementioned method implementation method and can achieve the same beneficial effects, so it will not be repeated here.
[0192] This application provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0193] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0194] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0195] Finally, it should be noted that 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 skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An optimized method for producing whole milk powder, characterized in that, include: Obtain nutritional data of raw milk from multiple milk tanks; Based on the complementarity of the nutritional composition data of the raw milk in each milk tank, the multiple milk tanks are grouped to obtain the production batch corresponding to each milk tank; the difference between the nutritional composition data of the raw milk after mixing of each production batch and the target nutritional composition data is less than the preset difference; the target nutritional composition data is determined based on the whole milk powder product specifications. Based on the differences between the nutritional composition data of raw milk in each production batch and the target nutritional composition data, process adjustment parameters for adjusting the nutritional composition of raw milk in each production batch are determined. Based on the process adjustment parameters for each production batch, whole milk powder is produced from the raw milk of each production batch. The method involves grouping the multiple milk tanks based on the complementarity of nutritional data among the raw milk in each tank to obtain the production batch corresponding to each tank, including: A number of candidate groups are determined, and centroid clustering is performed for each candidate group to divide the multiple milk tanks into multiple groups; the distance between each milk tank in the centroid clustering is determined based on the complementarity between the nutritional composition data of the raw milk in each milk tank. After clustering at the centroids corresponding to the number of candidate groups, the evaluation index for each candidate group is determined. The evaluation index includes the silhouette coefficient for evaluating the rationality of the clustering structure and the intra-batch mixing error for evaluating the degree of deviation between the raw milk mixed in each group and the target nutrient data. Based on the grouping evaluation index corresponding to each candidate grouping quantity, the optimal grouping quantity is determined from the multiple candidate grouping quantities, and the production batch corresponding to each milk tank is determined based on the grouping result corresponding to the optimal grouping quantity. The distances between the milk cans in the centroid cluster are determined based on the following steps: Based on the nutritional data of the raw milk in the two milk tanks, the absolute difference in the values of each nutritional indicator between the two milk tanks is calculated, and the absolute difference is weighted and summed based on the weight coefficients corresponding to each nutritional indicator to obtain the weighted difference between the two milk tanks; the weight coefficients are used to reflect the importance of the nutritional indicators. Based on the complementarity between the nutritional composition data of the raw milk in the two milk tanks, a complementary direction factor between the two milk tanks is determined. The distance between the two milk tanks is determined by combining the weighted difference and complementary direction factor between them. The determination of the complementary direction factor between the two milk tanks based on the complementarity of the nutritional composition data of the raw milk in the two milk tanks includes: The nutritional composition data of raw milk in each milk can is compared with the target nutritional composition data to obtain a deviation vector representing the direction and magnitude of the deviation of the nutritional composition of raw milk in each milk can. Based on the cosine similarity between the deviation vectors of the two milk cans, the complementary direction factor between the two milk cans is determined.
2. The optimized method for producing whole milk powder according to claim 1, characterized in that, The process adjustment parameters for adjusting the nutritional composition of raw milk in each production batch are determined based on the differences between the nutritional composition data of each production batch and the target nutritional composition data, including: Based on the differences between the nutritional composition data of raw milk from each production batch and the target nutritional composition data, the maximum separable fat content and / or lactose addition amount are determined. Based on the maximum separable fat content and / or the lactose addition amount, process adjustment parameters are determined for adjusting the nutritional composition of raw milk in each production batch.
3. The optimized method for producing whole milk powder according to claim 1, characterized in that, The nutritional data includes at least one of the following: total milk volume, protein content, lipid content, and non-fat solids content. After obtaining the nutritional composition data of raw milk from multiple milk tanks, the method further includes: The nutritional composition data of the raw milk in the multiple milk tanks are preprocessed; The preprocessing includes at least one of missing value processing, outlier processing, and normalization processing.
4. The optimized method for producing whole milk powder according to claim 1, characterized in that, The method further includes: The nutritional composition data of raw milk in each milk tank, the production batch corresponding to each milk tank, and the process adjustment parameters of each production batch are stored in the database. In response to user input in the user interface, the data in the database is displayed visually.
5. An optimized device for whole milk powder production, characterized in that, include: The acquisition module is used to acquire nutritional data of raw milk from multiple milk tanks; The grouping module is used to group the multiple milk tanks based on the complementarity of the nutritional composition data of the raw milk in each milk tank, thereby obtaining the production batch corresponding to each milk tank; the difference between the nutritional composition data of the raw milk after mixing of each production batch and the target nutritional composition data is less than a preset difference; the target nutritional composition data is determined based on the whole milk powder product specifications; The adjustment module is used to determine process adjustment parameters for adjusting the nutritional composition of raw milk in each production batch based on the difference between the nutritional composition data of each production batch and the target nutritional composition data. The production module is used to produce whole milk powder from raw milk in each production batch by adjusting the process parameters for each production batch. The method involves grouping the multiple milk tanks based on the complementarity of nutritional data among the raw milk in each tank to obtain the production batch corresponding to each tank, including: A number of candidate groups are determined, and centroid clustering is performed for each candidate group to divide the multiple milk tanks into multiple groups; the distance between each milk tank in the centroid clustering is determined based on the complementarity between the nutritional composition data of the raw milk in each milk tank. After clustering at the centroids corresponding to the number of candidate groups, the evaluation index for each candidate group is determined. The evaluation index includes the silhouette coefficient for evaluating the rationality of the clustering structure and the intra-batch mixing error for evaluating the degree of deviation between the raw milk mixed in each group and the target nutrient data. Based on the grouping evaluation index corresponding to each candidate grouping quantity, the optimal grouping quantity is determined from the multiple candidate grouping quantities, and the production batch corresponding to each milk tank is determined based on the grouping result corresponding to the optimal grouping quantity. The distances between the milk cans in the centroid cluster are determined based on the following steps: Based on the nutritional data of the raw milk in the two milk tanks, the absolute difference in the values of each nutritional indicator between the two milk tanks is calculated, and the absolute difference is weighted and summed based on the weight coefficients corresponding to each nutritional indicator to obtain the weighted difference between the two milk tanks; the weight coefficients are used to reflect the importance of the nutritional indicators. Based on the complementarity between the nutritional composition data of the raw milk in the two milk tanks, a complementary direction factor between the two milk tanks is determined. The distance between the two milk tanks is determined by combining the weighted difference and complementary direction factor between them. The determination of the complementary direction factor between the two milk tanks based on the complementarity of the nutritional composition data of the raw milk in the two milk tanks includes: The nutritional composition data of raw milk in each milk can is compared with the target nutritional composition data to obtain a deviation vector representing the direction and magnitude of the deviation of the nutritional composition of raw milk in each milk can. Based on the cosine similarity between the deviation vectors of the two milk cans, the complementary direction factor between the two milk cans is determined.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the whole milk powder production optimization method according to any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the whole milk powder production optimization method according to any one of claims 1 to 4.