A power data classification encryption transmission method and system for a smart terminal

By dynamically adjusting the encryption strength of power data through adaptive encryption mechanisms and clustering algorithms, the problems of insufficient computing load and security in power data transmission in smart terminals are solved, and data security and resource optimization are achieved during highly sensitive periods.

CN121967087BActive Publication Date: 2026-06-26HANGZHOU HUALONG ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-30
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing methods for transmitting power data in smart terminals, fixed-strength encryption strategies lead to problems such as excessive computational load and energy consumption or insufficient security.

Method used

By constructing an adaptive encryption mechanism, transient sensitivity is calculated based on the fluctuation level and purity of power data. The encryption strength is dynamically adjusted in combination with CPU load rate, and a clustering algorithm is used to divide data clusters for differentiated encryption processing.

Benefits of technology

During periods of high power grid sensitivity, ensure the security of critical data, reduce terminal computing load and energy consumption, avoid resource waste, ensure the real-time nature of fault diagnosis and data reporting, and optimize the efficiency of terminal resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967087B_ABST
    Figure CN121967087B_ABST
Patent Text Reader

Abstract

The application relates to the field of data transmission, in particular to a power data classification encryption transmission method and system for a smart terminal, which comprises the following steps: acquiring multi-dimensional power data at a target time, and constructing a target window at the target time; calculating the fluctuation degree and data purity of the target window, and taking the product of the fluctuation degree and the data purity as the transient sensitivity at the target time; reading the CPU load rate of the smart terminal at the target time, and calculating the encryption adjustment coefficient at the target time based on the transient sensitivity, the CPU load rate, a preset transient sensitive reference value and a sensitivity adjustment coefficient; clustering the sampling time based on the encryption adjustment coefficient by using a clustering algorithm to obtain a plurality of clustering clusters, calculating the encryption round of any clustering cluster, and completing data encryption transmission. Through the technical scheme, the accuracy and efficiency of the data transmission result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission. In particular, it relates to a method and system for classifying and encrypting power data transmission for smart terminals. Background Technology

[0002] With the rapid development of smart grids, smart terminals are widely deployed to collect and transmit key power data such as voltage, current, and power in real time. These data not only support core functions such as grid operation status monitoring, power quality analysis, and load forecasting management, but also contain massive amounts of power operation details and user electricity consumption behavior privacy information. Therefore, encryption technology must be used to ensure information security during transmission.

[0003] However, existing methods typically employ fixed-strength encryption strategies, which leads to a significant contradiction: applying high-strength encryption to all data can ensure security but also significantly increases the computational load and energy consumption of terminal devices, affecting real-time response capabilities; conversely, using low-strength encryption can reduce the load but cannot effectively protect critical data, thereby causing privacy leaks or security risks and resulting in low accuracy of data transmission results. Summary of the Invention

[0004] To address the aforementioned technical problems, the present invention provides solutions in the following aspects.

[0005] In a first aspect, a method for classifying and encrypting power data for a smart terminal includes: acquiring multi-dimensional power data at a target time, where the target time is any sampling time; constructing a target window for the target time using the target time as the last sampling time in the window and a preset sampling interval as the window scale; calculating the fluctuation degree and data purity of the target window, and using the product of the fluctuation degree and data purity as the transient sensitivity of the target time; reading the CPU load rate of the smart terminal at the target time, and calculating the encryption adjustment coefficient of the target time based on the transient sensitivity, CPU load rate, preset transient sensitivity reference value, and sensitivity adjustment coefficient; using a clustering algorithm to cluster the sampling times based on the encryption adjustment coefficient to obtain several clusters, calculating the encryption round of any cluster, encrypting and transmitting the power data based on the encryption round, and completing the encrypted data transmission; the calculation of the encryption round of any cluster includes: for any cluster, constructing an encryption adjustment value based on the mean of the encryption adjustment coefficients of each sampling time within the cluster, and using the sum of the encryption adjustment value and the preset encryption round benchmark value as the encryption round of any cluster.

[0006] Preferably, the degree of fluctuation includes: taking any dimension as the target dimension, obtaining the maximum value, minimum value, and first mean of all power data in the target dimension within the target window; calculating the absolute difference between any power data in the target dimension within the target window and the first mean, using the difference between the maximum and minimum values ​​as the denominator, and calculating the first ratio between the absolute difference and the denominator; iterating through and obtaining the first ratio of each power data in the target dimension within the target window, averaging all the first ratios to obtain the second mean, iterating through and obtaining the second mean of each dimension in the target window, and averaging all the second means to obtain the degree of fluctuation.

[0007] Preferably, the data purity includes: smoothing the multi-dimensional power data at the target time to obtain the smoothed power data at any dimension at the target time; taking any dimension as the target dimension, and taking the difference between the power data before and after smoothing at the target time in the target dimension as the residual; obtaining the maximum residual value in the target dimension in history; calculating a second ratio between the residual of any power data in the target dimension within the target window and the maximum residual value of the target dimension, iterating through the target window to obtain the second ratio of each power data in the target dimension, averaging all the second ratios to obtain a third mean; iterating through the target window to obtain the third mean of each dimension, averaging all the third means to obtain a fourth mean, and taking the difference between 1 and the fourth mean as the data purity.

[0008] Preferably, the smoothing process is performed using the least squares method.

[0009] Preferably, the calculation of the encryption adjustment coefficient at the target time includes: calculating the first difference between the transient sensitivity at the target time and the preset transient sensitivity reference value, and mapping the first difference using the hyperbolic tangent function to obtain a mapped value; calculating the second difference between 1 and the CPU load rate at the target time; and using the product of the sensitivity adjustment coefficient, the mapped value, and the second difference as the encryption adjustment coefficient at the target time.

[0010] Preferably, the clustering algorithm is DBSCAN.

[0011] Preferably, the process of completing encrypted data transmission includes: for the multi-dimensional power data corresponding to the sampling time of any cluster, based on the encryption round of any cluster, using the AES encryption algorithm to perform encrypted transmission, thereby completing encrypted data transmission.

[0012] Preferably, the step of constructing the encryption adjustment value based on the mean of the encryption adjustment coefficients at each sampling time within the cluster includes: 0 for a mean encryption adjustment coefficient greater than 0 and less than 0.4; 2 for a mean encryption adjustment coefficient not less than 0.4 and not greater than 0.8; and 4 for a mean encryption adjustment coefficient greater than 0.8 and less than 1.

[0013] In a second aspect, a power data classification and encryption transmission system for a smart terminal includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the power data classification and encryption transmission method for a smart terminal described in any one of the claims is implemented.

[0014] The present invention has the following effects:

[0015] This invention constructs an adaptive encryption mechanism by deeply integrating the time-series dynamic characteristics of power data with the real-time load status of terminal devices. It accurately captures highly sensitive fault periods such as voltage drops and current overloads during power grid operation and automatically activates high-strength encryption to ensure the security of core data. At the same time, it intelligently switches to lightweight encryption during stable operation periods, significantly reducing terminal CPU load and energy consumption, avoiding resource waste and equipment overload risks caused by traditional fixed encryption strategies. Especially during peak and off-peak periods of the power grid or high-load scenarios of terminals, the system dynamically suppresses encryption strength to prioritize the real-time performance of fault diagnosis and data reporting, preventing response delays or equipment crashes caused by insufficient computing resources. Thus, while ensuring the secure transmission of critical power grid operation data (such as fault mutation information), it optimizes the efficiency of terminal resource utilization. Attached Figure Description

[0016] Figure 1 This is a flowchart of a method for classifying and encrypting power data transmission for smart terminals according to an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0018] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0019] Reference Figure 1 A method for classifying and encrypting power data transmission for smart terminals includes steps S1-S4, as detailed below:

[0020] S1: Acquire multi-dimensional power data at the target time. The target time is any sampling time. Construct a target window for the target time with the target time as the last sampling time in the window and a preset sampling interval as the window scale.

[0021] It should be noted that the intelligent terminal acquires key power data such as voltage, current, power, and timestamp at any sampling moment. The timestamp ensures the accurate time sequence of the data, which is convenient for subsequent analysis. Through continuous processing of these high-frequency sampled data, power grid operation and maintenance personnel can grasp the operating parameters (such as voltage stability, load fluctuation and power factor) in real time, thereby dynamically assessing the overall health status of the power grid. When abnormal tendencies are detected (such as voltage drop, current overload or power change), a high-priority data transmission mechanism is immediately triggered to report the key information to the control center for rapid response.

[0022] In one embodiment, to balance data granularity and terminal resource consumption, the smart terminal collects voltage, current and power data at a preset frequency of 20 Hz. The multi-dimensional data includes voltage, current and power. The specific value of the sampling frequency can be set by those skilled in the art according to the time situation. The 20 Hz frequency is an example value.

[0023] This allows us to obtain multi-dimensional power data at any sampling time.

[0024] It is important to explain that power data has strong temporal and dynamic characteristics, and its change patterns are highly dependent on the time dimension. For example, during the data collection process, smart meters will face events such as voltage fluctuations and sudden fault alarms in real time. These data are highly susceptible to external environmental interference (such as periodic fluctuations caused by peak and off-peak periods of the power grid, instantaneous anomalies caused by short circuits or overloads, and random shocks during peak periods of user electricity consumption). This makes the sensitivity of the data significantly different in different time periods. For example, data during faults (such as voltage drops) is crucial for safety, while data during normal periods is relatively less sensitive.

[0025] This invention constructs an adaptive time window mechanism to segment and analyze the sampling period, capturing the fluctuation characteristics within the local time window, thereby providing a precise basis for subsequent allocation of encryption resources: during highly sensitive periods (such as fault windows), high-strength encryption algorithms are automatically allocated to ensure core security, while during low-sensitivity periods (such as stable operation periods), lightweight encryption is switched to ensure the protection of critical data and significantly optimize terminal computing load and energy consumption.

[0026] Any sampling time is taken as the target time, and a target window for the target time is constructed with the target time as the last sampling time in the window and a preset sampling interval as the window size. For example, the target time is obtained by selecting 99 historical sampling times before the target time as the endpoint, i.e., a window size of 100.

[0027] S2: Calculate the volatility and data purity of the target window, and use the product of volatility and data purity as the transient sensitivity at the target time.

[0028] In one embodiment, the volatility level includes: taking any dimension as the target dimension, obtaining the maximum value, minimum value, and first mean of all power data in the target dimension within the target window; calculating the absolute difference between any power data in the target dimension within the target window and the first mean, using the difference between the maximum and minimum values ​​as the denominator, and calculating the first ratio between the absolute difference and the denominator; iterating through and obtaining the first ratio of each power data in the target dimension within the target window, averaging all the first ratios to obtain the second mean, iterating through and obtaining the second mean of each dimension in the target window, and averaging all the second means to obtain the volatility level.

[0029] When the difference between the power data at any sampling time and the mean increases significantly, it will push up the overall fluctuation index, indicating that the data stability within the target window is decreasing and the risk of anomalies is increasing. This fluctuation analysis based on local time series not only accurately captures the dynamic sensitivity of power data, but also provides a real-time basis for subsequent allocation of encrypted resources: automatically increasing the encryption strength in windows with severe fluctuations, and decreasing the encryption strength in stable windows, thereby ensuring the security of core data while avoiding unnecessary computational overhead.

[0030] Data purity includes: smoothing the multi-dimensional power data at the target time to obtain the smoothed power data in any dimension at the target time; the smoothing process is the least squares method.

[0031] Using any dimension as the target dimension, the difference between the power data before and after smoothing at the target time is taken as the residual; the maximum residual value in the target dimension in history is obtained; the second ratio of the residual of any power data in the target dimension within the target window to the maximum residual value of the target dimension is calculated; the second ratio of each power data in the target dimension within the target window is obtained through iteration; all second ratios are accumulated and averaged to obtain the third mean; the third mean of each dimension in the target window is obtained through iteration; all third means are accumulated and averaged to obtain the fourth mean; the difference between 1 and the fourth mean is taken as the data purity.

[0032] Data purity can effectively distinguish the degree of data anomalies. High purity indicates stable data with low noise, suitable for routine monitoring; low purity indicates high fluctuations or potential faults, thus providing a scientific basis for dynamic encryption strategies: high-strength encryption is automatically triggered in windows of low data purity to ensure that sensitive information is not stolen or tampered with; while in windows of high purity, lightweight encryption is switched to significantly reduce terminal computing load, energy consumption and transmission latency, achieving optimal allocation of security resources. This ensures the security of critical fault data while avoiding the waste of resources caused by all-time high-strength encryption.

[0033] The product of volatility and data purity is used as the transient sensitivity at the target time.

[0034] S3: Read the CPU (Central Processing Unit) load rate of the smart terminal at the target time, and calculate the encryption adjustment coefficient at the target time based on transient sensitivity, CPU load rate, preset transient sensitivity reference value and sensitivity adjustment coefficient.

[0035] It should be noted that while the transient sensitivity obtained in step S2 can accurately capture local fluctuations in power data, it ignores the real-time load status of terminal devices (including key indicators such as CPU utilization, memory usage, and network bandwidth). These resource states are crucial in a dynamic power grid environment: during peak power grid periods, terminals are often already under high load. If high-strength encryption is forcibly applied to all highly sensitive data at this time, it will further increase the computational burden, leading to data transmission delays, device overheating, or even crashes, thereby delaying fault response time and threatening power grid stability. Conversely, during low-load periods, if the encryption strength is not dynamically increased or the algorithm is not optimized based on surplus resources, and only a fixed strategy is relied upon, it will result in idle resources and wasted energy, making it impossible to achieve efficient and low-latency data transmission.

[0036] In one embodiment, the CPU load rate of the smart terminal at a target time is read; a first difference between the transient sensitivity at the target time and a preset transient sensitivity reference value is calculated; and a mapped value is obtained by mapping the first difference using a hyperbolic tangent function; a second difference between 1 and the CPU load rate at the target time is calculated; and the product of the sensitivity adjustment coefficient, the mapped value, and the second difference is used as the encryption adjustment coefficient at the target time. For example, the preset transient sensitivity reference value is 0.5, and the specific value can be set by those skilled in the art.

[0037] The sensitivity adjustment coefficient is preset by those skilled in the art. Its core purpose is to dynamically control the magnitude of the increase in encryption strength due to transient sensitivity, and to avoid the rigidity of the security strategy. Specifically, nonlinear mapping is achieved through the S-curve characteristics of the hyperbolic tangent function: when the transient sensitivity is low (such as normal stable data), the output of the hyperbolic tangent function is negative, actively reducing the number of encryption rounds to save resources; while when the transient sensitivity is high (such as detecting a voltage drop or fault change), the output of the hyperbolic tangent function quickly approaches 1, significantly improving the encryption strength.

[0038] Simultaneously, by integrating the real-time load status of the integrated terminal, i.e., CPU load rate as a key input, when the system is under high load (such as CPU utilization exceeding 80% during peak power grid periods), an exponential decay of the second difference is triggered, rapidly suppressing encryption rounds. This reserves computing power for core functions such as fault diagnosis and data reporting, preventing equipment overload and crashes. Conversely, during low load periods, the decay effect weakens, allowing for full resource allocation to enhance security. This adaptive design not only ensures the security redundancy of highly sensitive data under low load but also prioritizes system robustness under high load, achieving real-time coordination between encryption strategies and terminal status.

[0039] S4: Using a clustering algorithm, cluster the sampling time based on the encryption adjustment coefficient to obtain several clusters, calculate the encryption round of any cluster, encrypt the power data based on the encryption round and transmit it, thus completing the encrypted data transmission.

[0040] It should be noted that power data has temporal and dynamic characteristics, and its change patterns are easily affected by grid load peaks and valleys, sudden fault events, and external environmental interference. Voltage drop data during fault periods require high-intensity protection, while regular readings during stable periods can be processed with lighter weight. To address this challenge, this invention introduces clustering to divide the sampling time corresponding to power data into multiple categories, and implements a unified encryption strength strategy for data with similar temporal characteristics within the same category.

[0041] In one embodiment, DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is used to cluster sampling times based on encryption adjustment coefficients to obtain several clusters. For any cluster, an encryption adjustment value is constructed based on the mean of the encryption adjustment coefficients at each sampling time within the cluster. The sum of the encryption adjustment value and a preset encryption round baseline value is used as the encryption round for any cluster. For example, the preset encryption round baseline value is 10. The encryption adjustment value satisfies the following conditions: 0 for a mean encryption adjustment coefficient greater than 0 and less than 0.4; 2 for a mean encryption adjustment coefficient not less than 0.4 and not greater than 0.8; and 4 for a mean encryption adjustment coefficient greater than 0.8 and less than 1.

[0042] It's important to explain that the AES encryption algorithm strictly defines the key length corresponding to each encryption round (128-bit key length corresponds to 10 rounds, 192-bit key length corresponds to 12 rounds, and 256-bit key length corresponds to 14 rounds). Therefore, when using the AES encryption algorithm, different encryption rounds require different key lengths. Generally, the longer the number of encryption rounds, the higher the data security.

[0043] For the multi-dimensional power data corresponding to the sampling time of any cluster, the AES (Advanced Encryption Standard) encryption algorithm is used to encrypt and transmit the data based on the encryption round of any cluster, thus completing the encrypted data transmission.

[0044] The system includes a processor and a memory, the memory storing computer program instructions. When the computer program instructions are executed by the processor, they implement a method for classifying and encrypting power data transmission for a smart terminal according to the first aspect of the present invention.

[0045] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0046] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for classifying and encrypting power data transmission for smart terminals, characterized in that, include: Acquire multi-dimensional power data at a target time. The target time is any sampling time. Construct a target window for the target time with the target time as the last sampling time in the window and a preset sampling interval as the window scale. Calculate the volatility and data purity of the target window, and use the product of volatility and data purity as the transient sensitivity at the target time. Read the CPU load rate of the smart terminal at the target time, and calculate the encryption adjustment coefficient at the target time based on transient sensitivity, CPU load rate, preset transient sensitivity reference value and sensitivity adjustment coefficient; A clustering algorithm is used to cluster the sampling time based on the encryption adjustment coefficient to obtain several clusters. The encryption round of any cluster is calculated. The power data is encrypted and transmitted based on the encryption round, thus completing the encrypted data transmission. The encryption rounds for calculating any cluster include: For any cluster, an encryption adjustment value is constructed based on the mean of the encryption adjustment coefficients at each sampling time within the cluster. The sum of the encryption adjustment value and the preset encryption round benchmark value is used as the encryption round for any cluster. The data purity includes: Smooth the multi-dimensional power data at the target time to obtain the smoothed power data in any dimension at the target time; Take any dimension as the target dimension, and use the difference between the power data before and after smoothing at the target time in the target dimension as the residual; Obtain the maximum residual value in the target dimension from the historical data; Calculate the second ratio between the residual of any power data in the target dimension within the target window and the maximum residual of the target dimension. Iterate through the target window to obtain the second ratio for each power data in the target dimension. Then, sum all the second ratios and average them to obtain the third mean. Iterate through the target window to obtain the third mean of each dimension, sum all the third means and average them to obtain the fourth mean, and use the difference between 1 and the fourth mean as the data purity.

2. The method for classifying and encrypting power data transmission for smart terminals according to claim 1, characterized in that, The degree of fluctuation includes: Using any dimension as the target dimension, obtain the maximum, minimum, and first mean of all power data within the target window for that target dimension. Calculate the absolute difference between any power data in the target dimension within the target window and the first mean, and use the difference between the maximum and minimum values ​​as the denominator to calculate the first ratio of the absolute difference to the denominator; The algorithm iterates through the target window to obtain the first ratio of each power data point in the target dimension. It then sums all the first ratios and averages them to obtain the second mean. Finally, iterates through the target window to obtain the second mean of each dimension and sums all the second means to obtain the degree of fluctuation.

3. The method for classifying and encrypting power data transmission for smart terminals according to claim 1, characterized in that, The smoothing process is performed using the least squares method.

4. The method for classifying and encrypting power data transmission for smart terminals according to claim 1, characterized in that, The encryption adjustment coefficients for calculating the target time include: Calculate the first difference between the transient sensitivity at the target time and the preset transient sensitivity reference value, and use the hyperbolic tangent function to map the first difference to obtain the mapped value; Calculate the second difference between the CPU load rate at time 1 and the target time. The product of the sensitivity adjustment coefficient, the mapping value, and the second difference is used as the encryption adjustment coefficient at the target time.

5. The method for classifying and encrypting power data transmission for smart terminals according to claim 1, characterized in that, The clustering algorithm is DBSCAN.

6. The method for classifying and encrypting power data transmission for smart terminals according to claim 1, characterized in that, The completion of encrypted data transmission includes: For the multi-dimensional power data corresponding to the sampling time of any cluster, the AES encryption algorithm is used to encrypt the data transmission based on the encryption round of any cluster, thus completing the encrypted data transmission.

7. A method for classifying and encrypting power data transmission for smart terminals according to claim 1, characterized in that, The step of constructing the encryption adjustment value based on the mean of the encryption adjustment coefficients at each sampling time within the cluster includes: Since the mean of the encryption adjustment coefficient is greater than 0 and less than 0.4, the encryption adjustment value is 0. In response to the fact that the mean of the encryption adjustment coefficient is not less than 0.4 and not greater than 0.8, the encryption adjustment value is 2; Since the mean of the encryption adjustment coefficient is greater than 0.8 and less than 1, the encryption adjustment value is set to 4.

8. A power data classification and encryption transmission system for smart terminals, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a method for classifying and encrypting power data transmission for a smart terminal according to any one of claims 1-7.

Citation Information

Patent Citations

  • Power data dynamic hybrid encryption algorithm capable of balancing security and efficiency

    CN120415878A

  • Non-intrusive power load identification method and system based on intelligent fusion terminal

    CN121037073A