Power data privacy calculation method and system based on multi-party security calculation and federated learning
By conducting multi-faceted analysis of the power consumption units in the power monitoring area, dividing them into different types of encryption units, and targeted encryption is carried out, the problem of waste of encryption resources in the existing technology is solved, and encryption efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411903471.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-25
AI Technical Summary
The existing power data privacy calculation method lacks the privacy requirements analysis of electricity users when encrypting home users' power data, resulting in wasting of encrypted resources.
By analyzing member behavior, electricity consumption data and regional environment of the electricity users in the target power monitoring area, the safety monitoring coefficients of each electricity user are calculated, divided into the first type and the second type of encryption unit, and the first type of encryption unit is encrypted according to the encryption requirements.
It improves the application targetedness of power data encryption technology, improves the efficiency of encryption resources, and ensures the accuracy and practicality of encryption results.
Smart Images

Figure CN119885221A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and system for calculating power data privacy, and in particular to a method and system for calculating power data privacy based on multi-party secure computing and federated learning, belonging to the field of power technology. Background Art
[0002] Power data privacy computing is a privacy protection technology for power industry data. It realizes data sharing and computing under the premise of ensuring data security. The existing power data privacy computing methods lack privacy demand analysis for power users when encrypting power data of household users. For example, the Chinese patent application with publication number CN114710258A does not screen encryption users based on the security data of power users when encrypting power data of power users. As a result, the power data privacy computing methods lack specificity when encrypting power data, which easily leads to waste of encryption resources. Summary of the invention
[0003] Purpose of the invention: The purpose of the present invention is to provide a method and system for privacy calculation of electric power data based on multi-party secure computing and federated learning, which can encrypt the accuracy and practicality of the results.
[0004] Technical solution: The power data privacy calculation method based on multi-party secure computing and federated learning described in the present invention includes:
[0005] S1: Select a sample power unit from a number of power units in the target power monitoring area, analyze the member behavior of each power unit, obtain the total number of unit members and the weighted length of unit stay corresponding to each power unit, calculate the first safety monitoring coefficient of each power unit, and define the sample power unit and all the first safety monitoring coefficients as member stay analysis data;
[0006] S2: Analyze the electricity consumption data of each electricity user according to the member stay analysis data, obtain the abnormal electricity consumption month ratio, sample unit average electricity consumption deviation and sample unit standard electricity consumption deviation corresponding to each electricity user, and analyze and obtain the second safety monitoring coefficient of each electricity user as unit power analysis data;
[0007] S3: Perform regional environmental analysis on each power user according to the member stay analysis data, obtain the regional power supply abnormality coefficient, regional effective monitoring area ratio and sample area rental ratio corresponding to each power user, and analyze and obtain multiple third safety monitoring coefficients as unit regional environmental analysis data;
[0008] S4: Conduct power data encryption demand analysis for each power consuming unit based on member stay analysis data, unit power analysis data and unit area environment analysis data, divide multiple power consuming units into first type encryption units and second type encryption units according to the analysis results, use the classification results as power unit encryption analysis data, and encrypt power data for the first type encryption unit based on the power unit encryption analysis data.
[0009] Furthermore, the step S1 comprises:
[0010] S11: Obtain a list of power users corresponding to the target power monitoring area, and obtain each power user in the target power monitoring area according to the list of power users;
[0011] S12: Randomly select one electricity user unit from all electricity users as a sample electricity user unit, analyze the length of stay of members of the sample electricity user unit, and obtain a safety monitoring coefficient corresponding to the sample electricity user unit;
[0012] S13: Analyze the stay time of each power user in the target power monitoring area to obtain the safety monitoring coefficient corresponding to each power user;
[0013] S14: Define the sample electricity consumption units and all safety monitoring factors as member stay analysis data.
[0014] Furthermore, the step S12 includes:
[0015] The number of unit members of the sample electricity user unit is obtained to obtain the total number of unit members, and the unit members of the sample electricity user unit are named the first unit member to the ath unit member respectively;
[0016] The length of stay of all unit members is analyzed. During the period of analysis, several periods are randomly selected as member monitoring periods, and each member monitoring period is divided into a first monitoring period and a second monitoring period;
[0017] Obtaining the length of time that the first unit member stays in the sample electricity unit in each first monitoring period, obtaining multiple first period monitoring periods, and averaging the obtained multiple first period monitoring periods to obtain the first period average length of time that the first unit member stays in;
[0018] Obtaining the length of time that the first unit member stays in the sample electricity unit in each second monitoring period, obtaining multiple second period monitoring periods, and averaging the obtained multiple second period monitoring periods to obtain the average length of time that the first unit member stays in the second period;
[0019] The weighted duration of stay of the first unit is calculated based on the average duration of stay in the first period and the average duration of stay in the second period corresponding to the members of the first unit:
[0020] Dtj=Sct1×a1+Sct2×a2
[0021] Wherein, Dtj is the weighted duration of stay in the first unit corresponding to the first unit member, Sct1 is the average duration of stay in the first period, Sct2 is the average duration of stay in the second period, a1 is the first proportional weight, and a2 is the second proportional weight;
[0022] The first safety monitoring coefficient corresponding to the sample electricity-consuming unit is obtained by calculating the total number of unit members, the weighted duration of stay of the first unit to the weighted duration of stay of the ath unit:
[0023] Ysx1=Dcz×(Dtj1+Dtj2+……+Dtja)
[0024] Among them, Ysx1 is the first safety monitoring coefficient, Dcz is the total number of unit members, and Dtj1 to Dtja are the weighted duration of stay of the first unit to the weighted duration of stay of the ath unit respectively.
[0025] Furthermore, the step S2 comprises:
[0026] S21: Obtaining sample electricity units in member stay analysis data;
[0027] S22: Obtain historical electricity consumption data corresponding to the sample electricity consuming units, randomly select a number of historical months from the historical electricity consumption data as electricity monitoring months, and name the selected electricity monitoring months as the first electricity monitoring month to the bth electricity monitoring month in chronological order;
[0028] S23: Obtain the first monthly power consumption to the bth monthly power consumption corresponding to the first power monitoring month to the bth power monitoring month respectively of the sample power users;
[0029] S24: Obtain the first monthly unit average power consumption to the bth monthly unit average power consumption corresponding to the first power monitoring month to the bth power monitoring month for all power users in the target power monitoring area;
[0030] S25: obtaining the ratio of abnormal electricity consumption months;
[0031] S26: Calculate the difference between the monthly electricity consumption and the monthly unit average electricity consumption, and take the absolute value of the obtained difference to obtain the benchmark electricity consumption deviation corresponding to each month;
[0032] S27: Calculate the average of the benchmark electricity consumption deviations corresponding to each month to obtain the average electricity consumption deviation of the sample unit, and calculate the standard deviation of the benchmark electricity consumption deviations corresponding to each month to obtain the standard electricity consumption deviation of the sample unit;
[0033] S28: The abnormal electricity consumption month ratio, the average electricity consumption deviation of the sample unit, and the standard electricity consumption deviation of the sample unit are calculated to obtain the second safety monitoring coefficient corresponding to the sample electricity unit:
[0034] Ysx2=Yyb 2 +Pcp+Dbz
[0035] Among them, Ysx2 is the second safety monitoring coefficient corresponding to the sample electricity unit, Yyb is the ratio of abnormal electricity consumption months, Pcp is the average electricity consumption deviation of the sample unit, and Dbz is the standard electricity consumption deviation of the sample unit;
[0036] S29: Analyze the power consumption data of each power consumption unit in the target power monitoring area respectively, and obtain the second safety monitoring coefficient corresponding to each power consumption unit as unit power analysis data.
[0037] Furthermore, the step S25 includes:
[0038] Use the power monitoring month as the horizontal coordinate and the power consumption as the vertical coordinate to establish a rectangular coordinate system for the power consumption plane, mark the first monthly power consumption to the b-th monthly power consumption in the rectangular coordinate system of the power consumption plane, and obtain the first monthly power consumption coordinate point to the b-th monthly power consumption coordinate point, and mark the first monthly unit average power consumption to the b-th monthly unit average power consumption in the rectangular coordinate system of the power consumption plane, and obtain the first average power consumption coordinate point to the b-th average power consumption coordinate point;
[0039] In the rectangular coordinate system of the electricity consumption plane, if a monthly electricity consumption coordinate point is below the average electricity consumption coordinate point, the corresponding monthly electricity consumption coordinate point is marked as a characteristic monthly electricity consumption coordinate point;
[0040] The difference between the monthly electricity consumption corresponding to each characteristic monthly electricity consumption coordinate point and the monthly unit average electricity consumption is obtained respectively, and the absolute value of the obtained difference is taken to obtain multiple monthly electricity consumption deviations, and the monthly electricity consumption benchmark deviation is preset. Each monthly electricity consumption deviation is compared with the monthly electricity consumption benchmark deviation in numerical value. When the monthly electricity consumption deviation is greater than the monthly electricity consumption benchmark deviation, the corresponding characteristic monthly electricity consumption coordinate point is marked as an abnormal monthly electricity consumption coordinate point;
[0041] In the rectangular coordinate system of the electricity consumption plane, the coordinate points of abnormal monthly electricity consumption are quantitatively counted to obtain the quantity value of the coordinate points of abnormal monthly electricity consumption, and the ratio of the coordinate points of abnormal monthly electricity consumption to b is calculated to obtain the abnormal electricity consumption month ratio.
[0042] Furthermore, the step S3 comprises:
[0043] S31: Obtaining sample electricity units in member stay analysis data;
[0044] S32: Analyze the regional power supply data of the sample power consuming units to obtain the regional power supply anomaly coefficient corresponding to the sample power consuming units;
[0045] S33: Obtain a monitoring coverage map corresponding to the target power monitoring area, in which a sample power consumption unit is used as a characteristic security point, and a safety monitoring distance is set;
[0046] S34: In the monitoring coverage map, a characteristic monitoring area is marked with the characteristic security point as the center and the preset safety monitoring distance as the radius, and the area of the characteristic monitoring area is acquired to obtain a first characteristic monitoring area value;
[0047] S35: obtaining an area value corresponding to the area covered by the monitoring in the monitoring coverage map, obtaining a second characteristic monitoring area value, calculating a ratio of the second characteristic monitoring area value to the first characteristic monitoring area value, and obtaining an effective monitoring area ratio of the area;
[0048] S36: Obtaining public security registration data corresponding to the characteristic monitoring area, and obtaining the number of owner-occupied electricity-using units in the characteristic monitoring area according to the public security registration data as the first characteristic electricity-using unit number value;
[0049] S37: acquiring the number of electricity units rented by tenants in the characteristic monitoring area according to the public security registration data as the second characteristic electricity unit quantity value, calculating the ratio of the second characteristic quantity unit value to the first characteristic electricity unit quantity value, and obtaining the sample area rental ratio;
[0050] S38: The regional power supply anomaly coefficient, the regional effective monitoring area ratio and the sample area rental ratio are calculated to obtain the third safety monitoring coefficient corresponding to the sample electricity user unit:
[0051] Ysx3=Qgy 2 +Jmb+Zzb
[0052] Among them, Ysx3 is the third safety monitoring coefficient, Qgy is the regional power supply abnormality coefficient, Jmb is the regional effective monitoring area ratio, and Zzb is the sample area rental ratio;
[0053] S39: Performing regional environmental analysis on each power user in the target power monitoring area respectively, and obtaining a third safety monitoring coefficient corresponding to each power user, which is defined as unit regional environmental analysis data.
[0054] Furthermore, the step S32 includes:
[0055] S321: for the sample unit, obtain a historical power supply log corresponding to the target power monitoring area, mark a number of historical power supply monitoring periods in the historical power supply log, and mark the several historical power supply monitoring periods as a first power supply monitoring period to a jth power supply monitoring period in chronological order;
[0056] S322: Analyze the power outage data in the first power supply monitoring period to obtain a first power supply abnormality index value; specifically including:
[0057] According to the historical power supply log, the historical power outage data of the target power monitoring area in the first power supply monitoring period is obtained, and according to the historical power outage data, the power outage events for which the power outage notice is issued are classified as the first type of power outage events, and according to the historical power outage data, the power outage events for which the power outage notice is not issued are classified as the second type of power outage events;
[0058] Obtain the number of first-type power outage events that have accumulated in the target power monitoring area during the first power supply monitoring period to obtain the number of first-type power outages, and obtain the number of second-type power outage events that have accumulated in the target power monitoring area during the first power supply monitoring period to obtain the number of second-type power outages;
[0059] Obtain the power outage duration corresponding to each second type of power outage event in the target power monitoring area within the first power supply monitoring period, obtain multiple power outage durations, and average the obtained multiple power outage durations, and use the result as the average abnormal power outage duration in the first period;
[0060] The number of first-type power outages, the number of second-type power outages, and the average abnormal power outage duration in the first power supply monitoring period are calculated to obtain the first power supply abnormality index value corresponding to the first power supply monitoring period:
[0061]
[0062] Among them, Gdy1 is the first power supply abnormality index value corresponding to the first power supply monitoring period, Dds1 is the number of first type power outages, Dds2 is the number of second type power outages, and Yts1 is the average abnormal power outage duration in the first period;
[0063] S323: Calculating the second power supply abnormality index value to the jth power supply abnormality index value corresponding to the second power supply monitoring period to the jth power supply monitoring period based on the calculation method of the first power supply abnormality index value;
[0064] S324: Calculate the average of the first power supply abnormality index value to the jth power supply abnormality index value to obtain the average value of the regional abnormal power supply index;
[0065] S325: Calculating the variance of the first power supply abnormality index value to the jth power supply abnormality index value to obtain the regional abnormal power supply index variance;
[0066] S326: Calculate the regional power supply abnormality coefficient by taking the average value of the regional abnormal power supply index and the variance of the regional abnormal power supply index:
[0067] Qgy=Gap+Gap*(1+Gfc)
[0068] Among them, Qgy is the regional power supply anomaly coefficient, Gap is the average value of the regional abnormal power supply index, and Gfc is the variance of the regional abnormal power supply index.
[0069] Furthermore, the step S4 comprises:
[0070] S41: Obtaining a first safety monitoring coefficient corresponding to a sample power unit and all power units according to member stay analysis data;
[0071] S42: Obtaining second safety monitoring coefficients corresponding to all power consumption units according to the unit power analysis data;
[0072] S43: Obtaining the third safety monitoring coefficient corresponding to all electricity users according to the unit area environmental analysis data;
[0073] S44: Perform encryption demand calculation on the sample electricity consumption unit to obtain the encryption demand assessment coefficient corresponding to the sample electricity consumption unit; specifically including:
[0074] Based on the first safety monitoring coefficient, the second safety monitoring coefficient and the third safety monitoring coefficient corresponding to the sample electricity consumption unit, the encryption demand assessment coefficient corresponding to the sample electricity consumption unit is obtained by calculation:
[0075] Jmp=Ysx1+Ysx2+Ysx3
[0076] Wherein, Jmp is the encryption demand assessment coefficient corresponding to the sample electricity unit, Ysx1 is the first safety monitoring coefficient of the sample electricity unit, Ysx2 is the second safety monitoring coefficient of the sample electricity unit, and Ysx3 is the third safety monitoring coefficient of the sample electricity unit;
[0077] S45: Calculate the encryption demand assessment coefficient corresponding to each electricity user unit based on the calculation method of the sample unit encryption demand assessment coefficient;
[0078] S46: Obtaining the encryption demand assessment coefficient threshold of each power consumption unit, comparing the values of each encryption demand assessment coefficient with the encryption demand assessment coefficient threshold, and classifying the corresponding multiple power consumption units into first type encryption units and second type encryption units according to the numerical comparison results, and using the classification results as power consumption unit encryption analysis data; specifically including:
[0079] Preset a first safety monitoring coefficient threshold, a second safety monitoring coefficient threshold and a third safety monitoring coefficient threshold for each electricity user;
[0080] Based on the calculation method of the encryption demand assessment coefficient, the first safety monitoring coefficient threshold, the second safety monitoring coefficient threshold and the third safety monitoring coefficient threshold of each electricity user are calculated to obtain the encryption demand assessment coefficient threshold;
[0081] When the encryption demand assessment coefficient is greater than or equal to the encryption demand assessment coefficient threshold, the corresponding electricity unit is classified as a first type encryption unit;
[0082] When the encryption demand assessment coefficient is less than the encryption demand assessment coefficient threshold, the corresponding electricity unit is classified as a second type of encryption unit;
[0083] S47: Encrypt power data of the first type encrypted units according to the plurality of first type encrypted units obtained from the encrypted analysis data of the power consumption units.
[0084] Furthermore, the step S47 includes:
[0085] S471: Randomly select a power consumption unit from the first type of encryption unit as a characteristic power consumption unit, establish a power data blockchain corresponding to the characteristic power consumption unit through the existing blockchain platform, mark the smart meter corresponding to the characteristic power consumption unit as a data generation node in the power data blockchain, and mark the power company corresponding to the characteristic power consumption unit as a data acquisition node;
[0086] S472: Obtain the power data encryption period corresponding to the characteristic power consumption unit, divide the power data encryption period into several power consumption months, and use each power consumption month as a block in the power data blockchain. When the patient is in the power data encryption period, the smart meter obtains the power consumption behavior of the characteristic power consumption unit, then the data generation node stores the corresponding power consumption behavior as power data in the corresponding block, so as to realize the blockchain encryption of the power data of the characteristic power consumption unit;
[0087] S473: Based on the encryption method of the characteristic electricity consumption unit, the power data generated by each first type encryption unit is encrypted by blockchain.
[0088] Based on the same inventive concept, the present invention also provides a power data privacy computing system based on multi-party secure computing and federated learning, including:
[0089] A member stay analysis module is used to select a sample power unit from a number of power units in the target power monitoring area, perform member behavior analysis on each power unit, obtain the total number of unit members and the weighted unit stay duration corresponding to each power unit, calculate the first safety monitoring coefficient of each power unit, and define the sample power unit and all the first safety monitoring coefficients as member stay analysis data;
[0090] The unit power analysis module is used to analyze the power consumption data of each power consumption unit according to the member stay analysis data, obtain the abnormal power consumption month ratio, sample unit average power consumption deviation and sample unit standard power consumption deviation corresponding to each power consumption unit, and analyze and obtain the second safety monitoring coefficient of each power consumption unit as the unit power analysis data;
[0091] The unit area environment analysis module is used to perform regional environment analysis on each power user unit according to the member stay analysis data, obtain the regional power supply anomaly coefficient, regional effective monitoring area ratio and sample area rental ratio corresponding to each power user unit, and analyze and obtain multiple third safety monitoring coefficients as unit area environment analysis data;
[0092] An encryption module is used to perform power data encryption demand analysis on each power consuming unit based on member stay analysis data, unit power analysis data and unit area environment analysis data, and to divide multiple power consuming units into first type encryption units and second type encryption units according to the analysis results, using the classification results as power unit encryption analysis data, and encrypting power data of the first type encryption units based on the power unit encryption analysis data.
[0093] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: 1. The present invention analyzes the power data encryption demand of each power user by calculating the encryption demand assessment coefficient, and encrypts the power data of the power users with encryption demand according to the analysis results, which can improve the application targeting of power data encryption technology, thereby improving the utilization efficiency of encryption resources; 2. The present invention effectively improves the accuracy of the encryption demand assessment coefficient calculation process by analyzing the privacy needs of power users from aspects such as user behavior, monthly changes in electricity consumption, and regional environment, thereby ensuring the accuracy and practicality of the encryption results. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1 is a flow chart of a method according to an embodiment of the present invention;
[0095] Figure 2 A schematic diagram of a rectangular coordinate system of an electricity-using plane according to an embodiment of the present invention;
[0096] Figure 3 This is a monitoring coverage map of an embodiment of the present invention. DETAILED DESCRIPTION
[0097] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application; it is obvious that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0098] As attached Figure 1 As shown, the power data privacy calculation method based on multi-party secure computing and federated learning in this embodiment includes:
[0099] S1: Select a sample power unit from a number of power units in the target power monitoring area, analyze the member behavior of each power unit, obtain the total number of unit members and the weighted length of unit stay corresponding to each power unit, calculate the first safety monitoring coefficient of each power unit, and define the sample power unit and all the first safety monitoring coefficients as member stay analysis data;
[0100] S2: Analyze the electricity consumption data of each electricity user according to the member stay analysis data, obtain the abnormal electricity consumption month ratio, sample unit average electricity consumption deviation and sample unit standard electricity consumption deviation corresponding to each electricity user, and analyze and obtain the second safety monitoring coefficient of each electricity user as unit power analysis data;
[0101] S3: Perform regional environmental analysis on each power user according to the member stay analysis data, obtain the regional power supply abnormality coefficient, regional effective monitoring area ratio and sample area rental ratio corresponding to each power user, and analyze and obtain multiple third safety monitoring coefficients as unit regional environmental analysis data;
[0102] S4: Conduct power data encryption demand analysis for each power consuming unit based on member stay analysis data, unit power analysis data and unit area environment analysis data, divide multiple power consuming units into first type encryption units and second type encryption units according to the analysis results, use the classification results as power unit encryption analysis data, and encrypt power data for the first type encryption unit based on the power unit encryption analysis data.
[0103] Specifically, in step S1, a number of power consumption units in the target power monitoring area are selected, and a sample power consumption unit is selected from the number of power consumption units, and member behavior analysis is performed on each power consumption unit respectively, and the total number of unit members corresponding to each power consumption unit and the weighted stay time of the first unit to the weighted stay time of the ath unit are obtained respectively to calculate multiple safety monitoring coefficients, and the sample power consumption unit and the multiple safety monitoring coefficients are defined as member stay analysis data;
[0104] The step S1 further includes the following specific steps:
[0105] Step S11: obtaining a list of power users corresponding to the target power monitoring area, and obtaining each power user in the target power monitoring area according to the list of power users to obtain a plurality of power users;
[0106] Step S12: randomly selecting one power unit from multiple power units as a sample power unit, analyzing the length of stay of members of the sample power unit, and obtaining a first safety monitoring coefficient corresponding to the sample power unit;
[0107] It should be noted here that:
[0108] In this embodiment, the target power monitoring area involved here is specifically the research sample area selected in this implementation, and the list of power users involved here is specifically the power supply list corresponding to the power company in the target power monitoring area;
[0109] The unit members involved here are specifically family members;
[0110] In this embodiment, the electricity user involved is specifically a user's residence;
[0111] The step 12 also includes the following specific steps:
[0112] Step S121: acquiring the number of unit members of the sample electricity user unit to obtain the total number of unit members, and naming the multiple unit members of the sample electricity user unit as the first unit member to the ath unit member respectively;
[0113] It should be noted here that:
[0114] In this embodiment, a is the number of members of the sample electricity unit, and a is an integer greater than 0;
[0115] Step S122: within the time period for analyzing the stay time of the sample electricity-consuming unit members, randomly select a number of time periods as member monitoring time periods, and set a first time feature point and a second time feature point in each member monitoring time period, and divide each member monitoring time period into a first monitoring time period and a second monitoring time period by the first time feature point and the second time feature point, so as to obtain a plurality of first monitoring time periods and a plurality of second monitoring time periods;
[0116] It should be noted here that: in this embodiment, the time length corresponding to the member monitoring period is 24 hours, and the time range corresponding to each member monitoring period in the 24-hour system is from 7:00 on the same day to 7:00 on the next day, the specific time value corresponding to the first time feature point is 7:00, and the specific time value corresponding to the second time feature point is 19:00. In any member monitoring period, 7:00 on the same day to 19:00 on the same day is the first monitoring period, and 19:00 on the same day to 7:00 on the next day is the second monitoring period;
[0117] Step S123: Obtain the length of stay of the first unit member in the sample electricity unit in each first monitoring period, obtain multiple first period monitoring periods, and average the obtained multiple first period monitoring periods to obtain the average length of stay of the first unit member in the first period;
[0118] Step S124: obtaining the length of stay of the first unit member in the sample electricity unit in each second monitoring period, obtaining multiple second period monitoring periods, and averaging the obtained multiple second period monitoring periods to obtain the average length of stay of the first unit member in the second period;
[0119] Step S125: Calculate the average stay time of the first time period and the average stay time of the second time period corresponding to the first unit member to obtain the unit stay weighted duration corresponding to the first unit member, and name it as the first unit stay weighted duration;
[0120] The weighted duration of stay of the first unit member is calculated. The specific formula is as follows:
[0121] Dtj=Sct1×a1+Sct2×a2;
[0122] Among them, Dtj is the weighted duration of the unit stay corresponding to the first unit member, Sct1 is the average duration of stay in the first period, Sct2 is the average duration of stay in the second period, a1 is the first proportional weight, and a2 is the second proportional weight;
[0123] It should be noted here that:
[0124] In this embodiment, the first proportional weight is set to 0.3, and the second proportional weight is set to 0.7;
[0125] Step S126: Calculate the total number of unit members and the weighted duration of stay of the first unit to the weighted duration of stay of the ath unit to obtain a first safety monitoring coefficient corresponding to the sample electricity-consuming unit;
[0126] The first safety monitoring coefficient is calculated, and the specific formula is as follows:
[0127] Ysx1=Dcz×(Dtj1+Dtj2+……+Dtja);
[0128] Among them, Ysx1 is the first safety monitoring coefficient, Dcz is the total number of unit members, and Dtj1 to Dtja are the weighted duration of stay of the first unit to the weighted duration of stay of the ath unit respectively;
[0129] Step S13: analyzing the stay time of each power user in the target power monitoring area to obtain a plurality of first safety monitoring coefficients;
[0130] Step S14: defining the sample electricity consumption unit and a plurality of safety monitoring coefficients as member stay analysis data;
[0131] Step S2: Analyze the power consumption data of each power consumption unit according to the member stay analysis data to obtain a plurality of second safety monitoring coefficients, and define the obtained plurality of second safety monitoring coefficients as unit power analysis data;
[0132] The step S2 further includes the following specific steps:
[0133] Step S21: obtaining member stay analysis data, and obtaining sample electricity consumption units according to the member stay analysis data;
[0134] Step S22: Obtain historical electricity consumption data corresponding to the sample electricity users, randomly select a number of historical months from the historical electricity consumption data as electricity monitoring months, and name the selected electricity monitoring months as the first electricity monitoring month to the bth electricity monitoring month in chronological order;
[0135] It should be noted here that:
[0136] In this application, b is the quantity value corresponding to the power monitoring month, and b is an integer greater than 0;
[0137] Step S23: obtaining the monthly power consumption of the sample power users from the first power monitoring month to the bth power monitoring month, respectively, to obtain the first monthly power consumption to the bth monthly power consumption;
[0138] Step S24: obtaining the unit average monthly power consumption corresponding to the first power monitoring month to the bth power monitoring month of multiple power users in the target power monitoring area, and obtaining the unit average power consumption from the first month to the bth month;
[0139] Step S25: Obtaining the ratio of abnormal electricity consumption months;
[0140] The step S25 further includes the following specific steps:
[0141] Step S251: Figure 2 As shown, the power monitoring month is used as the horizontal coordinate and the power consumption is used as the vertical coordinate to establish a rectangular coordinate system of the power consumption plane. The first monthly power consumption to the b-th monthly power consumption are marked as the coordinate points of the vertical coordinates in the rectangular coordinate system of the power consumption plane to obtain the first monthly power consumption coordinate point to the b-th monthly power consumption coordinate point. The first monthly unit average power consumption to the b-th monthly unit average power consumption are marked in the rectangular coordinate system of the power consumption plane to obtain the first average power consumption coordinate point to the b-th average power consumption coordinate point;
[0142] Step S252: In the rectangular coordinate system of the power consumption plane, if the monthly power consumption coordinate point is below the average power consumption coordinate point, the corresponding monthly power consumption coordinate point is marked as a characteristic monthly power consumption coordinate point, and each characteristic monthly power consumption coordinate point in the rectangular coordinate system of the power consumption plane is obtained to obtain a plurality of characteristic monthly power consumption coordinate points;
[0143] Step S253: respectively obtain the difference between the monthly electricity consumption corresponding to each characteristic monthly electricity consumption coordinate point and the monthly unit average electricity consumption, and take the absolute value of the obtained difference to obtain multiple monthly electricity consumption deviations, preset the monthly electricity consumption benchmark deviation, and compare the numerical value of each monthly electricity consumption deviation with the monthly electricity consumption benchmark deviation. When the monthly electricity consumption deviation is greater than the monthly electricity consumption benchmark deviation, the corresponding characteristic monthly electricity consumption coordinate point is marked as an abnormal monthly electricity consumption coordinate point;
[0144] Step S254: In the rectangular coordinate system of the power consumption plane, the number of coordinate points of abnormal monthly power consumption is counted to obtain the number of coordinate points of abnormal monthly power consumption, and the ratio of the coordinate points of abnormal monthly power consumption to b is calculated to obtain the ratio of abnormal monthly power consumption;
[0145] Step S26: Calculate the difference between the first monthly electricity consumption and the first monthly unit average electricity consumption, and take the absolute value of the obtained difference to obtain the first benchmark electricity consumption deviation, calculate the difference between the second monthly electricity consumption and the second monthly unit average electricity consumption, and take the absolute value of the obtained difference to obtain the second benchmark electricity consumption deviation, and so on, calculate the difference between the b-th month electricity consumption and the b-th month unit average electricity consumption, and take the absolute value of the obtained difference to obtain the b-th benchmark electricity consumption deviation;
[0146] Step S27: Calculate the average of the first reference power consumption deviation to the bth reference power consumption deviation to obtain the average power consumption deviation of the sample unit, and calculate the standard deviation of the first reference power consumption deviation to the bth reference power consumption deviation to obtain the standard power consumption deviation of the sample unit;
[0147] Step S28: Calculate the abnormal electricity consumption month ratio, the average electricity consumption deviation of the sample unit, and the standard electricity consumption deviation of the sample unit to obtain a second safety monitoring coefficient corresponding to the sample electricity unit;
[0148] The second safety monitoring coefficient corresponding to the sample electricity unit is calculated, and the specific formula is as follows:
[0149] Ysx2=Yyb 2 +Pcp+Dbz;
[0150] Among them, Ysx2 is the second safety monitoring coefficient corresponding to the sample electricity unit, Yyb is the ratio of abnormal electricity consumption months, Pcp is the average electricity consumption deviation of the sample unit, and Dbz is the standard electricity consumption deviation of the sample unit;
[0151] Step S29: Analyze the power consumption data of each power user in the target power monitoring area to obtain a plurality of second safety monitoring coefficients, and define the plurality of second safety monitoring coefficients as unit power analysis data;
[0152] Step S3: performing regional environmental analysis on each power consumption unit to obtain a plurality of third safety monitoring coefficients, and defining the obtained plurality of third safety monitoring coefficients as unit regional environmental analysis data;
[0153] The step S3 further includes the following specific steps:
[0154] Step S31: obtaining member stay analysis data, and obtaining sample electricity consumption units according to the member stay analysis data;
[0155] Step S32: Analyze the regional power supply data of the sample power consumption units to obtain the regional power supply anomaly coefficient corresponding to the sample power consumption units;
[0156] The step S32 further includes the following specific steps:
[0157] Step S321: obtaining a historical power supply log corresponding to the target power monitoring area, marking a number of historical power supply monitoring periods in the historical power supply log, and marking the several historical power supply monitoring periods as the first power supply monitoring period to the jth power supply monitoring period in chronological order;
[0158] It should be noted here that:
[0159] In this embodiment, j is the quantity value corresponding to the power supply monitoring period, and j is an integer greater than 0;
[0160] In this embodiment, the historical power supply log refers to a document or database that records the operation status, power supply conditions, power outage events and related information of the power system over a period of time in the past;
[0161] Step S322: Analyze the power outage data during the first power supply monitoring period to obtain a first power supply abnormality index value;
[0162] The step S322 further includes the following specific steps:
[0163] Step S3221: acquiring historical power outage data of the target power monitoring area in the first power supply monitoring period according to the historical power supply log, classifying the power outage events for which a power outage notice is issued as a first type of power outage event according to the historical power outage data, and classifying the power outage events for which a power outage notice is not issued as a second type of power outage event according to the historical power outage data;
[0164] Step S3222: acquiring the number of first-type power outage events that have accumulated in the target power monitoring area during the first power supply monitoring period to obtain the number of first-type power outages, and acquiring the number of second-type power outage events that have accumulated in the target power monitoring area during the first power supply monitoring period to obtain the number of second-type power outages;
[0165] Step S3223: Obtain the power outage duration corresponding to each second type power outage event in the target power monitoring area within the first power supply monitoring period, obtain multiple power outage durations, and average the obtained multiple power outage durations to obtain the average abnormal power outage duration in the first period;
[0166] Step S3224: Calculate the number of first-type power outages, the number of second-type power outages, and the average abnormal power outage duration in the first period to obtain a regional power supply abnormality index value corresponding to the first power supply monitoring period, and name it the first power supply abnormality index value;
[0167] The regional power supply anomaly index value corresponding to the first power supply monitoring period is calculated, and the specific formula is as follows:
[0168]
[0169] Among them, Gdy1 is the regional power supply abnormality index value corresponding to the first power supply monitoring period, Dds1 is the number of first type power outages, Dds2 is the number of second type power outages, and Yts1 is the average abnormal power outage duration in the first period;
[0170] Step S323: acquiring the regional power supply abnormality index values corresponding to the second power supply monitoring period to the jth power supply monitoring period, to obtain the second power supply abnormality index value to the jth power supply abnormality index value;
[0171] Step S324: Calculate the average of the first power supply abnormality index value to the jth power supply abnormality index value to obtain the average value of the regional abnormal power supply index;
[0172] Step S325: performing variance calculation on the first power supply abnormality index value to the jth power supply abnormality index value to obtain the regional abnormal power supply index variance;
[0173] Step S326: Calculate the regional power supply abnormality coefficient by taking the regional abnormal power supply index average value and the regional abnormal power supply index variance;
[0174] The regional power supply anomaly coefficient is calculated, and the specific formula is as follows:
[0175] Qgy=Gap+Gap*(1+Gfc);
[0176] Among them, Qgy is the regional power supply anomaly coefficient, Gap is the average value of regional abnormal power supply index, and Gfc is the variance of regional abnormal power supply index;
[0177] Step S33: obtaining a monitoring coverage map corresponding to the target power monitoring area, taking the sample power consumption unit as a characteristic security point in the monitoring coverage map, and setting a safe monitoring distance;
[0178] Step S34: Figure 3 As shown, in the monitoring coverage map, with the characteristic security point as the center and the preset safety monitoring distance as the radius, a characteristic monitoring area is marked, and the area of the characteristic monitoring area is obtained to obtain a first characteristic monitoring area value;
[0179] It should be noted here that: in this embodiment, the surveillance coverage map is a visual diagram that shows the installation locations and coverage areas of surveillance cameras in a specific area;
[0180] Step S35: in the monitoring coverage map, obtain the area value corresponding to the area covered by the monitoring, obtain the second characteristic monitoring area value, calculate the ratio of the second characteristic monitoring area value to the first characteristic monitoring area value, and obtain the effective monitoring area ratio of the area;
[0181] Step S36: Obtaining the public security registration data corresponding to the characteristic monitoring area, and obtaining the number of owner-occupied electricity units in the characteristic monitoring area according to the public security registration data to obtain a first characteristic electricity unit number value;
[0182] Step S37: acquiring the number of electricity units rented by tenants in the characteristic monitoring area according to the public security registration data, obtaining the second characteristic electricity unit quantity value, calculating the ratio of the second characteristic quantity unit value to the first characteristic electricity unit quantity value, and obtaining the sample area rental ratio;
[0183] Step S38: Calculate the regional power supply anomaly coefficient, the regional effective monitoring area ratio and the sample area rental ratio to obtain a third safety monitoring coefficient corresponding to the sample power unit;
[0184] The second safety monitoring coefficient is calculated, and the specific formula is as follows:
[0185] Ysx3=Qgy 2 +Jmb+Zzb;
[0186] Among them, Ysx3 is the third safety monitoring coefficient, Qgy is the regional power supply abnormality coefficient, Jmb is the regional effective monitoring area ratio, and Zzb is the sample area rental ratio;
[0187] Step S39: performing regional environmental analysis on each power user in the target power monitoring area to obtain a plurality of third safety monitoring coefficients, and defining the plurality of third safety monitoring coefficients as unit regional environmental analysis data;
[0188] Step S4: performing power data encryption demand analysis on each power consumption unit according to the member stay analysis data, the unit power analysis data and the unit regional environment analysis data, dividing the multiple power consumption units into first type encryption units and second type encryption units according to the analysis results, obtaining power consumption unit encryption analysis data, and encrypting power data of the first type encryption unit according to the power consumption unit encryption analysis data;
[0189] The step S4 further includes the following specific steps:
[0190] Step S41: obtaining member stay analysis data, and obtaining sample power consumption units and a first safety monitoring coefficient corresponding to each power consumption unit according to the member stay analysis data;
[0191] Step S42: obtaining unit power analysis data, and obtaining a second safety monitoring coefficient corresponding to each power consumption unit according to the unit power analysis data;
[0192] Step S43: Obtain unit area environmental analysis data, and obtain a third safety monitoring coefficient corresponding to each power consumption unit according to the unit area environmental analysis data;
[0193] Step S44: performing encryption demand calculation on the sample electricity consumption unit to obtain the encryption demand assessment coefficient corresponding to the sample electricity consumption unit;
[0194] The step S44 further includes the following specific steps:
[0195] Step S441: respectively obtaining a first safety monitoring coefficient, a second safety monitoring coefficient, and a third safety monitoring coefficient corresponding to a sample electricity consumption unit;
[0196] Step S442: Calculate the first safety monitoring coefficient, the second safety monitoring coefficient, and the third safety monitoring coefficient to obtain an encrypted demand assessment coefficient corresponding to the sample electricity unit;
[0197] The encryption requirement assessment coefficient is calculated as follows:
[0198] Jmp=Ysx1+Ysx2+Ysx3;
[0199] Among them, Jmp is the encryption demand assessment coefficient corresponding to the sample electricity unit, Ysx1 is the first safety monitoring coefficient, Ysx2 is the second safety monitoring coefficient, and Ysx3 is the third safety monitoring coefficient;
[0200] Step S45: acquiring the encrypted demand assessment coefficient corresponding to each electricity user to obtain a plurality of encrypted demand assessment coefficients;
[0201] Step S46: Obtain an encryption demand assessment coefficient threshold, compare each encryption demand assessment coefficient with the encryption demand assessment coefficient threshold, divide the corresponding multiple power consumption units into first type encryption units and second type encryption units according to the comparison results, and use the classification results as power consumption unit encryption analysis data;
[0202] The step S46 further includes the following specific steps:
[0203] Step S461: respectively obtaining a first safety monitoring coefficient threshold, a second safety monitoring coefficient threshold, and a third safety monitoring coefficient threshold;
[0204] It should be noted here that:
[0205] The first security monitoring coefficient threshold, the second security monitoring coefficient threshold and the third security monitoring coefficient threshold involved here are all the first security monitoring coefficient minimum value, the second security monitoring coefficient minimum value and the third security monitoring coefficient minimum value corresponding to the first type of encryption unit;
[0206] Step S462: Calculate the first security monitoring coefficient threshold, the second security monitoring coefficient threshold, and the third security monitoring coefficient threshold to obtain an encryption requirement assessment coefficient threshold;
[0207] Step S463: when the encryption demand assessment coefficient is greater than or equal to the encryption demand assessment coefficient threshold, the corresponding electricity unit is classified as a first type encryption unit;
[0208] Step S464: when the encryption demand assessment coefficient is less than the encryption demand assessment coefficient threshold, the corresponding electricity unit is classified as a second type encryption unit;
[0209] It should be noted here that:
[0210] The power data privacy protection requirements corresponding to the first type of encryption unit involved here are relatively high, and the power data of the first type of encryption unit needs to be encrypted and protected. The power data privacy protection requirements corresponding to the second type of encryption unit involved here are relatively conventional, and there is no need to encrypt and protect the power data of the second type of encryption unit;
[0211] Step S47: encrypting power data of the first type of encrypted units according to the plurality of first type of encrypted units obtained from the encrypted analysis data of the power consumption units;
[0212] The step S47 further includes the following specific steps:
[0213] Step S471: randomly selecting a power consumption unit from the first type of encryption unit as a characteristic power consumption unit, establishing a power data blockchain corresponding to the characteristic power consumption unit through the existing blockchain platform, marking the smart meter corresponding to the characteristic power consumption unit as a data generation node in the power data blockchain, and marking the power company corresponding to the characteristic power consumption unit as a data acquisition node;
[0214] Step S472: Obtain the power data encryption period corresponding to the characteristic power consumption unit, divide the power data encryption period into several power consumption months, and use each power consumption month as a block in the power data blockchain. When the patient is in the power data encryption period, the smart meter obtains the power consumption behavior of the characteristic power consumption unit, then the data generation node stores the corresponding power consumption behavior as power data in the corresponding block, thereby realizing blockchain encryption of the power data of the characteristic power consumption unit;
[0215] Step S473: Based on the encryption method of the characteristic electricity consumption unit, the power data generated by each first type encryption unit is encrypted by blockchain respectively;
[0216] Based on the same inventive concept, this embodiment also provides a power data privacy computing system based on multi-party secure computing and federated learning, including:
[0217] A member stay analysis module is used to select a sample power unit from a number of power units in the target power monitoring area, perform member behavior analysis on each power unit, obtain the total number of unit members and the weighted unit stay duration corresponding to each power unit, calculate the first safety monitoring coefficient of each power unit, and define the sample power unit and all the first safety monitoring coefficients as member stay analysis data;
[0218] The unit power analysis module is used to analyze the power consumption data of each power consumption unit according to the member stay analysis data, obtain the abnormal power consumption month ratio, sample unit average power consumption deviation and sample unit standard power consumption deviation corresponding to each power consumption unit, and analyze and obtain the second safety monitoring coefficient of each power consumption unit as the unit power analysis data;
[0219] The unit area environment analysis module is used to perform regional environment analysis on each power user unit according to the member stay analysis data, obtain the regional power supply anomaly coefficient, regional effective monitoring area ratio and sample area rental ratio corresponding to each power user unit, and analyze and obtain multiple third safety monitoring coefficients as unit area environment analysis data;
[0220] An encryption module is used to perform power data encryption demand analysis on each power consuming unit based on member stay analysis data, unit power analysis data and unit area environment analysis data, and to divide multiple power consuming units into first type encryption units and second type encryption units according to the analysis results, using the classification results as power unit encryption analysis data, and encrypting power data of the first type encryption units based on the power unit encryption analysis data.
[0221] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A power data privacy computing method based on multi-party secure computing and federated learning, characterized in that: include: S1: Select a sample power unit from a number of power units in the target power monitoring area, analyze the member behavior of each power unit, obtain the total number of unit members and the weighted length of unit stay corresponding to each power unit, calculate the first safety monitoring coefficient of each power unit, and define the sample power unit and all the first safety monitoring coefficients as member stay analysis data; S2: Analyze the electricity consumption data of each electricity consumption unit according to the member stay analysis data, obtain the abnormal electricity consumption month ratio, sample unit average electricity consumption deviation and sample unit standard electricity consumption deviation corresponding to each electricity consumption unit, and analyze and obtain the second safety monitoring coefficient of each electricity consumption unit as unit power analysis data; S3: Perform regional environmental analysis on each power user according to the member stay analysis data, obtain the regional power supply anomaly coefficient, regional effective monitoring area ratio and sample area rental ratio corresponding to each power user, and analyze and obtain multiple third safety monitoring coefficients as unit regional environmental analysis data; S4: Conduct power data encryption demand analysis for each power consuming unit based on member stay analysis data, unit power analysis data and unit area environment analysis data, divide multiple power consuming units into first type encryption units and second type encryption units according to the analysis results, use the classification results as power unit encryption analysis data, and encrypt power data for the first type encryption unit based on the power unit encryption analysis data.
2. The power data privacy computing method based on multi-party secure computing and federated learning according to claim 1 is characterized in that: The step S1 comprises: S11: Obtain a list of power users corresponding to the target power monitoring area, and obtain each power user in the target power monitoring area according to the list of power users; S12: Randomly select one electricity user from all electricity users as a sample electricity user, analyze the length of stay of members of the sample electricity user, and obtain a safety monitoring coefficient corresponding to the sample electricity user; S13: Analyze the stay time of each power user in the target power monitoring area to obtain the safety monitoring coefficient corresponding to each power user; S14: Define the sample electricity consumption units and all safety monitoring factors as member stay analysis data.
3. The power data privacy computing method based on multi-party secure computing and federated learning according to claim 2 is characterized in that: The step S12 comprises: The number of unit members of the sample electricity user unit is obtained to obtain the total number of unit members, and the unit members of the sample electricity user unit are named the first unit member to the ath unit member respectively; The length of stay of all unit members is analyzed. During the period of analysis, several periods are randomly selected as member monitoring periods, and each member monitoring period is divided into a first monitoring period and a second monitoring period; Obtaining the length of time that the first unit member stays in the sample electricity unit in each first monitoring period, obtaining multiple first period monitoring periods, and averaging the obtained multiple first period monitoring periods to obtain an average length of time that the first unit member stays in the first period; Obtaining the length of time that the first unit member stays in the sample electricity unit in each second monitoring period, obtaining multiple second period monitoring periods, and averaging the obtained multiple second period monitoring periods to obtain the average length of time that the first unit member stays in the second period; The weighted duration of stay of the first unit is calculated based on the average duration of stay in the first period and the average duration of stay in the second period corresponding to the members of the first unit: Dtj=Sct1×a1+Sct2×a2 Wherein, Dtj is the weighted duration of stay in the first unit corresponding to the first unit member, Sct1 is the average duration of stay in the first period, Sct2 is the average duration of stay in the second period, a1 is the first proportional weight, and a2 is the second proportional weight; The first safety monitoring coefficient corresponding to the sample electricity-consuming unit is obtained by calculating the total number of unit members, the weighted duration of stay of the first unit to the weighted duration of stay of the ath unit: Ysx1=Dcz×(Dtj1+Dtj2+……+Dtja) Among them, Ysx1 is the first safety monitoring coefficient, Dcz is the total number of unit members, and Dtj1 to Dtja are the weighted duration of stay of the first unit to the weighted duration of stay of the ath unit respectively.
4. The power data privacy computing method based on multi-party secure computing and federated learning according to claim 3 is characterized in that: The step S2 comprises: S21: Obtaining sample electricity units in member stay analysis data; S22: Obtain historical electricity consumption data corresponding to the sample electricity users, randomly select a number of historical months from the historical electricity consumption data as electricity monitoring months, and name the selected electricity monitoring months as the first electricity monitoring month to the bth electricity monitoring month in chronological order; S23: Obtain the first monthly power consumption to the bth monthly power consumption corresponding to the first power monitoring month to the bth power monitoring month respectively of the sample power users; S24: Obtain the first monthly unit average power consumption to the bth monthly unit average power consumption corresponding to the first power monitoring month to the bth power monitoring month for all power users in the target power monitoring area; S25: obtaining the ratio of abnormal electricity consumption months; S26: Calculate the difference between the monthly electricity consumption and the monthly unit average electricity consumption, and take the absolute value of the obtained difference to obtain the benchmark electricity consumption deviation corresponding to each month; S27: Calculate the average of the benchmark electricity consumption deviations corresponding to each month to obtain the average electricity consumption deviation of the sample unit, and calculate the standard deviation of the benchmark electricity consumption deviations corresponding to each month to obtain the standard electricity consumption deviation of the sample unit; S28: The abnormal electricity consumption month ratio, the average electricity consumption deviation of the sample unit, and the standard electricity consumption deviation of the sample unit are calculated to obtain the second safety monitoring coefficient corresponding to the sample electricity unit: Ysx2=Yyb 2 +Pcp+Dbz Among them, Ysx2 is the second safety monitoring coefficient corresponding to the sample electricity unit, Yyb is the ratio of abnormal electricity consumption months, Pcp is the average electricity consumption deviation of the sample unit, and Dbz is the standard electricity consumption deviation of the sample unit; S29: Analyze the power consumption data of each power consumption unit in the target power monitoring area respectively, and obtain the second safety monitoring coefficient corresponding to each power consumption unit as unit power analysis data.
5. The power data privacy computing method based on multi-party secure computing and federated learning according to claim 4 is characterized in that: The step S25 comprises: Use the power monitoring month as the horizontal coordinate and the power consumption as the vertical coordinate to establish a rectangular coordinate system for the power consumption plane, mark the first monthly power consumption to the b-th monthly power consumption in the rectangular coordinate system of the power consumption plane, and obtain the first monthly power consumption coordinate point to the b-th monthly power consumption coordinate point, and mark the first monthly unit average power consumption to the b-th monthly unit average power consumption in the rectangular coordinate system of the power consumption plane, and obtain the first average power consumption coordinate point to the b-th average power consumption coordinate point; In the rectangular coordinate system of the electricity consumption plane, if a monthly electricity consumption coordinate point is below the average electricity consumption coordinate point, the corresponding monthly electricity consumption coordinate point is marked as a characteristic monthly electricity consumption coordinate point; The difference between the monthly electricity consumption corresponding to each characteristic monthly electricity consumption coordinate point and the monthly unit average electricity consumption is obtained respectively, and the absolute value of the obtained difference is taken to obtain multiple monthly electricity consumption deviations, and the monthly electricity consumption benchmark deviation is preset. Each monthly electricity consumption deviation is compared with the monthly electricity consumption benchmark deviation in numerical value. When the monthly electricity consumption deviation is greater than the monthly electricity consumption benchmark deviation, the corresponding characteristic monthly electricity consumption coordinate point is marked as an abnormal monthly electricity consumption coordinate point; In the rectangular coordinate system of the electricity consumption plane, the coordinate points of abnormal monthly electricity consumption are quantitatively counted to obtain the quantity value of the coordinate points of abnormal monthly electricity consumption, and the ratio of the coordinate points of abnormal monthly electricity consumption to b is calculated to obtain the abnormal electricity consumption month ratio.
6. The power data privacy computing method based on multi-party secure computing and federated learning according to claim 5 is characterized in that: The step S3 comprises: S31: Obtaining sample electricity units in member stay analysis data; S32: Analyze the regional power supply data of the sample power consuming units to obtain the regional power supply anomaly coefficient corresponding to the sample power consuming units; S33: Obtain a monitoring coverage map corresponding to the target power monitoring area, in which a sample power consumption unit is used as a characteristic security point, and a safety monitoring distance is set; S34: In the monitoring coverage map, a characteristic monitoring area is marked with the characteristic security point as the center and the preset safety monitoring distance as the radius, and the area of the characteristic monitoring area is acquired to obtain a first characteristic monitoring area value; S35: obtaining an area value corresponding to the area covered by the monitoring in the monitoring coverage map, obtaining a second characteristic monitoring area value, calculating a ratio of the second characteristic monitoring area value to the first characteristic monitoring area value, and obtaining an effective monitoring area ratio of the area; S36: Obtaining public security registration data corresponding to the characteristic monitoring area, and obtaining the number of owner-occupied electricity-using units in the characteristic monitoring area according to the public security registration data as the first characteristic electricity-using unit number value; S37: acquiring the number of electricity units rented by tenants in the characteristic monitoring area according to the public security registration data as the second characteristic electricity unit quantity value, calculating the ratio of the second characteristic quantity unit value to the first characteristic electricity unit quantity value, and obtaining the sample area rental ratio; S38: The regional power supply anomaly coefficient, the regional effective monitoring area ratio and the sample area rental ratio are calculated to obtain the third safety monitoring coefficient corresponding to the sample electricity user unit: Ysx3=Qgy 2 +Jmb+Zzb Among them, Ysx3 is the third safety monitoring coefficient, Qgy is the regional power supply abnormality coefficient, Jmb is the regional effective monitoring area ratio, and Zzb is the sample area rental ratio; S39: Performing regional environmental analysis on each power user in the target power monitoring area, respectively, to obtain a third safety monitoring coefficient corresponding to each power user, which is defined as unit regional environmental analysis data.
7. The power data privacy computing method based on multi-party secure computing and federated learning according to claim 6 is characterized in that: The step S32 comprises: S321: for the sample unit, obtain a historical power supply log corresponding to the target power monitoring area, mark a number of historical power supply monitoring periods in the historical power supply log, and mark the several historical power supply monitoring periods as a first power supply monitoring period to a jth power supply monitoring period in chronological order; S322: Analyze the power outage data in the first power supply monitoring period to obtain a first power supply abnormality index value; specifically including: According to the historical power supply log, the historical power outage data of the target power monitoring area in the first power supply monitoring period is obtained, and according to the historical power outage data, the power outage events for which the power outage notice is issued are classified as the first type of power outage events, and according to the historical power outage data, the power outage events for which the power outage notice is not issued are classified as the second type of power outage events; Obtain the number of first-type power outage events that have accumulated in the target power monitoring area during the first power supply monitoring period to obtain the number of first-type power outages, and obtain the number of second-type power outage events that have accumulated in the target power monitoring area during the first power supply monitoring period to obtain the number of second-type power outages; Obtain the power outage duration corresponding to each second type of power outage event in the target power monitoring area within the first power supply monitoring period, obtain multiple power outage durations, and average the obtained multiple power outage durations, and use the result as the average abnormal power outage duration in the first period; The number of first-type power outages, the number of second-type power outages, and the average abnormal power outage duration in the first power supply monitoring period are calculated to obtain the first power supply abnormality index value corresponding to the first power supply monitoring period: Among them, Gdy1 is the first power supply abnormality index value corresponding to the first power supply monitoring period, Dds1 is the number of first type power outages, Dds2 is the number of second type power outages, and Yts1 is the average abnormal power outage duration in the first period; S323: Calculating the second power supply abnormality index value to the jth power supply abnormality index value corresponding to the second power supply monitoring period to the jth power supply monitoring period based on the calculation method of the first power supply abnormality index value; S324: Calculate the average of the first power supply abnormality index value to the jth power supply abnormality index value to obtain the average value of the regional abnormal power supply index; S325: Calculating the variance of the first power supply abnormality index value to the jth power supply abnormality index value to obtain the regional abnormal power supply index variance; S326: Calculate the regional power supply abnormality coefficient by taking the average value of the regional abnormal power supply index and the variance of the regional abnormal power supply index: Qgy=Gap+Gap*(1+Gfc) Among them, Qgy is the regional power supply anomaly coefficient, Gap is the average value of the regional abnormal power supply index, and Gfc is the variance of the regional abnormal power supply index.
8. The power data privacy computing method based on multi-party secure computing and federated learning according to claim 7 is characterized in that: The step S4 comprises: S41: Obtaining a first safety monitoring coefficient corresponding to a sample power consumption unit and all power consumption units according to member stay analysis data; S42: Obtaining second safety monitoring coefficients corresponding to all power consumption units according to the unit power analysis data; S43: Obtaining the third safety monitoring coefficient corresponding to all electricity users according to the unit area environmental analysis data; S44: Perform encryption demand calculation on the sample electricity consumption unit to obtain the encryption demand assessment coefficient corresponding to the sample electricity consumption unit; specifically including: Based on the first safety monitoring coefficient, the second safety monitoring coefficient and the third safety monitoring coefficient corresponding to the sample electricity consumption unit, the encryption demand assessment coefficient corresponding to the sample electricity consumption unit is obtained by calculation: Jmp=Ysx1+Ysx2+Ysx3 Wherein, Jmp is the encryption demand assessment coefficient corresponding to the sample electricity unit, Ysx1 is the first safety monitoring coefficient of the sample electricity unit, Ysx2 is the second safety monitoring coefficient of the sample electricity unit, and Ysx3 is the third safety monitoring coefficient of the sample electricity unit; S45: Calculate the encryption demand assessment coefficient corresponding to each electricity consumption unit based on the calculation method of the encryption demand assessment coefficient of the sample unit; S46: Obtaining the encryption demand assessment coefficient threshold of each power consumption unit, comparing the values of each encryption demand assessment coefficient with the encryption demand assessment coefficient threshold, and classifying the corresponding multiple power consumption units into first type encryption units and second type encryption units according to the numerical comparison results, and using the classification results as power consumption unit encryption analysis data; specifically including: Preset a first safety monitoring coefficient threshold, a second safety monitoring coefficient threshold and a third safety monitoring coefficient threshold for each electricity user; Based on the calculation method of the encryption demand assessment coefficient, the first safety monitoring coefficient threshold, the second safety monitoring coefficient threshold and the third safety monitoring coefficient threshold of each electricity user are calculated to obtain the encryption demand assessment coefficient threshold; When the encryption demand assessment coefficient is greater than or equal to the encryption demand assessment coefficient threshold, the corresponding electricity unit is classified as a first type encryption unit; When the encryption demand assessment coefficient is less than the encryption demand assessment coefficient threshold, the corresponding electricity unit is classified as a second type of encryption unit; S47: Encrypt power data of the first type encrypted units according to the plurality of first type encrypted units obtained from the encrypted analysis data of the power consumption units.
9. The power data privacy computing method based on multi-party secure computing and federated learning according to claim 8 is characterized in that: The step S47 comprises: S471: Randomly select a power consumption unit from the first type of encryption unit as a characteristic power consumption unit, establish a power data blockchain corresponding to the characteristic power consumption unit through the existing blockchain platform, mark the smart meter corresponding to the characteristic power consumption unit as a data generation node in the power data blockchain, and mark the power company corresponding to the characteristic power consumption unit as a data acquisition node; S472: Obtain the power data encryption period corresponding to the characteristic power consumption unit, divide the power data encryption period into several power consumption months, and use each power consumption month as a block in the power data blockchain. When the patient is in the power data encryption period, the smart meter obtains the power consumption behavior of the characteristic power consumption unit, then the data generation node stores the corresponding power consumption behavior as power data in the corresponding block, so as to realize the blockchain encryption of the power data of the characteristic power consumption unit; S473: Based on the encryption method of the characteristic electricity consumption unit, the power data generated by each first type encryption unit is encrypted by blockchain.
10. A power data privacy computing system based on multi-party secure computing and federated learning, characterized in that: include: A member stay analysis module is used to select a sample power unit from a number of power units in the target power monitoring area, perform member behavior analysis on each power unit, obtain the total number of unit members and the weighted unit stay duration corresponding to each power unit, calculate the first safety monitoring coefficient of each power unit, and define the sample power unit and all the first safety monitoring coefficients as member stay analysis data; The unit power analysis module is used to analyze the power consumption data of each power consumption unit according to the member stay analysis data, obtain the abnormal power consumption month ratio, sample unit average power consumption deviation and sample unit standard power consumption deviation corresponding to each power consumption unit, and analyze and obtain the second safety monitoring coefficient of each power consumption unit as the unit power analysis data; The unit area environment analysis module is used to perform regional environment analysis on each power user unit according to the member stay analysis data, obtain the regional power supply anomaly coefficient, regional effective monitoring area ratio and sample area rental ratio corresponding to each power user unit, and analyze and obtain multiple third safety monitoring coefficients as unit area environment analysis data; An encryption module is used to perform power data encryption demand analysis on each power consuming unit based on member stay analysis data, unit power analysis data and unit area environment analysis data, and to divide multiple power consuming units into first type encryption units and second type encryption units according to the analysis results, using the classification results as power unit encryption analysis data, and encrypting power data of the first type encryption units based on the power unit encryption analysis data.
Citation Information
Patent Citations
Privacy calculation method and system of power data, electronic equipment and storage medium
CN114710258A
FP-growth-based multi-source data association privacy disclosure risk assessment system
CN110222058A
Power system data privacy protection and access control method
CN117951722A