Power network equipment identity authentication method based on cryptography

Through a cryptography-based method, combining hash function and historical data analysis, the authentication success rate of computing devices and network activity abnormality rate, the challenge of efficiency and security of the identity authentication of power network devices in smart grid environments is solved, and the challenge of power network device identity authentication is realized. Higher certification reliability and security.

CN119011226APending Publication Date: 2024-11-22STATE GRID ANHUI ELECTRIC POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411030283.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The identity authentication of power network equipment requires an efficient, secure and scalable identity authentication mechanism in a smart grid environment, and the existing technology is difficult to effectively deal with the problem of the surge in the number of devices and the threat of network security.

Method used

Using a cryptography-based method, by collecting the historical data and identity authentication information of the device, calculating the authentication success rate and network activity abnormality rate, combining hash function to generate and compare the device keys, determine whether the device identity authentication is qualified, and ensure that the device is connected to the device. interoperability and network security.

Benefits of technology

It improves the security of the power network and the reliability of device identity authentication, ensures the security of data transmission and the integrity of the verification process through cryptography tools, and enhances the trust score and network security between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011226A_ABST
    Figure CN119011226A_ABST
Patent Text Reader

Abstract

The invention discloses a cryptography-based power network equipment identity authentication method. The cryptography-based power network equipment identity authentication method comprises the following steps: collecting historical data and identity authentication information of power network equipment; calculating an identity verification success rate of the equipment accessing the power network according to the collected data; calculating a network activity anomaly rate of the device through the collected historical data; judging whether the identity authentication of the equipment is qualified or not by combining the identity authentication success rate and the network activity abnormal rate of the equipment; according to the method, the power network equipment identity is authenticated through a cryptographic method, so that the security of the power network and the reliability of equipment identity authentication are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cryptography, and in particular to a cryptography-based power network equipment identity authentication method. Background Art

[0002] The power network equipment authentication method based on cryptography is a key technology developed in the context of power system security protection. It deeply integrates cryptographic theory with the specific needs of power networks. Cryptography, as the core of information security, provides tools such as asymmetric encryption, symmetric encryption, hash functions and digital signatures for data encryption, identity authentication and integrity checking, providing a solid security barrier for power network equipment. The complexity, distribution and real-time nature of power networks require that the authentication mechanism must be efficient, secure and scalable to cope with the surge in the number of smart grid devices and network security threats. Authentication technologies based on certificates, zero-knowledge proofs, biometrics, hardware and identity cryptography not only meet the needs of real-time response of power systems, but also enhance the interoperability between devices and the security of the entire network. Summary of the invention

[0003] The present invention provides a cryptography-based power network equipment identity authentication method, comprising:

[0004] S110, collecting historical data and identity authentication information of power network equipment;

[0005] S120, calculating the identity authentication success rate of the device accessing the power network based on the collected data;

[0006] S130, calculating the network activity abnormality rate of the device through the collected historical data;

[0007] S140. Determine whether the device identity authentication is qualified based on the device identity authentication success rate and the network activity abnormality rate.

[0008] The cryptography-based power network device identity authentication method as described above is characterized in that the power network identity authentication success rate calculation method includes the following sub-steps:

[0009] Extract the device identifier. When the device is first connected to the power network, the system generates a unique key for each device.

[0010] Use a hash function to convert the secret key into a hash value and store the hash value in the database;

[0011] When the device requests access again, the device information is hashed using the same hash function, and the newly generated hash value is compared with the hash value stored in the database. If the two match, the authentication success rate is increased; if they do not match, the authentication success rate is reduced.

[0012] The cryptography-based power network device identity authentication method as described above is characterized in that the method for calculating the abnormal rate of network activity of the device specifically includes the following sub-steps:

[0013] Calculate the flow pattern deviation based on the flow pattern data in the historical data;

[0014] Calculate the request frequency abnormality based on the request frequency data in the historical data;

[0015] The device's network activity anomaly rate is calculated based on the traffic pattern deviation and request frequency anomaly.

[0016] The cryptography-based power network device identity authentication method as described above is characterized in that the method for calculating the flow pattern deviation comprises the following sub-steps:

[0017] Establishing traffic pattern data sets;

[0018] Set the window size value;

[0019] Calculate the mean and standard deviation of the traffic pattern data based on the window size value and the traffic pattern data set;

[0020] The traffic pattern deviation is calculated based on the mean and standard deviation of the traffic pattern data.

[0021] The cryptography-based power network device identity authentication method described above is characterized in that the method for calculating the request frequency abnormality specifically includes the following sub-steps:

[0022] Establishing a request frequency data set;

[0023] Based on the request frequency data set, calculate the moving median absolute deviation;

[0024] According to the absolute value deviation of the moving median, outliers in the request frequency data set are detected and the request frequency anomaly degree is calculated.

[0025] The present invention also provides a cryptography-based power network equipment identity authentication system, comprising: a data collection module, an identity authentication success rate calculation module, a network activity abnormality rate calculation module, and a judgment module.

[0026] Data collection module: collects historical data and identity verification information of power network equipment;

[0027] Authentication success rate calculation module: calculates the authentication success rate of the device accessing the power network based on the collected data;

[0028] Network activity abnormality rate calculation module: calculates the network activity abnormality rate of the device through the collected historical data;

[0029] Judgment module: Combine the device's identity authentication success rate and network activity abnormality rate to determine whether the device identity authentication is qualified.

[0030] The cryptography-based power network device identity authentication system as described above is characterized in that the method for calculating the identity authentication success rate of the power network includes the following sub-steps:

[0031] Extract the device identifier. When the device is first connected to the power network, the system generates a unique key for each device.

[0032] Use a hash function to convert the secret key into a hash value and store the hash value in the database;

[0033] When the device requests access again, the device information is hashed using the same hash function, and the newly generated hash value is compared with the hash value stored in the database. If the two match, the authentication success rate is increased; if they do not match, the authentication success rate is reduced.

[0034] The cryptography-based power network device identity authentication system as described above is characterized in that the method for calculating the abnormal rate of network activity of the device specifically includes the following sub-steps:

[0035] Calculate the flow pattern deviation based on the flow pattern data in the historical data;

[0036] Calculate the request frequency abnormality based on the request frequency data in the historical data;

[0037] The device's network activity anomaly rate is calculated based on the traffic pattern deviation and request frequency anomaly.

[0038] The cryptography-based power network equipment identity authentication system as described above is characterized in that the method for calculating the flow pattern deviation comprises the following sub-steps:

[0039] Establishing traffic pattern data sets;

[0040] Set the window size value;

[0041] Calculate the mean and standard deviation of the traffic pattern data based on the window size value and the traffic pattern data set;

[0042] The traffic pattern deviation is calculated based on the mean and standard deviation of the traffic pattern data.

[0043] The cryptography-based power network equipment identity authentication system as described above is characterized in that the method for calculating the request frequency abnormality degree specifically includes the following sub-steps:

[0044] Establishing a request frequency data set;

[0045] Based on the request frequency data set, calculate the moving median absolute deviation;

[0046] According to the absolute value deviation of the moving median, outliers in the request frequency data set are detected and the request frequency anomaly degree is calculated.

[0047] The beneficial effects achieved by the present invention are as follows: the identity of power network equipment is authenticated by a cryptographic method, thereby improving the security of the power network and the reliability of equipment identity authentication. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] 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 recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0049] Figure 1 This is a flow chart of a cryptography-based power network device identity authentication method provided in Example 1 of the present application;

[0050] Figure 2 This is a schematic diagram of a cryptography-based power network equipment identity authentication system provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0051] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0052] Embodiment 1

[0053] like Figure 1 As shown, Embodiment 1 of the present application provides a power network equipment identity authentication method based on cryptography.

[0054] Step S110: Collecting historical data and identity verification information of power network equipment;

[0055] Historical data includes traffic pattern data and request frequency data. The device's authentication success rate and network activity anomaly rate can be calculated based on the device's historical data. The authentication success rate and network activity anomaly rate are important factors in the mutual trust score between power network devices. The authentication information includes the device's identifier and key information, which is the unique identifier of the authentication device in the power network device identity authentication system.

[0056] Step S120: Calculate the identity authentication success rate of the device accessing the power network based on the collected data;

[0057] The success rate of authentication for devices accessing the power grid involves analyzing historical login data, using cryptographic tools to ensure data transmission security and the integrity of the authentication process, using SSL / TLS or other encryption protocols to ensure that historical data is not intercepted or tampered with during transmission, and using hash storage to ensure that key information cannot be reversed. It specifically includes the following sub-steps:

[0058] Step S121: extracting the device identifier, when the device is first connected to the power network, the system generates a unique key for each device;

[0059] Extract the device identifier from the collected historical data. The device identifier includes the MAC address and the device number. Search the database according to the device number. If there is recorded data of the number, it is determined that the device is not connected to the power network for the first time, and step S123 is performed. If there is no recorded data of the number, it is determined that the device is connected to the power network for the first time. The system generates a unique key for the device. The unique key consists of the timestamp of the first access of the device, the MAC address encoding string and the device number. Specifically, the formula is used: Generate a secret key, where K represents the secret key, H represents the hash function SHA-256, T represents the timestamp of the device's first access, M represents the MAC address encoding string, and R represents the device number. It represents a bitwise XOR operation. The hash function is applied to the first access timestamp, MAC address and device number respectively, and then the obtained hash values ​​are XORed. Finally, the hash function is applied again to get the final key. The hash function can be used to convert different types of data (numbers and strings) into comparable numerical forms. The XOR operation can further mix the information from these three sources, so that any change in a single part will result in a huge change in the final key.

[0060] Step S122: using a hash function to convert the secret key into a hash value, and storing the hash value in a database;

[0061] Use the hash function SHA-256 to convert the device's unique secret key into a hash value, and pass the secret key K directly as input to the SHA-256 function, which will output a hash value of a fixed length. Specifically, the formula: H(K)=SHA-256(K) is used to calculate the hash value of the secret key, where H(K) represents the hash value of the secret key K, and SHA-256() represents the hash function. After the hashing is completed, the hash value is stored in the database. Since the calculation process of the hash value is irreversible, it means that it is difficult to derive the original secret key K from the hash value. This property ensures the security of the secret key.

[0062] Step S123: When the device requests access again, the device information is hashed using the same hash function, and the newly generated hash value is compared with the hash value stored in the database. If the two match, the identity authentication success rate is increased; if they do not match, the identity authentication success rate is reduced;

[0063] When the device requests access again, the device identifier passed in by the device and the first access timestamp of the device saved in the database are hashed using the same hash function, and the newly generated hash value is compared with the hash value stored in the database. If the two match, the authentication success rate is increased; if they do not match, the authentication success rate is reduced. Specifically, the formula is used:

[0064] Calculate the newly generated hash value using the formula: Calculate the authentication success rate, where S identity represents the authentication success rate, H(K) represents the hash value stored in the database, H(K') represents the newly generated hash value, SHA-256 represents the hash function, T represents the timestamp of the device's first access, M represents the MAC address encoding string, R represents the device number, Indicates a bitwise XOR operation. Since the first access timestamp, MAC address, and device number are fixed parameters of the device, the hash value will change if any of the parameters changes.

[0065] Step S130: Calculate the network activity abnormality rate of the device through the collected historical data;

[0066] The abnormal rate of network activity of a device is closely related to the identity authentication of the device. If the abnormal rate of network activity of a device is high, it is considered that the device is not compatible with the power network and there is an authentication risk. The abnormal rate of network activity includes the deviation of traffic pattern and the abnormality of request frequency. The calculation of the abnormal rate of network activity of a device includes the following sub-steps:

[0067] Step S131: Calculating the flow pattern deviation according to the flow pattern data in the historical data;

[0068] 1. Establish a traffic pattern data set;

[0069] The traffic pattern data set contains historical traffic data over a period of time. The traffic pattern deviation indicates the degree of deviation of the traffic data at a certain time point from the mean and standard deviation of the historical data. Specifically, the traffic pattern data set is expressed as: X = {x1, x2, ..., x i ,...,x n}, where X represents the traffic pattern data set, x i Indicates the traffic volume at the i-th time point, where i ranges from 1 to n.

[0070] 2. Set the window size value;

[0071] Choose a window size ω, which represents the length of the time period considered when calculating the mean and standard deviation. The choice of window size depends on the length of the trend you want to capture. For capturing short-term fluctuations, you can choose a smaller ω (such as 5 or 10 minutes), while for long-term trends, choose a larger ω (such as a day or a week).

[0072] 3. Calculate the mean and standard deviation of the traffic pattern data based on the window size value and the traffic pattern data set;

[0073] The mean and standard deviation of the traffic pattern data are calculated based on the window size ω. Specifically, the formula is used: Calculate the average value of traffic pattern data, where MA represents the average value set of traffic pattern data, ω represents the window size, and ma i represents the average value of the traffic pattern data at the i-th time node, the value of i is 1-n-ω+1, x j It represents the flow rate at the jth time point, j is i-i+ω-1, and the formula is: Calculate the standard deviation of the traffic pattern data, where MSD represents the set of standard deviations of the traffic pattern data, ω represents the window size, and msd i represents the standard deviation of the traffic pattern data at the i-th time node, ma i represents the average value of the traffic pattern data at the i-th time node, the value of i is 1-n-ω+1, x j It represents the flow rate at the jth time point, and the value of j is i-i+ω-1.

[0074] 4. Calculate the flow pattern deviation based on the mean and standard deviation of the flow pattern data;

[0075] For the traffic pattern data x at the current time point t t , the flow pattern deviation can be calculated by the mean value and standard deviation of the flow pattern data. Specifically, the formula is: Calculate the flow pattern deviation, where D trepresents the traffic pattern deviation at the current time point t, x t represents the traffic pattern data at the current time point t, ma t-ω+1 Represents the average value of the current traffic pattern data and the past ω time points, msd t-ω+1 represents the standard deviation of the current traffic pattern data and the past ω time points, D t It reflects the standardized deviation of the current flow rate from the average flow rate at the past ω time points. The larger the absolute value, the greater the degree to which the flow rate deviates from the historical pattern.

[0076] Step S132: Calculate the request frequency abnormality according to the request frequency data in the historical data;

[0077] 1. Establish a request frequency data set;

[0078] The request frequency data set contains historical request data within a period of time. The request frequency anomaly degree represents the degree of anomaly of the historical request frequency data within the window ω at each time t. Specifically, the request frequency data set is expressed as: Y = {y t-ω+1 ,y t-ω+2 ,...,y i ,...,y t}, where Y represents the request frequency data set, y i It represents the request frequency at the i-th time point, and the value of i is t-ω+1-t.

[0079] 2. Calculate the moving median absolute deviation based on the requested frequency data set;

[0080] Moving median absolute deviation is a statistic that measures the dispersion of data. It is more robust than the standard deviation and is not affected by outliers. For a certain time t, based on the data in the window ω, specifically, the formula is: MAD t = median(y i -M t |) Calculate the moving median absolute deviation, where MAD t represents the absolute deviation of the moving median at time t, y i represents the i-th request frequency data in the window, i is t-ω+1-t, M t Represents the median of the window, and median represents the median function.

[0081] 3. Detect outliers in the request frequency data set based on the absolute value deviation of the moving median and calculate the request frequency anomaly degree;

[0082] According to the absolute deviation of the moving median, the outlier boundary is defined. Specifically, the formula is: LowerBoundary = M t -k×MADt Indicates the lowest outlier boundary, UpperBoundary = M t + k × MAD t Indicates the highest outlier boundary, where M t Represents the median of the window, MAD t Represents the absolute deviation of the moving median at time t. k is a constant, and the value of k depends on the strictness of anomaly detection and the noise level of the data. A higher value of k means a wider anomaly boundary and it is less likely to mark normal fluctuations as anomalies.

[0083] For the request frequency y of the current window i , if y i < LowerBoundary or y i > UpperBoundary, then it is marked as an anomaly, and the total number of outliers is accumulated until all the data within the window is detected. The final request frequency anomaly degree is expressed as: where S t Represents the request frequency anomaly degree, μ represents the total number of outliers, and ω represents the window size.

[0084] Step S133: Calculate the network activity anomaly rate of the device based on the traffic pattern deviation degree and the request frequency anomaly degree;

[0085] The traffic pattern deviation degree reflects the deviation degree of the current traffic pattern from the historical traffic pattern, and the request frequency anomaly degree measures the anomaly degree of the current request frequency from the historical request frequency. By combining the traffic pattern deviation degree and the request frequency anomaly degree, the network activity anomaly rate of the device can be obtained. Specifically, the formula is used: Calculate the network activity anomaly rate of the device, where W t Represents the network activity anomaly rate of the device, D t Represents the traffic pattern deviation degree, S t Represents the request frequency anomaly degree, α represents the weight of the traffic pattern deviation degree, and β represents the weight of the request frequency anomaly degree.

[0086] Step S140: Combine the device's authentication success rate and the network activity anomaly rate to determine whether the device authentication is qualified;

[0087] In this application, the authentication success rate threshold is set to 0.9, indicating that at least 90% of the attempted accesses are successful, and the network activity anomaly rate threshold is set to 0.1, indicating that the network activity anomaly rate does not exceed 10%. Specifically, if S identity ≥ 0.9 && W t ≤ 0.1, it means the device authentication is qualified. If S identity < 0.9 || W t > 0.1, it means the device authentication is unqualified.

[0088] Embodiment 2

[0089] like Figure 2 As shown, Embodiment 1 of the present application provides a power network equipment identity authentication system based on cryptography.

[0090] Data collection module 21: collects historical data and identity verification information of power network equipment;

[0091] Historical data includes traffic pattern data and request frequency data. The device's authentication success rate and network activity anomaly rate can be calculated based on the device's historical data. The authentication success rate and network activity anomaly rate are important factors in the mutual trust score between power network devices. The authentication information includes the device's identifier and key information, which is the unique identifier of the authentication device in the power network device identity authentication system.

[0092] The identity authentication success rate calculation module 22 calculates the identity authentication success rate of the device accessing the power network according to the collected data;

[0093] The success rate of authentication for devices accessing the power grid involves analyzing historical login data, using cryptographic tools to ensure data transmission security and the integrity of the authentication process, using SSL / TLS or other encryption protocols to ensure that historical data is not intercepted or tampered with during transmission, and using hash storage to ensure that key information cannot be reversed. It specifically includes the following sub-steps:

[0094] Key generation module: extracts the device identifier. When the device is first connected to the power network, the system generates a unique key for each device.

[0095] Extract the device identifier from the collected historical data. The device identifier contains the MAC address and device number. Search the database according to the device number. If there is recorded data with this number, it is determined that the device is not connected to the power network for the first time. Perform a comparison module. If there is no recorded data with this number, it is determined that the device is connected to the power network for the first time. The system generates a unique key for the device. The unique key consists of the timestamp of the device's first access, the MAC address encoding string, and the device number. Specifically, the formula is used: Generate a secret key, where K represents the secret key, H represents the hash function SHA-256, T represents the timestamp of the device's first access, M represents the MAC address encoding string, and R represents the device number. It represents a bitwise XOR operation. The hash function is applied to the first access timestamp, MAC address and device number respectively, and then the obtained hash values ​​are XORed. Finally, the hash function is applied again to get the final key. The hash function can be used to convert different types of data (numbers and strings) into comparable numerical forms. The XOR operation can further mix the information from these three sources, so that any change in a single part will result in a huge change in the final key.

[0096] Hash value module: Use hash function to convert the secret key into hash value and store the hash value in the database;

[0097] Use the hash function SHA-256 to convert the device's unique secret key into a hash value, and pass the secret key K directly as input to the SHA-256 function, which will output a hash value of a fixed length. Specifically, the formula: H(K)=SHA-256(K) is used to calculate the hash value of the secret key, where H(K) represents the hash value of the secret key K, and SHA-256() represents the hash function. After the hashing is completed, the hash value is stored in the database. Since the calculation process of the hash value is irreversible, it means that it is difficult to derive the original secret key K from the hash value. This property ensures the security of the secret key.

[0098] Comparison module: When the device requests access again, the device information is hashed using the same hash function, and the newly generated hash value is compared with the hash value stored in the database. If the two match, the authentication success rate is increased; if they do not match, the authentication success rate is reduced;

[0099] When the device requests access again, the device identifier passed in by the device and the first access timestamp of the device saved in the database are hashed using the same hash function, and the newly generated hash value is compared with the hash value stored in the database. If the two match, the authentication success rate is increased; if they do not match, the authentication success rate is reduced. Specifically, the formula is used:

[0100] Calculate the newly generated hash value using the formula: Calculate the authentication success rate, where S identity represents the authentication success rate, H(K) represents the hash value stored in the database, H(K') represents the newly generated hash value, SHA-256 represents the hash function, T represents the timestamp of the device's first access, M represents the MAC address encoding string, R represents the device number, Indicates a bitwise XOR operation. Since the first access timestamp, MAC address, and device number are fixed parameters of the device, the hash value will change if any of the parameters changes.

[0101] Network activity abnormality rate calculation module 23: calculates the network activity abnormality rate of the device through the collected historical data;

[0102] The abnormal rate of network activity of a device is closely related to the identity authentication of the device. If the abnormal rate of network activity of a device is high, it is considered that the device is not compatible with the power network and there is an authentication risk. The abnormal rate of network activity includes the deviation of traffic pattern and the abnormality of request frequency. The calculation of the abnormal rate of network activity of a device includes the following sub-steps:

[0103] Traffic pattern deviation calculation module: calculates the traffic pattern deviation according to the traffic pattern data in the historical data;

[0104] 1. Establish a traffic pattern data set;

[0105] The traffic pattern data set contains historical traffic data over a period of time. The traffic pattern deviation indicates the degree of deviation of the traffic data at a certain time point from the mean and standard deviation of the historical data. Specifically, the traffic pattern data set is expressed as: X = {x1, x2, ..., x i ,...,x n}, where X represents the traffic pattern data set, x i Indicates the traffic volume at the i-th time point, where i ranges from 1 to n.

[0106] 2. Set the window size value;

[0107] Choose a window size ω, which represents the length of the time period considered when calculating the mean and standard deviation. The choice of window size depends on the length of the trend you want to capture. For capturing short-term fluctuations, you can choose a smaller ω (such as 5 or 10 minutes), while for long-term trends, choose a larger ω (such as a day or a week).

[0108] 3. Calculate the mean and standard deviation of the traffic pattern data based on the window size value and the traffic pattern data set;

[0109] The mean and standard deviation of the traffic pattern data are calculated based on the window size ω. Specifically, the formula is used: Calculate the average value of traffic pattern data, where MA represents the average value set of traffic pattern data, ω represents the window size, and ma i represents the average value of the traffic pattern data at the i-th time node, the value of i is 1-n-ω+1, x j It represents the flow rate at the jth time point, j is i-i+ω-1, and the formula is: Calculate the standard deviation of the traffic pattern data, where MSD represents the set of standard deviations of the traffic pattern data, ω represents the window size, and msd i represents the standard deviation of the traffic pattern data at the i-th time node, ma irepresents the average value of the traffic pattern data at the i-th time node, the value of i is 1-n-ω+1, x j It represents the flow rate at the jth time point, and the value of j is i-i+ω-1.

[0110] 4. Calculate the flow pattern deviation based on the mean and standard deviation of the flow pattern data;

[0111] For the traffic pattern data x at the current time point t t , the flow pattern deviation can be calculated by the mean value and standard deviation of the flow pattern data. Specifically, the formula is: Calculate the flow pattern deviation, where D t represents the traffic pattern deviation at the current time point t, x t represents the traffic pattern data at the current time point t, ma t-ω+1 Represents the average value of the current traffic pattern data and the past ω time points, msd t-ω+1 represents the standard deviation of the current traffic pattern data and the past ω time points, D t It reflects the standardized deviation of the current flow rate from the average flow rate at the past ω time points. The larger the absolute value, the greater the degree to which the flow rate deviates from the historical pattern.

[0112] Request frequency anomaly calculation module: calculates request frequency anomaly according to request frequency data in historical data;

[0113] 1. Establish a request frequency data set;

[0114] The request frequency data set contains historical request data within a period of time. The request frequency anomaly degree represents the degree of anomaly of the historical request frequency data within the window ω at each time t. Specifically, the request frequency data set is expressed as: Y = {y t-ω+1 ,y t-ω+2 ,...,y i ,...,y t}, where Y represents the request frequency data set, y i It represents the request frequency at the i-th time point, and the value of i is t-ω+1-t.

[0115] 2. Calculate the moving median absolute deviation based on the requested frequency data set;

[0116] Moving median absolute deviation is a statistic that measures the dispersion of data. It is more robust than the standard deviation and is not affected by outliers. For a certain time t, based on the data in the window ω, specifically, the formula is: MAD t = median(y i -M t |) Calculate the moving median absolute deviation, where MADt Represents the median absolute deviation at time t, y i Represents the i-th request frequency data within the window, where i ranges from t - ω + 1 to t, M t Represents the median of the window, and median represents the median function.

[0117] 3. Detect outliers in the request frequency data set based on the median absolute deviation of the moving median, and calculate the request frequency anomaly degree;

[0118] Define the outlier boundary according to the median absolute deviation of the moving median. Specifically, use the formula: LowerBoundary = M t - k × MAD t Represents the lowest outlier boundary, UpperBoundary = M t + k × MAD t Represents the highest outlier boundary, where M t Represents the median of the window, MAD t Represents the median absolute deviation of the moving median at time t. k is a constant, and the value of k depends on the strictness of outlier detection and the noise level of the data. A higher value of k means a wider outlier boundary and it is less likely to mark normal fluctuations as outliers.

[0119] For the request frequency y of the current window i , if y i < LowerBoundary or y i > UpperBoundary, then mark it as an outlier, accumulate the total number of outliers until all data within the window is detected. The final request frequency anomaly degree is expressed as: where S t Represents the request frequency anomaly degree, μ represents the total number of outliers, and ω represents the window size.

[0120] Network activity anomaly rate calculation module: Calculate the network activity anomaly rate of the device based on the traffic pattern deviation degree and the request frequency anomaly degree;

[0121] The traffic pattern deviation degree reflects the deviation degree of the current traffic pattern from the historical traffic pattern, and the request frequency anomaly degree measures the anomaly degree of the current request frequency from the historical request frequency. By combining the traffic pattern deviation degree and the request frequency anomaly degree, the network activity anomaly rate of the device can be obtained. Specifically, use the formula: Calculate the network activity anomaly rate of the device, where W t Represents the network activity anomaly rate of the device, D t Represents the traffic pattern deviation degree, S trepresents the request frequency abnormality, α represents the weight of the traffic pattern deviation, and β represents the weight of the request frequency abnormality.

[0122] Judgment module 24: judging whether the device identity authentication is qualified based on the device identity authentication success rate and the network activity abnormality rate;

[0123] In this application, the identity authentication success rate threshold is set to 0.9, indicating that at least 90% of the access attempts are successful, and the network activity abnormality rate threshold is set to 0.1, indicating that the network activity abnormality rate does not exceed 10%. Specifically, if S identity ≥0.9&&W t ≤0.1 means the device identity authentication is qualified. identity <0.9||W t >0.1 means the device authentication fails.

[0124] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A cryptography-based power network equipment identity authentication method, characterized in that: include: S110, collecting historical data and identity authentication information of power network equipment; S120, calculating the identity authentication success rate of the device accessing the power network based on the collected data; S130, calculating the network activity abnormality rate of the device through the collected historical data; S140. Determine whether the device identity authentication is qualified based on the device identity authentication success rate and the network activity abnormality rate.

2. A cryptography-based power network device identity authentication method as claimed in claim 1, characterized in that: The method for calculating the identity authentication success rate of the power network includes the following sub-steps: Extract the device identifier. When the device is first connected to the power network, the system generates a unique key for each device. Use a hash function to convert the secret key into a hash value and store the hash value in the database; When the device requests access again, the device information is hashed using the same hash function, and the newly generated hash value is compared with the hash value stored in the database. If the two match, the authentication success rate is increased; if they do not match, the authentication success rate is reduced.

3. A cryptography-based power network device identity authentication method as claimed in claim 1, characterized in that: The method for calculating the abnormal rate of network activity of a device specifically includes the following sub-steps: Calculate the flow pattern deviation based on the flow pattern data in the historical data; Calculate the request frequency abnormality based on the request frequency data in the historical data; The device's network activity anomaly rate is calculated based on the traffic pattern deviation and request frequency anomaly.

4. A cryptography-based power network device identity authentication method as claimed in claim 3, characterized in that: The method for calculating the flow pattern deviation comprises the following sub-steps: Establishing traffic pattern data sets; Set the window size value; Calculate the mean and standard deviation of the traffic pattern data based on the window size value and the traffic pattern data set; The traffic pattern deviation is calculated based on the mean and standard deviation of the traffic pattern data.

5. A cryptography-based power network equipment identity authentication method as claimed in claim 3, characterized in that: The method for calculating the request frequency abnormality specifically includes the following sub-steps: Establishing a request frequency data set; Based on the request frequency data set, calculate the moving median absolute deviation; According to the absolute value deviation of the moving median, outliers in the request frequency data set are detected and the request frequency anomaly degree is calculated.

6. A cryptography-based power network equipment identity authentication system, characterized in that: include: Data collection module: collects historical data and identity verification information of power network equipment; Authentication success rate calculation module: calculates the authentication success rate of the device accessing the power network based on the collected data; Network activity abnormality rate calculation module: calculates the network activity abnormality rate of the device through the collected historical data; Judgment module: Combine the device's identity authentication success rate and network activity abnormality rate to determine whether the device identity authentication is qualified.

7. A cryptography-based power network equipment identity authentication system as claimed in claim 6, characterized in that: The method for calculating the identity authentication success rate of the power network includes the following sub-steps: Extract the device identifier. When the device is first connected to the power network, the system generates a unique key for each device. Use a hash function to convert the secret key into a hash value and store the hash value in the database; When the device requests access again, the device information is hashed using the same hash function, and the newly generated hash value is compared with the hash value stored in the database. If the two match, the authentication success rate is increased; if they do not match, the authentication success rate is reduced.

8. The cryptography-based power network equipment identity authentication system according to claim 6, characterized in that: The method for calculating the abnormal rate of network activity of a device specifically includes the following sub-steps: Calculate the flow pattern deviation based on the flow pattern data in the historical data; Calculate the request frequency abnormality based on the request frequency data in the historical data; The device's network activity anomaly rate is calculated based on the traffic pattern deviation and request frequency anomaly.

9. A cryptography-based power network equipment identity authentication system as claimed in claim 8, characterized in that: The method for calculating the flow pattern deviation comprises the following sub-steps: Establishing traffic pattern data sets; Set the window size value; Calculate the mean and standard deviation of the traffic pattern data based on the window size value and the traffic pattern data set; The traffic pattern deviation is calculated based on the mean and standard deviation of the traffic pattern data.

10. A cryptography-based power network equipment identity authentication system as claimed in claim 8, characterized in that: The method for calculating the request frequency abnormality specifically includes the following sub-steps: Establishing a request frequency data set; Based on the request frequency data set, calculate the moving median absolute deviation; According to the absolute value deviation of the moving median, outliers in the request frequency data set are detected and the request frequency anomaly degree is calculated.