Model processing method and task processing method, device, medium and program product

By determining and fine-tuning a shared energy consumption model for each machine tool in discrete manufacturing, the problems of overfitting and storage fragmentation when the sample size of machine tools is small are solved, and high-precision, low-storage model optimization is achieved.

CN122174622APending Publication Date: 2026-06-09HAIER DIGITAL TECHNOLOGY (QINGDAO) CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HAIER DIGITAL TECHNOLOGY (QINGDAO) CO LTD
Filing Date
2026-02-05
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In discrete manufacturing, when the number of machine samples is small, traditional methods are prone to overfitting and fragmented model storage, leading to high storage requirements.

Method used

By using a sample dataset from a manufacturing plant, a shared energy consumption model for all machines in the target plant is determined. Based on the historical process data of each machine, fine-tuning is performed to obtain hyperparameter increments. The shared energy consumption model and hyperparameter increments are stored to achieve high-precision, low-storage machine optimization.

Benefits of technology

It achieves high-precision model optimization under small sample conditions, avoids model storage fragmentation and redundancy, and reduces storage requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122174622A_ABST
    Figure CN122174622A_ABST
Patent Text Reader

Abstract

This application provides a model processing method, task processing method, equipment, medium, and program product. It involves determining a shared energy consumption model for all machines in a target factory; obtaining the accuracy of each machine using the shared energy consumption model based on its process data; if the accuracy of the target machine is less than a preset accuracy threshold, obtaining a subset of sample data for the target machine; fine-tuning the shared energy consumption model based on this subset to obtain the target machine's energy consumption model; obtaining hyperparameter increments based on the shared energy consumption model and the target machine's energy consumption model; and storing the shared energy consumption model and hyperparameter increments at the inference end. This application avoids model storage fragmentation by storing the shared energy consumption model on the inference side, allowing all machines to share it; furthermore, it reduces the search space exponent by requiring only fine-tuning of the shared energy consumption model, avoiding overfitting when the machine sample size is small; and it solves the problem of redundant model storage by storing only hyperparameter increments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and in particular to a model processing method and task processing method, device, medium and program product. Background Technology

[0002] In discrete manufacturing (such as injection molding and semiconductor packaging), the process parameters and quality data of each production equipment (machine) may differ; it is usually necessary to perform real-time quality prediction or anomaly detection of the production equipment based on process parameters and quality data.

[0003] Traditional methods employ machine learning models for modeling, training a general model using data from the entire plant; then retraining the model for low-accuracy machines individually and saving the complete model file for that machine. However, this method is prone to overfitting when performing grid search with a small number of machine samples; furthermore, each machine requires a separate complete model file, resulting in fragmented model storage and a large memory requirement.

[0004] Therefore, there is an urgent need for a machine optimization scheme that can achieve high accuracy and low storage under small sample conditions. Summary of the Invention

[0005] The model processing method, task processing method, device, medium, and program products provided in the embodiments of this application are used to achieve the effect of high-precision, low-storage machine optimization under small sample conditions.

[0006] In a first aspect, embodiments of this application provide a model processing method, including:

[0007] Based on the sample dataset of the manufacturing plant, a shared energy consumption model for all machines in the target plant is determined from the candidate model pool; the sample dataset includes sample process parameters for all machines in the target plant; the shared energy consumption model optimizes the overall energy consumption of the manufacturing plant.

[0008] Based on the process data within the target historical time window of each machine, obtain the accuracy of each machine when using the shared energy consumption model;

[0009] If the accuracy of the target machine is less than the preset accuracy threshold, the sample data of the target machine is extracted from the sample dataset to form a subset of the sample data of the target machine. The shared energy consumption model is then fine-tuned based on the subset of the sample data of the target machine to obtain the energy consumption model of the target machine.

[0010] Based on the shared energy consumption model and the energy consumption model of the target machine, the hyperparameter increment of the target machine is obtained;

[0011] The inference end stores a shared energy consumption model, as well as the hyperparameter increments of the target machine.

[0012] In one possible implementation, the candidate model pool includes: multiple gradient boosting decision tree (GBDT) models; the hyperparameters of the GBDT models include: number of trees, tree depth, and learning rate;

[0013] Based on a sample dataset from manufacturing plants, a shared energy consumption model for the target plant is determined from a pool of candidate models, including:

[0014] Iterate through the GBDT models in the candidate model pool;

[0015] For the GBDT model that has been traversed, the GBDT model is trained using a sample dataset and a K-fold hierarchical cross-validation method to obtain the trained GBDT model and the performance evaluation metrics.

[0016] Based on the performance evaluation metrics of the trained GBDT model, a shared energy consumption model is determined from the trained GBDT model.

[0017] In one possible implementation, the shared energy consumption model is fine-tuned based on a subset of sample data from the target machine to obtain the energy consumption model for the target machine, including:

[0018] Obtain a discrete set of weight coefficients for the shared energy consumption model. The discrete set of weight coefficients covers the range from light oversampling to heavy oversampling, and the number of weight coefficients is a preset threshold.

[0019] While keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on the sample data subset of the target machine and the discrete set of weight coefficients of the shared energy consumption model, so as to obtain the energy consumption model of the target machine.

[0020] In one possible implementation, while keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on a subset of sample data from the target machine and a discrete set of weight coefficients of the shared energy consumption model, to obtain the energy consumption model of the target machine, including:

[0021] For any weight coefficient in the discrete set of weight coefficients of the shared energy consumption model, while keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on the sample data subset of the target machine and the weight coefficient to obtain a candidate energy consumption model; wherein, during the retraining process, the weight coefficient is applied to the negative sample data and the preset weight coefficient is applied to the positive sample data.

[0022] If there is a target candidate energy consumption model among the candidate energy consumption models with an accuracy greater than or equal to a preset accuracy threshold, then the energy consumption model of the target machine is determined from the target candidate energy consumption models.

[0023] In one possible implementation, based on the shared energy consumption model and the energy consumption model of the target machine, the hyperparameter increment of the target machine is obtained, including:

[0024] The increment of the leaf weight vector of the target machine is determined based on the difference between the leaf weight vector of the energy consumption model of the target machine and the leaf weight vector of the shared energy consumption model.

[0025] The non-zero elements in the increment of the leaf weight vector of the target machine are serialized to obtain the hyperparameter increment of the target machine.

[0026] In one possible implementation, a shared energy consumption model is stored at the inference end, along with hyperparameter increments for the target machine, including:

[0027] The shared energy consumption model is serialized into a binary file and deployed to the inference end as a global read-only resource for all machines;

[0028] The hyperparameter increments of the target machine are written as patch files to the patch directory of the shared energy consumption model; the patch files record the identifier and timestamp of the target machine.

[0029] Send a notification message to the inference end, which indicates that the shared energy consumption model has been deployed or updated.

[0030] Secondly, embodiments of this application provide a task processing method, including:

[0031] In response to the startup of the inference service, the shared energy consumption model obtained by the aforementioned method is loaded into the shared memory, and the hyperparameter increments recorded in the patch files of the target machines in the patch directory are injected into the hyperparameter increment area of ​​the shared memory.

[0032] In response to an inference service request for the target machine, based on the shared energy consumption model and the patch files of the target machine in the patch directory, the hyperparameters of the shared energy consumption model are updated, and the updated shared energy consumption model is used to execute the inference service request for the target machine.

[0033] In response to inference service requests for non-target machines, the inference service requests for non-target machines are executed based on the shared energy consumption model.

[0034] Thirdly, embodiments of this application provide a model processing apparatus, including:

[0035] The determination module is used to determine the shared energy consumption model for all machines in the target factory from the candidate model pool based on the sample dataset of the manufacturing plant; the sample dataset includes sample process parameters of all machines in the target factory; the shared energy consumption model optimizes the overall energy consumption of the manufacturing plant.

[0036] The processing module is used to obtain the accuracy of each machine when using the shared energy consumption model based on the process data within the target historical time window of each machine.

[0037] The processing module is also used to extract sample data of the target machine from the sample dataset if the accuracy of the target machine is less than a preset accuracy threshold, to form a sample data subset of the target machine, and to fine-tune the shared energy consumption model based on the sample data subset of the target machine to obtain the energy consumption model of the target machine.

[0038] The processing module is also used to obtain the hyperparameter increments of the target machine based on the shared energy consumption model and the energy consumption model of the target machine;

[0039] The storage module is used to store the shared energy consumption model and the hyperparameter increments of the target machine at the inference end.

[0040] In one possible implementation, the processing module is further configured to:

[0041] Iterate through the GBDT models in the candidate model pool;

[0042] For the GBDT model that has been traversed, the GBDT model is trained using a sample dataset and a K-fold hierarchical cross-validation method to obtain the trained GBDT model and the performance evaluation metrics.

[0043] Based on the performance evaluation metrics of the trained GBDT model, a shared energy consumption model is determined from the trained GBDT model.

[0044] In one possible implementation, the processing module is further configured to:

[0045] Obtain a discrete set of weight coefficients for the shared energy consumption model. The discrete set of weight coefficients covers the range from light oversampling to heavy oversampling, and the number of weight coefficients is a preset threshold.

[0046] While keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on the sample data subset of the target machine and the discrete set of weight coefficients of the shared energy consumption model, so as to obtain the energy consumption model of the target machine.

[0047] In one possible implementation, the processing module is further configured to:

[0048] For any weight coefficient in the discrete set of weight coefficients of the shared energy consumption model, while keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on the sample data subset of the target machine and the weight coefficient to obtain a candidate energy consumption model; wherein, during the retraining process, the weight coefficient is applied to the negative sample data and the preset weight coefficient is applied to the positive sample data.

[0049] If there is a target candidate energy consumption model among the candidate energy consumption models with an accuracy greater than or equal to a preset accuracy threshold, then the energy consumption model of the target machine is determined from the target candidate energy consumption models.

[0050] In one possible implementation, the processing module is further configured to:

[0051] The increment of the leaf weight vector of the target machine is determined based on the difference between the leaf weight vector of the energy consumption model of the target machine and the leaf weight vector of the shared energy consumption model.

[0052] The non-zero elements in the increment of the leaf weight vector of the target machine are serialized to obtain the hyperparameter increment of the target machine.

[0053] In one possible implementation, the storage module is further used for:

[0054] The shared energy consumption model is serialized into a binary file and deployed to the inference end as a global read-only resource for all machines;

[0055] The hyperparameter increments of the target machine are written as patch files to the patch directory of the shared energy consumption model; the patch files record the identifier and timestamp of the target machine.

[0056] Send a notification message to the inference end, which indicates that the shared energy consumption model has been deployed or updated.

[0057] Fourthly, embodiments of this application provide a task processing apparatus, including:

[0058] The response module is used to respond to the startup of the inference service by loading the shared energy consumption model obtained by the method described above into the shared memory, and injecting the hyperparameter increments recorded in the patch files of the target machines in the patch directory into the hyperparameter increment area of ​​the shared memory.

[0059] The update module is used to respond to inference service requests for the target machine, update the hyperparameters of the shared energy consumption model based on the shared energy consumption model and the patch files of the target machine in the patch directory, and use the updated shared energy consumption model to execute the inference service request for the target machine.

[0060] The inference module is used to respond to inference service requests for non-target machines and execute the inference service requests for non-target machines based on the shared energy consumption model.

[0061] Fifthly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0062] The memory stores the instructions that the computer executes;

[0063] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0064] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0065] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0066] The model processing method, task processing method, equipment, medium, and program products provided in this application embodiment determine the shared energy consumption model of all machines in the target factory from the candidate model pool based on the sample dataset of the manufacturing plant; obtain the accuracy of each machine when using the shared energy consumption model based on the process data within the target historical time window of each machine; if the accuracy of the target machine is less than a preset accuracy threshold, extract the sample data of the target machine from the sample dataset to form a subset of the sample data of the target machine, and fine-tune the shared energy consumption model based on the subset of the sample data of the target machine to obtain the energy consumption model of the target machine; obtain the hyperparameter increment of the target machine based on the shared energy consumption model and the energy consumption model of the target machine; and store the shared energy consumption model and the hyperparameter increment of the target machine at the inference end. This application trains a shared energy consumption model and stores it on the inference side, so that all machines can share a single shared energy consumption model, thus avoiding model storage fragmentation. In addition, the shared energy consumption model only needs to be fine-tuned using a subset of sample data corresponding to the target machine, which reduces the search space exponent and avoids overfitting when the number of machine samples is small. Furthermore, only the hyperparameter increments corresponding to the target machine are stored, which solves the problem of redundant model storage and reduces the memory required to store the model. Attached Figure Description

[0067] 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.

[0068] Figure 1 A flowchart illustrating a model processing method provided in this application;

[0069] Figure 2 A flowchart illustrating a machine reasoning method provided in this application;

[0070] Figure 3 A flowchart illustrating a task processing method provided in this application;

[0071] Figure 4 A schematic diagram of the structure of a model processing device provided in this application;

[0072] Figure 5 A schematic diagram of the structure of a task processing device provided in this application;

[0073] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application.

[0074] 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

[0075] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0076] First, let me explain the terms used in this application:

[0077] Gradient Boosting Decision Tree (GBDT) is an ensemble learning algorithm based on decision trees that iteratively trains multiple weak learners and combines them into a strong learner.

[0078] Few-shot learning refers to training or fine-tuning a model with very little training data (usually less than 100 samples).

[0079] Hot reloading refers to dynamically updating model parameters or structure without stopping the system or restarting the service.

[0080] In discrete manufacturing (such as injection molding and semiconductor packaging), the process parameters and quality data of each production equipment (machine) may differ; it is usually necessary to perform real-time quality prediction or anomaly detection of the production equipment based on process parameters and quality data.

[0081] Traditional methods employ machine learning models for modeling, training a general model using data from the entire plant; then retraining the model for low-accuracy machines individually and saving the complete model file for that machine. However, this method is prone to overfitting when performing grid search with a small number of machine samples; furthermore, each machine requires a separate complete model file, resulting in fragmented model storage and a large memory requirement.

[0082] Therefore, there is an urgent need for a machine optimization scheme that can achieve high accuracy and low storage under small sample conditions.

[0083] The model processing method, task processing method, equipment, medium, and program products provided in this application determine the shared energy consumption model for all machines in the target factory from a candidate model pool based on a sample dataset from the manufacturing plant; obtain the accuracy of each machine when using the shared energy consumption model based on the process data within the target historical time window of each machine; if the accuracy of the target machine is less than a preset accuracy threshold, extract sample data of the target machine from the sample dataset to form a subset of sample data of the target machine, and fine-tune the shared energy consumption model based on the subset of sample data of the target machine to obtain the energy consumption model of the target machine; obtain the hyperparameter increment of the target machine based on the shared energy consumption model and the energy consumption model of the target machine; and store the shared energy consumption model and the hyperparameter increment of the target machine at the inference end. This application trains a shared energy consumption model and stores it on the inference side, so that all machines can share a single shared energy consumption model, thus avoiding model storage fragmentation. In addition, the shared energy consumption model only needs to be fine-tuned using a subset of sample data corresponding to the target machine, which reduces the search space exponent and avoids overfitting when the number of machine samples is small. Furthermore, only the hyperparameter increments corresponding to the target machine are stored, which solves the problem of redundant model storage and reduces the memory required to store the model.

[0084] 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.

[0085] Figure 1 A flowchart illustrating a model processing method provided in this application is shown below. Figure 1 As shown, the model processing method provided in this application includes:

[0086] S101. Based on the sample dataset of the manufacturing plant, determine the shared energy consumption model for all machines in the target plant from the candidate model pool; the sample dataset includes sample process parameters for all machines in the target plant; the shared energy consumption model optimizes the overall energy consumption of the manufacturing plant.

[0087] The candidate model pool consists of the Gradient Boosting Decision Tree (GBDT) family, such as GBDT, XGBoost, LightGBM, and CatBoost. The GBDT family uses an additive model.

[0088]

[0089] Where hm(x) is the m-th CART regression tree; ρm is the step size (learning rate) of the m-th tree; and M is the number of trees. The gradient boosting decision tree model predicts the target value by weighting the sum of multiple regression trees; each tree consists of split nodes (which determine features and thresholds) and leaf nodes (which store weights).

[0090] The sample dataset includes sample process parameters of all machines in the target factory. For example, for target factory 1, the machines included in target factory 1 are: machine 1, machine 2, machine 3, and machine 4. Then, the sample process parameters of machine 1, machine 2, machine 3, and machine 4 are obtained to construct sample dataset A.

[0091] In one possible implementation, the candidate model pool includes: multiple gradient boosting decision tree (GBDT) models; the hyperparameters of the GBDT models include: number of trees, tree depth, and learning rate;

[0092] Based on a sample dataset from manufacturing plants, a shared energy consumption model for the target plant is determined from a pool of candidate models, including:

[0093] Iterate through the GBDT models in the candidate model pool;

[0094] For the GBDT model that has been traversed, the GBDT model is trained using a sample dataset and a K-fold hierarchical cross-validation method to obtain the trained GBDT model and the performance evaluation metrics.

[0095] Based on the performance evaluation metrics of the trained GBDT model, a shared energy consumption model is determined from the trained GBDT model.

[0096] Among them, the GBDT models in the candidate model pool refer to the models corresponding to the GBDT family, including GBDT, XGBoost, LightGBM, and CatBoost.

[0097] Specifically, the hyperparameters of the GBDT model include: number of trees T, tree depth d, and learning rate η; among them, "number of trees T / tree depth d / learning rate η" can be used as an abstract symbol to cover all members of the GBDT family, as shown in the table below:

[0098] Table 1 shows examples of hyperparameters for different GBDT models under the same dimension:

[0099]

[0100] As shown in the example above, the hyperparameter combination corresponding to the GBDT model is (number of trees T, tree depth d, learning rate η) = (100, 3, 0.1).

[0101] The search space corresponding to the hyperparameters is as follows: number of trees T∈{50,100,150,200}, tree depth d∈{3,5,7,9}, and learning rate η∈{0.05,0.1,0.2}. The GBDT models in the candidate model pool can be traversed using grid search and Bayesian optimization to determine 4×4×3=48 combinations of hyperparameters. For example, (T1,d1,η1)=(50,3,0.05), (T2,d2,η2)=(50,3,0.1), ..., (T48,d48,η48)=(200,9,0.2).

[0102] Specifically, the space complexity of gradient boosting decision trees (GBDT family) under grid search is:

[0103]

[0104] Where k: the number of hyperparameters to be tuned; : Number of candidate values ​​for the i-th hyperparameter; T: Number of trees; : The average number of nodes per tree.

[0105] In practical applications, the memory required to store each tree is: For example, in the current model (gradient boosting decision tree) scheme with 100 trees and an average depth of 8, a single complete model file would be approximately 8–15 MB. If grid search requires traversing all candidate combinations, when k=7 and each parameter has an average of 5 possible values, the number of combinations would be... The total memory space requirement is: .

[0106] This solution reduces the overall space complexity from exponential to low-order linear by compressing the machine-specific model; that is:

[0107] K-fold hierarchical cross-validation can be replaced by 5-fold hierarchical cross-validation. Specifically, the sample dataset A is divided into 5 equal parts: sample data 1, sample data 2, sample data 3, sample data 4, and sample data 5. One part of the sample data is used as the test set in turn, and the remaining 4 parts are used as the training set. The training is performed a total of 5 times, and the performance evaluation index (F1) corresponding to each training is summed and averaged to obtain the average F1.

[0108] For any set of hyperparameter combinations, based on the sample dataset A, a 5-fold stratified cross-validation method is used to obtain the average F1 score corresponding to that hyperparameter combination. Combining the above, for 48 sets of hyperparameter combinations, based on the sample dataset, a 5-fold stratified cross-validation method is used to obtain the average F1 score for each of the 48 hyperparameter combinations. From the average F1 scores of all hyperparameter combinations, the hyperparameter combination with the highest average F1 score is selected as the optimal hyperparameter combination, and the GBDT model corresponding to the optimal hyperparameter combination is used as the shared energy consumption model. This optimal hyperparameter is used as a fixed parameter in the shared energy consumption model and will not be modified in any subsequent machine optimization process.

[0109] By using sample process parameters of all machines in the target factory and a 5-fold stratified cross-validation method, the optimal hyperparameter combination and shared energy consumption model are determined. This ensures that the resulting shared energy consumption model can be adapted to all business scenarios. Furthermore, the 5-fold stratified cross-validation method can eliminate the interference of accidental factors and reduce misjudgments and omissions by using performance evaluation indicators, thus ensuring that the optimal hyperparameters are more in line with the actual needs of the factory.

[0110] S102. Based on the process data within the target historical time window of each machine, obtain the accuracy of each machine when using the shared energy consumption model.

[0111] The target historical time window can be set according to requirements, for example, a target historical time window of 7 days. Based on the above, process data for each machine within 7 days is collected: Machine 1 - Process Data 1, Machine 2 - Process Data 2, Machine 3 - Process Data 3, Machine 4 - Process Data 4. The process data corresponding to each machine is input into the shared energy consumption model to obtain the accuracy rate for each machine, such as Machine 1 - Accuracy 98%, Machine 2 - Accuracy 96%, Machine 1 - Accuracy 89%, Machine 1 - Accuracy 97%.

[0112] S103. If the accuracy of the target machine is less than the preset accuracy threshold, the sample data of the target machine is extracted from the sample dataset to form a subset of the sample data of the target machine. The shared energy consumption model is then fine-tuned based on the subset of the sample data of the target machine to obtain the energy consumption model of the target machine.

[0113] The preset accuracy threshold is 90%. The accuracy of each machine is compared to this preset threshold. If the accuracy of a machine is less than the threshold, it is identified as the target machine requiring optimization. Based on this comparison, machine 3 is determined to be the target machine requiring optimization. Therefore, sample data 'a' corresponding to machine 3 is extracted from sample dataset A. After deduplication and cleaning of sample data 'a', a subset 1 of sample data for machine 3 is obtained. Furthermore, subset 1 is closed to ensure that it is not mixed with other machine data during the fine-tuning process for machine 3, thus preventing interference between machines. Fine-tuning is triggered by the preset accuracy threshold to avoid overfitting caused by small sample machine data.

[0114] In one possible implementation, the shared energy consumption model is fine-tuned based on a subset of sample data from the target machine to obtain the energy consumption model for the target machine, including:

[0115] Obtain a discrete set of weight coefficients for the shared energy consumption model. The discrete set of weight coefficients covers the range from light oversampling to heavy oversampling, and the number of weight coefficients is a preset threshold.

[0116] While keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on the sample data subset of the target machine and the discrete set of weight coefficients of the shared energy consumption model, so as to obtain the energy consumption model of the target machine.

[0117] The discrete set of weight coefficients is K∈{2,3,5,7,10}. This set is determined through prior experiments, covers the interval from “light oversampling” to “heavy oversampling”, and has only 5 elements, thus avoiding computational explosion caused by continuous space.

[0118] Specifically, while keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using a 5-fold hierarchical cross-validation method based on the sample data subset 1 of the target machine and the discrete set of weight coefficients of the shared energy consumption model, to obtain the energy consumption model of the target machine.

[0119] Without changing the hyperparameters of the shared energy consumption model, by fine-tuning the weight coefficients, the search space is reduced from O(48) to O(5), which improves the accuracy of the model while avoiding overfitting to small samples.

[0120] In one possible implementation, while keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on a subset of sample data from the target machine and a discrete set of weight coefficients of the shared energy consumption model, to obtain the energy consumption model of the target machine, including:

[0121] For any weight coefficient in the discrete set of weight coefficients of the shared energy consumption model, while keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on the sample data subset of the target machine and the weight coefficient to obtain a candidate energy consumption model; wherein, during the retraining process, the weight coefficient is applied to the negative sample data and the preset weight coefficient is applied to the positive sample data.

[0122] If there is a target candidate energy consumption model among the candidate energy consumption models with an accuracy greater than or equal to a preset accuracy threshold, then the energy consumption model of the target machine is determined from the target candidate energy consumption models.

[0123] Among them, the retraining of the shared energy consumption model adopts an early stopping rule; that is, in the discrete set K of weight coefficients, once the smallest k value that meets the accuracy threshold is found, the process of further searching for a larger k is immediately stopped; the preset weight coefficient is k0=1.

[0124] Specifically, for any weight coefficient in the discrete set of weight coefficients, the machine is retrained sequentially in ascending order of k value. In the first retraining, the weight coefficient k=2; therefore, a weight coefficient k=2 is applied to the negative sample data in sample data subset 1, and a preset weight coefficient "k0=1" is applied to the positive sample data in sample data subset 1. The shared energy consumption model is retrained using 5-fold cross-validation to obtain the candidate energy consumption model corresponding to machine 3. The process data 3 corresponding to machine 3 is input into the candidate energy consumption model to obtain the accuracy 'a' of machine 3 using the candidate energy consumption model. If the accuracy 'a' is greater than or equal to a preset accuracy threshold, then the candidate energy consumption model obtained through retraining with weight coefficient k=2 is determined to be the energy consumption model corresponding to machine 3. If the accuracy 'a' is less than the preset accuracy threshold, then a weight coefficient k=3 is selected, and the retraining process returns to the beginning. If, under the retraining condition of k=10, the accuracy of the candidate energy consumption model is still less than the preset accuracy threshold, then machine 3 retains its original model.

[0125] By adopting an early stopping rule, i.e., the minimum k constraint, the increase in the weight coefficient of negative sample data is controllable, which reduces the number of searches to save resources while suppressing overfitting.

[0126] S104. Based on the shared energy consumption model and the energy consumption model of the target machine, obtain the hyperparameter increment of the target machine.

[0127] With a very small sample size (n < 100), in order to avoid the MB-level storage waste caused by resaving the complete model, the machine-specific information is compressed to KB-level patches by "saving only the leaf weight increment Δw", providing a data foundation for the subsequent millisecond-level hot loading.

[0128] In one possible implementation, based on the shared energy consumption model and the energy consumption model of the target machine, the hyperparameter increment of the target machine is obtained, including:

[0129] The increment of the leaf weight vector of the target machine is determined based on the difference between the leaf weight vector of the energy consumption model of the target machine and the leaf weight vector of the shared energy consumption model.

[0130] The non-zero elements in the increment of the leaf weight vector of the target machine are serialized to obtain the hyperparameter increment of the target machine.

[0131] Among them, the leaf weight vector of the shared energy consumption model is w old The leaf weight vector of the energy consumption model obtained after fine-tuning is w. new Then the increment Δw of the blade weight vector of machine 3 is w new -w old To further reduce model storage redundancy, the non-zero elements in the increment Δw of the leaf weight vector are serialized to obtain the hyperparameter increment corresponding to machine 3.

[0132] S105. Store the shared energy consumption model at the inference end, as well as the hyperparameter increments of the target machine.

[0133] The inference terminal is used to provide inference services for all machines in the target factory.

[0134] In one possible implementation, a shared energy consumption model is stored at the inference end, along with hyperparameter increments for the target machine, including:

[0135] The shared energy consumption model is serialized into a binary file and deployed to the inference end as a global read-only resource for all machines;

[0136] The hyperparameter increments of the target machine are written as patch files to the patch directory of the shared energy consumption model; the patch files record the identifier and timestamp of the target machine.

[0137] Send a notification message to the inference end, which indicates that the shared energy consumption model has been deployed or updated.

[0138] The shared energy consumption model is serialized into a binary file with a size of 12MB, thus completing the model solidification. The serialized shared energy consumption model is then deployed as a global read-only resource on the inference end of all machines, so that all machines can share and use the shared energy consumption model for inference services.

[0139] Furthermore, the hyperparameter increments obtained after fine-tuning the machines requiring optimization are written to the patch directory of the shared energy consumption model as patch files. The patch directory is deployed decoupled from the shared energy consumption model, supporting version rollback. Specifically, the hyperparameter increments are named "Machine ID_Timestamp_Short Hash.Δw", generating the corresponding machine patch file 1. Here, Machine ID is the machine's device number; Timestamp refers to the generation time of the patch file; Short Hash refers to the first 6 digits of the hash value obtained after hashing the data used to calculate Δw for the corresponding machine; .Δw indicates the file type or data identifier, representing the Δw-related data.

[0140] After storing the patch file in the patch directory, send a notification message, such as a "PATCH_READY signal," to the hot-loading engine on the inference server to indicate that the patch file for machine 3 has been updated and is safe and available, and can be sent to the corresponding machine for machine optimization. Alternatively, after storing the shared energy consumption model on the inference server, send a notification message to the inference server to indicate that the shared energy consumption model for all machines has been deployed.

[0141] By storing hyperparameter increments as patch files in the patch directory, the hyperparameter increments are compressed to below 1kb, reducing storage memory. Simultaneously, the patch files include the machine ID and timestamp to support rapid machine rollback. Furthermore, globally read-only resources for all machines in the shared energy consumption model are deployed to the inference end, where the hyperparameter combinations are locked and will not be modified, avoiding performance fluctuations caused by hyperparameter differences.

[0142] This application provides a model processing method that determines a shared energy consumption model for all machines in a target factory from a candidate model pool based on a sample dataset of a manufacturing plant; obtains the accuracy of each machine when using the shared energy consumption model based on the process data within the target historical time window of each machine; if the accuracy of the target machine is less than a preset accuracy threshold, extracts sample data of the target machine from the sample dataset to form a subset of sample data of the target machine, and fine-tunes the shared energy consumption model based on the subset of sample data of the target machine to obtain the energy consumption model of the target machine; obtains the hyperparameter increment of the target machine based on the shared energy consumption model and the energy consumption model of the target machine; and stores the shared energy consumption model and the hyperparameter increment of the target machine at the inference end. This application trains a shared energy consumption model and stores it on the inference side, so that all machines can share a single shared energy consumption model, thus avoiding model storage fragmentation. In addition, the shared energy consumption model only needs to be fine-tuned using a subset of sample data corresponding to the target machine, which reduces the search space exponent and avoids overfitting when the number of machine samples is small. Furthermore, only the hyperparameter increments corresponding to the target machine are stored, which solves the problem of redundant model storage and reduces the memory required to store the model.

[0143] Figure 2A flowchart illustrating a machine reasoning method provided in this application is shown below. Figure 2 As shown, sample process parameters of all machines in the target factory are collected to construct a sample dataset. Data correlation analysis is performed on the sample dataset, including feature enhancement, feature compression, and feature redundancy analysis, to obtain feature vectors for training the model. Feature enhancement refers to expanding higher-order statistical features through correlation analysis; feature redundancy refers to eliminating duplicate feature data; and feature compression refers to, based on removing feature redundancy, integrating and simplifying multiple high-dimensional, scattered useful features into a few low-dimensional comprehensive features through algorithms. Specifically, the process involves identifying and eliminating duplicate features through feature redundancy operations, enhancing the remaining features, and finally compressing the enhanced high-dimensional features to obtain the feature vectors.

[0144] Based on the feature vectors obtained from data correlation analysis of the sample dataset, the candidate model pool is trained to obtain the GBDT family of models and the performance evaluation index corresponding to each GBDT model. The hyperparameter combination corresponding to the highest performance evaluation index among all performance evaluation indices is selected as the optimal hyperparameter combination, and the GBDT model corresponding to the optimal hyperparameter combination is a shared energy consumption model.

[0145] Based on the process data within the target historical time window of each machine, the accuracy of each machine when using the shared energy consumption model is obtained; if the accuracy of machine 3 is less than the preset accuracy threshold, then machine 3 is a machine that needs to be optimized; then the hyperparameter increment corresponding to machine 3 is determined, and the shared energy consumption model is updated based on the hyperparameter increment corresponding to machine 3.

[0146] Figure 3 A flowchart illustrating a task processing method provided in this application is shown below. Figure 3 As shown in the embodiments of this application, the task processing method includes:

[0147] S301. In response to the startup of the inference service, the shared energy consumption model obtained by the method described above is loaded into the shared memory, and the hyperparameter increments recorded in the patch files of the target machine in the patch directory are injected into the hyperparameter increment area of ​​the shared memory.

[0148] When the inference service starts, the shared energy consumption model is loaded into shared memory; and the hyperparameter increments recorded in the patch files of the target machines in the patch directory are injected into the hyperparameter increment area of ​​shared memory. Through machine ID-patch mapping and shared memory technology, millisecond-level injection is achieved without restarting the inference service, meeting the cycle time requirements of online quality inspection in discrete manufacturing.

[0149] S302. In response to the inference service request for the target machine, based on the shared energy consumption model and the patch file of the target machine in the patch directory, update the hyperparameters of the shared energy consumption model, and use the updated shared energy consumption model to execute the inference service request for the target machine.

[0150] In conjunction with the foregoing, for example, when responding to an inference service request from machine 3, if an update to the patch file corresponding to machine 3 is detected, the hyperparameters of the shared energy consumption model are updated according to the hyperparameter increments recorded in the patch file corresponding to machine 3 in the patch directory; and the updated shared energy consumption model is used to execute the inference service request from the target machine.

[0151] S303. In response to an inference service request for a non-target machine, execute the inference service request for the non-target machine based on the shared energy consumption model.

[0152] In light of the foregoing, if the patch files for machine 1, machine 2, and machine 4 have not been updated, then there is no need to update these machines. The corresponding inference service requests can be executed directly based on the shared energy consumption model.

[0153] Understandably, all machines share the same shared energy consumption model, and the monitoring scripts, image versions, and rollback strategies remain unchanged. The model family also does not need to be switched, which significantly reduces the complexity of operation and maintenance and the risk of human error. When a machine needs to be optimized and updated, there is no need to restart the inference service. The patch file can be injected through hot reloading to achieve the update.

[0154] Figure 4 This application provides a schematic diagram of the structure of a model processing device, as shown below. Figure 4 As shown, the model processing device 400 provided in this embodiment includes:

[0155] The determination module 401 is used to determine the shared energy consumption model of all machines in the target factory from the candidate model pool based on the sample dataset of the manufacturing plant; the sample dataset includes sample process parameters of all machines in the target factory; the shared energy consumption model optimizes the overall energy consumption of the manufacturing plant.

[0156] Processing module 402 is used to obtain the accuracy of each machine when using the shared energy consumption model based on the process data within the target historical time window of each machine.

[0157] The processing module 402 is also used to extract sample data of the target machine from the sample dataset if the accuracy of the target machine is less than a preset accuracy threshold, form a sample data subset of the target machine, and fine-tune the shared energy consumption model based on the sample data subset of the target machine to obtain the energy consumption model of the target machine.

[0158] The processing module 402 is also used to obtain the hyperparameter increment of the target machine based on the shared energy consumption model and the energy consumption model of the target machine;

[0159] Storage module 403 is used to store the shared energy consumption model and the hyperparameter increments of the target machine at the inference end.

[0160] In one possible implementation, the processing module 402 is further configured to:

[0161] Iterate through the GBDT models in the candidate model pool;

[0162] For the GBDT model that has been traversed, the GBDT model is trained using a sample dataset and a K-fold hierarchical cross-validation method to obtain the trained GBDT model and the performance evaluation metrics.

[0163] Based on the performance evaluation metrics of the trained GBDT model, a shared energy consumption model is determined from the trained GBDT model.

[0164] In one possible implementation, the processing module 402 is further configured to:

[0165] Obtain a discrete set of weight coefficients for the shared energy consumption model. The discrete set of weight coefficients covers the range from light oversampling to heavy oversampling, and the number of weight coefficients is a preset threshold.

[0166] While keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on the sample data subset of the target machine and the discrete set of weight coefficients of the shared energy consumption model, so as to obtain the energy consumption model of the target machine.

[0167] In one possible implementation, the processing module 402 is further configured to:

[0168] For any weight coefficient in the discrete set of weight coefficients of the shared energy consumption model, while keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on the sample data subset of the target machine and the weight coefficient to obtain a candidate energy consumption model; wherein, during the retraining process, the weight coefficient is applied to the negative sample data and the preset weight coefficient is applied to the positive sample data.

[0169] If there is a target candidate energy consumption model among the candidate energy consumption models with an accuracy greater than or equal to a preset accuracy threshold, then the energy consumption model of the target machine is determined from the target candidate energy consumption models.

[0170] In one possible implementation, the processing module 402 is further configured to:

[0171] The increment of the leaf weight vector of the target machine is determined based on the difference between the leaf weight vector of the energy consumption model of the target machine and the leaf weight vector of the shared energy consumption model.

[0172] The non-zero elements in the increment of the leaf weight vector of the target machine are serialized to obtain the hyperparameter increment of the target machine.

[0173] In one possible implementation, the storage module 403 is further configured to:

[0174] The shared energy consumption model is serialized into a binary file and deployed to the inference end as a global read-only resource for all machines;

[0175] The hyperparameter increments of the target machine are written as patch files to the patch directory of the shared energy consumption model; the patch files record the identifier and timestamp of the target machine.

[0176] Send a notification message to the inference end, which indicates that the shared energy consumption model has been deployed or updated.

[0177] The model processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0178] Figure 5 A schematic diagram of the structure of a task processing device provided in this application is shown below. Figure 5 As shown, the task processing device 500 provided in this embodiment includes:

[0179] The response module 501 is used to load the shared energy consumption model obtained by the method described above into the shared memory in response to the startup of the inference service, and to inject the hyperparameter increment recorded in the patch file of the target machine in the patch directory into the hyperparameter increment area of ​​the shared memory.

[0180] The update module 502 is used to respond to an inference service request for the target machine, update the hyperparameters of the shared energy consumption model based on the shared energy consumption model and the patch files of the target machine in the patch directory, and use the updated shared energy consumption model to execute the inference service request for the target machine.

[0181] The inference module 503 is used to respond to inference service requests for non-target machines and execute the inference service requests for non-target machines based on the shared energy consumption model.

[0182] The task processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0183] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the device 60 further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.

[0184] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above-described method.

[0185] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0186] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0187] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0188] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0189] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0190] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0191] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0192] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0193] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

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

[0195] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0196] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. 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.

[0197] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0198] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A model processing method, characterized in that, include: Based on a sample dataset of the manufacturing plant, a shared energy consumption model for all machines in the target plant is determined from a pool of candidate models; the sample dataset includes sample process parameters for all machines in the target plant; the shared energy consumption model optimizes the overall energy consumption of the manufacturing plant. Based on the process data within the target historical time window of each machine, the accuracy of each machine when using the shared energy consumption model is obtained. If the accuracy of the target machine is less than a preset accuracy threshold, then the sample data of the target machine is extracted from the sample dataset to form a subset of the sample data of the target machine, and the shared energy consumption model is fine-tuned based on the subset of the sample data of the target machine to obtain the energy consumption model of the target machine. Based on the shared energy consumption model and the energy consumption model of the target machine, the hyperparameter increment of the target machine is obtained; The shared energy consumption model and the hyperparameter increments of the target machine are stored at the inference end.

2. The method according to claim 1, characterized in that, The candidate model pool includes: multiple gradient boosting decision tree (GBDT) models; the hyperparameters of the GBDT models include: number of trees, tree depth, and learning rate; The shared energy consumption model for the target factory is determined from the candidate model pool based on the sample dataset of the manufacturing plant, including: Iterate through the GBDT models in the candidate model pool; For the GBDT model that has been traversed, the GBDT model is trained using the sample dataset and a K-fold hierarchical cross-validation method to obtain the trained GBDT model and the performance evaluation metrics. Based on the performance evaluation metrics of the trained GBDT model, the shared energy consumption model is determined from the trained GBDT model.

3. The method according to claim 2, characterized in that, The step of fine-tuning the shared energy consumption model based on a subset of sample data from the target machine to obtain the energy consumption model for the target machine includes: Obtain the discrete set of weight coefficients of the shared energy consumption model, wherein the discrete set of weight coefficients covers the range from light oversampling to heavy oversampling, and the number of weight coefficients is a preset threshold. While keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on the sample data subset of the target machine and the discrete set of weight coefficients of the shared energy consumption model, to obtain the energy consumption model of the target machine.

4. The method according to claim 3, characterized in that, While keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on a subset of sample data from the target machine and a discrete set of weight coefficients of the shared energy consumption model, to obtain the energy consumption model of the target machine, including: For any weight coefficient in the discrete set of weight coefficients of the shared energy consumption model, while keeping the hyperparameters of the shared energy consumption model unchanged, the shared energy consumption model is retrained using K-fold hierarchical cross-validation based on the sample data subset of the target machine and the weight coefficient to obtain a candidate energy consumption model; wherein, during the retraining process, the weight coefficient is applied to negative sample data and a preset weight coefficient is applied to positive sample data. If there is a target candidate energy consumption model among the candidate energy consumption models with an accuracy greater than or equal to a preset accuracy threshold, then the energy consumption model of the target machine is determined from the target candidate energy consumption models.

5. The method according to claim 4, characterized in that, The step of obtaining the hyperparameter increment of the target machine based on the shared energy consumption model and the energy consumption model of the target machine includes: The increment of the leaf weight vector of the target machine is determined based on the difference between the leaf weight vector of the energy consumption model of the target machine and the leaf weight vector of the shared energy consumption model. The non-zero elements in the increment of the leaf weight vector of the target machine are serialized to obtain the hyperparameter increment of the target machine.

6. The method according to any one of claims 1-5, characterized in that, The storage of the shared energy consumption model at the inference terminal, and the hyperparameter increments of the target machine, include: The shared energy consumption model is serialized into a binary file and deployed to the inference end as a global read-only resource for all machines; The hyperparameter increments of the target machine are written as patch files to the patch directory of the shared energy consumption model; wherein, the patch files record the identifier and timestamp of the target machine; A notification message is sent to the inference terminal, the notification message indicating that the shared energy consumption model has been deployed or updated.

7. A task processing method, characterized in that, The method includes: In response to the inference service startup, the shared energy consumption model obtained by the method as described in any one of claims 1-6 is loaded into the shared memory, and the hyperparameter increments recorded in the patch files of the target machines in the patch directory are injected into the hyperparameter increment area of ​​the shared memory. In response to an inference service request for a target machine, based on the shared energy consumption model and the patch file of the target machine in the patch directory, the hyperparameters of the shared energy consumption model are updated, and the updated shared energy consumption model is used to execute the inference service request for the target machine. In response to an inference service request for a non-target machine, the inference service request for the non-target machine is executed based on the shared energy consumption model.

8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.