Temporary power safety management method and system based on digital power supply
By defining the impact response function and designing a multi-layer model architecture for feature extraction and expression, and combining the parameter adaptation domain to optimize the model parameters, the problems of low data feature processing efficiency, low model training efficiency and low optimization search efficiency in traditional methods are solved, and the problem of low data feature processing efficiency is achieved. More efficient data processing and model training.
Patent Information
- Application Number
- CN202411529315.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-30
AI Technical Summary
Traditional data feature processing methods have low extraction efficiency and insufficient feature expression, making it difficult to capture the frequency domain characteristics of time series data; traditional power safety monitoring model has a single architecture, insufficient activation function adaptability, insufficient feature fusion, low training efficiency and easy to pass Fitting; Traditional model optimization methods have low search efficiency and are prone to fall into local optimal solutions, relying on manual experience.
Feature extraction is performed by defining the impact response function to enrich feature dimensions; design a multi-layer model architecture, using dynamic adaptation activation function and multiple layer structures (feedforward layer, jump compensation layer, loop layer, output layer) for feature expression and fusion. ; Use parameter adaptation domain and iterative search to optimize model parameters to reduce manual intervention.
It improves data processing efficiency and model understanding of time series data complexity, enhances the model's feature expression ability and training efficiency, reduces the risk of overfitting, and improves the accuracy and stability of model optimization.
Smart Images

Figure CN119048284B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electricity safety management, and specifically to a temporary electricity safety management method and system based on digital power supply. Background Art
[0002] The temporary power safety management method and system based on digital power supply is based on machine learning, integrates precise data collection technology, and uses data analysis and processing technology, combined with power system professional knowledge and safety standards, to build an efficient and scientific temporary power safety management system. However, the traditional data feature processing method has the problems of low extraction efficiency, insufficient feature expression, and difficulty in effectively capturing the frequency domain characteristics of time series data; the traditional power safety monitoring model has the problems of single model architecture, insufficient adaptability of activation function, insufficient feature fusion, low training efficiency and high risk of overfitting; the traditional model optimization method has the problems of low search efficiency, easy to fall into local optimal solution, and parameter adjustment relying on manual experience. Summary of the invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a temporary power safety management method and system based on digital power supply. In view of the problems of low extraction efficiency, insufficient feature expression and difficulty in effectively capturing the frequency domain characteristics of time series data in traditional data feature processing methods, this solution defines an impulse response function to perform feature extraction, enriches the feature dimension, improves the model's ability to understand the complexity of time series data, and improves the efficiency of data processing; in view of the problems of single model architecture, insufficient adaptability of activation function, insufficient feature fusion, low training efficiency and high risk of overfitting in traditional power safety monitoring models, this solution designs a model architecture, a dynamically adapted activation function, a feedforward layer, a jump compensation layer, and a loop The model is established by designing the layer, the output layer, the loss function and the early stopping condition, which improves the model's adaptability to complex power safety monitoring tasks and the ability to process data, improves the model's feature expression ability and training efficiency, and reduces the risk of model overfitting; In view of the problems of low search efficiency, easy to fall into local optimal solution and parameter adjustment dependence on manual experience in traditional model optimization methods, this scheme optimizes the model by creating a parameter adaptation domain, defining extension coefficients, generating guide points, designing parameter iteration strategies and formulating iteration rules, which provides direction and scope for the search, improves the search efficiency, and enables the search process to jump out of the local optimal solution and approach the global optimal solution, reducing the possibility of manual intervention and dependence on experience, and improving the accuracy and stability of model optimization.
[0004] The technical solution adopted by the present invention is as follows: a temporary power safety management method based on digital power supply, the method comprising the following steps:
[0005] Step S1: data collection;
[0006] Step S2: data feature processing;
[0007] Step S3: Establishing a temporary power safety monitoring model;
[0008] Step S4: model optimization;
[0009] Step S5: Temporary power safety management.
[0010] Furthermore, in step S1, the data collection is to collect multi-dimensional historical temporary power consumption data, including voltage, current, power factor, frequency, harmonic components, time series data and power consumption status data, and the power consumption status data includes normal power consumption status and abnormal power consumption status.
[0011] Furthermore, in step S2, the data feature processing specifically includes the following steps:
[0012] Step S21: define the impulse response function, which is expressed as follows:
[0013] ;
[0014] Where t represents time, represents the time-integrated variable, represents the impulse response function, It means square root. represents pi, represents the smoothing parameter, e represents the natural constant;
[0015] Step S22: Feature extraction, extracting the frequency domain features of the time series data as the input feature data of the model, expressed as follows:
[0016] ;
[0017] Where f is the frequency, represents the frequency domain features extracted at time t and frequency f, Indicates the time integral variable point The original data at Indicates the time integral variable point The first-order derivative of the original data at , i represents the imaginary unit, represents the symbolic function, represents positive infinity, represents negative infinity, Denotes the time-integrated variable Integrate from negative infinity to positive infinity;
[0018] Step S23: Setting label data, setting the power usage status data as label data.
[0019] Furthermore, in step S3, the establishment of a temporary power safety monitoring model specifically includes the following steps:
[0020] Step S31: designing a model architecture, the temporary power safety monitoring model includes a feedforward layer, a jump compensation layer, a circulation layer, a dynamic adjustment layer and an output layer;
[0021] Step S32: Design a dynamic adaptation activation function, which is expressed as follows:
[0022] ;
[0023] in, represents the dynamic adaptation activation function, represents the input of the dynamic adaptation activation function, and represents the adaptation factor, Indicates taking the absolute value, represents the activation weight, represents the hyperbolic tangent function;
[0024] Step S33: Design the feed-forward layer, which is expressed as follows:
[0025] ;
[0026] in, represents the output value of the feedforward layer, , and Represent the weights of the third, second, and first layers of the feedforward layer, respectively. , and Respectively represent the bias of the 3rd, 2nd and 1st layers of the feedforward layer, Represents the input value of the first layer of the feedforward layer;
[0027] Step S34: Design a jump compensation layer, as shown below:
[0028] ;
[0029] in, represents the output of the jump compensation layer, and denote the weights of the second and first layers of the jump compensation layer, respectively. and denote the bias of the second and first layers of the jump compensation layer, respectively;
[0030] Step S35: Design a recurrent layer, which is composed of a forgetting unit, an updating unit, and an output unit, and specifically includes the following contents:
[0031] Step S351: Design a forgetting unit, which is expressed as follows:
[0032] ;
[0033] in, represents the output value of the forgetting unit at time t, represents the sigmoid activation function, and represents the weight and bias of the forgetting unit, represents the hidden state of the recurrent layer at time t-1, represents the input value of the forgetting unit at time t, represents the attenuation coefficient;
[0034] Step S352: Design status update unit, as shown below:
[0035] ;
[0036] in, represents the output value of the state update unit at time t, represents element-wise multiplication operation, and represents the weight of the state update unit, and represents the bias of the state update unit, represents the hidden state of the recurrent layer at time t-2, represents the input value of the state update unit at time t, Represents the input value of the state update unit at time t-1;
[0037] Step S353: Design the output unit, as shown below:
[0038] ;
[0039] in, represents the output value of the output unit at time t, and denote the weight and bias of the output unit respectively, Represents the input value of the output unit at time t;
[0040] Step S354: Update the hidden state of the recurrent layer, as shown below:
[0041] ;
[0042] in, represents the hidden state of the recurrent layer at time t;
[0043] Step S36: Design the output layer, which is expressed as follows:
[0044] ;
[0045] in, represents the output value of the output layer, represents the normalized exponential activation function, , and Represent the weight, input value and bias of the output layer respectively;
[0046] Step S37: Design a loss function, which is expressed as follows:
[0047] ;
[0048] in, represents the loss value of the model, k represents the index of the data used to train the model, N represents the total number of data, log(·) represents the logarithmic operation, represents the true value of the kth data, represents the model prediction value of the kth data, represents the variance, represents the output value of the kth data in the jump compensation layer, It represents the variance of the output value of the kth data in the jump compensation layer with respect to the output values of all data points in the jump compensation layer;
[0049] Step S38: Set the early stop condition and create an early stop instruction. When the instruction value is 1, the model training stops. When the instruction value is 0, the model continues to train, as shown below:
[0050] ;
[0051] Among them, u represents the number of model training times, represents the early stopping instruction during the u-th model training, Represents the loss value of the u-th model training, Represents the loss value of the u-1th model training, represents the early stopping threshold;
[0052] Step S39: Model training, expressed as follows:
[0053] ;
[0054] in, represents the model parameters during the u-th model training, represents the model parameters during the u-1th model training, represents the adjustment rate during the u-th model training, Represents the gradient of the model's loss function with respect to the parameters.
[0055] Further, in step S4, the model optimization optimizes the model by iteratively searching for high-quality parameters in the model building process, specifically comprising the following steps:
[0056] Step S41: Create a parameter adaptation domain, determine search parameters, including adaptation factor, activation weight, and early stopping threshold, set the inverse of the model loss value as the parameter fitness value, create a parameter adaptation domain, and generate an initial parameter search point group in the parameter adaptation domain;
[0057] Step S42: Generate a guide point, calculate the average position of the parameter search point group in the parameter adaptation domain at this time and the fitness values of all parameter search points, select the parameter points with the highest fitness value and the lowest fitness value, and generate a guide point, which is expressed as follows:
[0058] ;
[0059] Among them, It represents the number of parameter iterations, It represents the guide point generated at the Itth parameter iteration. represents the average position of the parameter search point group at the It-th parameter iteration, and represents random numbers that follow a standard normal distribution, Indicates the position of the parameter point with the highest current fitness value. Indicates the position of the parameter point with the lowest current fitness value;
[0060] Step S43: define the extension coefficient, which is expressed as follows:
[0061] ;
[0062] in, It represents the extension coefficient at the Itth parameter iteration. Indicates the maximum number of iterations of the parameter, It represents the Euclidean distance between the farthest two points in the parameter point group at the Itth parameter iteration. Indicates the position of the parameter point with the highest fitness value among the parameters obtained by the It-th parameter iteration. express and The Euclidean distance between
[0063] Step S44: Design parameter iteration strategy, as shown below:
[0064] ;
[0065] in, Indicates the parameter position obtained by the Itth parameter iteration, Indicates the parameter position obtained by the It-1th parameter iteration, It represents the Euclidean distance between the guide point generated at the It-th parameter iteration and the parameter position obtained at the It-1-th parameter iteration. Represents a random number ranging from 1 to 3. It means that the mean is 0 and the variance is Normally distributed random numbers;
[0066] Step S45: Formulate iteration rules, set the maximum number of iterations of parameters and the parameter fitness threshold, execute the parameter iteration strategy, calculate the fitness values of the parameter points obtained by iteration, update the parameter points with the highest fitness values and the parameter points with the lowest fitness values, and if there are parameter points whose fitness values are greater than the fitness threshold, output the parameters of the parameter point with the highest fitness value at this time as the high-quality parameters of the model building process; if the maximum number of iterations of the parameters is reached, iterate again; otherwise, increase the number of iterations by one and continue iterating.
[0067] Furthermore, in step S5, the temporary electricity safety management is to collect the user's electricity usage data in real time, process and analyze the data in real time through a temporary electricity safety monitoring model, output the electricity usage status corresponding to the electricity usage data, and issue an early warning message when the electricity usage status is an abnormal power usage status to manage the user's electricity safety in real time.
[0068] The temporary power safety management system based on digital power supply provided by the present invention includes a data acquisition module, a data feature processing module, a module for establishing a temporary power safety monitoring model, a model optimization module and a temporary power safety management module;
[0069] The data acquisition module collects multi-dimensional historical temporary power consumption data, including voltage, current, power factor, frequency, harmonic components, time series data and power consumption status data, and sends the data to the data feature processing module;
[0070] The data feature processing module receives the data sent by the data acquisition module, extracts features from the received data, sets label data, and sends the data to the module for establishing a temporary power safety monitoring model;
[0071] The module for establishing a temporary power safety monitoring model receives data sent by the data feature processing module, establishes a temporary power safety monitoring model, and sends the data to the model optimization module and the temporary power safety management module;
[0072] The model optimization module receives data sent by the module for establishing a temporary power safety monitoring model, optimizes the model by iteratively searching for high-quality parameters in the model building process, and sends the data to the temporary power safety management module;
[0073] The temporary electricity safety management module receives data sent by the temporary electricity safety monitoring model establishment module and the model optimization module, collects the user's electricity usage data in real time, uses the temporary electricity safety monitoring model to output the electricity usage status corresponding to the electricity usage data, and manages the user's temporary electricity safety.
[0074] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0075] (1) In view of the problems of low extraction efficiency, insufficient feature expression and difficulty in effectively capturing the frequency domain characteristics of time series data in traditional data feature processing methods, this scheme defines an impulse response function for feature extraction, enriches the feature dimension, improves the model's ability to understand the complexity of time series data, and improves the efficiency of data processing.
[0076] (2) In view of the problems of traditional electricity safety monitoring models, such as single model architecture, insufficient adaptability of activation functions, insufficient feature fusion, low training efficiency and high risk of overfitting, this scheme establishes a model by designing the model architecture, dynamically adapting the activation function, designing the feedforward layer, designing the jump compensation layer, designing the loop layer, designing the output layer, designing the loss function and setting the early stopping condition. This improves the model's adaptability to complex electricity safety monitoring tasks and its data processing capabilities, improves the model's feature expression ability and training efficiency, and reduces the risk of model overfitting.
[0077] (3) In view of the problems of low search efficiency, easy to fall into local optimal solutions and parameter adjustment relying on human experience in traditional model optimization methods, this scheme optimizes the model by creating a parameter adaptation domain, defining extension coefficients, generating guide points, designing parameter iteration strategies and formulating iteration rules. It provides direction and scope for the search, improves the search efficiency, and enables the search process to jump out of the local optimal solution and approach the global optimal solution, reducing the possibility of human intervention and reliance on experience, and improving the accuracy and stability of model optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 A schematic diagram of the flow chart of the temporary power safety management method based on digital power supply provided by the present invention;
[0079] Figure 2 A schematic diagram of a temporary power safety management system based on digital power supply provided by the present invention;
[0080] Figure 3 is a schematic flow chart of step S3;
[0081] Figure 4 It is a schematic diagram of the process of step S4.
[0082] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0083] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0084] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0085] Example 1, see Figure 1 The present invention provides a temporary power safety management method based on digital power supply, which includes the following steps:
[0086] Step S1: Data collection, collecting multi-dimensional historical temporary power consumption data, including voltage, current, power factor, frequency, harmonic components, time series data and power consumption status data;
[0087] Step S2: Data feature processing, extracting features and setting label data by defining an impulse response function;
[0088] Step S3: Establishing a temporary power safety monitoring model, by designing a model architecture, designing a dynamic adaptive activation function, designing a feedforward layer, designing a jump compensation layer, designing a loop layer, designing an output layer, designing a loss function and setting an early stop condition to establish a temporary power safety monitoring model;
[0089] Step S4: Model optimization, optimizing the model by creating a parameter adaptation domain, defining an extension coefficient, generating guide points, designing a parameter iteration strategy, and formulating iteration rules;
[0090] Step S5: Temporary power safety management, real-time collection of users' power consumption data, real-time processing and analysis of the data through a temporary power safety monitoring model, and real-time management of users' power safety.
[0091] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, the data collection is to collect multi-dimensional historical temporary power consumption data, including voltage, current, power factor, frequency, harmonic components, time series data and power consumption status data, and the power consumption status data includes normal power consumption status and abnormal power consumption status.
[0092] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, the data feature processing specifically includes the following steps:
[0093] Step S21: define the impulse response function, which is expressed as follows:
[0094] ;
[0095] Where t represents time, represents the time-integrated variable, represents the impulse response function, It means square root. represents pi, represents the smoothing parameter, e represents the natural constant;
[0096] Step S22: Feature extraction, extracting the frequency domain features of the time series data as the input feature data of the model, expressed as follows:
[0097] ;
[0098] Where f is the frequency, represents the frequency domain features extracted at time t and frequency f, Indicates the time integral variable point The original data at Indicates the time integral variable point The first-order derivative of the original data at , i represents the imaginary unit, represents the symbolic function, represents positive infinity, represents negative infinity, Denotes the time-integrated variable Integrate from negative infinity to positive infinity;
[0099] Step S23: Setting label data, setting the power usage status data as label data.
[0100] By performing the above operations, in order to address the problems of low extraction efficiency, insufficient feature expression and difficulty in effectively capturing the frequency domain characteristics of time series data in traditional data feature processing methods, this solution defines an impulse response function for feature extraction, enriches the feature dimension, improves the model's ability to understand the complexity of time series data, and improves data processing efficiency.
[0101] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S3, the establishment of a temporary power safety monitoring model specifically includes the following steps:
[0102] Step S31: designing a model architecture, the temporary power safety monitoring model includes a feedforward layer, a jump compensation layer, a circulation layer, a dynamic adjustment layer and an output layer;
[0103] Step S32: Design a dynamic adaptation activation function, which is expressed as follows:
[0104] ;
[0105] in, represents the dynamic adaptation activation function, represents the input of the dynamic adaptation activation function, and represents the adaptation factor, Indicates taking the absolute value, represents the activation weight, represents the hyperbolic tangent function;
[0106] Step S33: Design the feed-forward layer, which is expressed as follows:
[0107] ;
[0108] in, represents the output value of the feedforward layer, , and Represent the weights of the third, second, and first layers of the feedforward layer, respectively. , and Respectively represent the bias of the 3rd, 2nd and 1st layers of the feedforward layer, Represents the input value of the first layer of the feedforward layer;
[0109] Step S34: Design a jump compensation layer, as shown below:
[0110] ;
[0111] in, represents the output of the jump compensation layer, and denote the weights of the second and first layers of the jump compensation layer, respectively. and denote the bias of the second and first layers of the jump compensation layer, respectively;
[0112] Step S35: Design a recurrent layer, which is composed of a forgetting unit, an updating unit, and an output unit, and specifically includes the following contents:
[0113] Step S351: Design a forgetting unit, which is expressed as follows:
[0114] ;
[0115] in, represents the output value of the forgetting unit at time t, represents the sigmoid activation function, and represents the weight and bias of the forgetting unit, represents the hidden state of the recurrent layer at time t-1, represents the input value of the forgetting unit at time t, represents the attenuation coefficient;
[0116] Step S352: Design status update unit, as shown below:
[0117] ;
[0118] in, represents the output value of the state update unit at time t, represents element-wise multiplication operation, and represents the weight of the state update unit, and represents the bias of the state update unit, represents the hidden state of the recurrent layer at time t-2, represents the input value of the state update unit at time t, Represents the input value of the state update unit at time t-1;
[0119] Step S353: Design the output unit, as shown below:
[0120] ;
[0121] in, represents the output value of the output unit at time t, and denote the weight and bias of the output unit respectively, Represents the input value of the output unit at time t;
[0122] Step S354: Update the hidden state of the recurrent layer, as shown below:
[0123] ;
[0124] in, represents the hidden state of the recurrent layer at time t;
[0125] Step S36: Design the output layer, which is expressed as follows:
[0126] ;
[0127] in, represents the output value of the output layer, represents the normalized exponential activation function, , and Represent the weight, input value and bias of the output layer respectively;
[0128] Step S37: Design a loss function, which is expressed as follows:
[0129] ;
[0130] in, represents the loss value of the model, k represents the index of the data used to train the model, N represents the total number of data, log(·) represents the logarithmic operation, represents the true value of the kth data, represents the model prediction value of the kth data, represents the variance, represents the output value of the kth data in the jump compensation layer, It represents the variance of the output value of the kth data in the jump compensation layer with respect to the output values of all data points in the jump compensation layer;
[0131] Step S38: Set the early stop condition and create an early stop instruction. When the instruction value is 1, the model training stops. When the instruction value is 0, the model continues to train, as shown below:
[0132] ;
[0133] Among them, u represents the number of model training times, represents the early stopping instruction during the u-th model training, Represents the loss value of the u-th model training, Represents the loss value of the u-1th model training, represents the early stopping threshold;
[0134] Step S39: Model training, expressed as follows:
[0135] ;
[0136] in, represents the model parameters during the u-th model training, represents the model parameters during the u-1th model training, represents the adjustment rate during the u-th model training, Represents the gradient of the model's loss function with respect to the parameters.
[0137] By performing the above operations, in order to address the problems of traditional electricity safety monitoring models, such as single model architecture, insufficient adaptability of activation functions, insufficient feature fusion, low training efficiency and high risk of overfitting, this solution establishes a model by designing model architecture, dynamically adapting activation functions, feedforward layers, jump compensation layers, loop layers, output layers, loss functions and setting early stopping conditions. This improves the model's adaptability to complex electricity safety monitoring tasks and data processing capabilities, improves the model's feature expression capabilities and training efficiency, and reduces the risk of model overfitting.
[0138] Example 5, see Figure 1 and Figure 4 This embodiment is based on the above embodiment. In step S4, the model optimization optimizes the model by iteratively searching for high-quality parameters in the model building process, specifically including the following steps:
[0139] Step S41: Create a parameter adaptation domain, determine search parameters, including adaptation factor, activation weight, and early stopping threshold, set the inverse of the model loss value as the parameter fitness value, create a parameter adaptation domain, and generate an initial parameter search point group in the parameter adaptation domain;
[0140] Step S42: Generate a guide point, calculate the average position of the parameter search point group in the parameter adaptation domain at this time and the fitness values of all parameter search points, select the parameter points with the highest fitness value and the lowest fitness value, and generate a guide point, which is expressed as follows:
[0141] ;
[0142] Among them, It represents the number of parameter iterations, It represents the guide point generated at the Itth parameter iteration. represents the average position of the parameter search point group at the It-th parameter iteration, and represents random numbers that follow a standard normal distribution, Indicates the position of the parameter point with the highest current fitness value. Indicates the position of the parameter point with the lowest current fitness value;
[0143] Step S43: define the extension coefficient, which is expressed as follows:
[0144] ;
[0145] in, It represents the extension coefficient at the Itth parameter iteration. Indicates the maximum number of iterations of the parameter, It represents the Euclidean distance between the farthest two points in the parameter point group at the Itth parameter iteration. Indicates the position of the parameter point with the highest fitness value among the parameters obtained by the It-th parameter iteration. express and The Euclidean distance between
[0146] Step S44: Design parameter iteration strategy, as shown below:
[0147] ;
[0148] in, Indicates the parameter position obtained by the Itth parameter iteration, Indicates the parameter position obtained by the It-1th parameter iteration, It represents the Euclidean distance between the guide point generated at the It-th parameter iteration and the parameter position obtained at the It-1-th parameter iteration. Represents a random number ranging from 1 to 3. It means that the mean is 0 and the variance is Normally distributed random numbers;
[0149] Step S45: Formulate iteration rules, set the maximum number of iterations of parameters and the parameter fitness threshold, execute the parameter iteration strategy, calculate the fitness values of the parameter points obtained by iteration, update the parameter points with the highest fitness values and the parameter points with the lowest fitness values, and if there are parameter points whose fitness values are greater than the fitness threshold, output the parameters of the parameter point with the highest fitness value at this time as the high-quality parameters of the model building process; if the maximum number of iterations of the parameters is reached, iterate again; otherwise, increase the number of iterations by one and continue iterating.
[0150] By performing the above operations, in order to address the problems of low search efficiency, easy to fall into local optimal solutions and parameter adjustment dependence on manual experience in traditional model optimization methods, this solution optimizes the model by creating a parameter adaptation domain, defining extension coefficients, generating guide points, designing parameter iteration strategies and formulating iteration rules. It provides direction and scope for the search, improves the search efficiency, enables the search process to jump out of the local optimal solution and approach the global optimal solution, reduces the possibility of manual intervention and dependence on experience, and improves the accuracy and stability of model optimization.
[0151] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S5, the temporary electricity safety management collects the user's electricity usage data in real time, processes and analyzes the data in real time through a temporary electricity safety monitoring model, and outputs the electricity usage status corresponding to the electricity usage data. When the electricity usage status is an abnormal electricity usage status, an early warning message is issued to manage the user's electricity safety in real time.
[0152] Embodiment 7, see Figure 2 , this embodiment is based on the above embodiment. The temporary power safety management system based on digital power supply provided by the present invention includes a data acquisition module, a data feature processing module, a temporary power safety monitoring model establishment module, a model optimization module and a temporary power safety management module;
[0153] The data acquisition module collects multi-dimensional historical temporary power consumption data, including voltage, current, power factor, frequency, harmonic components, time series data and power consumption status data, and sends the data to the data feature processing module;
[0154] The data feature processing module receives the data sent by the data acquisition module, extracts features from the received data, sets label data, and sends the data to the module for establishing a temporary power safety monitoring model;
[0155] The module for establishing a temporary power safety monitoring model receives data sent by the data feature processing module, establishes a temporary power safety monitoring model, and sends the data to the model optimization module and the temporary power safety management module;
[0156] The model optimization module receives data sent by the module for establishing a temporary power safety monitoring model, optimizes the model by iteratively searching for high-quality parameters in the model building process, and sends the data to the temporary power safety management module;
[0157] The temporary electricity safety management module receives data sent by the temporary electricity safety monitoring model establishment module and the model optimization module, collects the user's electricity usage data in real time, uses the temporary electricity safety monitoring model to output the electricity usage status corresponding to the electricity usage data, and manages the user's temporary electricity safety.
[0158] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0159] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.
[0160] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A temporary power safety management method based on digital power supply, characterized in that: The method comprises the following steps: Step S1: Data collection, collecting multi-dimensional historical temporary power consumption data, including voltage, current, power factor, frequency, harmonic components, time series data and power consumption status data; Step S2: Data feature processing, extracting features and setting label data by defining an impulse response function; Step S3: Establishing a temporary power safety monitoring model, by designing a model architecture, designing a dynamic adaptive activation function, designing a feedforward layer, designing a jump compensation layer, designing a loop layer, designing an output layer, designing a loss function and setting an early stop condition to establish a temporary power safety monitoring model; Step S4: Model optimization, optimizing the model by creating a parameter adaptation domain, defining an extension coefficient, generating guide points, designing a parameter iteration strategy, and formulating iteration rules; Step S5: temporary power safety management, real-time collection of user power consumption data, real-time processing and analysis of the data through a temporary power safety monitoring model, and real-time management of user power safety; In step S2, the data feature processing specifically includes the following steps: Step S21: define the impulse response function, which is expressed as follows: ; Where t represents time, represents the time-integrated variable, represents the impulse response function, It means square root. represents pi, represents the smoothing parameter, e represents the natural constant; Step S22: Feature extraction, extracting the frequency domain features of the time series data as the input feature data of the model, expressed as follows: ; Where f is the frequency, represents the frequency domain features extracted at time t and frequency f, Indicates the time integral variable point The original data at Indicates the time integral variable point The first-order derivative of the original data at , i represents the imaginary unit, represents the symbolic function, represents positive infinity, represents negative infinity, Denotes the time-integrated variable Integrate from negative infinity to positive infinity; Step S23: Setting label data, setting the power usage status data as label data; In step S3, the establishment of a temporary power safety monitoring model specifically includes the following steps: Step S31: designing a model architecture, the temporary power safety monitoring model includes a feedforward layer, a jump compensation layer, a circulation layer, a dynamic adjustment layer and an output layer; Step S32: Design a dynamic adaptation activation function, which is expressed as follows: ; in, represents the dynamic adaptation activation function, represents the input of the dynamic adaptation activation function, and represents the adaptation factor, Indicates taking the absolute value, represents the activation weight, represents the hyperbolic tangent function; Step S33: Design the feed-forward layer, which is expressed as follows: ; in, represents the output value of the feedforward layer, , and Represent the weights of the third, second, and first layers of the feedforward layer, respectively. , and Respectively represent the bias of the 3rd, 2nd and 1st layers of the feedforward layer, Represents the input value of the first layer of the feedforward layer; Step S34: Design a jump compensation layer, as shown below: ; in, represents the output of the jump compensation layer, and denote the weights of the second and first layers of the jump compensation layer, respectively. and denote the bias of the second and first layers of the jump compensation layer, respectively; Step S35: Design a recurrent layer, which is composed of a forgetting unit, an updating unit, and an output unit, and specifically includes the following contents: Step S351: Design a forgetting unit, which is expressed as follows: ; in, represents the output value of the forgetting unit at time t, represents the sigmoid activation function, and represents the weight and bias of the forgetting unit, represents the hidden state of the recurrent layer at time t-1, represents the input value of the forgetting unit at time t, represents the attenuation coefficient, and e represents the natural constant; Step S352: Design status update unit, as shown below: ; in, represents the output value of the state update unit at time t, represents element-wise multiplication operation, and represents the weight of the state update unit, and represents the bias of the state update unit, represents the hidden state of the recurrent layer at time t-2, represents the input value of the state update unit at time t, Represents the input value of the state update unit at time t-1; Step S353: Design the output unit, as shown below: ; in, represents the output value of the output unit at time t, and denote the weight and bias of the output unit respectively, Represents the input value of the output unit at time t; Step S354: Update the hidden state of the recurrent layer, as shown below: ; in, represents the hidden state of the recurrent layer at time t; Step S36: Design the output layer, which is expressed as follows: ; in, represents the output value of the output layer, represents the normalized exponential activation function, , and Represent the weight, input value and bias of the output layer respectively; Step S37: Design a loss function, which is expressed as follows: ; in, represents the loss value of the model, k represents the index of the data used to train the model, N represents the total number of data, log(·) represents the logarithmic operation, represents the true value of the kth data, represents the model prediction value of the kth data, represents the variance, represents the output value of the kth data in the jump compensation layer, It represents the variance of the output value of the kth data in the jump compensation layer with respect to the output values of all data points in the jump compensation layer; Step S38: Set the early stop condition and create an early stop instruction. When the instruction value is 1, the model training stops. When the instruction value is 0, the model continues to train, as shown below: ; Among them, u represents the number of model training times, represents the early stopping instruction during the u-th model training, Represents the loss value of the u-th model training, Represents the loss value of the u-1th model training, represents the early stopping threshold; Step S39: Model training, expressed as follows: ; in, represents the model parameters during the u-th model training, represents the model parameters during the u-1th model training, represents the adjustment rate during the u-th model training, Represents the gradient of the model's loss function with respect to the parameters; In step S4, the model optimization optimizes the model by iteratively searching for high-quality parameters in the model building process, specifically including the following steps: Step S41: Create a parameter adaptation domain, determine search parameters, including adaptation factor, activation weight, and early stopping threshold, set the inverse of the model loss value as the parameter fitness value, create a parameter adaptation domain, and generate an initial parameter search point group in the parameter adaptation domain; Step S42: Generate a guide point, calculate the average position of the parameter search point group in the parameter adaptation domain at this time and the fitness values of all parameter search points, select the parameter points with the highest fitness value and the lowest fitness value, and generate a guide point, which is expressed as follows: ; Among them, It represents the number of parameter iterations, It represents the guide point generated at the Itth parameter iteration. represents the average position of the parameter search point group at the It-th parameter iteration, and represents random numbers that follow a standard normal distribution, Indicates the position of the parameter point with the highest current fitness value. Indicates the position of the parameter point with the lowest current fitness value; Step S43: define the extension coefficient, which is expressed as follows: ; in, It represents the extension coefficient at the Itth parameter iteration. Indicates the maximum number of iterations of the parameter, It represents the Euclidean distance between the farthest two points in the parameter point group at the Itth parameter iteration. Indicates the position of the parameter point with the highest fitness value among the parameters obtained by the It-th parameter iteration. express and The Euclidean distance between Step S44: Design parameter iteration strategy, as shown below: ; in, Indicates the parameter position obtained by the Itth parameter iteration, Indicates the parameter position obtained by the It-1th parameter iteration, It represents the Euclidean distance between the guide point generated at the It-th parameter iteration and the parameter position obtained at the It-1-th parameter iteration. Represents a random number ranging from 1 to 3. It means that the mean is 0 and the variance is Normally distributed random numbers; Step S45: Formulate iteration rules, set the maximum number of iterations of parameters and the parameter fitness threshold, execute the parameter iteration strategy, calculate the fitness values of the parameter points obtained by iteration, update the parameter points with the highest fitness values and the parameter points with the lowest fitness values, and if there are parameter points whose fitness values are greater than the fitness threshold, output the parameters of the parameter point with the highest fitness value at this time as the high-quality parameters of the model building process; if the maximum number of iterations of the parameters is reached, iterate again; otherwise, increase the number of iterations by one and continue iterating.
2. The temporary power safety management method based on digital power supply according to claim 1 is characterized in that: In step S1, the data collection is to collect multi-dimensional historical temporary power consumption data, including voltage, current, power factor, frequency, harmonic component, time series data and power consumption status data, and the power consumption status data includes normal power consumption status and abnormal power consumption status; In step S5, the temporary electricity safety management is to collect the user's electricity usage data in real time, process and analyze the data in real time through a temporary electricity safety monitoring model, output the electricity usage status corresponding to the electricity usage data, and issue an early warning message when the electricity usage status is an abnormal power usage status to manage the user's electricity safety in real time.
3. A temporary power safety management system based on digital power supply, which is used to implement the temporary power safety management method based on digital power supply as described in any one of claims 1-2, including a data acquisition module, a data feature processing module, a temporary power safety monitoring model establishment module, a model optimization module and a temporary power safety management module; The data acquisition module collects multi-dimensional historical temporary power consumption data, including voltage, current, power factor, frequency, harmonic components, time series data and power consumption status data, and sends the data to the data feature processing module; The data feature processing module receives the data sent by the data acquisition module, extracts features from the received data, sets label data, and sends the data to the module for establishing a temporary power safety monitoring model; The module for establishing a temporary power safety monitoring model receives data sent by the data feature processing module, establishes a temporary power safety monitoring model, and sends the data to the model optimization module and the temporary power safety management module; The model optimization module receives data sent by the module for establishing a temporary power safety monitoring model, optimizes the model by iteratively searching for high-quality parameters in the model building process, and sends the data to the temporary power safety management module; The temporary electricity safety management module receives data sent by the temporary electricity safety monitoring model establishment module and the model optimization module, collects the user's electricity usage data in real time, uses the temporary electricity safety monitoring model to output the electricity usage status corresponding to the electricity usage data, and manages the user's temporary electricity safety.
Citation Information
Patent Citations
Safety monitoring method for online operation state of electricity utilization information acquisition terminal
CN117833464A
Temporary electricity utilization safety and energy consumption management and control system and method
CN118137677A