Data-based methods, devices, and equipment for predicting power grid line losses

By performing latent semantic mining and fusion on power grid data, and using cross-attention and gating mechanisms for semantic constraints, the problem of low reliability in power grid line loss prediction is solved, and the accuracy and reliability of line loss prediction are improved.

CN122087431APending Publication Date: 2026-05-26CHENGDU CHANGXIN ELECTRONIC TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU CHANGXIN ELECTRONIC TECH CO LTD
Filing Date
2026-04-24
Publication Date
2026-05-26

Smart Images

  • Figure CN122087431A_ABST
    Figure CN122087431A_ABST
Patent Text Reader

Abstract

This application provides a data analysis-based method, apparatus, and equipment for predicting power grid line losses, relating to the field of data analysis technology. In this application, latent semantic mining is performed on user load data to obtain a user load semantic vector; latent semantic mining is performed on voltage fluctuation data to obtain a voltage fluctuation semantic vector; based on the semantic information of the line loss-related frequency components in the voltage fluctuation data, line loss-related semantic constraints are applied to the voltage fluctuation semantic vector to obtain a voltage fluctuation constraint vector; latent semantic mining is performed on line characteristic data to obtain a line characteristic semantic vector; latent semantic mining is performed on environmental description data to obtain an environmental description semantic vector; semantic restoration is performed on the user load semantic vector, voltage fluctuation constraint vector, line characteristic semantic vector, and environmental description semantic vector to obtain power grid line loss prediction data. Based on the above, the relatively low reliability of power grid line loss prediction in existing technologies can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data analysis technology, and more specifically, to a method, apparatus, and equipment for predicting power grid line losses based on data analysis. Background Technology

[0002] With rapid economic development and accelerated urbanization, electricity demand is constantly increasing, and the power grid is continuously expanding. The safe, stable, and efficient operation of the power system has become a crucial guarantee for socio-economic development. However, transmission and distribution line losses have always been a major challenge in the power system, causing not only enormous energy waste but also increasing the operating costs of power companies and affecting the quality and efficiency of power supply. According to statistics from the International Energy Agency (IEA), the average line loss rate of global transmission and distribution networks is between 5% and 15%, while in some developing countries, the rate is as high as 20%. These line losses mainly include two parts: technical line losses and management line losses. Technical line losses are due to resistive losses generated when current passes through transmission and distribution lines, while management line losses are mainly caused by factors such as electricity theft, metering errors, and meter malfunctions. Therefore, anomaly identification and application research in transmission and distribution line loss management is of significant practical importance and necessity.

[0003] However, in existing technologies, the effective use and mining of data is insufficient, resulting in relatively low reliability of power grid line loss prediction. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a data analysis-based method, apparatus and equipment for predicting power grid line losses, so as to improve the problem of relatively low reliability of power grid line loss prediction in the prior art.

[0005] To achieve the above objectives, this application adopts the following technical solution: A data analysis-based method for predicting power grid line losses includes: Acquire user load data, voltage fluctuation data, line characteristic data, and environmental description data of the target power grid, wherein the line characteristic data is used to describe the attribute information of power grid lines and power grid equipment in the target power grid related to line loss; Latent semantic mining is performed on the user load data to obtain the user load semantic vector; The voltage fluctuation data is subjected to latent semantic mining to obtain a voltage fluctuation semantic vector. Based on the semantic information of the line loss related frequency components in the voltage fluctuation data, the voltage fluctuation semantic vector is subjected to line loss related semantic constraints to obtain a voltage fluctuation constraint vector. Latent semantic mining is performed on the line characteristic data to obtain line characteristic semantic vectors; Latent semantic mining is performed on the environmental description data to obtain environmental description semantic vectors; The fusion vector of the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector, and the environment description semantic vector is semantically restored to obtain power grid line loss prediction data, which is used to reflect abnormal line loss conditions.

[0006] In a preferred embodiment of this application, in the aforementioned data analysis-based power grid line loss prediction method, the steps of performing latent semantic mining on the voltage fluctuation data to obtain a voltage fluctuation semantic vector, and applying line loss-related semantic constraints to the voltage fluctuation semantic vector based on the semantic information of the line loss-related frequency components in the voltage fluctuation data to obtain a voltage fluctuation constraint vector, include: The voltage fluctuation data is convolved to form a voltage fluctuation semantic vector; The voltage fluctuation data is frequency domain transformed to form a voltage fluctuation spectrum, and higher harmonic information is extracted from the voltage fluctuation spectrum to obtain higher harmonic information of the voltage fluctuation. The voltage fluctuation spectrum is convolved to form a voltage fluctuation spectrum vector, and the voltage fluctuation higher harmonic information is convolved to form a voltage fluctuation higher harmonic vector. The voltage fluctuation spectrum vector is used to characterize the global semantic information of the frequency domain in the voltage fluctuation data, and the voltage fluctuation higher harmonic vector is used to characterize the semantic information of the line loss related frequency components in the voltage fluctuation data. Based on the voltage fluctuation spectrum vector and the voltage fluctuation higher harmonic vector, the voltage fluctuation semantic vector is subjected to line loss related semantic constraints to obtain the voltage fluctuation constraint vector.

[0007] In a preferred embodiment of this application, in the aforementioned data analysis-based power grid line loss prediction method, the step of applying line loss-related semantic constraints to the voltage fluctuation semantic vector based on the voltage fluctuation spectrum vector and the voltage fluctuation higher harmonic vector to obtain a voltage fluctuation constraint vector includes: Based on the higher harmonic vector of the voltage fluctuation, the voltage fluctuation spectrum vector is focused and mined to form a focused voltage fluctuation vector. The focused mining is implemented based on the cross-attention mechanism and / or gating mechanism, and the focused voltage fluctuation vector focuses on characterizing the semantic information of the line loss related frequency components in the voltage fluctuation data. From the voltage fluctuation semantic vector, semantic information that is related to the voltage fluctuation focusing vector is extracted to achieve line loss related semantic constraints on the voltage fluctuation semantic vector, thus obtaining the voltage fluctuation constraint vector.

[0008] In a preferred embodiment of this application, in the aforementioned data analysis-based power grid line loss prediction method, the step of mining semantic information that is correlated with the voltage fluctuation focusing vector from the voltage fluctuation semantic vector to achieve line loss-related semantic constraints on the voltage fluctuation semantic vector and obtain a voltage fluctuation constraint vector includes: Generate multiple different random noise vectors; Based on each of the random noise vectors, noise fusion is performed on the voltage fluctuation semantic vector to form multiple voltage fluctuation noise vectors; For each voltage fluctuation noise vector, based on the voltage fluctuation focusing vector, a dot product operation is performed on the transpose vector of the voltage fluctuation noise vector to form a first correlation parameter distribution; Based on the concentration of parameter distribution in each of the first association parameter distributions, a first association parameter distribution is selected from multiple first association parameter distributions as the second association parameter distribution; Based on the voltage fluctuation focusing vector, a dot product operation is performed on the transpose vector of the voltage fluctuation semantic vector to form a third correlation parameter distribution; and based on the second correlation parameter distribution, the third correlation parameter distribution is gated to form a target correlation parameter distribution. Based on the distribution of the target associated parameters, a weighted summation operation is performed on the voltage fluctuation semantic vector to form a voltage fluctuation constraint vector.

[0009] In a preferred embodiment of this application, in the aforementioned data analysis-based power grid line loss prediction method, the step of semantically restoring the fusion vector of the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector, and the environmental description semantic vector to obtain power grid line loss prediction data includes: Based on the line characteristic semantic vector, semantic association optimization is performed on the user load semantic vector, the voltage fluctuation constraint vector, and the environment description semantic vector respectively to form user load optimization vector, voltage fluctuation optimization vector, and environment description optimization vector. The semantic association optimization is implemented based on cross-attention mechanism and / or gating mechanism. The user load optimization vector, the voltage fluctuation optimization vector, and the environment description optimization vector are concatenated to form a concatenated optimization vector. The concatenated optimization vector is then convolved to form a line loss-related global vector. Finally, the line loss-related global vector is pooled to form a line loss-related pooled vector. The line loss-related pooling vector is mapped using a fully connected method to form a line loss-related fully connected vector, wherein the size of the line loss-related fully connected vector is 1*1. The line loss-related fully connected vectors are subjected to identity mapping or linear mapping to form power grid line loss prediction data.

[0010] In a preferred embodiment of this application, the step of performing latent semantic mining on the user load data to obtain a user load semantic vector in the above-mentioned data analysis-based power grid line loss prediction method includes: Perform convolution operations on the user load data to form a user load convolution vector; The user load data is frequency domain transformed to form a user load spectrum diagram, and the user load spectrum diagram is convolved to form a load spectrum diagram convolution vector. The load spectrum convolution vector is fused into the user load convolution vector to obtain the user load semantic vector.

[0011] In a preferred embodiment of this application, in the aforementioned data analysis-based power grid line loss prediction method, the step of performing latent semantic mining on the line characteristic data to obtain line characteristic semantic vectors includes: The line characteristic data is vector-space mapped to form a line characteristic mapping vector; The line characteristic mapping vector is subjected to a first compression and a second compression respectively to form a first line characteristic compressed vector and a second line characteristic compressed vector. The first compression and the second compression have different compression methods, and the first line characteristic compressed vector and the second line characteristic compressed vector have the same size. Based on the first line characteristic compression vector, the second line characteristic compression vector is subjected to cross-attention processing to form a line characteristic attention vector. Semantic fusion processing is performed based on the line characteristic attention vector and the line characteristic mapping vector to obtain the line characteristic semantic vector.

[0012] In a preferred embodiment of this application, in the aforementioned data analysis-based power grid line loss prediction method, the step of performing latent semantic mining on the environmental description data to obtain an environmental description semantic vector includes: The environmental description data is mapped into a vector space to form an environmental description mapping vector; The environment description mapping vector is subjected to a third compression and a fourth compression respectively to form a first environment description compressed vector and a second environment description compressed vector. The third compression and the fourth compression have different compression methods, and the first environment description compressed vector and the second environment description compressed vector have the same size. Based on the first environment description compression vector, the second environment description compression vector is subjected to cross-attention processing to form an environment description attention vector. Semantic fusion processing is performed based on the environment description attention vector and the environment description mapping vector to obtain the environment description semantic vector.

[0013] This application also provides a power grid line loss prediction device based on data analysis, comprising: The power grid data acquisition module is used to acquire user load data, voltage fluctuation data, line characteristic data and environmental description data of the target power grid, wherein the line characteristic data is used to describe the attribute information of the power grid lines and power grid equipment in the target power grid related to line loss; The load semantic mining module is used to perform latent semantic mining on the user load data to obtain the user load semantic vector; The voltage semantic mining module is used to perform latent semantic mining on the voltage fluctuation data to obtain a voltage fluctuation semantic vector, and to perform line loss related semantic constraints on the voltage fluctuation semantic vector based on the semantic information of the line loss related frequency components in the voltage fluctuation data to obtain a voltage fluctuation constraint vector. The line semantic mining module is used to perform latent semantic mining on the line characteristic data to obtain the line characteristic semantic vector. The environmental semantic mining module is used to perform latent semantic mining on the environmental description data to obtain an environmental description semantic vector. The semantic restoration module is used to perform semantic restoration on the fusion vector of the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector and the environmental description semantic vector to obtain power grid line loss prediction data, wherein the power grid line loss prediction data is used to reflect abnormal line loss conditions.

[0014] Based on the above, this application also provides an electronic device, including: Memory, used to store computer programs; A processor connected to the memory is used to execute the computer program stored in the memory to implement the above-described data analysis-based power grid line loss prediction method.

[0015] The data analysis-based power grid line loss prediction method, apparatus, and equipment provided in this application first acquire user load data, voltage fluctuation data, line characteristic data, and environmental description data of the target power grid. Second, latent semantic mining is performed on the user load data to obtain a user load semantic vector. Furthermore, latent semantic mining is performed on the voltage fluctuation data to obtain a voltage fluctuation semantic vector. Based on the semantic information of the line loss-related frequency components in the voltage fluctuation data, line loss-related semantic constraints are applied to the voltage fluctuation semantic vector to obtain a voltage fluctuation constraint vector. Additionally, latent semantic mining is performed on the line characteristic data to obtain a line characteristic semantic vector. Latent semantic mining can also be performed on the environmental description data to obtain an environmental description semantic vector. Finally, semantic restoration is performed on the fusion vector of the user load semantic vector, voltage fluctuation constraint vector, line characteristic semantic vector, and environmental description semantic vector to obtain power grid line loss prediction data. Based on the above, on the one hand, because latent semantic mining is performed from four dimensions—user load data, voltage fluctuation data, line characteristic data, and environmental description data—the resulting fusion vector has high semantic richness, providing a more sufficient basis for line loss prediction and thus ensuring the reliability of the line loss prediction. On the other hand, after performing latent semantic mining on voltage fluctuation data, line loss-related semantic constraints are also performed based on the semantic information of line loss-related frequency components. This results in the voltage fluctuation constraint vector having high semantic representation accuracy in the direction of line loss prediction, thereby further improving the reliability of line loss prediction and thus improving the problem of relatively low reliability of power grid line loss prediction in the existing technology. Attached Figure Description

[0016] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings.

[0017] Figure 1 A structural block diagram of an electronic device provided in an embodiment of this application.

[0018] Figure 2 A flowchart illustrating the power grid line loss prediction method based on data analysis provided in this application embodiment.

[0019] Figure 3 This is a schematic diagram illustrating semantic mining and line loss-related semantic constraints provided in an embodiment of this application.

[0020] Figure 4 This is a schematic diagram illustrating the extraction of semantic information with related relationships, provided for an embodiment of this application.

[0021] Figure 5 This is a schematic diagram illustrating potential semantic mining as provided in an embodiment of this application.

[0022] Figure 6A block diagram of a power grid line loss prediction device based on data analysis provided in an embodiment of this application. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0024] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0025] like Figure 1 As shown in the illustration, this application provides an electronic device. The electronic device may include a memory, a processor, and a power grid line loss prediction device based on data analysis.

[0026] Specifically, the memory and the processor are electrically connected directly or indirectly to enable data transmission or interaction. For example, the memory and the processor can be electrically connected via one or more communication buses or signal lines. The data analysis-based power grid line loss prediction device includes at least one software functional module stored in the memory in the form of software or firmware. The processor is used to execute executable computer programs stored in the memory, such as the software functional modules and computer programs included in the data analysis-based power grid line loss prediction device, to implement the data analysis-based power grid line loss prediction method provided in the embodiments of this application.

[0027] Optionally, the memory may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0028] Furthermore, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a system on chip (SoC), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0029] Understandable. Figure 1 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown may include, for example, a communication unit for exchanging information with other devices.

[0030] Combination Figure 2 This application also provides a data analysis-based power grid line loss prediction method applicable to the aforementioned electronic device. The method steps defined in the process of the data analysis-based power grid line loss prediction method can be implemented by the electronic device. The following will describe... Figure 2 The specific process shown will be explained in detail.

[0031] Step S110: Obtain user load data, voltage fluctuation data, line characteristic data, and environmental description data of the target power grid.

[0032] In this embodiment, the electronic device can acquire user load data, voltage fluctuation data, line characteristic data, and environmental description data of the target power grid. The user load data can refer to the load data of all users in the target power grid, or it can be the individual load data for each user, which can be obtained from data acquisition systems such as power dispatch centers and substations. The voltage fluctuation data can refer to the supply voltage of the target power grid, which can be obtained from voltage monitoring systems, sensors, and other devices. The line characteristic data describes the attributes of power grid lines and equipment in the target power grid related to line losses, such as basic parameters like the material, length, and capacity of the power grid lines, as well as physical characteristics like resistance and admittance of the power grid lines, which can be obtained from databases of power companies or operators. The environmental description data can be weather data such as temperature and humidity, which can be obtained from weather stations or meteorological data platforms.

[0033] Step S120: Perform latent semantic mining on the user load data to obtain the user load semantic vector.

[0034] In this embodiment of the application, after obtaining the user load data, the electronic device can perform latent semantic mining on the user load data to obtain a user load semantic vector. That is, the latent semantic information in the user load data can be mined and represented in the form of a vector (or matrix), thus obtaining the user load semantic vector.

[0035] Step S130: Perform latent semantic mining on the voltage fluctuation data to obtain a voltage fluctuation semantic vector; and, based on the semantic information of the line loss related frequency components in the voltage fluctuation data, apply line loss related semantic constraints to the voltage fluctuation semantic vector to obtain a voltage fluctuation constraint vector.

[0036] In this embodiment, after obtaining the voltage fluctuation data, the electronic device can perform latent semantic mining on the voltage fluctuation data to obtain a voltage fluctuation semantic vector. Furthermore, based on the semantic information of the line loss-related frequency components in the voltage fluctuation data, line loss-related semantic constraints are applied to the voltage fluctuation semantic vector to obtain a voltage fluctuation constraint vector. In other words, the latent semantic information in the voltage fluctuation data can be mined first and represented in vector (or matrix) form to obtain the voltage fluctuation semantic vector. Additionally, to further improve the accuracy of the semantic representation, line loss-related semantic constraints can be applied to obtain the voltage fluctuation constraint vector.

[0037] Step S140: Perform latent semantic mining on the line characteristic data to obtain the line characteristic semantic vector.

[0038] In this embodiment of the application, after obtaining the line characteristic data, the electronic device can perform latent semantic mining on the line characteristic data to obtain a line characteristic semantic vector. That is, the latent semantic information in the line characteristic data can be mined and represented in the form of a vector (or matrix), thus obtaining the line characteristic semantic vector.

[0039] Step S150: Perform latent semantic mining on the environmental description data to obtain the environmental description semantic vector.

[0040] In this embodiment of the application, after obtaining the environmental description data, the electronic device can perform latent semantic mining on the environmental description data to obtain an environmental description semantic vector. That is, the latent semantic information in the environmental description data can be mined and represented in the form of a vector (or matrix), thus obtaining the environmental description semantic vector.

[0041] Step S160: Semantic restoration is performed on the fusion vector of the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector, and the environmental description semantic vector to obtain power grid line loss prediction data.

[0042] In this embodiment, after obtaining the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector, and the environment description semantic vector, the electronic device can perform semantic restoration on the fused vector of the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector, and the environment description semantic vector to obtain power grid line loss prediction data. That is, the four-dimensional semantic vectors can be fused first to obtain a fused vector with better representational capabilities, and then semantic restoration can be performed based on the fused vector to obtain reliable power grid line loss prediction data. The power grid line loss prediction data is used to reflect abnormal line loss conditions, such as whether there is an anomaly or the probability of an anomaly.

[0043] Based on the above, on the one hand, because latent semantic mining is performed from four dimensions—user load data, voltage fluctuation data, line characteristic data, and environmental description data—the resulting fusion vector has high semantic richness, providing a more comprehensive basis for line loss prediction and thus ensuring its reliability. On the other hand, after performing latent semantic mining on voltage fluctuation data, line loss-related semantic constraints are applied based on the semantic information of line loss-related frequency components. This results in a voltage fluctuation constraint vector with high semantic representation accuracy in the direction of line loss prediction, further improving the reliability of line loss prediction and thus addressing the problem of relatively low reliability in existing power grid line loss prediction technologies.

[0044] Firstly, regarding step S110, it should be noted that the specific methods for obtaining user load data, voltage fluctuation data, line characteristic data, and environmental description data of the target power grid are not limited and can be selected according to actual needs.

[0045] For example, in one alternative implementation, user load data, voltage fluctuation data, line characteristic data, and environmental description data of the target power grid for a current period can be acquired in real time. As another alternative implementation, user load data, voltage fluctuation data, line characteristic data, and environmental description data of the target power grid formed over a historical period can be acquired from a corresponding data storage device.

[0046] Secondly, it should be noted that the specific method for performing latent semantic mining on the user load data is not limited and can be selected according to actual needs.

[0047] For example, in an alternative implementation, the user load data can be convolved to obtain a user load semantic vector.

[0048] For example, in another alternative implementation, in order to improve the accuracy of latent semantic mining and enable the obtained user load semantic vector to better represent the user load data, the above step S120 may further include steps S121, S122 and S123, the specific contents of each step are as follows.

[0049] Step S121: Perform convolution operation on the user load data to form a user load convolution vector.

[0050] In this embodiment, the user load data can be convolved to form a user load convolution vector. For example, the user load data can be time-domain data, such as user load data at multiple time points. Thus, the user load data can first be preprocessed, such as by normalization or standardization, to form preprocessed user load data. Then, convolution operations can be performed on this preprocessed user load data (e.g., through one-dimensional convolution) to obtain the user load convolution vector.

[0051] Step S122: Perform frequency domain transformation on the user load data to form a user load spectrum diagram, and perform convolution operation on the user load spectrum diagram to form a load spectrum diagram convolution vector.

[0052] In this embodiment, the user load data can be frequency-domain transformed to form a user load spectrum diagram, and the user load spectrum diagram can be convolved to form a load spectrum diagram convolution vector. For example, the user load data can be Fourier transformed to form a corresponding user load spectrum diagram. Then, a two-dimensional convolution operation can be performed on the user load spectrum diagram to obtain the load spectrum diagram convolution vector. It should be noted that the two-dimensional matrix formed by the two-dimensional convolution can be unfolded to form a one-dimensional vector.

[0053] Step S123: The load spectrum convolution vector is fused into the user load convolution vector to obtain the user load semantic vector.

[0054] In this embodiment, after obtaining the user load convolution vector and the load spectrum convolution vector, the load spectrum convolution vector can be fused into the user load convolution vector to obtain a user load semantic vector. That is, since semantic information in the frequency domain can better reflect changes in user load, and these changes may be related to line loss, fusing the load spectrum convolution vector into the user load convolution vector allows the user load semantic vector to characterize not only time-domain semantic information but also, more importantly, semantic information related to line loss.

[0055] Thirdly, regarding step S130, it should be noted that the specific methods for performing latent semantic mining and line loss-related semantic constraints on the voltage fluctuation data are not limited and can be selected according to actual needs.

[0056] For example, in an alternative implementation, in order to ensure the accuracy of latent semantic mining and line loss-related semantic constraints, so that the formed voltage fluctuation constraint vector can fully and accurately represent the line loss-related semantic information, the above step S130 may further include steps S131, S132, S133 and S134, the specific contents of each step are as follows.

[0057] Step S131: Perform convolution operation on the voltage fluctuation data to form a voltage fluctuation semantic vector.

[0058] In the embodiments of this application, combined with Figure 3 The voltage fluctuation data can be convolved to form a voltage fluctuation semantic vector. For example, the voltage fluctuation data can be time-domain data, such as supply voltage at multiple time points. Thus, the voltage fluctuation data can first be preprocessed, such as by normalization and standardization, to form voltage fluctuation preprocessed data. Then, convolution operations can be performed on this preprocessed voltage fluctuation data (e.g., through one-dimensional convolution) to obtain the voltage fluctuation semantic vector.

[0059] Step S132: Perform frequency domain conversion on the voltage fluctuation data to form a voltage fluctuation spectrum diagram, and extract high-order harmonic information from the voltage fluctuation spectrum diagram to obtain high-order harmonic information of voltage fluctuation.

[0060] In this embodiment, the voltage fluctuation data can be frequency-domain transformed to form a voltage fluctuation spectrum, and higher harmonic information can be extracted from the voltage fluctuation spectrum to obtain higher harmonic information of the voltage fluctuation. For example, the voltage fluctuation data can be Fourier transformed to form a corresponding voltage fluctuation spectrum. Then, the fundamental frequency (e.g., 60Hz) can be determined from the voltage fluctuation spectrum. Based on this fundamental frequency, various harmonic frequencies (e.g., 2nd, 3rd, 4th, 5th, 6th, etc.) can be determined. Then, the required higher harmonics, such as the 5th fundamental frequency (300Hz), can be found from these harmonic frequencies. Thus, data of frequencies other than these higher harmonics can be hidden in the voltage fluctuation spectrum, thereby obtaining the higher harmonic information of the voltage fluctuation (also represented in the form of a spectrum).

[0061] Step S133: Perform convolution operation on the voltage fluctuation spectrum to form a voltage fluctuation spectrum vector, and perform convolution operation on the voltage fluctuation higher harmonic information to form a voltage fluctuation higher harmonic vector.

[0062] In this embodiment, after obtaining the voltage fluctuation spectrum and the higher harmonic information of the voltage fluctuation, a convolution operation can be performed on the voltage fluctuation spectrum to form a voltage fluctuation spectrum vector, and a convolution operation can be performed on the higher harmonic information of the voltage fluctuation (spectrum) to form a higher harmonic vector of the voltage fluctuation. The voltage fluctuation spectrum vector is used to characterize the global semantic information of the frequency domain in the voltage fluctuation data, and the higher harmonic vector of the voltage fluctuation is used to characterize the semantic information of the line loss-related frequency components in the voltage fluctuation data. It should be noted that harmonics are voltage or current waveform distortions caused by nonlinear loads (such as frequency converters and electrical equipment). Higher harmonic components may exacerbate energy losses in power grid lines because harmonic currents generate more thermal effects than fundamental frequency currents, leading to increased iron and copper losses. Thus, the semantic information of the line loss-related frequency components can be characterized through the higher harmonic vector of the voltage fluctuation.

[0063] Step S134: Based on the voltage fluctuation spectrum vector and the voltage fluctuation higher harmonic vector, apply line loss related semantic constraints to the voltage fluctuation semantic vector to obtain the voltage fluctuation constraint vector.

[0064] In this embodiment, after obtaining the voltage fluctuation spectrum vector, the voltage fluctuation higher harmonic vector, and the voltage fluctuation semantic vector, line loss-related semantic constraints can be applied to the voltage fluctuation semantic vector based on the voltage fluctuation spectrum vector and the voltage fluctuation higher harmonic vector to obtain a voltage fluctuation constraint vector. That is, the voltage fluctuation semantic vector can be sufficiently constrained based on the global semantic information in the frequency domain of the voltage fluctuation spectrum vector and the line loss-related semantic information in the frequency domain of the voltage fluctuation higher harmonic vector, thereby effectively improving the semantic representation accuracy of the voltage fluctuation constraint vector.

[0065] It is understood that in step S134 above, the specific method of applying line loss related semantic constraints to the voltage fluctuation semantic vector is not limited. For example, in an alternative implementation, in order to ensure the accuracy of the semantic constraints and further improve the semantic representation accuracy of the formed voltage fluctuation constraint vector, step S134 above may further include steps S134a and S134b, the specific contents of each step are as follows.

[0066] Step S134a: Based on the higher harmonic vector of the voltage fluctuation, focus mining is performed on the voltage fluctuation spectrum vector to form a voltage fluctuation focus vector.

[0067] In this embodiment, the voltage fluctuation spectrum vector can be focused and mined based on the higher harmonics vector of the voltage fluctuation to form a focused voltage fluctuation vector. That is, since the voltage fluctuation spectrum vector represents global semantic information in the frequency domain, including semantic information related to line loss and semantic information unrelated to line loss, focusing and mining are first performed on the higher harmonics vector of the voltage fluctuation. This allows the focused voltage fluctuation vector to not only represent global semantic information in the frequency domain but also to emphasize the representation of semantic information related to line loss. The focusing and mining is implemented based on a cross-attention mechanism and / or a gating mechanism, and the focused voltage fluctuation vector focuses on representing the semantic information of the line loss-related frequency components in the voltage fluctuation data. For example, the voltage fluctuation spectrum vector can be cross-attention processed based on the higher harmonics vector of the voltage fluctuation, and the result of the processing can be added to the voltage fluctuation spectrum vector to form the focused voltage fluctuation vector. For example, the higher harmonic vector of the voltage fluctuation can be nonlinearly activated (e.g., by using the sigmoid function) to form a gating parameter distribution. Then, the gating parameter distribution and the voltage fluctuation focusing vector can be multiplied element-wise, and the result of the multiplication can be added to the voltage fluctuation spectrum vector to form the voltage fluctuation focusing vector.

[0068] Step S134b: Extract semantic information that is related to the voltage fluctuation focusing vector from the voltage fluctuation semantic vector to realize the line loss related semantic constraint on the voltage fluctuation semantic vector and obtain the voltage fluctuation constraint vector.

[0069] In this embodiment of the application, after obtaining the voltage fluctuation focusing vector, semantic information that is related to the voltage fluctuation focusing vector can be extracted from the voltage fluctuation semantic vector to realize the line loss related semantic constraint on the voltage fluctuation semantic vector and obtain the voltage fluctuation constraint vector.

[0070] It is understood that in step S134b above, the specific method of mining semantic information that has a correlation with the voltage fluctuation focusing vector from the voltage fluctuation semantic vector is not limited. For example, in an alternative implementation, in order to further improve the accuracy of semantic constraints, step S134b above may include steps b1, b2, b3, b4, b5 and b6, the specific contents of each step are as follows.

[0071] Step b1: Generate multiple different random noise vectors.

[0072] In the embodiments of this application, combined with Figure 4 This can generate multiple different random noise vectors. The size of the voltage fluctuation semantic vector can be the same as the size of each of the random noise vectors.

[0073] Step b2: Based on each of the random noise vectors, noise fusion is performed on the voltage fluctuation semantic vector to form multiple voltage fluctuation noise vectors.

[0074] In this embodiment, after generating the random noise vector, noise fusion (e.g., addition) can be performed on the voltage fluctuation semantic vector based on each random noise vector to form multiple voltage fluctuation noise vectors. It should be noted that since the voltage fluctuation data acquisition process may involve some distortion, noise fusion can simulate or capture this distortion to a certain extent, so that one or more voltage fluctuation noise vectors among the multiple voltage fluctuation noise vectors may be able to represent more realistic semantic information.

[0075] Step b3: For each voltage fluctuation noise vector, perform a dot product operation on the transpose of the voltage fluctuation noise vector based on the voltage fluctuation focusing vector to form a first correlation parameter distribution.

[0076] In this embodiment of the application, after the voltage fluctuation noise vector is formed, a dot product operation can be performed on the transpose vector of each voltage fluctuation noise vector based on the voltage fluctuation focusing vector to form a first correlation parameter distribution (attention score).

[0077] Step b4: Based on the parameter distribution concentration in each of the first correlation parameter distributions, select one first correlation parameter distribution from the multiple first correlation parameter distributions as the second correlation parameter distribution.

[0078] In this embodiment, after obtaining the first correlation parameter distribution, a first correlation parameter distribution can be selected from multiple first correlation parameter distributions as the second correlation parameter distribution based on the parameter distribution concentration in each of the first correlation parameter distributions. For example, the parameter distribution concentration can be characterized by dispersion (the degree of deviation between each vector parameter in the first correlation parameter distribution and the mean). That is, the higher the dispersion, the more uneven the parameter distribution, and the better it can distinguish between important and unimportant parameters. Based on this, the first correlation parameter distribution with the largest parameter distribution concentration (i.e., dispersion) can be selected as the second correlation parameter distribution.

[0079] Step b5: Based on the voltage fluctuation focusing vector, perform a dot product operation on the transpose vector of the voltage fluctuation semantic vector to form a third correlation parameter distribution; and based on the second correlation parameter distribution, perform gating adjustment on the third correlation parameter distribution to form a target correlation parameter distribution.

[0080] In this embodiment, a dot product operation can be performed on the transpose of the voltage fluctuation semantic vector based on the voltage fluctuation focus vector to form a third correlation parameter distribution (i.e., an attention distribution without noise). Furthermore, based on the second correlation parameter distribution, the third correlation parameter distribution can be gated to form a target correlation parameter distribution. That is, since the second correlation parameter distribution can better distinguish between important and unimportant parameters, gating the third correlation parameter distribution based on the second correlation parameter distribution allows the resulting target correlation parameter distribution to characterize both attention scores and to pay different degrees of attention to important and unimportant parameters. Additionally, the gating process can include: performing nonlinear activation on the second correlation parameter distribution (e.g., using a function like sigmoid), and then multiplying the activation result element-wise with the third correlation parameter distribution to obtain the target correlation parameter distribution.

[0081] Step b6: Based on the target correlation parameter distribution, perform a weighted summation operation on the voltage fluctuation semantic vector to form a voltage fluctuation constraint vector.

[0082] In this embodiment of the application, after obtaining the target correlation parameter distribution, a weighted summation operation can be performed on the voltage fluctuation semantic vector based on the target correlation parameter distribution to form a voltage fluctuation constraint vector (or, the result of the weighted summation operation can be added to the voltage fluctuation semantic vector to obtain the voltage fluctuation constraint vector).

[0083] Fourthly, regarding step S140, it should be noted that the specific method for performing latent semantic mining on the line characteristic data is not limited and can be selected according to actual needs.

[0084] For example, in an alternative implementation, the line characteristic data can be vector-space mapped to form a line characteristic semantic vector.

[0085] For example, in another alternative implementation, in order to ensure the accuracy of latent semantic mining and enable the formed line characteristic semantic vector to fully represent the semantic information in the line characteristic data, the above step S140 may further include steps S141, S142, S143 and S144, as detailed below.

[0086] Step S141: Perform vector space mapping on the line characteristic data to form a line characteristic mapping vector.

[0087] In the embodiments of this application, combined with Figure 5 The line characteristic data can be mapped into a vector space to form a line characteristic mapping vector. For example, the line characteristic data can be text data. In this case, a trained word embedding model can be used to embed the line characteristic data to obtain the line characteristic mapping vector.

[0088] Step S142: Perform a first compression and a second compression on the line characteristic mapping vector to form a first line characteristic compressed vector and a second line characteristic compressed vector.

[0089] In this embodiment, after obtaining the line characteristic mapping vector, the line characteristic mapping vector can be subjected to a first compression and a second compression to form a first compressed line characteristic vector and a second compressed line characteristic vector. The first compression and the second compression have different compression methods (e.g., max pooling and mean pooling, or convolution processing using two convolution kernels of the same size but different parameters), and the first compressed line characteristic vector and the second compressed line characteristic vector have the same size. It should be noted that the line characteristic mapping vector can be used to represent shallow semantic information, but it is insufficient for representing deep semantic information. Therefore, the first compression and the second compression can further capture important deep semantic information.

[0090] Step S143: Based on the first line characteristic compression vector, perform cross-attention processing on the second line characteristic compression vector to form a line characteristic attention vector.

[0091] In this embodiment of the application, after obtaining the first line characteristic compression vector and the second line characteristic compression vector, cross-attention processing can be performed on the second line characteristic compression vector based on the first line characteristic compression vector to form a line characteristic attention vector. That is, deep semantic information formed in different ways can be fused together, so that the formed line characteristic attention vector can focus on representing important semantic information.

[0092] Step S144: Perform semantic fusion processing based on the line characteristic attention vector and the line characteristic mapping vector to obtain the line characteristic semantic vector.

[0093] In this embodiment, after obtaining the line characteristic attention vector, semantic fusion processing can be performed based on the line characteristic attention vector and the line characteristic mapping vector to obtain a line characteristic semantic vector. For example, the line characteristic attention vector can be upsampled to form an upsampled vector with the same size as the line characteristic mapping vector. Then, the upsampled vector and the line characteristic mapping vector can be added to obtain the line characteristic semantic vector, so that both deep and shallow semantic information can be addressed.

[0094] Fifthly, regarding step S150, it should be noted that the specific method for performing latent semantic mining on the environmental description data is not limited and can be selected according to actual needs.

[0095] For example, in an alternative implementation, the environment description data can be vector-space mapped to form an environment description semantic vector.

[0096] For example, in another alternative implementation, in order to ensure the accuracy of latent semantic mining and enable the formed environment description semantic vector to fully represent the semantic information in the environment description data, the above step S140 may further include steps S141, S142, S143 and S144, as detailed below.

[0097] Step S141: Perform vector space mapping on the environmental description data to form an environmental description mapping vector.

[0098] In this embodiment, the environmental description data can be mapped into a vector space to form an environmental description mapping vector. For example, the environmental description data can be text data; thus, a trained word embedding model can be used to embed the environmental description data to obtain the environmental description mapping vector. Alternatively, the environmental description data can be time-domain data, such as temperature data at various time points; the environmental description data can be preprocessed and word embedded to form the environmental description mapping vector.

[0099] Step S142: Perform third and fourth compressions on the environment description mapping vector to form a first environment description compressed vector and a second environment description compressed vector.

[0100] In this embodiment, after obtaining the environment description mapping vector, the environment description mapping vector can be subjected to a third compression and a fourth compression to form a first environment description compressed vector and a second environment description compressed vector. The third compression and the fourth compression have different compression methods (e.g., max pooling and mean pooling, or convolution processing using two convolution kernels of the same size but different parameters), and the first environment description compressed vector and the second environment description compressed vector have the same size. It should be noted that the environment description mapping vector can be used to represent shallow semantic information, but it is insufficient for representing deep semantic information. Therefore, the third and fourth compressions can be used to further capture important deep semantic information.

[0101] Step S143: Based on the first environment description compression vector, perform cross-attention processing on the second environment description compression vector to form an environment description attention vector.

[0102] In this embodiment of the application, after obtaining the first environment description compression vector and the second environment description compression vector, cross-attention processing can be performed on the second environment description compression vector based on the first environment description compression vector to form an environment description attention vector. That is, deep semantic information formed in different ways can be fused together, so that the formed environment description attention vector can focus on representing important semantic information.

[0103] Step S144: Perform semantic fusion processing based on the environment description attention vector and the environment description mapping vector to obtain the environment description semantic vector.

[0104] In this embodiment, after obtaining the environment description attention vector, semantic fusion processing can be performed based on the environment description attention vector and the environment description mapping vector to obtain an environment description semantic vector. For example, the environment description attention vector can be upsampled to form an upsampled vector with the same size as the environment description mapping vector. Then, the upsampled vector and the environment description mapping vector can be added to obtain the environment description semantic vector, so that both deep and shallow semantic information can be given attention.

[0105] Sixthly, regarding step S160, it should be noted that the specific method for semantic restoration of the fusion vector of the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector, and the environment description semantic vector is not limited and can be selected according to actual needs.

[0106] For example, in an alternative implementation, the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector, and the environment description semantic vector can be concatenated or added together (to achieve efficient and low computational cost fusion), and then the semantics of the concatenation or addition result can be restored to obtain the power grid line loss prediction data.

[0107] For example, in another alternative implementation, in order to achieve reliable fusion and ensure the accuracy of semantic reconstruction, thereby obtaining reliable power grid line loss prediction data, the above step S160 may further include steps S161, S162, S163 and S164.

[0108] Step S161: Based on the line characteristic semantic vector, perform semantic association optimization on the user load semantic vector, the voltage fluctuation constraint vector, and the environment description semantic vector respectively to form the user load optimization vector, the voltage fluctuation optimization vector, and the environment description optimization vector.

[0109] In this embodiment, semantic association optimization can be performed on the user load semantic vector, the voltage fluctuation constraint vector, and the environmental description semantic vector based on the line characteristic semantic vector, respectively, to form a user load optimized vector, a voltage fluctuation optimized vector, and an environmental description optimized vector. The semantic association optimization is implemented based on a cross-attention mechanism and / or a gating mechanism. It should be noted that the semantic information represented by the line characteristic semantic vector is relatively stable; however, the semantic information represented by the user load semantic vector, the voltage fluctuation constraint vector, and the environmental description semantic vector can vary significantly, and the semantic information at different times may be completely different. Therefore, semantic association optimization can be performed first based on the relatively stable line characteristic semantic vector, so that the resulting user load optimized vector, voltage fluctuation optimized vector, and environmental description optimized vector can be further constrained, thereby improving the accuracy of semantic representation.

[0110] Step S162: The user load optimization vector, the voltage fluctuation optimization vector, and the environment description optimization vector are concatenated to form a concatenated optimization vector; the concatenated optimization vector is convolved to form a line loss-related global vector; and the line loss-related global vector is pooled to form a line loss-related pooled vector.

[0111] In this embodiment of the application, after obtaining the user load optimization vector, the voltage fluctuation optimization vector, and the environment description optimization vector, the user load optimization vector, the voltage fluctuation optimization vector, and the environment description optimization vector can be concatenated to form a concatenated optimization vector. Furthermore, the concatenated optimization vector can be convolved (to further fuse semantic information of different dimensions) to form a line loss-related global vector. Finally, the line loss-related global vector can be pooled (to extract important semantic information) to form a line loss-related pooled vector.

[0112] Step S163: Perform a fully connected mapping on the line loss-related pooling vector to form a line loss-related fully connected vector.

[0113] In this embodiment, after obtaining the line loss-related pooling vector, a fully connected mapping can be performed on the line loss-related pooling vector to form a line loss-related fully connected vector. The size of the line loss-related fully connected vector is 1*1, meaning it includes one vector parameter.

[0114] Step S164: Perform an identity mapping or linear mapping on the line loss-related fully connected vector to form power grid line loss prediction data.

[0115] In this embodiment of the application, after obtaining the line loss-related fully connected vector, the line loss-related fully connected vector can be subjected to an identity mapping (such as y=x) or a linear mapping (which can be implemented by a corresponding activation function) to form power grid line loss prediction data to characterize the probability of anomalies.

[0116] Combination Figure 6 This application also provides a data analysis-based power grid line loss prediction device applicable to the aforementioned electronic equipment. The data analysis-based power grid line loss prediction device may include a power grid data acquisition module, a load semantic mining module, a voltage semantic mining module, a line semantic mining module, an environmental semantic mining module, and a semantic reconstruction module.

[0117] The power grid data acquisition module is used to acquire user load data, voltage fluctuation data, line characteristic data, and environmental description data of the target power grid. The line characteristic data describes the attribute information of power grid lines and equipment in the target power grid related to line losses. In this embodiment, the power grid data acquisition module can be used to perform... Figure 2 The relevant content regarding the power grid data acquisition module in step S110 shown can be found in the previous description of step S110.

[0118] The load semantic mining module is used to perform latent semantic mining on the user load data to obtain a user load semantic vector. In this embodiment, the load semantic mining module can be used to execute... Figure 2 The relevant content regarding the load semantic mining module in step S120 shown can be found in the previous description of step S120.

[0119] The voltage semantic mining module is used to perform latent semantic mining on the voltage fluctuation data to obtain a voltage fluctuation semantic vector, and to apply line loss-related semantic constraints to the voltage fluctuation semantic vector based on the semantic information of the line loss-related frequency components in the voltage fluctuation data to obtain a voltage fluctuation constraint vector. In this embodiment, the voltage semantic mining module can be used to perform... Figure 2 The relevant content regarding the voltage semantic mining module in step S130 shown can be found in the previous description of step S130.

[0120] The line semantic mining module is used to perform latent semantic mining on the line characteristic data to obtain line characteristic semantic vectors. In this embodiment, the line semantic mining module can be used to execute... Figure 2 The relevant content regarding the line semantic mining module in step S140 shown can be found in the previous description of step S140.

[0121] The environmental semantic mining module is used to perform latent semantic mining on the environmental description data to obtain environmental description semantic vectors. In this embodiment, the environmental semantic mining module can be used to execute... Figure 2 The relevant content regarding the environmental semantic mining module in step S150 shown can be found in the previous description of step S150.

[0122] The semantic restoration module is used to perform semantic restoration on the fusion vector of the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector, and the environmental description semantic vector to obtain power grid line loss prediction data, wherein the power grid line loss prediction data is used to reflect abnormal line loss conditions. In this embodiment of the application, the semantic restoration module can be used to perform... Figure 2 The relevant content regarding the semantic restoration module in step S160 shown can be found in the previous description of step S160.

[0123] In summary, the power grid line loss prediction method, apparatus, and equipment based on data analysis provided in this application first acquire user load data, voltage fluctuation data, line characteristic data, and environmental description data of the target power grid; secondly, perform latent semantic mining on the user load data to obtain a user load semantic vector; furthermore, perform latent semantic mining on the voltage fluctuation data to obtain a voltage fluctuation semantic vector, and apply line loss-related semantic constraints to the voltage fluctuation semantic vector based on the semantic information of the line loss-related frequency components in the voltage fluctuation data to obtain a voltage fluctuation constraint vector; additionally, perform latent semantic mining on the line characteristic data to obtain a line characteristic semantic vector; and also perform latent semantic mining on the environmental description data to obtain an environmental description semantic vector; finally, perform semantic restoration on the fusion vector of the user load semantic vector, voltage fluctuation constraint vector, line characteristic semantic vector, and environmental description semantic vector to obtain power grid line loss prediction data. Based on the above, on the one hand, since latent semantic mining is performed from four dimensions—user load data, voltage fluctuation data, line characteristic data, and environmental description data—the resulting fusion vector has high semantic richness, making the basis for line loss prediction more sufficient, thereby ensuring the reliability of line loss prediction. On the other hand, after performing latent semantic mining on voltage fluctuation data, line loss-related semantic constraints are also performed based on the semantic information of line loss-related frequency components. This results in the voltage fluctuation constraint vector having high semantic representation accuracy in the direction of line loss prediction, thereby further improving the reliability of line loss prediction and thus improving the problem of relatively low reliability of power grid line loss prediction in the existing technology.

[0124] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0125] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0126] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0127] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data analysis-based method for predicting power grid line losses, characterized in that, include: Acquire user load data, voltage fluctuation data, line characteristic data, and environmental description data of the target power grid, wherein the line characteristic data is used to describe the attribute information of power grid lines and power grid equipment in the target power grid related to line loss; Latent semantic mining is performed on the user load data to obtain the user load semantic vector; The voltage fluctuation data is subjected to latent semantic mining to obtain a voltage fluctuation semantic vector. Based on the semantic information of the line loss related frequency components in the voltage fluctuation data, the voltage fluctuation semantic vector is subjected to line loss related semantic constraints to obtain a voltage fluctuation constraint vector. Latent semantic mining is performed on the line characteristic data to obtain line characteristic semantic vectors; Latent semantic mining is performed on the environmental description data to obtain environmental description semantic vectors; The fusion vector of the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector, and the environment description semantic vector is semantically restored to obtain power grid line loss prediction data, which is used to reflect abnormal line loss conditions.

2. The power grid line loss prediction method based on data analysis according to claim 1, characterized in that, The steps of performing latent semantic mining on the voltage fluctuation data to obtain a voltage fluctuation semantic vector, and applying line loss-related semantic constraints to the voltage fluctuation semantic vector based on the semantic information of the line loss-related frequency components in the voltage fluctuation data to obtain a voltage fluctuation constraint vector, include: The voltage fluctuation data is convolved to form a voltage fluctuation semantic vector; The voltage fluctuation data is frequency domain transformed to form a voltage fluctuation spectrum, and higher harmonic information is extracted from the voltage fluctuation spectrum to obtain higher harmonic information of the voltage fluctuation. The voltage fluctuation spectrum is convolved to form a voltage fluctuation spectrum vector, and the voltage fluctuation higher harmonic information is convolved to form a voltage fluctuation higher harmonic vector. The voltage fluctuation spectrum vector is used to characterize the global semantic information of the frequency domain in the voltage fluctuation data, and the voltage fluctuation higher harmonic vector is used to characterize the semantic information of the line loss related frequency components in the voltage fluctuation data. Based on the voltage fluctuation spectrum vector and the voltage fluctuation higher harmonic vector, the voltage fluctuation semantic vector is subjected to line loss related semantic constraints to obtain the voltage fluctuation constraint vector.

3. The power grid line loss prediction method based on data analysis according to claim 2, characterized in that, The step of applying line loss-related semantic constraints to the voltage fluctuation semantic vector based on the voltage fluctuation spectrum vector and the voltage fluctuation higher harmonic vector to obtain the voltage fluctuation constraint vector includes: Based on the higher harmonic vector of the voltage fluctuation, the voltage fluctuation spectrum vector is focused and mined to form a focused voltage fluctuation vector. The focused mining is implemented based on the cross-attention mechanism and / or gating mechanism, and the focused voltage fluctuation vector focuses on characterizing the semantic information of the line loss related frequency components in the voltage fluctuation data. From the voltage fluctuation semantic vector, semantic information that is related to the voltage fluctuation focusing vector is extracted to achieve line loss related semantic constraints on the voltage fluctuation semantic vector, thus obtaining the voltage fluctuation constraint vector.

4. The power grid line loss prediction method based on data analysis according to claim 3, characterized in that, The step of mining semantic information that is correlated with the voltage fluctuation focusing vector from the voltage fluctuation semantic vector to achieve line loss-related semantic constraints on the voltage fluctuation semantic vector and obtain a voltage fluctuation constraint vector includes: Generate multiple different random noise vectors; Based on each of the random noise vectors, noise fusion is performed on the voltage fluctuation semantic vector to form multiple voltage fluctuation noise vectors; For each voltage fluctuation noise vector, based on the voltage fluctuation focusing vector, a dot product operation is performed on the transpose vector of the voltage fluctuation noise vector to form a first correlation parameter distribution; Based on the concentration of parameter distribution in each of the first association parameter distributions, a first association parameter distribution is selected from multiple first association parameter distributions as the second association parameter distribution; Based on the voltage fluctuation focusing vector, a dot product operation is performed on the transpose vector of the voltage fluctuation semantic vector to form a third correlation parameter distribution; and based on the second correlation parameter distribution, the third correlation parameter distribution is gated to form a target correlation parameter distribution. Based on the distribution of the target associated parameters, a weighted summation operation is performed on the voltage fluctuation semantic vector to form a voltage fluctuation constraint vector.

5. The power grid line loss prediction method based on data analysis according to claim 1, characterized in that, The step of semantically restoring the fusion vector of the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector, and the environmental description semantic vector to obtain power grid line loss prediction data includes: Based on the line characteristic semantic vector, semantic association optimization is performed on the user load semantic vector, the voltage fluctuation constraint vector, and the environment description semantic vector respectively to form user load optimization vector, voltage fluctuation optimization vector, and environment description optimization vector. The semantic association optimization is implemented based on cross-attention mechanism and / or gating mechanism. The user load optimization vector, the voltage fluctuation optimization vector, and the environment description optimization vector are concatenated to form a concatenated optimization vector. The concatenated optimization vector is then convolved to form a line loss-related global vector. Finally, the line loss-related global vector is pooled to form a line loss-related pooled vector. The line loss-related pooling vector is mapped using a fully connected method to form a line loss-related fully connected vector, wherein the size of the line loss-related fully connected vector is 1*1. The line loss-related fully connected vectors are subjected to identity mapping or linear mapping to form power grid line loss prediction data.

6. The power grid line loss prediction method based on data analysis according to any one of claims 1-5, characterized in that, The step of performing latent semantic mining on the user load data to obtain user load semantic vectors includes: Perform convolution operations on the user load data to form a user load convolution vector; The user load data is frequency domain transformed to form a user load spectrum diagram, and the user load spectrum diagram is convolved to form a load spectrum diagram convolution vector. The load spectrum convolution vector is fused into the user load convolution vector to obtain the user load semantic vector.

7. The power grid line loss prediction method based on data analysis according to any one of claims 1-5, characterized in that, The step of performing latent semantic mining on the line characteristic data to obtain line characteristic semantic vectors includes: The line characteristic data is vector-space mapped to form a line characteristic mapping vector; The line characteristic mapping vector is subjected to a first compression and a second compression respectively to form a first line characteristic compressed vector and a second line characteristic compressed vector. The first compression and the second compression have different compression methods, and the first line characteristic compressed vector and the second line characteristic compressed vector have the same size. Based on the first line characteristic compression vector, the second line characteristic compression vector is subjected to cross-attention processing to form a line characteristic attention vector. Semantic fusion processing is performed based on the line characteristic attention vector and the line characteristic mapping vector to obtain the line characteristic semantic vector.

8. The power grid line loss prediction method based on data analysis according to any one of claims 1-5, characterized in that, The step of performing latent semantic mining on the environmental description data to obtain environmental description semantic vectors includes: The environmental description data is mapped into a vector space to form an environmental description mapping vector; The environment description mapping vector is subjected to a third compression and a fourth compression respectively to form a first environment description compressed vector and a second environment description compressed vector. The third compression and the fourth compression have different compression methods, and the first environment description compressed vector and the second environment description compressed vector have the same size. Based on the first environment description compression vector, the second environment description compression vector is subjected to cross-attention processing to form an environment description attention vector. Semantic fusion processing is performed based on the environment description attention vector and the environment description mapping vector to obtain the environment description semantic vector.

9. A power grid line loss prediction device based on data analysis, characterized in that, include: The power grid data acquisition module is used to acquire user load data, voltage fluctuation data, line characteristic data and environmental description data of the target power grid, wherein the line characteristic data is used to describe the attribute information of the power grid lines and power grid equipment in the target power grid related to line loss; The load semantic mining module is used to perform latent semantic mining on the user load data to obtain the user load semantic vector; The voltage semantic mining module is used to perform latent semantic mining on the voltage fluctuation data to obtain a voltage fluctuation semantic vector, and to perform line loss related semantic constraints on the voltage fluctuation semantic vector based on the semantic information of the line loss related frequency components in the voltage fluctuation data to obtain a voltage fluctuation constraint vector. The line semantic mining module is used to perform latent semantic mining on the line characteristic data to obtain the line characteristic semantic vector. The environmental semantic mining module is used to perform latent semantic mining on the environmental description data to obtain an environmental description semantic vector. The semantic restoration module is used to perform semantic restoration on the fusion vector of the user load semantic vector, the voltage fluctuation constraint vector, the line characteristic semantic vector and the environment description semantic vector to obtain power grid line loss prediction data, wherein the power grid line loss prediction data is used to reflect abnormal line loss conditions.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor connected to the memory is used to execute the computer program stored in the memory to implement the power grid line loss prediction method based on data analysis as described in any one of claims 1-8.