A secure communication method for power Internet of Things system
By analyzing the rules and attention of user electricity data and adjusting the sliding window size of the LZ77 algorithm, the problem of insufficient flexibility of compression algorithms in the existing technology is solved, and more precise compression and protection of user electricity data is achieved.
Patent Information
- Application Number
- CN202411418056.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-10-11
AI Technical Summary
In the prior art, the sliding window size of the LZ77 compression algorithm is fixed, resulting in limited flexibility of the compression algorithm when processing real-time data flows, and it is impossible to effectively identify and compress key data in user power consumption data.
By analyzing the electricity consumption patterns between different users, calculating the similarity of electricity consumption patterns between users, several user categories are obtained, and the importance of user electricity consumption data is calculated based on the electricity consumption attention of each user category, and the sliding window size of the LZ77 algorithm is adjusted for compression.
The problem that all data in traditional methods has the same compression effect is eliminated, and a more accurate compression process is achieved, ensuring that key data is better compressed, thereby protecting the integrity of key data.
Smart Images

Figure CN119316451B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital information transmission, and in particular to a secure communication method for an electric power Internet of Things system. Background Art
[0002] With the continuous development of the power Internet of Things (IoT), the construction of smart grids is increasingly becoming the key to improving the efficiency and reliability of power systems. However, the accompanying security risks are becoming more and more prominent. In the power Internet of Things environment, various devices such as smart meters, sensors and control systems are interconnected through wireless networks, which greatly increases the risk of network attacks, including data theft, tampering and denial of service attacks. These security threats may not only cause economic losses, but also affect public safety. User electricity consumption data is the basis of data collection and management in the power Internet of Things, and it is also a key component for achieving energy efficiency, intelligent services and sustainable development. By effectively collecting, analyzing and utilizing user electricity consumption data, smarter and more efficient power system operations and management can be achieved.
[0003] In order to achieve efficient management of electricity consumption data, it is necessary to collect electricity consumption data of a large number of users; because of the large amount of data, it is necessary to increase the data transmission rate. In the prior art, it is necessary to perform lossless data compression on user electricity consumption data, among which the LZ77 compression algorithm is a commonly used data compression algorithm. The LZ77 algorithm processes input data by maintaining a sliding window. Since the size of the sliding window is always constant, the electricity consumption data of users that need to be focused on and other users that do not need to be focused on have the same compression effect; and if the window is too large, it may occupy too many memory resources, and if the window is too small, it will lead to poor compression effect; at the same time, the size of the window will also affect the processing speed of the algorithm. A larger window may require more calculations to find repeated strings, thereby affecting the compression and decompression effects. Summary of the invention
[0004] The present invention provides a secure communication method for an electric power Internet of Things system to solve the existing problems.
[0005] A secure communication method for an electric power Internet of Things system of the present invention adopts the following technical solution:
[0006] An embodiment of the present invention provides a secure communication method for an electric power Internet of Things system, the method comprising the following steps:
[0007] Using a smart meter, the user's electricity consumption data is obtained at a preset collection frequency within a preset collection period, and a data sequence is formed in the collection order, which is recorded as a power consumption data time series, and a plurality of consecutive power consumption data time series of a plurality of users are obtained. The power consumption data time series is divided into a current power consumption data time series and a historical power consumption data time series;
[0008] According to the changing trend of the time series of electricity consumption data of different users, the similarity of electricity consumption patterns among users is calculated; according to the similarity of electricity consumption patterns among users in different collection periods, several user categories are obtained;
[0009] Based on the electricity consumption data of users in each user category, analyze the electricity consumption of users and determine the electricity consumption attention of each user category; according to the electricity consumption attention of each user category, combined with the electricity consumption data time series of several users, calculate the importance of the user's electricity consumption data;
[0010] The sliding window size of the LZ77 algorithm is adjusted according to the importance of the user's electricity consumption data, and then the user's electricity consumption data is compressed and transmitted.
[0011] Furthermore, the specific method of calculating the similarity of electricity consumption patterns among users according to the changing trend of the electricity consumption data time series of different users is as follows:
[0012] The Pearson correlation coefficient of the time series of electricity consumption data between users is calculated, and the similarity of electricity consumption patterns between users is calculated by combining the maximum and minimum normalization formula.
[0013] Furthermore, the specific method of obtaining several user categories according to the similarity of electricity consumption patterns among users in different collection periods includes:
[0014] Firstly, according to the similarity of electricity consumption patterns among users in different collection periods, the final similarity of electricity consumption patterns among users is obtained;
[0015] Then, the similarity of the final electricity consumption patterns among users is used to calculate the possibility that users belong to the same category;
[0016] Finally, according to the possibility that users belong to the same category, the users' electricity consumption is classified to obtain several user categories.
[0017] Furthermore, the specific method of obtaining the similarity of the final electricity consumption rules between users is as follows:
[0018] An average value of the similarities of power consumption patterns among users in a number of collection time periods is calculated, and the average value of the similarities of power consumption patterns among users is recorded as the final similarity of power consumption patterns among users.
[0019] Furthermore, the method of calculating the possibility that users belong to the same category includes:
[0020] By using the similarity of the final electricity consumption patterns among users and combining it with the similarity of the final electricity consumption patterns of users close to the user, the possibility of users belonging to the same category is calculated;
[0021]
[0022] Among them, P A,B represents the possibility that the Ath user and the Bth user belong to the same category, Indicates the similarity of the final electricity consumption patterns between the Bth user and the users close to the Ath user; Indicates the similarity of the final electricity consumption patterns between the Ath user and the Bth user's neighbors; Indicates the similarity of the final electricity consumption patterns between the Ath user and the Bth user.
[0023] Furthermore, the method of classifying the electricity consumption of users according to the possibility that the users belong to the same category to obtain several user categories includes the following specific methods:
[0024] A threshold T1 is preset, and a user is randomly selected, and all users whose probability of belonging to the same category as the user is greater than or equal to the preset threshold are recorded as users of the same category; among the remaining users, another user is randomly selected, and all users whose probability of belonging to the same category as the user is greater than or equal to the preset threshold are obtained, and are recorded as another category of users. This is repeated in this way, and all users are classified to obtain several user categories.
[0025] Furthermore, the specific method of analyzing the electricity usage of users based on the electricity usage data of users in each user category and determining the electricity usage concern of each user category is as follows:
[0026] The average of the electricity consumption per unit area of all users in each user category is recorded as the average electricity consumption of each user category;
[0027]
[0028] Among them, G w represents the electricity consumption concern of the wth user category; k w represents the number of users in the wth user category; E w,i represents the power consumption of the i-th user in the w-th category during the collection period; σ w,i represents the standard deviation of the electricity consumption data of the ith user in the wth category during the collection period; GE w represents the average electricity consumption of the w-th user category; exp() represents an exponential function with a natural constant as the base.
[0029] Furthermore, the importance of the user's electricity consumption data is calculated based on the electricity consumption attention of each user category and in combination with the electricity consumption data time series of several users, including the specific method of:
[0030] First, according to the obtained electricity consumption data time series of several users, the difference between the current electricity consumption data time series of the user and several historical electricity consumption data time series is determined;
[0031] Then, the importance of the user's electricity consumption data is constructed by using the electricity consumption attention of the user category to which the user belongs and the difference between the user's current electricity consumption data time series and several historical electricity consumption data time series; the electricity consumption attention of the user category to which the user belongs and the difference between the user's current electricity consumption data time series and several historical electricity consumption data time series are positively correlated with the importance of the user's electricity consumption data.
[0032] Furthermore, the method of determining the difference between the current power consumption data time series of the user and the time series of several historical power consumption data according to the obtained power consumption data time series of several users includes the following specific methods:
[0033]
[0034] Among them, C A represents the difference between the current electricity consumption data time series of the Ath user and several historical electricity consumption data time series; m represents the number of electricity consumption data time series obtained for the user; n represents the number of data points contained in the electricity consumption data time series of the user; E A,4 represents the value of the jth data point in the current electricity consumption data time series of the Ath user; E A,5,4 represents the value of the jth data point in the fth historical electricity consumption data time series of the Ath user; || represents the absolute value symbol; norm() represents the normalization function.
[0035] Furthermore, the sliding window size of the LZ77 algorithm is adjusted according to the importance of the user's electricity consumption data, thereby compressing and transmitting the user's electricity consumption data, including the specific method of:
[0036] The original sliding window of the LZ77 algorithm is preset, and the size of the original sliding window is adjusted according to the importance of the user's electricity consumption data;
[0037]
[0038] in, represents the size of the corrected sliding window, g represents the number of user electricity consumption data contained in the original sliding window, and D i represents the importance of the electricity consumption data of the i-th user in the original sliding window, and K represents the size of the original sliding window of the LZ77 algorithm.
[0039] The beneficial effects of the technical solution of the present invention are: the sliding window size of the traditional LZ77 compression is fixed, which limits the flexibility of the compression algorithm when processing real-time data streams. The embodiment of the present invention analyzes the electricity consumption patterns among different users to obtain several user categories, which helps to understand the electricity consumption needs and behaviors of different user groups, analyzes the electricity consumption attention of several user categories, and further calculates the importance of user electricity consumption data, which helps to identify key data in user electricity consumption data, and adjusts the sliding window size of the LZ77 algorithm according to the importance of user electricity consumption data, and then compresses and transmits the user's electricity consumption data, eliminating the problem that the traditional method has the same compression effect on all data, helping to obtain a more accurate sliding window of the compression process, so that key data can be better compressed, thereby protecting the integrity of key data. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 The present invention is a flowchart of the steps of a secure communication method for an electric power Internet of Things system. DETAILED DESCRIPTION
[0042] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a secure communication method for an electric power Internet of Things system proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0043] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0044] The following is a detailed description of a specific solution of a secure communication method for an electric power Internet of Things system provided by the present invention in conjunction with the accompanying drawings.
[0045] See also Figure 1 , which shows a flowchart of a secure communication method for an electric power Internet of Things system provided by an embodiment of the present invention, the method comprising the following steps:
[0046] Step S001: Collect the user's electricity consumption data to form an electricity consumption data time series.
[0047] Specifically, in order to implement a secure communication method for a power Internet of Things system proposed in this embodiment, it is first necessary to collect the time sequence of power consumption data. The specific process is as follows:
[0048] A smart meter is installed at the user end. The smart meter has a wireless communication function. One smart meter corresponds to one user ID. The user ID, IP address and meter port number that uniquely identify the smart meter are used as the fingerprint information of the smart meter. The collected fingerprint information is encrypted and stored in the database. When the smart meter is connected, the system matches the input fingerprint information with the fingerprint data in the database. If the match is successful, the identity authentication is completed and the user is allowed to enter or access the corresponding function; if the match fails, access is denied.
[0049] Obtain the location of the smart meter and the building area of the corresponding user, obtain the user's electricity consumption data at a preset collection frequency within a preset collection period, form a data sequence in the collection order, record it as an electricity consumption data time series, collect several consecutive electricity consumption data time series of several users, and the electricity consumption data time series is divided into current electricity consumption data time series and historical electricity consumption data time series.
[0050] It should be noted that the preset collection frequency in the embodiment of the present invention is to record once per minute, the preset collection period is 24 hours starting from the hour, and a set of power consumption data time series includes 1440 data points.
[0051] So far, several power consumption data time series are obtained through the above method.
[0052] Step S002: Calculate the similarity of electricity usage patterns among users according to the changing trend of the electricity usage data time series of different users; and obtain several user categories according to the similarity of electricity usage patterns among users in different collection time periods.
[0053] It should be noted that this step needs to determine several user categories, and then expand the size of the sliding window according to the importance of the user's electricity data in the original window, so that the data can be better compressed and protected. Because the importance of electricity data for different categories of users is different (such as residential users, industrial users, commercial users, etc.), it is necessary to classify users first; then, the importance of these categories can be determined according to their electricity consumption and changes in electricity consumption, that is, the degree of attention; finally, based on the category attention, the importance of user electricity data is obtained through its difference from history.
[0054] Specifically, in step 2.1, based on the changing trend of the time series of electricity consumption data of different users, the similarity of electricity consumption patterns among users is calculated.
[0055] It should be noted that when two users have similar electricity usage habits, their electricity usage trends are the same. To obtain similar electricity usage habits of users, the similarity of electricity usage patterns between users is calculated based on the changing trend of the electricity usage data time series between users in the same collection period. Therefore, for the electricity usage data time series between users in the same collection period, the larger the Pearson correlation coefficient between the data time series, the stronger the correlation between the data and the more similar the electricity usage patterns between users.
[0056] The Pearson correlation coefficient of the time series of electricity consumption data between users is calculated, and the similarity of electricity consumption patterns between users is calculated by combining the maximum and minimum normalization formula.
[0057] As an embodiment, the calculation method of the similarity of power consumption patterns among users in the same collection period is as follows:
[0058]
[0059] Among them, S A,B represents the similarity of electricity consumption patterns between the Ath user and the Bth user in the same collection period, ρ A,B It represents the Pearson correlation coefficient of the time series of electricity consumption data between the Ath user and the Bth user in the same collection period, ρ represents the Pearson correlation coefficient of the time series of electricity consumption data between any two users, min() represents the selection of the minimum value, and max() represents the selection of the maximum value.
[0060] It should be noted that when the power consumption of the Ath user increases, the probability of the Bth user's power consumption increasing becomes greater, and when the power consumption of the Ath user decreases, the probability of the Bth user's power consumption decreasing also increases, indicating that the two power consumption data time series have a high positive correlation, that is, the larger the Pearson correlation coefficient between the two data sets, the higher the similarity of the power consumption patterns between users in the same collection period.
[0061] Step 2.2: According to the similarity of electricity consumption patterns among users in different collection periods, several user categories are obtained.
[0062] It should be noted that when the similarity of electricity usage patterns among users in several collection time periods is high, it can better indicate that the users have the same final electricity usage habits, and the possibility that the users belong to the same category is greater. Therefore, by calculating the average value of the similarity of electricity usage patterns among users in several collection time periods within a certain time, the similarity of final electricity usage patterns among users is determined, and then the possibility that users belong to the same category is calculated.
[0063] Firstly, according to the similarity of electricity consumption patterns among users in different collection periods, the final similarity of electricity consumption patterns among users is obtained.
[0064] Optionally, the embodiment of the present invention calculates an average value of the similarities of power usage patterns among users in several collection time periods, and records the average value of the similarities of power usage patterns among users as the final similarity of power usage patterns among users.
[0065] It should be noted that, assuming that the Ath user and the Bth user belong to the same category, the similarity of their electricity usage habits must be high, and based on the similarity of electricity usage habits, users and similar users generally belong to the same category (residential users' closest users are residential users, and industrial users' closest users are industrial users). Therefore, we need to compare the electricity usage similarity between the Ath user and the Bth user's similar users, as well as the electricity usage similarity between the Bth user and the Ath user's similar users, to obtain the possibility that the Ath user and the Bth user belong to the same category.
[0066] Then, the possibility that the users belong to the same category is calculated by using the similarity of the final electricity usage patterns between the users and combining it with the similarity of the final electricity usage patterns of users close to the user.
[0067] As an embodiment, the method for calculating the possibility that users belong to the same category is:
[0068]
[0069] Among them, P A,B represents the possibility that the Ath user and the Bth user belong to the same category, Indicates the similarity of the final electricity consumption patterns between the Bth user and the users close to the Ath user; Indicates the similarity of the final electricity consumption patterns between the Ath user and the Bth user's neighbors; Indicates the similarity of the final electricity consumption patterns between the Ath user and the Bth user.
[0070] Finally, according to the possibility that users belong to the same category, the users' electricity consumption is classified to obtain several user categories.
[0071] Optionally, an embodiment of the present invention provides a method for classifying electricity consumption of users: a threshold value T1 is preset, and a user is randomly selected, and all users whose probability of belonging to the same category as the user is greater than or equal to the preset threshold are recorded as users of the same category; among the remaining users, another user is randomly selected, and all users whose probability of belonging to the same category as the user is greater than or equal to the preset threshold are obtained and recorded as another category of users, and so on, all users are classified to obtain several user categories.
[0072] It should be noted that the embodiment of the present invention presets the threshold value T1=0.7, which can be adjusted according to actual conditions and is not specifically limited in the embodiment of the present invention.
[0073] So far, the user's electricity consumption classification is obtained through the above method.
[0074] Step S003: Based on the electricity consumption data of users in each user category, analyze the users' electricity consumption and determine the electricity consumption attention of each user category; calculate the importance of the user's electricity consumption data according to the electricity consumption attention of each user category and in combination with the electricity consumption data time series of several users.
[0075] It should be noted that users with high electricity consumption (high unit electricity consumption) often promote better economic benefits and are more dependent on electricity to support critical commercial or industrial operations, so these users need to be paid more attention. For each type of user, the category with high average unit electricity consumption should be paid more attention.
[0076] Specifically, in step 3.1, based on the electricity consumption data of users in each user category, the electricity consumption of users is analyzed to determine the electricity consumption concern of each user category.
[0077] The average of the electricity consumption per unit area of all users in each user category is recorded as the average electricity consumption of each user category.
[0078] It should be noted that due to the different sizes of building areas, it is impossible to clearly determine the abnormal changes in user energy consumption during the collection period. Therefore, by calculating the power consumption per unit area, the impact of building size on total power consumption is eliminated, which helps to better understand the changes in user power consumption within a certain period of time, providing a standardized perspective and making the analysis results more objective and scientific. When a user's power consumption per unit area is too high, there may be equipment failure or improper use, and such users need to be paid special attention to.
[0079] As an embodiment, the specific calculation method of the average power consumption of each user category is:
[0080]
[0081] Among them, GE w represents the average power consumption of the wth user category; k w represents the number of users in the wth user category; E w,i represents the power consumption of the i-th user in the w-th category during the collection period; R i represents the building area of the i-th user.
[0082] Based on the electricity consumption data of users in each user category and combined with the average electricity consumption of each user category, the electricity consumption concern of each user category is calculated.
[0083] As an embodiment, the specific calculation method of the electricity consumption concern of each user category is:
[0084]
[0085] Among them, G w represents the electricity consumption concern of the wth user category; k w represents the number of users in the wth user category; E w,i represents the power consumption of the i-th user in the w-th category during the collection period; σ w,i represents the standard deviation of the electricity consumption data of the ith user in the wth category during the collection period; GE w represents the average electricity consumption of the w-th user category; exp() represents an exponential function with a natural constant as the base.
[0086] It should be noted that because the categories of users with high electricity consumption who need continuous electricity supply are more important (factories that never stop working, data centers, etc. that require large servers to continue to operate with electricity, which have a higher risk of economic losses), so based on the average electricity consumption, the smaller the volatility of the user's electricity consumption during the collection period, the more attention should be paid.
[0087] Step 3.2, according to the electricity consumption attention of each user category, combined with the electricity consumption data time series of several users, calculate the importance of the user's electricity consumption data.
[0088] It should be noted that the greater the change between the user's current electricity consumption data and the historical electricity consumption data, the more it needs to be recorded. However, for different categories, even if the change is the same as the historical data, the importance is not exactly the same (for residential users, compared with industrial users who do not stop working, the change of residential users is not as important as that of industrial users who do not stop working). Therefore, the obtained category attention is combined with the change between the user's current electricity consumption data and the historical electricity consumption data to obtain the importance of the user's electricity consumption data.
[0089] First, based on the obtained power consumption data time series of several users, the difference between the user's current power consumption data time series and several historical power consumption data time series is determined.
[0090] As an embodiment, a specific calculation method for determining the difference between the user's current power consumption data and several historical power consumption data is as follows:
[0091]
[0092] Among them, C A represents the difference between the current electricity consumption data time series of the Ath user and several historical electricity consumption data time series; m represents the number of electricity consumption data time series obtained for the user; n represents the number of data points contained in the electricity consumption data time series of the user; E A,4 represents the value of the jth data point in the current electricity consumption data time series of the Ath user; E A,5represents the value of the jth data point in the fth historical electricity consumption data time series of the Ath user; || represents the absolute value symbol; norm() represents the normalization function.
[0093] It should be noted that to determine the importance of user electricity consumption data, the difference between the user's current electricity consumption data and several historical electricity consumption data should be determined based on the category. Generally speaking, the greater the difference between the current data and the historical data, the more attention it needs. However, compared with ordinary residential users and users who need continuous high electricity supply, under the same difference, the category with higher attention is more important.
[0094] Then, the importance of the user's electricity consumption data is constructed by using the electricity consumption attention of the user category to which the user belongs and the difference between the user's current electricity consumption data time series and several historical electricity consumption data time series; the electricity consumption attention of the user category to which the user belongs and the difference between the user's current electricity consumption data time series and several historical electricity consumption data time series are positively correlated with the importance of the user's electricity consumption data.
[0095] As an embodiment, a specific method for constructing the importance of user power consumption data is as follows:
[0096] D A =G A ×C A
[0097] Among them, D A Indicates the importance of the Ath user's electricity consumption data, G A represents the electricity consumption concern of the user category to which the Ath user belongs, C A Indicates the difference between the current power consumption data time series of the Ath user and several historical power consumption data time series.
[0098] So far, the importance of user electricity consumption data is obtained through the above method.
[0099] Step S004: adjusting the sliding window size of the LZ77 algorithm according to the importance of the user's electricity consumption data, thereby compressing and transmitting the user's electricity consumption data.
[0100] It should be noted that because the compressed data is more compact and structured, it helps to maintain the integrity and accuracy of the data and ensure that the receiving end can accurately restore the data, so better compression of important data is required here. The window size in the LZ77 compression algorithm determines the maximum user segment length that the algorithm can find and reuse. Specifically, the window size determines the maximum distance that can be traced back during the compression process, which affects whether the algorithm can effectively find and replace repeated data blocks. For important data, it is necessary to make it possible to trace back longer, thereby improving the compression rate of important data.
[0101] The original sliding window of the LZ77 algorithm is preset, and the size of the original sliding window is adjusted according to the importance of the user's electricity consumption data in the original sliding window.
[0102] Specifically, as an embodiment, a specific calculation method for adjusting the sliding window size is:
[0103]
[0104] in, represents the size of the corrected sliding window, g represents the number of user electricity consumption data contained in the original sliding window, and D i represents the importance of the electricity consumption data of the i-th user in the original sliding window, and K represents the size of the original sliding window of the LZ77 algorithm.
[0105] It should be noted that the embodiment of the present invention presets the size of the original sliding window of the LZ77 algorithm to be 16KB, which can be adjusted according to actual conditions and is not specifically limited in the embodiment of the present invention.
[0106] It should be noted that if the importance of the user data in the original window is higher, the search window size should be expanded, so the sum of the importance of all users in the original window is obtained. The initial window size is expanded to the left to expand the size of the search buffer so that more important data can be traced back and the compression rate is improved.
[0107] According to the adjusted sliding window, the user's electricity consumption data is compressed by LZ77 to obtain a number of compressed data segments, and the electricity consumption data is transmitted according to the compressed data segments.
[0108] At this point, this embodiment is completed.
[0109] It should be noted that the exp(-x) model used in this embodiment is only used to indicate that the negative correlation and the result of the constraint model output are in the interval (0,1). In specific implementation, it can be replaced with other models with the same purpose. This embodiment only uses the exp(-x) model as an example for description without making specific limitations on it, where x refers to the input of the model.
[0110] The sliding window size of traditional LZ77 compression is fixed, which limits the flexibility of the compression algorithm when processing real-time data streams. The embodiment of the present invention analyzes the electricity consumption patterns among different users to obtain several user categories, which helps to understand the electricity consumption needs and behaviors of different user groups, analyzes the electricity consumption attention of several user categories, and further calculates the importance of user electricity consumption data, which helps to identify key data in user electricity consumption data, and adjusts the sliding window size of the LZ77 algorithm according to the importance of user electricity consumption data, and then compresses and transmits the user's electricity consumption data, eliminating the problem that traditional methods have the same compression effect on all data, helping to obtain a more accurate sliding window of the compression process, so that key data can be better compressed, thereby protecting the integrity of key data.
[0111] Another embodiment of the present invention provides a security access management system for the electric power Internet of Things, including encryption technology, identity authentication mechanism and security protocol.
[0112] Specifically, first, the compressed data segment corresponding to each user is encrypted using the national encryption SM3 algorithm to obtain encrypted data.
[0113] Then, the hash function is used to obtain the hash code of the encrypted data, and each encrypted data corresponds to a hash code; the digital signature technology is used to generate a digital signature for each smart meter corresponding to the user ID, and the digital signature, hash code and corresponding encrypted data are packaged into a data packet and sent to the data center through the 5G communication module of the smart meter.
[0114] The data center performs signature verification on the received data packet. If the verification fails, the data packet is discarded; if the verification passes, the data center uses the same hash function to hash the encrypted data to obtain a new hash code, compares the new hash code with the hash code in the data packet, and decrypts the encrypted data based on the comparison result.
[0115] When the comparison results are the same, the compressed data is stored in the cloud storage platform according to the user ID; when the comparison results are different, the data packet is discarded and the smart meter is requested to resend it.
[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A secure communication method for an electric power Internet of Things system, characterized in that: The method comprises the following steps: Using a smart meter, the user's electricity consumption data is obtained at a preset collection frequency within a preset collection period, and a data sequence is formed in the collection order, which is recorded as a power consumption data time series, and a plurality of consecutive power consumption data time series of a plurality of users are obtained. The power consumption data time series is divided into a current power consumption data time series and a historical power consumption data time series; According to the changing trend of the time series of electricity consumption data of different users, the similarity of electricity consumption patterns among users is calculated; according to the similarity of electricity consumption patterns among users in different collection periods, several user categories are obtained; Based on the electricity consumption data of users in each user category, analyze the electricity consumption of users and determine the electricity consumption attention of each user category; according to the electricity consumption attention of each user category, combined with the electricity consumption data time series of several users, calculate the importance of the user's electricity consumption data; The sliding window size of the LZ77 algorithm is adjusted according to the importance of the user's electricity consumption data, thereby compressing and transmitting the user's electricity consumption data; The specific method of analyzing the electricity usage of users based on the electricity usage data of users in each user category and determining the electricity usage concern of each user category is as follows: The average of the electricity consumption per unit area of all users in each user category is recorded as the average electricity consumption of each user category; Among them, G w represents the electricity consumption concern of the wth user category; k w represents the number of users in the wth user category; E w,i represents the power consumption of the i-th user in the w-th category during the collection period; σ w,i represents the standard deviation of the electricity consumption data of the ith user in the wth category during the collection period; GE w represents the average electricity consumption of the w-th user category; exp() represents an exponential function with a natural constant as the base.
2. According to claim 1, a secure communication method for an electric power Internet of Things system is characterized in that: The specific method of calculating the similarity of electricity consumption patterns among users according to the changing trend of the electricity consumption data time series of different users is as follows: The Pearson correlation coefficient of the time series of electricity consumption data between users is calculated, and the similarity of electricity consumption patterns between users is calculated by combining the maximum and minimum normalization formula.
3. According to claim 1, a secure communication method for an electric power Internet of Things system is characterized in that: The specific method of obtaining several user categories according to the similarity of electricity consumption patterns among users in different collection periods includes: Firstly, according to the similarity of electricity consumption patterns among users in different collection periods, the final similarity of electricity consumption patterns among users is obtained; Then, the similarity of the final electricity consumption patterns among users is used to calculate the possibility that users belong to the same category; Finally, according to the possibility that users belong to the same category, the users' electricity consumption is classified to obtain several user categories.
4. According to claim 3, a secure communication method for an electric power Internet of Things system is characterized in that: The specific method of obtaining the similarity of the final electricity consumption rules between users includes: An average value of the similarities of power consumption patterns among users in a number of collection time periods is calculated, and the average value of the similarities of power consumption patterns among users is recorded as the final similarity of power consumption patterns among users.
5. According to claim 3, a secure communication method for an electric power Internet of Things system is characterized in that: The method of calculating the possibility that users belong to the same category includes: By using the similarity of the final electricity consumption patterns among users and combining it with the similarity of the final electricity consumption patterns of users close to the user, the possibility of users belonging to the same category is calculated; Among them, P A,B represents the possibility that the Ath user and the Bth user belong to the same category, Indicates the similarity of the final electricity consumption patterns between the Bth user and the users close to the Ath user; Indicates the similarity of the final electricity consumption patterns between the Ath user and the Bth user's neighbors; Indicates the similarity of the final electricity consumption patterns between the Ath user and the Bth user.
6. According to claim 3, a secure communication method for an electric power Internet of Things system is characterized in that: The method of classifying the electricity consumption of users according to the possibility that the users belong to the same category to obtain several user categories includes: A threshold T1 is preset, and a user is randomly selected, and all users whose probability of belonging to the same category as the user is greater than or equal to the preset threshold are recorded as users of the same category; among the remaining users, another user is randomly selected, and all users whose probability of belonging to the same category as the user is greater than or equal to the preset threshold are obtained, and are recorded as another category of users. This is repeated in this way, and all users are classified to obtain several user categories.
7. The secure communication method of the power Internet of Things system according to claim 1, characterized in that: The importance of the user's electricity consumption data is calculated based on the electricity consumption attention of each user category and in combination with the electricity consumption data time series of several users, including the specific method of: First, according to the obtained electricity consumption data time series of several users, the difference between the current electricity consumption data time series of the user and several historical electricity consumption data time series is determined; Then, the importance of the user's electricity consumption data is constructed by using the electricity consumption attention of the user category to which the user belongs and the difference between the user's current electricity consumption data time series and several historical electricity consumption data time series; The electricity consumption attention of the user category to which the user belongs, and the difference between the time series of the user's current electricity consumption data and several time series of historical electricity consumption data are both positively correlated with the importance of the user's electricity consumption data.
8. A secure communication method for an electric power Internet of Things system according to claim 7, characterized in that: The method of determining the difference between the current power consumption data time series of the user and the time series of several historical power consumption data according to the obtained power consumption data time series of several users includes: Among them, C A represents the difference between the current electricity consumption data time series of the Ath user and several historical electricity consumption data time series; m represents the number of electricity consumption data time series obtained for the user; n represents the number of data points contained in the electricity consumption data time series of the user; E A,j represents the value of the jth data point in the current electricity consumption data time series of the Ath user; E A,f,j represents the value of the jth data point in the fth historical electricity consumption data time series of the Ath user; || represents the absolute value symbol; norm() represents the normalization function.
9. The secure communication method of the power Internet of Things system according to claim 1, characterized in that: The specific method of adjusting the sliding window size of the LZ77 algorithm according to the importance of the user's electricity consumption data includes: The original sliding window of the LZ77 algorithm is preset, and the size of the original sliding window is adjusted according to the importance of the user's electricity consumption data; in, represents the size of the corrected sliding window, g represents the number of user electricity consumption data contained in the original sliding window, and D i represents the importance of the electricity consumption data of the ith user in the original sliding window, and K represents the size of the original sliding window of the LZ77 algorithm.
Citation Information
Patent Citations
Power distribution and utilization data compression and fusion method and device
CN111930725A
Smart power grid data optimization transmission method
CN116828070A