Artificial Intelligence-Based Power Supply Safety Protection Methods and Systems
By detecting the current of the power supply lines and electrical equipment, and identifying abnormal states in combination with the power consumption mode, the problem of difficulty in identifying power abnormality caused by different power consumption modes of electrical equipment in the existing technology is solved, and the stability and stability of the power supply system are improved. Security.
Patent Information
- Application Number
- CN202410437435.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-12
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-04-12
AI Technical Summary
The existing technology is difficult to identify abnormal power consumption when the power consumption patterns of electrical equipment are different, and thus it is difficult to better protect the power supply system.
By detecting the supply voltage of the power supply line and the power consumption current of the electrical equipment, the trained power consumption abnormality monitoring model is used in combination with the power consumption pattern to identify abnormal states, and the corresponding switches are disconnected based on the recognition results to prevent safety risks.
It achieves accurate abnormal identification and timely protection of electrical equipment, reduces abnormal spread and chain reactions, and improves the stability and safety of the power supply system.
Smart Images

Figure CN118213938B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of circuit protection, and in particular to a power supply safety protection method and system based on artificial intelligence. Background Art
[0002] In the related art, CN113572126A discloses an overcurrent protection method, device and power supply circuit. When receiving an overcurrent signal sent by a DC-DC conversion module indicating that its output current exceeds the OCP value, the DC-DC conversion module is not immediately controlled to stop working, but the protection module is controlled to disconnect and the external device is disconnected, so that the circuit on the board is not powered off. Then, the first enable signal is output to the DC-DC conversion module within a third preset time period greater than the first preset time period, and after the first preset time period, it is determined whether the overcurrent signal sent by the DC-DC conversion module is received again. If so, it indicates that part of the circuit on the board has an overcurrent, so the DC-DC conversion module is controlled to shut down and stop supplying power to the circuit on the board; if not, the protection module is kept disconnected and only the circuit on the board continues to be powered on. This solution solves the problem that the connection of capacitive external devices easily causes power failure of the circuit on the board, and improves the power supply reliability of the circuit on the board.
[0003] CN110994548A provides a protection circuit, a power supply device and a switch power supply protection method, wherein the protection circuit includes: a determination unit, a processing unit and an overload protection unit; the determination unit is connected to the switch power supply; the processing unit is respectively connected to the determination unit and the overload protection unit; the determination unit is used to determine the voltage value and the current value of the switch power supply, and send the voltage value and the current value to the processing unit; the processing unit is used to determine whether the switch voltage satisfies the following conditions at the same time: the voltage value is within the preset standard voltage range, and the current value is within the preset standard current range, if not, the overload protection unit is triggered; the overload protection unit is used to stop supplying power to the electrical device under the triggering of the processing unit. This method can form overload protection for the switch power supply.
[0004] Therefore, in the related art, power supply protection triggers the protection mode through current and voltage anomalies. However, when the power consumption modes of the electrical equipment are different, it is difficult to identify power consumption anomalies, and thus it is difficult to better protect the power supply system.
[0005] The information disclosed in the background technology section of this application is only intended to deepen the understanding of the general background technology of this application, and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to those skilled in the art. Summary of the invention
[0006] The present invention provides a power supply safety protection method and system based on artificial intelligence, which can solve the technical problem of difficulty in identifying power consumption anomalies when the power consumption modes of power-consuming equipment are different.
[0007] According to a first aspect of the present invention, there is provided a power supply safety protection method based on artificial intelligence, comprising:
[0008] Detecting the power supply voltage of the power supply circuit at multiple times by means of a first detection device, and detecting the power consumption current of multiple power-consuming devices at multiple times by means of multiple second detection devices;
[0009] Determine a power supply voltage stability score by using power supply voltages at multiple moments in a first preset time period before a current moment, wherein the current moment is the last moment in the first preset time period;
[0010] When the power supply voltage stability score is lower than the stability threshold, a first switch between the power supply line and the power grid is controlled to be disconnected, and a second switch between the power grid and the voltage stabilizing inverter is controlled to be closed, wherein the input end of the voltage stabilizing inverter is connected to the second switch, and the output end of the voltage stabilizing inverter is connected to the power supply line;
[0011] Determine the power consumption mode of each power-consuming device by using the power consumption current at multiple moments in a second preset time period before the current moment of each power-consuming device, wherein the current moment is the last moment in the second preset time period;
[0012] The power consumption pattern of each power-consuming device and the power consumption current at multiple times within the second preset time period are processed by the trained power consumption anomaly monitoring model to determine the power consumption anomaly recognition result of each power-consuming device;
[0013] Disconnecting a third switch corresponding to the electrical device for which the power consumption abnormality identification result is abnormal power consumption, wherein the third switch is located between the electrical device and the power supply line;
[0014] Determining a first number of power-consuming devices for which the power-usage abnormality identification result is power-usage abnormality;
[0015] When the first quantity meets a preset quantity condition, the first switch and the second switch are disconnected.
[0016] According to a second aspect of the present invention, there is provided a power supply safety protection system based on artificial intelligence, comprising: a first detection device, a plurality of second detection devices, a first switch, a second switch, a third switch, a voltage stabilizing inverter and a controller;
[0017] The first detection device is used to detect the power supply voltage of the power supply circuit at multiple times, and the multiple second detection devices are used to detect the power consumption current of multiple power-consuming devices at multiple times;
[0018] The controller is used to:
[0019] Determine a power supply voltage stability score by using power supply voltages at multiple moments in a first preset time period before a current moment, wherein the current moment is the last moment in the first preset time period;
[0020] When the power supply voltage stability score is lower than the stability threshold, a first switch between the power supply line and the power grid is controlled to be disconnected, and a second switch between the power grid and the voltage stabilizing inverter is controlled to be closed, wherein the input end of the voltage stabilizing inverter is connected to the second switch, and the output end of the voltage stabilizing inverter is connected to the power supply line;
[0021] Determine the power consumption mode of each power-consuming device by using the power consumption current at multiple moments in a second preset time period before the current moment of each power-consuming device, wherein the current moment is the last moment in the second preset time period;
[0022] The power consumption pattern of each power-consuming device and the power consumption current at multiple times within the second preset time period are processed by the trained power consumption anomaly monitoring model to determine the power consumption anomaly recognition result of each power-consuming device;
[0023] Disconnecting a third switch corresponding to the electrical device for which the power consumption abnormality identification result is abnormal power consumption, wherein the third switch is located between the electrical device and the power supply line;
[0024] Determining a first number of power-consuming devices for which the power-usage abnormality identification result is power-usage abnormality;
[0025] When the first quantity meets a preset quantity condition, the first switch and the second switch are disconnected.
[0026] Technical effect: According to the present invention, the power supply voltage of the power supply circuit and the power current of multiple power-consuming devices can be monitored in real time through the first detection device and the second detection device, so as to timely discover potential problems. By scoring the stability of the power supply voltage, the stability of the power supply circuit is judged. When the stability of the power supply voltage is lower than the stability threshold, the first switch will be disconnected and the second switch will be closed. Using the trained power consumption anomaly monitoring model, combined with the power consumption mode of each power-consuming device identified, the abnormal state of the power-consuming device can be accurately identified, so that the third switch is automatically disconnected according to the power consumption anomaly identification result, thereby preventing potential safety risks. When it is determined that the first quantity meets the preset quantity condition, the first switch and the second switch will be disconnected, reducing the spread and chain reaction of the anomaly and improving the stability and safety of the entire power supply system. When determining whether the power supply voltage is stable, the voltage error score can be determined by the absolute cumulative error, so as to objectively and accurately express the error between the actual power supply voltage and the rated voltage, and the magnitude relationship between the predicted error and the actual error can be used to determine whether the voltage change causes the voltage to be abnormal, and then accurately determine the moment when the voltage change rate is abnormal, so that the voltage change score can accurately describe the abnormality of the voltage change rate. In the process of training the abnormal power consumption monitoring model, the error between the predicted result of the sample power consumption pattern and the actual power consumption pattern can be determined, and based on the size of the error, the loss function in the specific situation can be selected, so that the training process using the loss function is more targeted and efficient, and the loss function can be reduced during the training process, thereby more specifically improving the accuracy of the abnormal power consumption monitoring model.
[0027] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit the present invention. Other features and aspects of the present invention will become more apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other embodiments can be obtained based on these drawings without creative work.
[0029] Figure 1 A schematic diagram of a flow chart of a power supply safety protection method based on artificial intelligence according to an embodiment of the present invention is exemplarily shown;
[0030] Figure 2 A block diagram of a power supply safety protection system based on artificial intelligence according to an embodiment of the present invention is exemplarily shown. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0033] Figure 1 A flowchart of a power supply safety protection method based on artificial intelligence according to an embodiment of the present invention is exemplarily shown, and the method includes:
[0034] Step S101, detecting the power supply voltage of the power supply circuit at multiple times by a first detection device, and detecting the power consumption current of multiple power-consuming devices at multiple times by multiple second detection devices;
[0035] Step S102, determining a power supply voltage stability score by using the power supply voltages at multiple moments in a first preset time period before a current moment, wherein the current moment is the last moment in the first preset time period;
[0036] Step S103, when the power supply voltage stability score is lower than the stability threshold, control the first switch between the power supply line and the power grid to be disconnected, and control the second switch between the power grid and the voltage stabilizing inverter to be closed, wherein the input end of the voltage stabilizing inverter is connected to the second switch, and the output end of the voltage stabilizing inverter is connected to the power supply line;
[0037] Step S104, determining the power consumption mode of each power-consuming device by the power consumption current at multiple moments in a second preset time period before the current moment of each power-consuming device, wherein the current moment is the last moment in the second preset time period;
[0038] Step S105, using the trained power consumption anomaly monitoring model, processing the power consumption pattern of each power-consuming device and the power consumption current at multiple moments in the second preset time period to determine the power consumption anomaly recognition result of each power-consuming device;
[0039] Step S106, disconnecting a third switch corresponding to the electrical device for which the power consumption abnormality identification result is abnormal power consumption, wherein the third switch is located between the electrical device and the power supply line;
[0040] Step S107, determining a first number of electrical devices with abnormal power consumption as a result of power consumption abnormality identification;
[0041] Step S108: when the first quantity meets a preset quantity condition, disconnect the first switch and the second switch.
[0042] According to the power supply safety protection method based on artificial intelligence of the embodiment of the present invention, the power supply voltage of the power supply line and the power current of multiple power-consuming devices can be monitored in real time through the first detection device and the second detection device, so as to timely discover potential problems. By scoring the stability of the power supply voltage, the stability of the power supply line is judged. When the stability of the power supply voltage is lower than the stability threshold, the first switch will be disconnected and the second switch will be closed. Using the trained power consumption anomaly monitoring model, combined with the power consumption mode of each power-consuming device identified, the abnormal state of the power-consuming device can be accurately identified, so that according to the power consumption anomaly identification result, the third switch is automatically disconnected, thereby preventing potential safety risks. When it is determined that the first quantity meets the preset quantity condition, the first switch and the second switch will be disconnected to reduce the spread and chain reaction of the anomaly and improve the stability and safety of the entire power supply system.
[0043] According to one embodiment of the present invention, in step S101, the interval between adjacent moments can be set to 1 minute, 2 minutes, etc., and the present invention is not limited to this. The power supply line is detected using a first detection device to obtain the power supply voltage data of the power supply line at multiple moments. Among them, the first detection device can be a voltage measuring instrument or sensor, such as a voltmeter, which can measure the voltage level of the power supply line at multiple moments. Use multiple second detection devices to monitor the power current of each electrical device. The power supply voltage of the power supply line to each electrical device is equal, and is equal to the power supply voltage. Therefore, the power current of each electrical device is detected to determine the power of each electrical device. Among them, the second detection device can be a sensor or current measuring device installed on different electrical devices, such as an ammeter.
[0044] According to one embodiment of the present invention, in step S102, the first preset time period can be set to 15 minutes, 30 minutes, etc., and the present invention is not limited to this. In this step, the current moment is defined as the last moment in the first preset time period. The stability of the power supply voltage is evaluated using the power supply voltage data of multiple moments in the first preset time period before the current moment. The power supply voltage stability score indicates the stability level of the power supply voltage.
[0045] According to one embodiment of the present invention, step S102 includes: fitting the supply voltage at multiple moments within a first preset time period before the current moment to obtain a supply voltage fitting function; determining the rated voltage of the power supply circuit; obtaining a voltage error score based on the supply voltage fitting function and the rated voltage; derivatizing the supply voltage fitting function to obtain a supply voltage change function; determining the voltage change rate at multiple moments within the first preset time period based on the supply voltage change function; determining the voltage change score based on the voltage change rate at multiple moments within the first preset time period; and determining the supply voltage stability score based on the voltage change score and the voltage error score.
[0046] According to one embodiment of the present invention, by fitting the power supply voltage data at multiple moments within a first preset time period before the current moment, a power supply voltage fitting function is obtained, which can describe the change trend of the power supply voltage. The rated voltage of the power supply circuit can be used as a reference value. The voltage error score is used to measure the deviation between the power supply voltage and the rated voltage. The power supply voltage fitting function is derived to obtain the power supply voltage change function, so as to determine the voltage change rate at multiple moments within the first preset time period. The voltage change score is used to evaluate the change of the voltage. According to the voltage error score and the voltage change score, the deviation and change of the power supply voltage are comprehensively considered to determine the supply voltage stability score. The larger the voltage error score and the voltage change score, the more unstable the power supply voltage is, that is, the lower the power supply voltage stability score is. The smaller the voltage error score and the voltage change score, the more stable the power supply voltage is, that is, the higher the power supply voltage stability score is. The power supply voltage stability score can reflect the stability of the power supply voltage.
[0047] According to one embodiment of the present invention, a voltage error score is obtained based on the supply voltage fitting function and the rated voltage, including: subtracting the supply voltage fitting function from the rated voltage to obtain a supply voltage error function; determining the absolute value of the supply voltage error function as the supply voltage absolute error function; integrating the supply voltage absolute error function within the first preset time period to obtain an absolute error cumulative value; integrating the rated voltage within the first preset time period to obtain a rated voltage cumulative value; determining the ratio of the absolute error cumulative value to the rated voltage cumulative value as a voltage relative error value; and determining the voltage error score based on the voltage relative error value.
[0048] According to one embodiment of the present invention, the supply voltage error function describes the difference between the actual supply voltage and the rated voltage. Taking the absolute value of the supply voltage error function to obtain the absolute error function of the supply voltage can avoid the offset of positive and negative errors, resulting in an underestimation of the error between the supply voltage fitting function and the rated voltage. The cumulative value of the absolute error represents the overall size of the absolute error in the first preset time period, which can be obtained by integrating the absolute error function of the supply voltage in the first preset time period. The rated voltage is a constant, and it is integrated in the first preset time period, that is, the rated voltage is multiplied by the duration of the first preset time period to obtain the rated voltage cumulative value. The ratio of the absolute error cumulative value to the rated voltage cumulative value is the relative error value of the voltage, which represents the relative error degree between the actual voltage and the rated voltage, and can be used as a voltage error score. The smaller the relative error value of the voltage, the smaller the voltage error score.
[0049] According to one embodiment of the present invention, determining a voltage change score according to the voltage change rate at multiple moments in the first preset time period includes: for the i-th moment in the first preset time period, determining a power supply voltage prediction value at the i+1-th moment according to the power supply voltage at the i-th moment, the voltage change rate at the i-th moment, and the time interval between adjacent moments; if i≠n, determining a prediction error between the power supply voltage prediction value at the i+1-th moment and the rated voltage, and an actual error between the power supply voltage at the i+1-th moment and the rated voltage, wherein n is the number of moments in the first preset time period, and the first prediction value is the power supply voltage prediction value at the i+1-th moment. Assume that the nth moment in the time period is the current moment, i≤n, and both i and n are positive integers; if the predicted error is less than or equal to the actual error, the i-th moment is determined as the moment of abnormal voltage change rate; if i=n, determine the predicted error between the predicted value of the power supply voltage at the i+1th moment and the rated voltage, and when the predicted error is greater than or equal to a preset prediction error threshold, determine the i-th moment as the moment of abnormal voltage change rate; count the second number of abnormal voltage change rate moments; determine the voltage change score according to the second number and the number of moments in the first preset time period.
[0050] According to one embodiment of the present invention, the predicted value of the power supply voltage at the i+1th moment is the voltage change rate at the i-th moment multiplied by the time interval between adjacent moments plus the power supply voltage at the i-th moment. If i is not equal to n (i.e., not the last moment), the predicted error and the actual error can be calculated, the predicted error being the error between the predicted value of the power supply voltage at the i+1th moment and the rated voltage, and the actual error being the error between the measured power supply voltage at the i+1th moment and the rated voltage. If the predicted error is less than or equal to the actual error, i.e., in the time period from the i-th moment to the i+1th moment, the actual voltage change rate is greater than the voltage change rate at the i-th moment, i.e., the actual voltage change rate exceeds expectations, and the voltage change rate at the i-th moment is part of the actual error, then the i-th moment is determined as the moment of abnormal voltage change rate. If the predicted error is greater than the actual error, it means that the actual error is small, and the voltage change rate at the i-th moment does not lead to a large predicted error. In other words, the smaller actual error is not caused by the voltage change rate at the i-th moment, but by the smaller voltage change rate in the time period from the i-th moment to the i+1-th moment. Therefore, the i-th moment will not be determined as an abnormal voltage change rate moment. If i is equal to n (that is, it is the last moment), at this time, there is no actual error at the i+1-th moment, then when the predicted error is greater than or equal to the preset prediction error threshold, the i-th moment is determined as an abnormal voltage change rate moment. The voltage change score is determined based on the ratio of the second number of abnormal voltage change rate moments to the number of moments in the first preset time period. The score can evaluate whether the voltage changes drastically in the power supply system and whether the proportion of voltage instability moments is high. If the voltage change score is high, the voltage stability is low.
[0051] In this way, the voltage error score can be determined by the absolute cumulative error, thereby objectively and accurately expressing the error between the actual supply voltage and the rated voltage. The relationship between the predicted error and the actual error can be used to determine whether the voltage change has caused the voltage to become abnormal, and then the moment when the voltage change rate becomes abnormal can be accurately determined, so that the voltage change score can accurately describe the voltage change rate abnormality.
[0052] According to one embodiment of the present invention, the power supply voltage stability score can be determined by combining the above-mentioned voltage variation score and voltage error score. For example, the power supply voltage stability score can be obtained by subtracting the weighted average of the voltage variation score and the voltage error score from 1. The higher the voltage variation score and the voltage error score, the worse the stability of the power supply voltage and the lower the power supply voltage stability score.
[0053] According to one embodiment of the present invention, in step S103, it is determined whether the power supply voltage is lower than the stability threshold value according to the power supply voltage stability score. If the score is lower than the stability threshold value, it means that the stability of the power supply voltage is insufficient. At this time, the first switch between the power supply line and the power grid is controlled to be disconnected. That is, the connection between the power supply line and the power grid is cut off to avoid using an unstable voltage to power the electrical equipment and reduce the probability of damage to the electrical equipment. At the same time, the second switch between the power grid and the voltage stabilizing inverter is controlled to be closed. That is, the input end of the voltage stabilizing inverter is connected to the power grid, and the output end is connected to the power supply line, so that the power supply line operates stably, that is, the electrical equipment can be powered after the voltage stabilization processing of the voltage stabilizing inverter.
[0054] According to an embodiment of the present invention, in step S104, the second preset time period can be set to 15 minutes, 30 minutes, etc., and the present invention does not limit this. In this step, the current moment is defined as the last moment in the second preset time period. Using the power consumption current data of multiple moments in the second preset time period before the current moment, the power consumption mode of each power-consuming device at the current moment can be determined. The power consumption mode may involve information such as the working status of different power-consuming devices and the law of current changes.
[0055] According to one embodiment of the present invention, step S104 includes: performing data fitting on the power consumption current of the jth power device at multiple moments within the second preset time period to obtain the power consumption current function of the jth power device, wherein j is a positive integer; obtaining the current error between the power consumption current of the jth power device at multiple moments and the function value of the power consumption current function at multiple moments; determining the absolute value of the current error as the absolute current error; summing the absolute current errors at multiple moments to obtain an absolute cumulative error; if the absolute cumulative error is less than or equal to a preset absolute error threshold, and the absolute value of the slope of the power consumption current function is greater than or equal to a preset slope threshold, then determining the power consumption mode of the jth power device as a charging mode, otherwise, determining the power consumption mode of the jth power device as a power consumption mode, wherein the charging mode is the power consumption mode when charging the energy storage device, and the power consumption mode is the power consumption mode when the power device is running.
[0056] According to one embodiment of the present invention, data fitting is performed through the power current data at multiple moments within the second preset time period to obtain the power current function of each power-consuming device. The function can describe the power consumption of the device at different time points. The current error between the actual power current of the j-th power-consuming device at multiple moments and the function value calculated by the power current function at the corresponding moment is calculated. The absolute value of the error is the absolute current error. The absolute current errors at multiple moments are summed to obtain the absolute cumulative error. The absolute cumulative error represents the accumulation of the overall error. In charging mode, the current changes linearly, or decreases uniformly according to other rules, that is, the power current changes gradually. Therefore, the error between the power current of the power-consuming device in charging mode and the power current function obtained by fitting is small, that is, the absolute cumulative error is less than or equal to the preset absolute error threshold, and the absolute value of the slope of the power current function is greater than or equal to the set slope threshold, that is, the speed at which the power current decreases is greater than or equal to the set slope threshold, indicating that the power current shows a downward trend over time and is not a stable current. If the above two conditions are met at the same time, the power consumption mode of the jth power-consuming device is determined to be the charging mode.
[0057] On the contrary, the fitted power current function may be a straight line with a low absolute slope value. In this case, the power device may be in standby mode. Alternatively, when the power device is not in standby mode, the power current value is more random, and the error between it and the fitted power current function (e.g., a linear function) is larger. Therefore, the absolute cumulative error may be greater than the preset absolute error threshold. If the power current does not simultaneously satisfy the absolute cumulative error less than or equal to the preset absolute error threshold and the absolute value of the slope of the power current function is greater than or equal to the preset slope threshold, the power mode of the jth power device can be determined as the power consumption mode.
[0058] According to one embodiment of the present invention, in step S105, the power consumption anomaly monitoring model is a neural network model, which analyzes historical power consumption data, learns the power consumption mode of each power-consuming device, and then identifies whether each power-consuming device has power consumption anomalies. Real-time power consumption current data of the power-consuming device at multiple times within the second preset time period can be input into the model for processing. Based on the processing of the power consumption mode and the processing of the power consumption current within the second preset time period, the power consumption anomaly monitoring model will identify anomalies for each power-consuming device. For example, if the power consumption current of a device in a specific power consumption mode is significantly different from the current in the power consumption mode, it means that the device may have a fault or power consumption anomaly.
[0059] According to one embodiment of the present invention, step S105 includes: inputting the power consumption current of each power device at multiple moments within a second preset time period into the coding sub-model of the power consumption anomaly monitoring model to obtain the coding information of each power device; decoding the coding information of each power device through the power consumption pattern decoding sub-model to obtain the power consumption pattern prediction result of each power device; determining the accuracy of the power consumption pattern prediction result based on the power consumption pattern prediction result of each power device and the power consumption pattern of each power device; when the accuracy is higher than the preset accuracy threshold, inputting the power consumption pattern of each power device and the coding information of each power device into the abnormality identification decoding sub-model to obtain the power consumption anomaly identification result of each power device.
[0060] According to one embodiment of the present invention, the data of the power consumption current of each power-consuming device at multiple moments within the second preset time period are processed. For example, the data of multiple power consumption currents of each power-consuming device can form a vector corresponding to each power-consuming device, and the vectors corresponding to multiple power-consuming devices can form an input quantity in the form of a matrix, so as to be input into the coding sub-model of the power consumption anomaly monitoring model for processing. The coding sub-model is used to convert the power consumption current data in the form of a matrix into coding information for subsequent processing. The coding information of each power-consuming device is decoded by the power consumption mode decoding sub-model, so as to predict the power consumption mode of each device, that is, the power consumption mode prediction result. According to the power consumption mode prediction result and the known power consumption mode, the accuracy of the prediction result is calculated. When the accuracy is low, it means that the current power consumption anomaly monitoring model still has a large error and needs to be further trained. When the accuracy is higher than the preset accuracy threshold, the power consumption mode and the corresponding coding information of each power-consuming device are input into the abnormal recognition decoding sub-model to parse the information, identify whether each power-consuming device has an abnormal situation, and obtain the power consumption anomaly recognition result of each power-consuming device. Therefore, the power consumption pattern prediction result can be used to determine whether the power consumption anomaly monitoring model is applicable to the anomaly identification of the power consumption equipment at the current moment. If it is not applicable, the power consumption anomaly monitoring model can be further trained to improve the accuracy of the power consumption anomaly monitoring model. Then, the anomaly identification decoding sub-model of the power consumption anomaly monitoring model with higher accuracy can be used to process the power consumption pattern of each power consumption equipment and the coding information of each power consumption equipment, so as to determine the power consumption anomaly identification result of each power consumption equipment.
[0061] According to one embodiment of the present invention, the training step of the power consumption anomaly monitoring model includes: inputting sample power consumption currents of multiple power devices at multiple moments in a historical time period into the encoding sub-model of the power consumption anomaly monitoring model to obtain sample coding information of each power device; decoding the sample coding information of each power device through the power consumption pattern decoding sub-model to obtain sample power consumption pattern prediction results of each power device; inputting the sample power consumption pattern prediction results and the sample coding information into the anomaly recognition decoding sub-model to obtain sample power consumption anomaly recognition results of each power device; obtaining the loss function of the power consumption anomaly monitoring model based on the sample power consumption pattern prediction results, the sample power consumption anomaly recognition results, the actual abnormal state of each power device and the actual power consumption pattern of each power device; training the power consumption anomaly monitoring model based on the loss function to obtain the trained power consumption anomaly monitoring model.
[0062] According to an embodiment of the present invention, the loss function of the power consumption anomaly monitoring model is used to measure the difference between the model prediction result and the actual situation, and is a key indicator for training the model. During the training process, the loss function is back-propagated and the model parameters are adjusted to minimize the loss function, thereby improving the accuracy of the power consumption anomaly monitoring model and obtaining the trained power consumption anomaly monitoring model.
[0063] According to an embodiment of the present invention, according to the sample power consumption pattern prediction result, the sample power consumption anomaly identification result, the actual abnormal state of each power-consuming device and the actual power consumption pattern of each power-consuming device, a loss function of the power consumption anomaly monitoring model is obtained, including: obtaining the loss function L of the power consumption anomaly monitoring model according to formula (1),
[0064] (1);
[0065] in, is the probability that the power consumption mode of the kth power consumer is the charging mode, determined based on the actual power consumption mode of the kth power consumer, is the probability that the power consumption mode of the kth power consumer is the charging mode, determined based on the sample power consumption mode prediction result of the kth power consumer, is the probability of abnormal power consumption of the kth power-consuming device determined based on the actual abnormal state of the kth power-consuming device, is the probability of abnormal power consumption of the kth power-consuming device determined based on the abnormal power consumption recognition result of the sample of the kth power-consuming device, N is the number of power-consuming devices, k≤N, and both k and N are positive integers, , and is the preset weight, .
[0066] According to one embodiment of the present invention, in formula (1), the sample power usage pattern prediction result may be a result in the form of probability, for example, it may represent the probability that the power usage pattern of the power-consuming device is the charging mode, and the actual power usage pattern may also be a result in the form of probability, for example, when the power usage pattern is the charging mode, the actual power usage pattern is 1, otherwise it is 0. Similarly, the sample power usage anomaly identification result may be a result in the form of probability, for example, the sample power usage anomaly identification result is the probability that the power usage of the power-consuming device is abnormal, and the actual abnormal state of the power-consuming device may also be a result in the form of probability, for example, when the power usage is abnormal, the actual abnormal state is 1, otherwise it is 0.
[0067] According to one embodiment of the present invention, represents the cross entropy loss function for electricity usage pattern prediction. Represents the cross entropy loss function for identifying abnormal electricity consumption. It means that the difference between the predicted charging mode probability and the actual probability is less than or equal to 0.5, that is, the power consumption mode prediction result is close to the actual result, indicating that the prediction accuracy of the power consumption mode is high. The power consumption mode prediction result can be used to continue to obtain the sample power consumption anomaly recognition result, and the cross entropy loss function of power consumption anomaly recognition can be obtained based on the sample power consumption anomaly recognition result. Therefore, in this case, the loss function can be calculated by weighted summing and averaging the above two items.
[0068] According to one embodiment of the present invention, Indicates that the difference between the predicted charging mode probability and the actual probability is greater than 0.5, that is, the error rate of the power consumption mode prediction result is high and cannot be used to continue to obtain the sample power consumption anomaly recognition result. In this case, a larger weight is used to weight the cross entropy loss function of the power consumption mode prediction to quickly improve the accuracy of the sample power consumption anomaly recognition result. For example, the weight in this case is In the case of , the weighted sum of the cross entropy loss function for power consumption pattern prediction and the cross entropy loss function for power consumption anomaly identification.
[0069] In this way, during the training process, the error between the predicted results of the sample power consumption pattern and the actual power consumption pattern can be determined, and based on the size of the error, the loss function for the specific situation can be selected, making the training process using the loss function more targeted and efficient, and reducing the loss function during the training process, thereby more specifically improving the accuracy of the power consumption anomaly monitoring model.
[0070] According to an embodiment of the present invention, in step S106, corresponding measures are taken for the abnormal power consumption device, that is, the third switch corresponding to the device is disconnected. The third switch is located between the device and the power supply line, and is used to directly control the power supply of the device.
[0071] According to an embodiment of the present invention, in step S107, among the confirmed power usage abnormal devices, a first quantity needs to be determined, that is, the number of power usage abnormal devices whose power usage abnormality identification results are power usage abnormalities.
[0072] According to an embodiment of the present invention, in step S108, when the first number meets the preset number condition, it means that the number of electrical devices with abnormal power consumption as a result of power anomaly identification is large, and there may be some external faults, such as equipment damage caused by natural disasters, or power consumption abnormality caused by power supply abnormality, etc. At this time, the operation of disconnecting the first switch and the second switch can be performed to protect the electrical devices from further damage, and also to protect the safety of the power supply circuit.
[0073] According to the power supply safety protection method based on artificial intelligence of the embodiment of the present invention, the power supply voltage of the power supply line and the power current of multiple power-consuming devices can be monitored in real time through the first detection device and the second detection device, so as to timely discover potential problems. By scoring the stability of the power supply voltage, the stability of the power supply line is judged. When the stability of the power supply voltage is lower than the stability threshold, the first switch will be disconnected and the second switch will be closed. Using the trained power consumption anomaly monitoring model, combined with the power consumption mode of each power-consuming device identified, the abnormal state of the power-consuming device can be accurately identified, so that according to the power consumption anomaly identification result, the third switch is automatically disconnected, thereby preventing potential safety risks. When it is determined that the first quantity meets the preset quantity condition, the first switch and the second switch will be disconnected, reducing the spread and chain reaction of the anomaly and improving the stability and safety of the entire power supply system. When determining whether the power supply voltage is stable, the voltage error score can be determined by the absolute cumulative error, so as to objectively and accurately express the error between the actual power supply voltage and the rated voltage, and the magnitude relationship between the predicted error and the actual error can be used to determine whether the voltage change causes the voltage to be abnormal, and then accurately determine the moment when the voltage change rate is abnormal, so that the voltage change score can accurately describe the abnormality of the voltage change rate. In the process of training the abnormal power consumption monitoring model, the error between the predicted result of the sample power consumption pattern and the actual power consumption pattern can be determined, and based on the size of the error, the loss function in the specific situation can be selected, so that the training process using the loss function is more targeted and efficient, and the loss function can be reduced during the training process, thereby more specifically improving the accuracy of the abnormal power consumption monitoring model.
[0074] Figure 2 A block diagram of a power supply safety protection system based on artificial intelligence according to an embodiment of the present invention is exemplarily shown, the system comprising: a first detection device, a plurality of second detection devices, a first switch, a second switch, a third switch, a voltage stabilizing inverter and a controller;
[0075] The first detection device is used to detect the power supply voltage of the power supply circuit at multiple times, and the multiple second detection devices are used to detect the power consumption current of multiple power-consuming devices at multiple times;
[0076] The controller is used to:
[0077] Determine a power supply voltage stability score by using power supply voltages at multiple moments in a first preset time period before a current moment, wherein the current moment is the last moment in the first preset time period;
[0078] When the power supply voltage stability score is lower than the stability threshold, a first switch between the power supply line and the power grid is controlled to be disconnected, and a second switch between the power grid and the voltage stabilizing inverter is controlled to be closed, wherein the input end of the voltage stabilizing inverter is connected to the second switch, and the output end of the voltage stabilizing inverter is connected to the power supply line;
[0079] Determine the power consumption mode of each power-consuming device by using the power consumption current at multiple moments in a second preset time period before the current moment of each power-consuming device, wherein the current moment is the last moment in the second preset time period;
[0080] The power consumption pattern of each power-consuming device and the power consumption current at multiple times within the second preset time period are processed by the trained power consumption anomaly monitoring model to determine the power consumption anomaly recognition result of each power-consuming device;
[0081] Disconnecting a third switch corresponding to the electrical device for which the power consumption abnormality identification result is abnormal power consumption, wherein the third switch is located between the electrical device and the power supply line;
[0082] Determining a first number of power-consuming devices for which power-usage abnormality identification results are power-usage abnormalities;
[0083] When the first quantity meets a preset quantity condition, the first switch and the second switch are disconnected.
[0084] It should be understood by those skilled in the art that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments, and the embodiments of the present invention may be deformed or modified in any way without departing from the principles.
[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A power supply safety protection method based on artificial intelligence, characterized in that: include: Detecting the power supply voltage of the power supply circuit at multiple times by means of a first detection device, and detecting the power consumption current of multiple power-consuming devices at multiple times by means of multiple second detection devices; Determine a power supply voltage stability score by using power supply voltages at multiple moments in a first preset time period before a current moment, wherein the current moment is the last moment in the first preset time period; When the power supply voltage stability score is lower than the stability threshold, a first switch between the power supply line and the power grid is controlled to be disconnected, and a second switch between the power grid and the voltage stabilizing inverter is controlled to be closed, wherein the input end of the voltage stabilizing inverter is connected to the second switch, and the output end of the voltage stabilizing inverter is connected to the power supply line; Determine the power consumption mode of each power-consuming device by using the power consumption current at multiple moments in a second preset time period before the current moment of each power-consuming device, wherein the current moment is the last moment in the second preset time period; The power consumption pattern of each power-consuming device and the power consumption current at multiple times within the second preset time period are processed by the trained power consumption anomaly monitoring model to determine the power consumption anomaly recognition result of each power-consuming device; Disconnecting a third switch corresponding to the electrical device for which the power consumption abnormality identification result is abnormal power consumption, wherein the third switch is located between the electrical device and the power supply line; Determining a first number of power-consuming devices for which power-usage abnormality identification results are power-usage abnormalities; When the first quantity meets a preset quantity condition, disconnecting the first switch and the second switch; Determining a supply voltage stability score by using supply voltages at multiple moments within a first preset time period before a current moment includes: Fitting the power supply voltage at multiple moments within a first preset time period before the current moment to obtain a power supply voltage fitting function; Determine the rated voltage of the power supply circuit; Obtaining a voltage error score according to the supply voltage fitting function and the rated voltage; Derivative the supply voltage fitting function to obtain a supply voltage variation function; Determining voltage change rates at multiple moments in the first preset time period according to the supply voltage change function; Determining a voltage change score according to the voltage change rates at multiple moments in the first preset time period; Determining a supply voltage stability score according to the voltage variation score and the voltage error score; Obtaining a voltage error score according to the supply voltage fitting function and the rated voltage, including: Subtracting the supply voltage fitting function from the rated voltage to obtain a supply voltage error function; determining the absolute value of the supply voltage error function as the supply voltage absolute error function; Integrating the supply voltage absolute error function within the first preset time period to obtain an absolute error cumulative value; Integrating the rated voltage within the first preset time period to obtain a rated voltage cumulative value; Determine the ratio of the absolute error cumulative value to the rated voltage cumulative value as a voltage relative error value; Determining the voltage error score according to the voltage relative error value; Determining a voltage change score according to the voltage change rates at multiple moments in the first preset time period includes: For the i-th moment in the first preset time period, determine a predicted value of the power supply voltage at the i+1-th moment according to the power supply voltage at the i-th moment, the voltage change rate at the i-th moment, and the time interval between adjacent moments; If i≠n, determining the predicted error between the predicted value of the power supply voltage at the i+1th moment and the rated voltage, and the actual error between the power supply voltage at the i+1th moment and the rated voltage, wherein n is the number of moments in the first preset time period, the nth moment in the first preset time period is the current moment, i≤n, and i and n are both positive integers; If the predicted error is less than or equal to the actual error, the i-th moment is determined as the moment of abnormal voltage change rate; If i=n, determine the prediction error between the predicted value of the power supply voltage at the i+1th moment and the rated voltage, and if the prediction error is greater than or equal to a preset prediction error threshold, determine the i-th moment as the moment of abnormal voltage change rate; Counting a second number of moments when the voltage change rate is abnormal; determining the voltage change score according to the second number and the number of moments in the first preset time period; Determining the power consumption mode of each power-consuming device by using the power consumption current of each power-consuming device at multiple times within a second preset time period before the current time, includes: Performing data fitting on the power consumption current of the j-th power-consuming device at multiple moments in the second preset time period to obtain a power consumption current function of the j-th power-consuming device, where j is a positive integer; Obtaining a current error between a power consumption current of the j-th power-consuming device at multiple times and a function value of the power consumption current function at multiple times; determining an absolute value of the current error as an absolute current error; The absolute current errors at multiple moments are summed to obtain the absolute cumulative error; If the absolute cumulative error is less than or equal to a preset absolute error threshold, and the absolute value of the slope of the power consumption current function is greater than or equal to a preset slope threshold, the power consumption mode of the j-th power-consuming device is determined as a charging mode, otherwise, the power consumption mode of the j-th power-consuming device is determined as a power consumption mode, wherein the charging mode is a power consumption mode when the energy storage device is charged, and the power consumption mode is a power consumption mode when the power-consuming device is running; The power consumption pattern of each power-consuming device and the power consumption current at multiple times within the second preset time period are processed by the trained power consumption anomaly monitoring model to determine the power consumption anomaly recognition result of each power-consuming device, including: Inputting the power consumption current of each power-consuming device at multiple moments in the second preset time period into the coding sub-model of the power consumption anomaly monitoring model to obtain coding information of each power-consuming device; The coded information of each power-consuming device is decoded by the power-consuming pattern decoding sub-model to obtain the power-consuming pattern prediction result of each power-consuming device; Determining the accuracy of the power consumption pattern prediction result based on the power consumption pattern prediction result of each power-consuming device and the power consumption pattern of each power-consuming device; When the accuracy rate is higher than a preset accuracy rate threshold, the power consumption mode of each power-consuming device and the coding information of each power-consuming device are input into the abnormality recognition decoding sub-model to obtain the power consumption abnormality recognition result of each power-consuming device; The training steps of the power consumption anomaly monitoring model include: The sample power currents of multiple power-consuming devices at multiple times in a historical time period are input into the coding sub-model of the power consumption anomaly monitoring model to obtain the sample coding information of each power-consuming device; The sample coding information of each power-consuming device is decoded by the power-consuming pattern decoding sub-model to obtain the sample power-consuming pattern prediction result of each power-consuming device; Input the sample power consumption pattern prediction result and the sample coding information into the abnormality identification decoding sub-model to obtain the sample power consumption abnormality identification result of each power-consuming device; Obtaining a loss function of a power consumption anomaly monitoring model according to the sample power consumption pattern prediction result, the sample power consumption anomaly identification result, the actual abnormal state of each power-consuming device, and the actual power consumption pattern of each power-consuming device; Training the power consumption anomaly monitoring model according to the loss function to obtain the trained power consumption anomaly monitoring model; According to the sample power consumption pattern prediction result, the sample power consumption anomaly identification result, the actual abnormal state of each power-consuming device and the actual power consumption pattern of each power-consuming device, a loss function of the power consumption anomaly monitoring model is obtained, including: According to the formula ; The loss function L of the power consumption anomaly monitoring model is obtained, where is the probability that the power consumption mode of the kth power consumer is the charging mode, determined based on the actual power consumption mode of the kth power consumer, is the probability that the power consumption mode of the kth power consumer is the charging mode, determined based on the sample power consumption mode prediction result of the kth power consumer, is the probability of abnormal power consumption of the kth power-consuming device determined based on the actual abnormal state of the kth power-consuming device, is the probability of abnormal power consumption of the kth power-consuming device determined based on the abnormal power consumption recognition result of the sample of the kth power-consuming device, N is the number of power-consuming devices, k≤N, and both k and N are positive integers, , and is the preset weight, .
2. An artificial intelligence-based power supply safety protection system for executing the method according to claim 1, characterized in that: include: A first detection device, a plurality of second detection devices, a first switch, a second switch, a third switch, a voltage stabilizing inverter and a controller; The first detection device is used to detect the power supply voltage of the power supply circuit at multiple times, and the multiple second detection devices are used to detect the power consumption current of multiple power-consuming devices at multiple times; The controller is used to: Determine a power supply voltage stability score by using power supply voltages at multiple moments in a first preset time period before a current moment, wherein the current moment is the last moment in the first preset time period; When the power supply voltage stability score is lower than the stability threshold, a first switch between the power supply line and the power grid is controlled to be disconnected, and a second switch between the power grid and the voltage stabilizing inverter is controlled to be closed, wherein the input end of the voltage stabilizing inverter is connected to the second switch, and the output end of the voltage stabilizing inverter is connected to the power supply line; Determine the power consumption mode of each power-consuming device by using the power consumption current at multiple moments in a second preset time period before the current moment of each power-consuming device, wherein the current moment is the last moment in the second preset time period; The power consumption pattern of each power-consuming device and the power consumption current at multiple times within the second preset time period are processed by the trained power consumption anomaly monitoring model to determine the power consumption anomaly recognition result of each power-consuming device; Disconnecting a third switch corresponding to the electrical device for which the power consumption abnormality identification result is abnormal power consumption, wherein the third switch is located between the electrical device and the power supply line; Determining a first number of power-consuming devices for which power-usage abnormality identification results are power-usage abnormalities; When the first quantity meets a preset quantity condition, the first switch and the second switch are disconnected.
Citation Information
Patent Citations
Protection circuit, power supply device and switching power supply protection method
CN110994548A
Power consumption abnormity detection method
CN117150409A
High-power-density direct-current power supply safety monitoring method and system
CN117388732A
