Model modeling method and device, equipment, storage medium and program product

By using the slime mold algorithm to iteratively update the individual positions of slime molds and adjust the model parameters according to the error value, the accuracy of the IDC computer room temperature prediction model is solved, and the precise control and energy consumption optimization of the IDC computer room temperature are achieved.

CN120470890APending Publication Date: 2025-08-12CHINA MOBILE GRP GANSU CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510499872.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing IDC room temperature prediction model has insufficient coverage of empirical data or insufficient adaptability of algorithms, resulting in a decrease in the accuracy of prediction results, making it difficult to achieve accurate control of the IDC room temperature.

Method used

The preset mucosmic algorithm is used to update the individual positions of mucosmic mucosmics, determine and update model parameters according to the mapping relationship between position and model parameters, and adjust the control parameters through error values, iteratively update the model parameters until the minimum error value is reached, and the target model is constructed.

Benefits of technology

Improve the accuracy of model prediction results, ensure the accuracy of IDC room temperature prediction, reduce energy consumption and avoid degradation or failure of server performance in the room.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120470890A_ABST
    Figure CN120470890A_ABST
Patent Text Reader

Abstract

The invention discloses a model modeling method and device, equipment, a storage medium and a program product, and the method comprises the steps: updating the position of a myxomycete individual through employing a preset myxomycete algorithm, and obtaining an updated myxomycete individual corresponding to the myxomycete individual; determining updated model parameters according to a mapping relation between the positions of the myxus individuals and the model parameters; under the condition that the model parameters of the model are updated model parameters, calculating an error value corresponding to the updated myxomycete individual by utilizing a prediction result of the model and the label data; according to the error value, adjusting a control parameter in a preset colistification algorithm to obtain an updated colistification algorithm; and taking the updated myxomycete algorithm as a preset myxomycete algorithm, returning to the step of updating the position of the myxomycete individual by adopting the preset myxomycete algorithm to obtain an updated myxomycete individual corresponding to the myxomycete individual until the returning frequency reaches a preset threshold value, and constructing the target model according to the model parameter corresponding to the minimum error value. The accuracy of a model prediction result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of artificial intelligence technology, and in particular relates to a model building method, apparatus, device, storage medium and program product. Background Art

[0002] Internet Data Centers (IDCs) provide businesses and governments with a full range of services, including server hosting, leasing, and related value-added services. To ensure stable operation of IDC computer rooms, precise temperature control is required.

[0003] Currently, IDC room temperatures can be predicted to precisely control the air conditioning system and achieve dynamic regulation. However, IDC room temperature prediction models primarily rely on physical modeling and traditional machine learning methods. These models rely on empirical data and algorithms to accurately predict temperature. This can lead to reduced prediction accuracy if the empirical data fails to fully capture all possible temperature variations or if the algorithm employed lacks adaptability. Summary of the Invention

[0004] The embodiments of the present application provide a model building method, apparatus, device, storage medium and program product, which can improve the accuracy of model prediction results.

[0005] In a first aspect, an embodiment of the present application provides a model building method, comprising:

[0006] The preset slime mold algorithm is used to update the position of each slime mold individual to obtain the updated slime mold individual corresponding to each slime mold individual;

[0007] According to the mapping relationship between the position of the slime mold individual and the model parameters, the updated model parameters corresponding to each updated slime mold individual are determined;

[0008] For each updated slime mold individual, when the model parameters of the model are the updated model parameters, the error value corresponding to the updated slime mold individual is calculated using the prediction result of the model and the label data;

[0009] Adjusting the control parameters in the preset slime mold algorithm according to the error value corresponding to each updated slime mold individual to obtain an updated slime mold algorithm;

[0010] The updated slime mold algorithm is used as the preset slime mold algorithm, and the step of using the preset slime mold algorithm to update the position of each slime mold individual to obtain an updated slime mold individual corresponding to each slime mold individual is returned to execute until the number of returns reaches a preset threshold, and the target model is constructed according to the model parameters corresponding to the minimum error value.

[0011] In a possible implementation, before determining the updated model parameters corresponding to each updated slime mold individual based on the mapping relationship between the position of the slime mold individual and the model parameters, the method further includes:

[0012] Determine the model's indicators to be optimized;

[0013] Constructing a correspondence between the indicator to be optimized and the position vector dimension of the slime mold individual;

[0014] The parameters of the indicator to be optimized are converted according to a preset conversion rule corresponding to each position vector dimension to determine a mapping relationship between the model parameters and the position of the slime mold individual.

[0015] In one possible implementation, for each updated slime mold individual, when the model parameters of the model are the updated model parameters, calculating the error value corresponding to the updated slime mold individual using the prediction result of the model and the label data, the method further includes:

[0016] Adjusting the model parameters of the neural network model to the updated model parameters to obtain a model to be optimized;

[0017] Obtain environmental data and numerical weather forecast data within a preset time period;

[0018] Constructing a training data set and a label data set of the model according to the environmental data and the numerical weather forecast data;

[0019] Using the training data set and the label data set to train the model to be optimized to obtain an iterative model;

[0020] The error value is calculated using the prediction result of the iterative model and the label data.

[0021] In a possible implementation, constructing the training dataset and the label dataset of the model based on the environmental data and the numerical weather forecast data includes:

[0022] Using the quartile method, abnormal data in the environmental data and the numerical weather forecast data are set to null values to obtain first environmental data and first numerical weather forecast data;

[0023] performing linear interpolation on the first environmental data and the first numerical weather forecast data to obtain second environmental data and second numerical weather forecast data;

[0024] Normalizing the second environmental data and the second numerical weather forecast data to obtain third environmental data and third numerical weather forecast data;

[0025] The training data set and the label data set are constructed using the third environmental data and the third numerical weather forecast data.

[0026] In one possible implementation, calculating the error value corresponding to the updated slime mold individual using the prediction result of the model and the label data includes:

[0027] The error value is calculated using the following formula:

[0028]

[0029] Where, f is the error value, Y is the number of samples in the training data set, and y i is the prediction result, t i is the label data.

[0030] In one possible implementation, the control parameters include slime mold position update mode control parameters and adaptive weights of slime mold individuals; and adjusting the control parameters in the preset slime mold algorithm according to the error value corresponding to each updated slime mold individual to obtain an updated slime mold algorithm includes:

[0031] The error value is used to adjust the control parameters of the slime mold position update method and the adaptive weights of the slime mold individuals to obtain the updated slime mold algorithm.

[0032] In a second aspect, an embodiment of the present application provides a model building device, comprising:

[0033] An updating module is used to update the position of each slime mold individual using a preset slime mold algorithm to obtain an updated slime mold individual corresponding to each slime mold individual;

[0034] a determination module, configured to determine the updated model parameters corresponding to each updated slime mold individual based on a mapping relationship between the position of the slime mold individual and the model parameters;

[0035] a calculation module, configured to calculate, for each updated slime mold individual, an error value corresponding to the updated slime mold individual using the prediction result of the model and the label data, when the model parameters of the model are the updated model parameters;

[0036] an adjustment module, configured to adjust the control parameters in the preset slime mold algorithm according to the error value corresponding to each updated slime mold individual, to obtain an updated slime mold algorithm;

[0037] A loop module is configured to use the updated slime mold algorithm as the preset slime mold algorithm, return to execute the above-mentioned step of updating the position of each slime mold individual using the preset slime mold algorithm to obtain an updated slime mold individual corresponding to each slime mold individual, until the number of returns reaches a preset threshold, and construct a target model according to the model parameters corresponding to the minimum error value.

[0038] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions;

[0039] When the processor executes the computer program instructions, the model building method according to the first aspect is implemented.

[0040] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the model modeling method of the first aspect is implemented.

[0041] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the model modeling method as in the first aspect.

[0042] The present invention provides a modeling method, apparatus, device, storage medium, and program product for updating the positions of individual slime molds using a preset slime mold algorithm. The positions of the individual slime molds are mapped to model parameters, thereby obtaining updated model parameters corresponding to each updated slime mold. After updating the model parameters using the updated model parameters, an error value corresponding to each updated slime mold is calculated. Based on the error value corresponding to each updated slime mold, it is possible to determine whether the position and direction of the individual slime mold is correct, thereby updating the control parameters in the preset slime mold algorithm and adjusting the updated direction of the individual slime mold positions in real time. Thus, since the positions of the individual slime molds are mapped to the model parameters, the positions of the individual slime molds are iteratively updated using the preset slime mold algorithm to achieve iterative updates of the model parameters. When the number of returns reaches a preset threshold, a target model is constructed using the model parameters corresponding to the minimum error value. The model parameters corresponding to the minimum error value are the optimal model parameters obtained by iterative calculation using the preset slime mold algorithm, thereby improving the accuracy of the target model's prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0044] Figure 1 This is a flow chart of a model building method provided in an embodiment of the present application;

[0045] Figure 2 This is a flowchart of a mapping relationship construction method provided in an embodiment of the present application;

[0046] Figure 3 is an exemplary schematic diagram of a model building method provided in an embodiment of the present application;

[0047] Figure 4 Schematic diagram of a model building device provided in an embodiment of the present application;

[0048] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.

[0050] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0051] At present, in order to achieve more precise control of the air-conditioning system of the IDC computer room, reduce energy consumption, and avoid server performance degradation or server failure in the computer room due to unstable computer room temperature, a single prediction model can be used to predict the computer room temperature, such as the Back Propagation Neural Network (BP) neural network, support vector machine, long short-term memory neural network, etc.

[0052] Physical modeling, among other things, requires a large amount of physical measurement data and parameter tuning during the modeling process, making it inefficient. Furthermore, physical modeling relies on geographic information, meteorological data, and numerical weather forecasts, which are significantly affected by the accuracy of numerical weather forecasts and make it difficult to adapt to extreme weather conditions. Furthermore, in environments with frequent temperature fluctuations, physical models may struggle to adjust to these changes in a timely manner.

[0053] In order to solve the problems of the prior art, the embodiments of the present application provide a model building method, apparatus, device, storage medium and program product. The following first describes the model building method provided by the embodiments of the present application. The method is applied to electronic devices, such as Figure 1 As shown, the method includes:

[0054] S101. Using a preset slime mold algorithm, the position of each slime mold individual is updated to obtain an updated slime mold individual corresponding to each slime mold individual.

[0055] Among them, the preset slime mold algorithm refers to the existing technical standards and will not be repeated here.

[0056] It is understood that the preset slime mold algorithm can update the position of each slime mold individual based on the fitness value of each slime mold individual, so that each slime mold individual moves in the direction of a higher fitness value. The fitness value is used to represent the food odor concentration at the location of different slime mold individuals. In the embodiment of the present application, the fitness value is used to represent the distance between the location of each slime mold individual and the optimal model parameters.

[0057] S102: Determine the updated model parameters corresponding to each updated slime mold individual according to the mapping relationship between the position of the slime mold individual and the model parameters.

[0058] The position of a slime mold individual is represented by a position vector. The number of dimensions of the position vector is the same as the number of model parameter indices. That is, each dimension of the position vector corresponds to a model parameter of a certain indicator, and each slime mold individual position corresponds to a set of model parameters. For example, the position vector of a slime mold individual is [x1, x2, x3, x4], where x1 corresponds to indicator 1, x2 to indicator 2, x3 to indicator 3, and x4 to indicator 4. As an example, indicator 1 can be the convolution kernel size, indicator 2 can be the learning rate, indicator 3 can be the model hidden layer dimension, and indicator 4 can be the number of training times.

[0059] Therefore, the electronic device can obtain the model parameters corresponding to each position vector by reading the position vector of the updated slime mold individual, thereby determining the updated model parameters corresponding to the updated slime mold individual.

[0060] S103 . For each updated slime mold individual, when the model parameters of the model are updated model parameters, the error value corresponding to the updated slime mold individual is calculated using the prediction result of the model and the label data.

[0061] Specifically, after obtaining the updated model parameters corresponding to each updated slime mold individual, the electronic device adjusts the model parameters of the trained model according to each updated model parameter, and after the adjustment, calculates the error value using the prediction result and the label data.

[0062] The error value represents the gap between the predicted result and the labeled data. As you can understand, the smaller the error value, the higher the accuracy of the model. Conversely, the larger the error value, the lower the accuracy of the model.

[0063] S104 , adjusting control parameters in a preset slime mold algorithm according to the error value corresponding to each updated slime mold individual to obtain an updated slime mold algorithm.

[0064] It is understandable that after the control parameters are updated, the electronic device can search for a direction with a smaller error value according to the control parameters using a preset slime mold algorithm, so as to move the slime mold individuals in the direction with a smaller error value.

[0065] S105: Using the updated slime mold algorithm as the preset slime mold algorithm, returning to the above step of updating the position of each slime mold individual using the preset slime mold algorithm to obtain an updated slime mold individual corresponding to each slime mold individual, until the number of returns reaches a preset threshold, and constructing a target model according to the model parameters corresponding to the minimum error value.

[0066] The preset threshold is set according to actual business needs and is used to indicate the maximum number of iterations of the preset slime mold algorithm.

[0067] Using the above method, the positions of individual slime molds are updated using a preset slime mold algorithm to obtain updated slime mold individuals corresponding to each individual slime mold. A mapping relationship exists between the positions of individual slime molds and model parameters, thereby obtaining updated model parameters corresponding to each updated slime mold individual. After updating the model parameters using the updated model parameters, an error value corresponding to each updated slime mold individual can be calculated. Based on the error value corresponding to each updated slime mold individual, it is possible to determine whether the position and direction of the individual slime mold are correct, thereby updating the control parameters in the preset slime mold algorithm and adjusting the updated direction of the individual slime mold positions in real time. Thus, since the positions of individual slime molds and model parameters exist in a mapping relationship, iteratively updating the positions of individual slime molds using the preset slime mold algorithm can achieve iterative updating of the model parameters. When the number of returns reaches a preset threshold, a target model is constructed using the model parameters corresponding to the minimum error value. The model parameters corresponding to the minimum error value are the optimal model parameters obtained by iterative calculation using the preset slime mold algorithm, thereby improving the accuracy of the target model's prediction results.

[0068] It should be noted that the parameters of the preset slime mold algorithm can be set according to actual business needs. The parameters of the slime mold algorithm include the number of particles (p), spatial dimension (d), position update parameter (z), and maximum number of iterations (T). The number of particles is used to indicate the generation of p slime mold individuals in the entire space, the spatial dimension is used to indicate the dimension of the algorithm's search space, the position update parameter is used to balance the algorithm's global and local search capabilities, and the maximum number of iterations is used to indicate the algorithm's final search depth.

[0069] After completing the setting of the preset slime mold algorithm, for the above S101, the preset slime mold algorithm is used to update the position of each slime mold individual to obtain an updated slime mold individual corresponding to each slime mold individual. Specifically, the position of each slime mold individual is updated according to the following formula 1:

[0070]

[0071] Among them, U B and L B Indicates the boundary conditions of the preset search range; X b represents the position of the slime mold individual with the smallest error value; v b represents the control parameter; W represents the adaptive weight of the slime mold individual, which ensures that the algorithm converges quickly while maintaining a certain disturbance rate, thereby avoiding the problem of the algorithm falling into the local optimum; X A and X B represents the positions of two randomly selected slime mold individuals; v c represents the control parameter; X new Indicates updating the position of the slime mold individual; rand and r are random numbers within the preset range; p represents the control parameter of the slime mold position update method.

[0072] Among them, U B and L B It is pre-set according to actual business needs, for example, U B =[5,0.01,256,200], L B =[2,0.0001,16,20]. b The value range of is [-a, a], where the calculation formula of a is shown in Formula 2:

[0073]

[0074] Where t represents the number of iterations corresponding to this update, which is the number of returns in the above embodiment, and T represents the maximum number of iterations. As the number of iterations increases, the value of a will gradually decrease, thus affecting v bThe value range of makes the algorithm's search behavior gradually shift from global search to local search to achieve algorithm convergence.

[0075] After obtaining the updated slime mold individuals through the above calculations, the updated model parameters corresponding to the updated slime mold individuals need to be determined. The mapping relationship between the positions of the slime mold individuals and the model parameters can be achieved by: Figure 2 The method shown is constructed as Figure 2 As shown, the mapping relationship construction method includes:

[0076] S201. Determine the indicators to be optimized of the model.

[0077] The indicator to be optimized can be set based on experience. In one example, the indicator to be optimized can be the convolution kernel size, the learning rate, the model hidden layer dimension, or the number of training times.

[0078] S202: Construct a corresponding relationship between the indicator to be optimized and the position vector dimension of the slime mold individual.

[0079] It should be noted that the number of position vector dimensions of the slime mold individuals is the same as the number of indicators to be optimized, and the position vector dimensions and the indicators to be optimized are one-to-one corresponding.

[0080] S203 : Convert the parameters of the indicator to be optimized according to the preset conversion rules corresponding to each position vector dimension, and determine the mapping relationship between the model parameters and the positions of the slime mold individuals.

[0081] The preset conversion rules may be preset based on experience.

[0082] Accordingly, after the position of the slime mold individual is updated, the electronic device can convert the position vector of each position vector dimension according to the preset conversion rule corresponding to each position vector dimension, thereby obtaining the model parameters corresponding to each slime mold individual.

[0083] Using the method provided in the embodiments of this application, by establishing a preset correspondence between the indicator to be optimized and the position vector dimension, a mapping relationship between model parameters and the positions of individual slime molds can be established. This transforms the problem of finding the optimal model parameters into the problem of finding the optimal positions of individual slime molds. Subsequently, using the preset slime mold algorithm, the optimal positions of individual slime molds can be accurately determined, thereby obtaining the optimal model parameters. Using the preset slime mold algorithm improves the accuracy and efficiency of model parameter optimization, thereby constructing the target model using the optimized model parameters and improving the accuracy of the target model's prediction results.

[0084] In some embodiments of the present application, for the above S103, for each updated slime mold individual, when the model parameters of the model are updated model parameters, the error value corresponding to the updated slime mold individual is calculated using the model prediction results and label data, which can be specifically implemented as follows:

[0085] Step 1: Adjust the model parameters of the neural network model to update the model parameters to obtain the model to be optimized.

[0086] The neural network model may be a convolutional neural network-long short-term memory neural network (CNN-LSTM).

[0087] Step 2: Obtain environmental data and numerical weather forecast data within a preset time period.

[0088] Among them, the preset time period can be set according to actual business needs. For example, the preset time period can be from October 2022 to October 2023.

[0089] Specifically, for data within a preset time period, a preset sampling frequency may be used to sample the data within the preset time period. For example, the sampling time resolution is 30 minutes, that is, environmental data and numerical weather data are collected every 30 minutes.

[0090] In one example, the environmental data includes the temperature and humidity inside the cold aisle, the temperature and humidity outside the cold aisle, and the return air temperature and humidity at the air conditioning terminal. The numerical weather forecast data includes the temperature and humidity data for the next two hours at the time of environmental data collection.

[0091] Step 3: Build the training dataset and label dataset of the model based on the environmental data and numerical weather forecast data.

[0092] After obtaining the environmental data and numerical weather forecast data, the environmental data and numerical weather forecast data are preprocessed to ensure their accuracy. Specifically, the following steps are included:

[0093] Step A: using the quartile method to set abnormal data in the environmental data and the numerical weather forecast data to null values, thereby obtaining first environmental data and first numerical weather forecast data.

[0094] Specifically, after sorting the environmental data and numerical weather forecast data, the electronic device calculates the first quartile and the third quartile, then calculates the interquartile range based on the first quartile and the third quartile, and then uses the interquartile range, the first quartile and the third quartile to set the outlier limit, and finally uses the outlier limit to identify abnormal data.

[0095] Step B: performing linear interpolation on the first environmental data and the first numerical weather forecast data to obtain second environmental data and second numerical weather forecast data.

[0096] Among them, after using the quartile method to remove abnormal data and setting the location of the abnormal data as a null value, the value of each null value location is estimated by linear interpolation, and the estimated value is inserted into the corresponding null value location.

[0097] Step C: normalizing the second environmental data and the second numerical weather forecast data to obtain third environmental data and third numerical weather forecast data.

[0098] Step D: construct a training data set and a label data set using the third environmental data and the third numerical weather forecast data.

[0099] It should be noted that after the third environmental data and the third numerical weather forecast data are determined as described above, the electronic device can also reconstruct the third environmental data and the third numerical weather forecast data so that the reconstructed third environmental data and the third numerical weather forecast data can meet the requirements of the input and output sample sets of the model.

[0100] Specifically, when the model is a CNN-LSTM model, the requirements for the large input and output sample sets of the CNN-LSTM model can be expressed as:

[0101] R={(x i ,y i ) i=1,2,…,n} s Formula 3

[0102] Among them, R represents the input and output sample set based on the time series CNN-LSTM model; x i y represents the 48*8 input matrix consisting of the temperature and humidity in the cold aisle, the temperature and humidity outside the cold aisle, the return air temperature and humidity at the air conditioning terminal, and the temperature and humidity sequence corresponding to the above 48 time points in the next hour in the i-th sample; i The 6*2 output matrix that represents the sequence of the temperature inside the cold channel and the temperature outside the cold channel at the next 6 time points corresponding to the above 48 time points in the i-th sample is y i represents the label data corresponding to the i-th sample; s represents the capacity of each sample; n represents the total number of samples.

[0103] In addition, after the electronic device reconstructs the input and output sample sets, the input and output sample sets can be divided according to a preset ratio to obtain a training set and a validation set. The training set is used to train the neural network model, and the validation set is used to evaluate the performance of the trained model.

[0104] By preprocessing the acquired environmental data and numerical weather forecast data, anomalies can be removed, ensuring data accuracy. Subsequent training of the optimization model using the preprocessed data can improve the accuracy of the model's predictions.

[0105] Step 4: Use the training dataset and the label dataset to train the model to be optimized to obtain an iterative model.

[0106] Step 5: Calculate the error value using the prediction results of the iterative model and the label data.

[0107] For example, using the method provided in the embodiments of this application, by collecting environmental data and numerical weather forecast data from the computer room, and using this data to train the optimization model, the resulting iterative model can be used to predict the computer room temperature. In this way, the trained model can predict the computer room temperature, facilitating precise control of the air conditioning system and optimizing energy consumption.

[0108] In some embodiments of the present application, for the above S103, for each updated slime mold individual, when the model parameters of the model are updated model parameters, the error value corresponding to the updated slime mold individual is calculated using the model prediction results and label data. The error value can be calculated using the following formula:

[0109]

[0110] Among them, f is the error value, Y is the number of samples in the training data set, and y i is the prediction result, t i is the label data.

[0111] Furthermore, based on the error values calculated above, the control parameters of the preset annual slime mold algorithm are adjusted using the calculated error values, so that the electronic device uses the adjusted preset slime mold algorithm to update the positions of the slime mold individuals, continuously approaching the optimal solution for the model parameters, and so that the error values after iterative calculation approach zero. Based on this, the control parameters include the slime mold position update method control parameters and the adaptive weights of the slime mold individuals. Regarding S104 above, adjusting the control parameters of the preset slime mold algorithm according to the error values corresponding to each updated slime mold individual to obtain the updated slime mold algorithm can be implemented as follows:

[0112] The error value is used to adjust the control parameters of the slime mold position update method and the adaptive weights of the slime mold individuals to obtain the slime mold update algorithm.

[0113] The control parameters of the slime mold position update method are adjusted according to the following formula:

[0114] p=tanh|S(i)-D F | Formula 5

[0115] Among them, p represents the control parameter of the slime mold position update method, S(i) represents the corresponding error value of X(t), and D F Indicates the minimum error value before adjusting the control parameters in this round.

[0116] The adaptive weights of the slime mold individuals are adjusted according to the following formula:

[0117]

[0118] Among them, b F and w F They represent the best and worst error values generated in the current iteration process respectively; SmellIndex(i) = sort(S), which represents the sorted error value sequence; condition represents the slime mold individuals in the first 1 / 2 of the error value sorting; other represents the slime mold individuals in the last 1 / 2 of the error value sorting.

[0119] The following combination Figure 3 The complete process of the model building method provided in the embodiment of the present application is introduced as follows: Figure 3 As shown, the method includes:

[0120] S301. Obtain all environmental data and supporting NWP data of the IDC computer room within a preset time period.

[0121] Among them, the preset time period is set according to actual business needs, and the NWP data is the above-mentioned numerical weather forecast data.

[0122] S302: Perform data preprocessing to construct the input and output sample sets of the CNN-LSTM model.

[0123] Among them, data preprocessing refers to the process in which the electronic device uses the quartile method, linear interpolation and normalization to process environmental data and numerical weather forecast data. The specific content is referred to the relevant description in the above embodiment and will not be repeated here.

[0124] After the data is preprocessed, the preprocessed data is reconstructed according to the requirements of the input and output sample sets. The specific reconstruction method is described in the above embodiment and will not be repeated here.

[0125] While constructing the input and output sample sets, the neural network model is initialized. In one example, the basic parameters of the neural network model are shown in Table 1:

[0126] Table 1

[0127] <![CDATA[d i ]]> <![CDATA[d o ]]> <![CDATA[l i ]]> <![CDATA[l o ]]> 8 2 48 6

[0128] Among them, d i Indicates the input dimension, d o represents the output dimension, l i Indicates the length of the input sequence, l o Bao represents the output sequence length.

[0129] S303: Initialize and set the parameters of the preset slime mold algorithm, and iterate the individual positions of the slime mold according to the formula.

[0130] The parameters of the preset slime mold algorithm are determined according to the parameters to be optimized of the model to be optimized and the value range of each parameter to be optimized.

[0131] For example, the value range of the parameters to be optimized is shown in Table 2:

[0132] Table 2

[0133] <![CDATA[d c ]]> <![CDATA[r l ]]> <![CDATA[d l ]]> <![CDATA[n e ]]> [2,5] [0.0001,0.01] [16,256] [20,200]

[0134] Among them, d c is the convolution kernel size, r l is the learning rate, d l Indicates the LSTM hidden layer dimension, n e The electronic device determines the parameters of the preset slime mold algorithm according to the value range of the parameter to be optimized. For example, the boundary condition of the search range of the preset slime mold algorithm is determined to be U B =[5,0.01,256,200] and L B =[2,0.0001,16,20].

[0135] Then, after determining the parameters of the preset slime mold algorithm, the updated slime mold individual corresponding to each slime mold individual is calculated according to the formula of the preset slime mold algorithm.

[0136] In one example, after determining the parameters to be optimized and the value range of each parameter to be optimized as described above, the parameters of the preset slime mold algorithm are determined as follows: the number of particles p is 50, indicating that 50 slime mold individuals are generated within the search range; the spatial dimension d is 4, indicating that the search space dimension of the preset slime mold algorithm is 4; the position update parameter z is 0.03, and the position update parameter represents the balance between global search and local search of the preset slime mold algorithm; the maximum number of iterations T is 100, indicating the search depth of the algorithm.

[0137] Finally, after calculating the slime mold individuals using the formula of the preset slime mold algorithm, the model parameters corresponding to each slime mold individual can be determined according to the mapping relationship between the position of the slime mold individual and the model parameters. For each set of model parameters, the electronic device adjusts the neural network model according to the set of model parameters and calculates the error value of the adjusted neural network model.

[0138] Specifically, the method for calculating the error value is described in the above embodiment and will not be repeated here.

[0139] S304: Using a preset slime mold algorithm to solve the parameters to be optimized, and obtaining an optimal IDC room temperature prediction model based on the preset slime mold algorithm-optimized CNN-LSTM.

[0140] Specifically, after calculating the error values corresponding to each set of model parameters, the control parameters of the preset slime mold algorithm are adjusted using these error values to obtain an updated slime mold algorithm. This updated slime mold algorithm is then used to calculate the position of each individual slime mold. This iterative calculation continues until the maximum number of iterations is reached. The minimum error value is determined based on the error values corresponding to each set of model parameters, and the target model is then constructed based on the model parameters corresponding to the minimum error value.

[0141] Using the method provided in the embodiments of this application, a slime mold algorithm is used to iteratively calculate model parameters, obtaining model parameters corresponding to the minimum error value. By adjusting the parameters of the slime mold algorithm, the efficiency of model parameter optimization is improved, and the prediction accuracy of the target model is enhanced. Furthermore, by setting the parameters of the slime mold algorithm, the search range, global search capabilities, and local search capabilities of the slime mold algorithm can be effectively enhanced, improving the optimization accuracy and convergence speed of the slime mold algorithm. Furthermore, preprocessing the collected environmental data and numerical weather forecast data before training the neural network model can ensure data accuracy and reliability, thereby guaranteeing the prediction accuracy of the trained target model.

[0142] Based on the same concept, the embodiment of the present application provides a model building device, such as Figure 4 As shown, the device includes:

[0143] An updating module 401 is configured to update the position of each slime mold individual using a preset slime mold algorithm to obtain an updated slime mold individual corresponding to each slime mold individual;

[0144] A determination module 402 is configured to determine the updated model parameters corresponding to each updated slime mold individual based on a mapping relationship between the position of the slime mold individual and the model parameters;

[0145] a calculation module 403 for calculating, for each updated slime mold individual, an error value corresponding to the updated slime mold individual using the prediction result of the model and the label data, when the model parameters of the model are the updated model parameters;

[0146] An adjustment module 404 is configured to adjust the control parameters of the preset slime mold algorithm according to the error value corresponding to each updated slime mold individual to obtain an updated slime mold algorithm;

[0147] The loop module 405 is configured to use the updated slime mold algorithm as the preset slime mold algorithm, return to the above step of updating the position of each slime mold individual using the preset slime mold algorithm to obtain an updated slime mold individual corresponding to each slime mold individual, until the number of returns reaches a preset threshold, and construct a target model according to the model parameters corresponding to the minimum error value.

[0148] In a possible implementation, the device further includes:

[0149] Determination module 402, for determining the model's to-be-optimized indicator before determining the updated model parameters corresponding to each updated slime mold individual based on the mapping relationship between the slime mold individual's position and the model parameters;

[0150] A construction module, configured to construct a corresponding relationship between the indicator to be optimized and the position vector dimension of the slime mold individual;

[0151] A conversion module is used to convert the parameters of the indicator to be optimized according to a preset conversion rule corresponding to each position vector dimension, and determine a mapping relationship between the model parameters and the position of the slime mold individual.

[0152] In a possible implementation, the calculation module 403 is specifically configured to:

[0153] Adjusting the model parameters of the neural network model to the updated model parameters to obtain a model to be optimized;

[0154] Obtain environmental data and numerical weather forecast data within a preset time period;

[0155] Constructing a training data set and a label data set of the model according to the environmental data and the numerical weather forecast data;

[0156] Using the training data set and the label data set to train the model to be optimized to obtain an iterative model;

[0157] The error value is calculated using the prediction result of the iterative model and the label data.

[0158] In a possible implementation, the calculation module 403 is specifically configured to:

[0159] Using the quartile method, abnormal data in the environmental data and the numerical weather forecast data are set to null values to obtain first environmental data and first numerical weather forecast data;

[0160] performing linear interpolation on the first environmental data and the first numerical weather forecast data to obtain second environmental data and second numerical weather forecast data;

[0161] Normalizing the second environmental data and the second numerical weather forecast data to obtain third environmental data and third numerical weather forecast data;

[0162] The training data set and the label data set are constructed using the third environmental data and the third numerical weather forecast data.

[0163] In a possible implementation, the calculation module 403 is specifically configured to:

[0164] The error value is calculated using the following formula:

[0165]

[0166] Where, f is the error value, Y is the number of samples in the training data set, and y i is the prediction result, t i is the label data.

[0167] In one possible implementation, the control parameters include slime mold position update mode control parameters and adaptive weights of slime mold individuals; the adjustment module 404 is specifically configured to:

[0168] The error value is used to adjust the control parameters of the slime mold position update method and the adaptive weights of the slime mold individuals to obtain the updated slime mold algorithm.

[0169] It should be noted that the modeling device is a device corresponding to the above-mentioned model modeling method. All implementation methods in the above-mentioned method embodiments are applicable to the embodiments of the device and can achieve the same technical effects.

[0170] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0171] The electronic device may include a processor 501 and a memory 502 storing computer program instructions.

[0172] Specifically, the processor 501 may include a central processing unit (CPU) or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0173] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 502 may include removable or non-removable (or fixed) media. Where appropriate, the memory 502 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 502 is a non-volatile solid-state memory.

[0174] In certain embodiments, the memory 502 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0175] The processor 501 reads and executes computer program instructions stored in the memory 502 to implement any one of the model building methods in the above embodiments.

[0176] In one example, the electronic device may further include a communication interface 503 and a bus 504. Figure 5 As shown, the processor 501 , the memory 502 , and the communication interface 503 are connected via a bus 504 and communicate with each other.

[0177] The communication interface 503 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0178] The bus 504 includes hardware, software, or both that couples components of the electronic device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Super Transmission (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, the bus 504 may include one or more buses. Although embodiments herein describe and illustrate a particular bus, this application contemplates any suitable bus or interconnect.

[0179] In addition, in conjunction with the model building methods in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the model building methods in the above embodiments is implemented.

[0180] An embodiment of the present application also provides a computer program product, including a computer program, which implements any one of the model modeling methods in the above embodiments when the computer program is processed and executed.

[0181] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0182] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (erasable read-only memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0183] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0184] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0185] The above is only a specific implementation method of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited to this. Any technician familiar with this technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the scope of protection of this application.

Claims

1. A model building method, characterized in that: include: The preset slime mold algorithm is used to update the position of each slime mold individual to obtain the updated slime mold individual corresponding to each slime mold individual; According to the mapping relationship between the position of the slime mold individual and the model parameters, the updated model parameters corresponding to each updated slime mold individual are determined; For each updated slime mold individual, when the model parameters of the model are the updated model parameters, the error value corresponding to the updated slime mold individual is calculated using the prediction result of the model and the label data; Adjusting the control parameters in the preset slime mold algorithm according to the error value corresponding to each updated slime mold individual to obtain an updated slime mold algorithm; The updated slime mold algorithm is used as the preset slime mold algorithm, and the step of using the preset slime mold algorithm to update the position of each slime mold individual to obtain an updated slime mold individual corresponding to each slime mold individual is returned to execute until the number of returns reaches a preset threshold, and the target model is constructed according to the model parameters corresponding to the minimum error value.

2. The method according to claim 1, characterized in that Before determining the updated model parameters corresponding to each updated slime mold individual based on the mapping relationship between the position of the slime mold individual and the model parameters, the method further includes: Determine the model's indicators to be optimized; Constructing a correspondence between the indicator to be optimized and the position vector dimension of the slime mold individual; The parameters of the indicator to be optimized are converted according to a preset conversion rule corresponding to each position vector dimension to determine a mapping relationship between the model parameters and the position of the slime mold individual.

3. The method according to claim 1, characterized in that For each updated slime mold individual, when the model parameters of the model are the updated model parameters, calculating the error value corresponding to the updated slime mold individual using the prediction result of the model and the label data, including: Adjusting the model parameters of the neural network model to the updated model parameters to obtain a model to be optimized; Obtain environmental data and numerical weather forecast data within a preset time period; Constructing a training data set and a label data set of the model according to the environmental data and the numerical weather forecast data; Using the training data set and the label data set to train the model to be optimized to obtain an iterative model; The error value is calculated using the prediction result of the iterative model and the label data.

4. The method according to claim 3, characterized in that The training data set and label data set for constructing the model based on the environmental data and the numerical weather forecast data include: Using the quartile method, abnormal data in the environmental data and the numerical weather forecast data are set to null values to obtain first environmental data and first numerical weather forecast data; performing linear interpolation on the first environmental data and the first numerical weather forecast data to obtain second environmental data and second numerical weather forecast data; Normalizing the second environmental data and the second numerical weather forecast data to obtain third environmental data and third numerical weather forecast data; The training data set and the label data set are constructed using the third environmental data and the third numerical weather forecast data.

5. The method according to claim 3 or 4 is characterized in that Calculating the error value corresponding to the updated slime mold individual using the prediction result of the model and the label data includes: The error value is calculated using the following formula: Where, f is the error value, Y is the number of samples in the training data set, and y i is the prediction result, t i is the label data.

6. The method according to claim 5, characterized in that The control parameters include slime mold position update mode control parameters and adaptive weights of slime mold individuals; the control parameters in the preset slime mold algorithm are adjusted according to the error value corresponding to each updated slime mold individual to obtain an updated slime mold algorithm, including: The error value is used to adjust the control parameters of the slime mold position update method and the adaptive weights of the slime mold individuals to obtain the updated slime mold algorithm.

7. A model building device, characterized in that: include: An updating module is used to update the position of each slime mold individual using a preset slime mold algorithm to obtain an updated slime mold individual corresponding to each slime mold individual; a determination module, configured to determine the updated model parameters corresponding to each updated slime mold individual based on a mapping relationship between the position of the slime mold individual and the model parameters; a calculation module, configured to calculate, for each updated slime mold individual, an error value corresponding to the updated slime mold individual using the prediction result of the model and the label data, when the model parameters of the model are the updated model parameters; an adjustment module, configured to adjust the control parameters in the preset slime mold algorithm according to the error value corresponding to each updated slime mold individual, to obtain an updated slime mold algorithm; A loop module is configured to use the updated slime mold algorithm as the preset slime mold algorithm, return to execute the above-mentioned step of updating the position of each slime mold individual using the preset slime mold algorithm to obtain an updated slime mold individual corresponding to each slime mold individual, until the number of returns reaches a preset threshold, and construct a target model according to the model parameters corresponding to the minimum error value.

8. An electronic device, characterized in that: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the model building method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the model building method according to any one of claims 1 to 6.

10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the model building method according to any one of claims 1 to 6.