Iot privacy protection method for park energy consumption data

CN122969861APending Publication Date: 2026-10-23SHANXI ZHONGWEI INFORMATION ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611221902.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]现有技术在实际运行中,通常围绕设备身份、数据内容、访问权限、传输链路、会话密钥、行为状态和信任属性进行协同管控,但访问权限常以预设规则、固定限值或静态角色关系作为主要依据,园区温度、电价时段、电网应急指令等运行环境变化难以及时影响访问控制尺度,容易出现同一第三方终端设备在普通运行状态和应急运行状态下仍适用相同访问窗口及相同扣减强度的问题;在访问行为判断方面,若仅依据请求次数、身份认证结果或链路状态进行分散判断,数据传输字节累加值突然增加但请求频次变化不明显时,异常调用可能被视为正常访问,若终端心跳安全状态异常但传输字节累加值未明显波动,也可能延迟阻断

Benefits of technology

[0039]本发明通过实时提取园区温度值、电价时段系数值、电网应急指令布尔值并形成物理环境特征向量,使访问控制不再仅依赖终端身份或固定权限,而是将园区运行环境变化纳入候选动作选择过程,进而从目标动作中解析滑动窗口长度和信任属性扣减权重,使访问行为采集尺度和信任扣减幅度能够随物理环境状态同步变化;在访问行为分析中,将数据传输字节累加值、访问请求频次、终端心跳安全状态值转化为统计流特征向量,并通过统计流特征向量同系统安全基线特征向量之间的差异计算行为偏移量,使异常访问不只依靠单一请求次数判断,而是结合流量强度、请求密集程度和终端在线安全状态进行联合衡量;将行为偏移量同信任属性扣减权重相乘形成信任扣减步长,再更新实时可变信任属性值,可使第三方终端设备的准入资格随持续访问表现动态变化,降低长期授权下的持续滥用风险;当实时可变信任属性值低于系统授权准入限值时,直接生成访问阻断判决指令,切断数据传输链路并销毁会话密钥,可同时阻止后续数据读取和密钥复用;在惩罚观察期内统计阻断后重连请求频次和二次身份认证通过率,并据此向缓存的物理环境特征向量及目标动作映射记录赋予正向奖励值或负向奖励值,可将拦截结果反向作用于后续动作选择,使访问控制规则具备持续校正能力,提高园区能耗数据在复杂接入环境下的隐私保护精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122969861A_ABST
    Figure CN122969861A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of Internet of Things privacy protection, in particular to a park energy consumption data Internet of Things privacy protection method, comprising the following steps: a dynamic access control agent of a platform end acquires a physical environment characteristic vector, inputs the physical environment characteristic vector into a preset deep Q network to select a candidate action, and generates a target action; a sliding window length and a trust attribute deduction weight in the target action are extracted to generate a self-adaptive control parameter pair. The application counts the frequency of reconnection requests after blocking and the secondary identity authentication pass rate in the punishment observation period, and accordingly gives positive reward values or negative reward values to the cached physical environment characteristic vector and target action mapping records, so that the interception results can be inversely applied to subsequent action selection, so that the access control rule has a continuous correction capability, and the privacy protection accuracy of park energy consumption data in a complex access environment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) privacy protection technology, and in particular to an IoT privacy protection method for campus energy consumption data. Background Technology

[0002] Internet of Things (IoT) privacy protection technology involves protecting privacy and security during the data collection, transmission, storage, retrieval, and sharing processes among sensing devices, edge nodes, platform servers, third-party terminals, and data users in the IoT environment.

[0003] In practical operation, existing technologies typically manage access control collaboratively around device identity, data content, access permissions, transmission links, session keys, behavioral states, and trust attributes. However, access permissions often rely primarily on preset rules, fixed limits, or static role relationships. Changes in the operating environment, such as park temperature, electricity price periods, and grid emergency commands, are difficult to promptly affect access control standards. This can easily lead to the same third-party terminal device being subject to the same access window and deduction intensity in both normal and emergency operating states. Regarding access behavior judgment, if judgments are based solely on the number of requests, authentication results, or link status, a sudden increase in the accumulated data transmission bytes without a significant change in request frequency may be interpreted as normal access. Similarly, if the terminal's heartbeat security status is abnormal but the accumulated transmission bytes do not fluctuate significantly, delays and blocking may occur. Therefore, improvements are needed. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing an IoT-based privacy protection method for campus energy consumption data.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: an IoT privacy protection method for campus energy consumption data, comprising the following steps:

[0006] The platform-side dynamic access control agent obtains physical environment feature vectors, inputs the physical environment feature vectors into a preset deep Q-network to select candidate actions, and generates target actions.

[0007] Extract the sliding window length and trust attribute deduction weight from the target action to generate an adaptive control parameter pair, and cache the physical environment feature vector and target action mapping record of the current judgment period;

[0008] Based on the length of the sliding window, the access behavior data of the target third-party terminal device within the current sliding window is collected. The access behavior data includes the cumulative value of data transmission bytes, the frequency of access requests, and the terminal heartbeat security status value.

[0009] Instantaneous traffic feature value is generated based on the accumulated value of data transmission bytes and the frequency of access requests. The instantaneous traffic feature value is then concatenated with the terminal heartbeat security status value to generate a statistical flow feature vector.

[0010] Calculate the behavioral offset between the statistical flow feature vector and the preset system security baseline feature vector, and obtain the trust deduction step size based on the behavioral offset and the trust attribute deduction weight;

[0011] Subtract the trust deduction step size from the current real-time variable trust attribute value of the target third-party terminal device to generate an updated real-time variable trust attribute value.

[0012] If the updated real-time variable trust attribute value is lower than the preset system authorization access limit, the dynamic revocation mechanism of continuous use control is triggered, an access blocking judgment instruction is generated, the data transmission link between the target third-party terminal device and the energy consumption sensing node is cut off, and the session key of the current data stream is destroyed.

[0013] During the preset penalty observation period after the execution of the access blocking decision instruction, the frequency of reconnection requests after blocking and the pass rate of secondary authentication of the target third-party terminal device are statistically analyzed.

[0014] Preferably, the method further includes:

[0015] Based on the frequency of reconnection requests after blocking, the preset frequency limit, and the result of the secondary authentication pass rate, positive or negative reward values ​​are assigned to the cached physical environment feature vector and the target action mapping record; the target loss function is calculated in combination with the positive or negative reward values, and the neural network parameters of the deep Q network are updated to complete the self-learning evolution of the adaptive access control rules.

[0016] Preferably, the steps for obtaining the physical environment feature vector are as follows:

[0017] The platform-side dynamic access control agent reads the park temperature value, electricity price period coefficient value, and power grid emergency command Boolean value within the current judgment period. It retrieves the preset upper and lower temperature values ​​for the park temperature value and performs differential scaling. It retrieves the preset upper and lower electricity price period coefficient values ​​and performs differential scaling. It retains the discrete value state of the power grid emergency command Boolean value. The fields are concatenated in a fixed order: the processed park temperature value, the processed electricity price period coefficient value, and the power grid emergency command Boolean value, to generate a physical environment feature vector.

[0018] Preferably, the step of obtaining the adaptive control parameter pair is as follows:

[0019] The dynamic access control agent inputs the processed values ​​of the park temperature, the processed values ​​of the electricity price period coefficient, and the Boolean value of the power grid emergency command from the physical environment feature vector into a preset deep Q network. It calls the candidate action index one by one, calculates the state action evaluation value corresponding to the candidate action index, sorts the state action evaluation values ​​from largest to smallest, selects the candidate action corresponding to the first state action evaluation value in the sorted list, and generates the target action.

[0020] The action encoding field pre-bound in the target action is parsed, and the action encoding field is split into a sliding window length encoding segment and a trust attribute deduction weight encoding segment. The sliding window length is queried according to the sliding window length encoding segment, and the trust attribute deduction weight is queried according to the trust attribute deduction weight encoding segment. The sliding window length and trust attribute deduction weight are encapsulated in pairs to form an adaptive control parameter pair. At the same time, the physical environment feature vector and target action mapping record of the current judgment period are cached locally.

[0021] Preferably, the step of obtaining the instantaneous flow characteristic value is as follows:

[0022] Based on the sliding window length in the adaptive control parameter pair, the platform determines the start and end times of the current sliding window according to the sliding window length, continuously reads the accumulated value of data transmission bytes of the target third-party terminal device within the current sliding window, counts the frequency of access requests within the same current sliding window, reads the terminal heartbeat security status value corresponding to the end time of the current sliding window, and generates access behavior data.

[0023] The platform continuously advances the sliding window along the time axis according to a preset time step. Within each current sliding window, it calls the historical mean and historical standard deviation of the accumulated data transmission bytes, performs standard deviation scaling on the accumulated data transmission bytes, calls the historical mean and historical standard deviation of the access request frequency, performs standard deviation scaling on the access request frequency, and then calls the preset traffic weight and frequency weight to perform weighted accumulation on the converted accumulated data transmission bytes and the converted access request frequency to generate instantaneous traffic feature values.

[0024] Preferably, the step of obtaining the statistical flow feature vector is as follows:

[0025] The platform calls the terminal heartbeat security status value in the access behavior data, reads the discrete value identifier of the terminal heartbeat security status value, places the instantaneous traffic feature value at the beginning of the vector, places the terminal heartbeat security status value at the end of the vector, and completes the field concatenation according to the current sliding window collection order to generate a statistical flow feature vector.

[0026] Preferably, the step of obtaining the updated real-time variable trust attribute value is as follows:

[0027] Extract the system security baseline feature vector preset on the platform, read the instantaneous traffic feature value and terminal heartbeat security status value in the statistical flow feature vector of the current sliding window, match the baseline instantaneous traffic feature value and baseline terminal heartbeat security status value in the system security baseline feature vector according to the vector position order, square the numerical difference of the same vector position, then accumulate and square root the square result, mark the value obtained by square root as the quantification result of access behavior abnormality, and obtain the behavior offset;

[0028] Extract the trust attribute deduction weight from the adaptive control parameter pair, read the weight value state corresponding to the trust attribute deduction weight, use the behavior offset as the base amount of the deduction range, use the trust attribute deduction weight as the adjustment amount of the deduction range, perform a product operation on the behavior offset and the trust attribute deduction weight, and use the value obtained from the product operation as the trust deduction range corresponding to the current sliding window to obtain the trust deduction step size;

[0029] Obtain the current real-time variable trust attribute value of the target third-party terminal device, read the current value status of the real-time variable trust attribute value, use the real-time variable trust attribute value as the base value of the trust attribute before deduction, use the trust deduction step size as the deduction amount, deduct the trust deduction step size from the real-time variable trust attribute value, write the value after deduction into the real-time trust attribute field, and generate the updated real-time variable trust attribute value.

[0030] Preferably, the steps for obtaining the frequency of reconnection requests after blocking and the pass rate of secondary authentication are as follows:

[0031] The updated real-time variable trust attribute value is written into the admission comparison field of the current judgment period. The system authorization admission limit preset by the platform is retrieved. The updated real-time variable trust attribute value is used as the comparison value, and the system authorization admission limit is used as the admission benchmark value. The target third-party terminal device identifier, the current judgment period identifier, and the source of the real-time variable trust attribute field are checked item by item. If the updated real-time variable trust attribute value is less than the system authorization admission limit, it is marked as a prohibited transmission state. If the updated real-time variable trust attribute value is greater than or equal to the system authorization admission limit, it is marked as a allowed transmission state, and the admission comparison result is obtained.

[0032] The platform reads the prohibition on continued transmission status from the admission comparison result, triggers the dynamic revocation mechanism of continuous use control, calls the target third-party terminal device identifier, energy consumption sensing node identifier, current data stream identifier, and current data stream session key identifier, marks the data transmission link between the target third-party terminal device and the energy consumption sensing node as a link to be cut off, marks the session key of the current data stream as a key to be destroyed, writes the link cut-off field and key destruction field to the platform gateway node, and generates an access blocking decision instruction;

[0033] According to the access blocking decision instruction, the platform gateway node executes the link closing action corresponding to the link cutting field, cutting off the data transmission link between the target third-party terminal device and the energy consumption sensing node, and executes the key clearing action corresponding to the key destruction field, destroying the session key of the current data stream. During the preset penalty observation period after the access blocking decision instruction is executed, the platform continuously reads the reconnection request records and secondary authentication records initiated by the target third-party terminal device, counts the cumulative number of reconnection request records, and counts the proportion of successful secondary authentication records to the total number of authentication records, thereby obtaining the reconnection request frequency and secondary authentication pass rate after blocking.

[0034] Preferably, the specific steps to complete the self-learning evolution of adaptive access control rules are as follows:

[0035] Extract the cached physical environment feature vector and target action mapping record, read the frequency of reconnection requests after blocking, the preset frequency limit, and the secondary authentication pass rate, compare the frequency of reconnection requests after blocking with the preset frequency limit, and check the consistency between the secondary authentication pass rate and the full pass rate. If the frequency of reconnection requests after blocking is greater than the preset frequency limit and the secondary authentication pass rate is equal to the full pass rate, then mark the current target action corresponding to the target action mapping record as a false alarm interception. If the frequency of reconnection requests after blocking is less than the preset frequency limit, or the secondary authentication pass rate does not reach the full pass rate, then mark the current target action corresponding to the target action mapping record as a correct interception, and obtain the current target action interception judgment result.

[0036] Read the false alarm interception flag and the correct interception flag in the current target action interception judgment result, call the cached physical environment feature vector after processing the park temperature value, the electricity price time coefficient after processing, and the power grid emergency command boolean value, call the candidate action index and target action identifier in the target action mapping record, if the current target action interception judgment result is a false alarm interception, write a negative reward field to the physical environment feature vector and the target action mapping record, if the current target action interception judgment result is a correct interception, write a positive reward field to the physical environment feature vector and the target action mapping record, and generate a positive reward value or a negative reward value;

[0037] The dynamic access control agent reads the physical environment feature vector, the target action mapping record, and the reward field corresponding to the positive or negative reward value. It retrieves the state action evaluation value corresponding to the current neural network parameters in the deep Q network, reads the candidate action evaluation peak value for the next decision period, writes the reward field, state action evaluation value, and candidate action evaluation peak value into the error calculation channel, calculates the target loss function, and transmits the correction amount to the neural network parameters of the deep Q network layer by layer according to the target loss function. It also updates the weight parameters of the deep Q network according to the correction amount, thus completing the self-learning evolution of the adaptive access control rule.

[0038] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0039] This invention extracts real-time park temperature values, electricity price period coefficient values, and power grid emergency command Boolean values ​​to form a physical environment feature vector. This allows access control to no longer rely solely on terminal identity or fixed permissions, but incorporates changes in the park's operating environment into the candidate action selection process. Furthermore, it analyzes the sliding window length and trust attribute deduction weights from the target actions, enabling the access behavior collection scale and trust deduction magnitude to change synchronously with the physical environment status. In access behavior analysis, the accumulated value of data transmission bytes, access request frequency, and terminal heartbeat security status value are transformed into a statistical flow feature vector. The behavior offset is calculated by the difference between the statistical flow feature vector and the system security baseline feature vector, so that abnormal access is not judged solely by the number of requests, but by a joint measurement of traffic intensity, request density, and terminal online security status. Multiplying the behavior offset by the trust attribute deduction weight to form the trust deduction step size, and then updating the real-time variable trust attribute value, allows the access qualification of third-party terminal devices to dynamically change with continuous access performance, reducing the risk of continuous abuse under long-term authorization. When the real-time variable trust attribute value is lower than the system's authorization access limit, an access blocking judgment instruction is directly generated, cutting off the data transmission link and destroying the session key, which can simultaneously prevent subsequent data reading and key reuse. During the penalty observation period, the frequency of reconnection requests after blocking and the pass rate of secondary authentication are counted, and positive or negative reward values ​​are assigned to the cached physical environment feature vector and target action mapping record accordingly. The interception results can be reversed to the selection of subsequent actions, enabling access control rules to have continuous correction capabilities and improving the privacy protection accuracy of campus energy consumption data in complex access environments. Attached Figure Description

[0040] Figure 1 A schematic diagram illustrating the behavioral offset between the statistical flow feature vector and the system security baseline feature vector;

[0041] Figure 2 The graph shows the change in the target loss function. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0043] Please see Figure 1-2 This invention provides a technical solution: an IoT privacy protection method for energy consumption data in a park, comprising the following steps:

[0044] The platform-side dynamic access control agent obtains physical environment feature vectors, inputs the physical environment feature vectors into a preset deep Q network to select candidate actions, and generates target actions; extracts the sliding window length and trust attribute deduction weights from the target actions to generate adaptive control parameter pairs, and caches the physical environment feature vectors and target action mapping records for the current judgment period;

[0045] Based on the length of the sliding window, the access behavior data of the target third-party terminal device within the current sliding window is collected. The access behavior data includes the cumulative value of data transmission bytes, the frequency of access requests, and the terminal heartbeat security status value. Instantaneous traffic feature values ​​are generated based on the cumulative value of data transmission bytes and the frequency of access requests. The instantaneous traffic feature values ​​are concatenated with the terminal heartbeat security status value to generate a statistical flow feature vector.

[0046] Calculate the behavioral offset between the statistical flow feature vector and the preset system security baseline feature vector, and obtain the trust deduction step size based on the behavioral offset and the trust attribute deduction weight; subtract the trust deduction step size from the current real-time variable trust attribute value of the target third-party terminal device to generate the updated real-time variable trust attribute value.

[0047] If the updated real-time variable trust attribute value is lower than the preset system authorization access limit, the dynamic revocation mechanism of continuous use control is triggered, an access blocking judgment instruction is generated, the data transmission link between the target third-party terminal device and the energy consumption sensing node is cut off, and the session key of the current data stream is destroyed; during the preset penalty observation period after the execution of the access blocking judgment instruction, the frequency of reconnection requests after the blocking of the target third-party terminal device and the pass rate of secondary identity authentication are counted.

[0048] Based on the frequency of reconnection requests after blocking, the preset frequency limit, and the pass rate of secondary authentication, positive or negative reward values ​​are assigned to the cached physical environment feature vectors and target action mapping records. The target loss function is calculated by combining the positive or negative reward values, and the neural network parameters of the deep Q network are updated to complete the self-learning evolution of the adaptive access control rules.

[0049] The steps for obtaining the physical environment feature vector are as follows:

[0050] The platform-side dynamic access control agent reads the park temperature value, electricity price period coefficient value, and power grid emergency command Boolean value within the current judgment period. It retrieves the preset upper and lower temperature values ​​for the park temperature value and performs differential scaling. It retrieves the preset upper and lower electricity price period coefficient values ​​and performs differential scaling. It retains the discrete value state of the power grid emergency command Boolean value. The fields are concatenated in a fixed order: the processed park temperature value, the processed electricity price period coefficient value, and the power grid emergency command Boolean value, to generate a physical environment feature vector.

[0051] Specifically, the platform's dynamic access control agent reads the park's temperature value, electricity price period coefficient value, and power grid emergency command Boolean value for the current judgment period. First, it normalizes the acquired continuous data. For the park temperature value, it retrieves a pre-set temperature range based on historical meteorological data and equipment operation safety specifications. For example, the preset upper temperature limit is set to the highest safe operating temperature that the park's equipment can withstand, 50 degrees Celsius, and the preset lower temperature limit is set to the local historical extreme minimum temperature of -10 degrees Celsius. A difference scaling method is used to calculate the difference: the current temperature value is subtracted from the preset lower temperature limit, and the resulting difference is divided by the difference between the preset upper and lower temperature limits, yielding a dimensionless value between 0 and 1. Then, the same processing is applied to the electricity price period coefficient value, retrieving the electricity price policy data issued by the power supply department. The coefficient range defined in the policy document, for example, setting the peak electricity price coefficient of 1.8 as the upper limit of the preset electricity price period coefficient and the valley electricity price coefficient of 0.4 as the lower limit of the preset electricity price period coefficient, calculates a processed value in the range of 0 to 1 using the same difference scaling method. For discrete power grid emergency command Boolean values, their original Boolean value states are retained, where "1" represents the emergency state of the power grid issuing emergency dispatch or load control commands, and "0" represents the normal state of normal operation, without the need for numerical scaling. Finally, the fields are concatenated in a fixed order according to the park temperature processed value, the electricity price period coefficient processed value, and the power grid emergency command Boolean value to form a three-dimensional feature vector. For example, if the three processed values ​​are 0.65, 0.82, and 1, then the physical environment feature vector generated after concatenation is...

[0052] The steps for obtaining adaptive control parameter pairs are as follows:

[0053] The dynamic access control agent inputs the processed values ​​of the park temperature, the processed values ​​of the electricity price period coefficient, and the Boolean value of the power grid emergency command from the physical environment feature vector into a preset deep Q network. It calls the candidate action index one by one, calculates the state action evaluation value corresponding to the candidate action index, sorts the state action evaluation values ​​from largest to smallest, selects the candidate action corresponding to the first state action evaluation value in the sorted list, and generates the target action.

[0054] The action encoding field pre-bound in the target action is parsed and split into a sliding window length encoding segment and a trust attribute deduction weight encoding segment. The sliding window length is queried according to the sliding window length encoding segment, and the trust attribute deduction weight is queried according to the trust attribute deduction weight encoding segment. The sliding window length and trust attribute deduction weight are encapsulated in pairs to form an adaptive control parameter pair. At the same time, the physical environment feature vector and target action mapping record of the current judgment period are cached locally.

[0055] Specifically, the physical environment feature vector generated in the previous process is used as the state input and fed into a pre-trained Deep Q-Network (DQN) for decision-making inference. This DQN consists of an input layer, two hidden layers, and an output layer. The input layer contains three neurons, receiving the processed values ​​of the park temperature, the processed values ​​of the electricity price period coefficient, and the Boolean value of the power grid emergency command from the physical environment feature vector. The first hidden layer is configured as a fully connected layer with 128 neurons and uses a Corrected Linear Unit (ReLU) as the activation function to learn the nonlinear combination of physical environment features. The second hidden layer is also a fully connected layer, containing 64 neurons and a ReLU activation function. To further extract deeper features, the output layer is a fully connected layer with N neurons, where N is equal to the size of a predefined set of candidate actions. Each neuron corresponds to a specific candidate action, and its output value is the long-term reward evaluation for performing the corresponding action in the current physical environment, i.e., the state-action evaluation value Q(s,a). During inference, the physical environment feature vector propagates forward through the network, and the output layer calculates the state-action evaluation values ​​corresponding to all candidate actions. Then, these evaluation values ​​are sorted from largest to smallest, and the evaluation value ranked first in the sorting results is selected. The candidate action corresponding to this evaluation value is adopted as the optimal strategy to be executed in the current decision period, generating the target action.

[0056] After selecting and generating the target action using a deep Q-network, the pre-bound action encoding field within the target action is parsed. This action encoding field is a fixed-length binary or decimal string, and its structure is pre-designed to consist of two parts. For example, in an action encoding field encoded as "1050", the first two "10"s define the sliding window length encoding segment, and the last two "50"s define the trust attribute deduction weight encoding segment. Then, a pre-defined action parameter mapping table is consulted based on the encoding segment. This mapping table is established during system initialization based on security policy requirements and experience, clearly defining the correspondence between the encoding and specific parameter values. For example, the mapping relationship for the sliding window length encoding segment is: "05" corresponds to 5 seconds, "10" corresponds to 10 seconds, and "15" corresponds to 15 seconds; the mapping relationship for the trust attribute deduction weight encoding segment is: "10". "50" corresponds to 0.5, and "90" corresponds to 0.9. The sliding window length encoding segment "10" is used to look up the mapping table, resulting in a sliding window length of 10 seconds. Similarly, the trust attribute deduction weight encoding segment "50" is used to look up the mapping table, resulting in a trust attribute deduction weight of 0.5. The retrieved sliding window length (10 seconds) and trust attribute deduction weight (0.5) are then paired and encapsulated to form a structured adaptive control parameter pair. Finally, in the local experience replay cache, the physical environment feature vector of the current judgment period and the newly generated target action (including its encoding and parsed parameters) are stored as a complete record entry for subsequent training and updating of the reinforcement learning model, forming a physical environment feature vector and target action mapping record for the current judgment period.

[0057] The steps for obtaining instantaneous flow characteristic values ​​are as follows:

[0058] Based on the sliding window length in the adaptive control parameter pair, the platform determines the start and end times of the current sliding window according to the sliding window length. Within the current sliding window, it continuously reads the cumulative value of data transmission bytes of the target third-party terminal device, counts the frequency of access requests within the same current sliding window, reads the terminal heartbeat security status value corresponding to the end time of the current sliding window, and generates access behavior data.

[0059] The platform continuously advances the sliding window along the time axis according to a preset time step. Within each current sliding window, it calls the historical mean and historical standard deviation of the accumulated data transmission bytes, performs standard deviation scaling on the accumulated data transmission bytes, calls the historical mean and historical standard deviation of the access request frequency, performs standard deviation scaling on the access request frequency, and then calls the preset traffic weight and frequency weight to perform weighted summation on the converted accumulated data transmission bytes and the converted access request frequency to generate instantaneous traffic characteristic values.

[0060] Specifically, based on the sliding window length in the adaptive control parameter pair generated in the previous process, for example, if the obtained sliding window length is 10 seconds, the platform uses this as a basis to set the data acquisition time window. Specifically, the current system timestamp is used as the start time of the current sliding window acquisition, and 10 seconds are added to this start time as the end time. Within this 10-second time window from start to end, the platform's data acquisition interface continuously listens to and reads all data packets sent by the target third-party terminal device through the network interface using high-frequency polling or subscription push, and accumulates the number of bytes carrying the effective payload to obtain the accumulated value of data transmission bytes within this time window. A counter is then set. The platform counts all independent access requests (such as API calls and data upload requests) initiated by the same third-party terminal device within the time window, and calculates the access request frequency. At the end of the current sliding window (i.e., at the end of the 10th second after the start time), the platform actively queries or receives the most recent heartbeat packet reported by the terminal device, and parses out the predefined terminal heartbeat security status value. This status value is a discrete value. For example, "0" represents that the device is operating normally, "1" represents that the firmware has been tampered with, and "2" represents that the critical process has exited abnormally. The accumulated value of data transmission bytes, the access request frequency, and the terminal heartbeat security status value are summarized as a data unit to generate access behavior data.

[0061] After generating access behavior data, the platform continuously advances a sliding window (e.g., 10 seconds) along the time axis according to a preset time step, such as 1 second, using adaptive control parameters. This forms overlapping or continuous analysis windows. Within each newly formed current sliding window, historical statistical data of the accumulated data transmission bytes, accumulated through long-term system monitoring, is retrieved. Specifically, this includes the historical mean and standard deviation of all similar devices within the same time period over the past 24 hours. The standard deviation of the accumulated data transmission bytes collected in the current window is then calculated by subtracting the difference between the current value and the historical mean, resulting in a standardized deviation metric. Similarly, the historical mean and standard deviation of the access request frequency over the past 24 hours are also retrieved. Historical standard deviation is calculated by applying the same standard deviation scale to the frequency of access requests counted within the current window to obtain a standardized deviation measure. Then, preset traffic weights and frequency weights are retrieved. These two weight values ​​are derived from historical security event analysis and are intended to reflect the importance of different behavioral indicators in anomaly detection. For example, if the analysis finds that a sudden increase in data volume is more indicative of an attack than an increase in request frequency, the traffic weight can be set to 0.7 and the frequency weight to 0.3, with the sum of the two being 1. Finally, the accumulated value of the converted data transmission bytes is multiplied by its corresponding traffic weight of 0.7, and the converted access request frequency is multiplied by its corresponding frequency weight of 0.3. The two products are then added together and weighted to generate an instantaneous traffic characteristic value.

[0062] The steps for obtaining the statistical flow feature vector are as follows:

[0063] The platform calls the terminal heartbeat security status value in the access behavior data, reads the discrete value identifier of the terminal heartbeat security status value, places the instantaneous traffic feature value at the beginning of the vector, places the terminal heartbeat security status value at the end of the vector, and completes the field concatenation according to the current sliding window collection order to generate a statistical flow feature vector.

[0064] Specifically, after generating instantaneous traffic feature values, the platform further calls access behavior data collected within the same sliding window as these instantaneous traffic feature values ​​to extract the terminal heartbeat security status value. It then reads the specific discrete value identifier of this status value, which is an integer. For example, according to a predefined device security protocol, "0" represents security, "1" represents firmware verification failure, and "2" represents critical configuration modification. The platform directly uses this discrete integer value as part of the feature without additional scaling or transformation processing. To construct a feature vector that comprehensively reflects terminal behavior, a field concatenation operation is performed. Specifically, this involves creating... A two-dimensional vector is generated by placing the continuous value "instantaneous flow characteristic value" calculated in the previous process at the beginning of the vector, and the discrete value "terminal heartbeat security status value" representing the internal security status of the device at the end of the vector. This concatenation order is fixed to ensure that the feature vector has a consistent structure across different time windows and different devices. For example, if the instantaneous flow characteristic value calculated in a certain sliding window is 2.53 and the terminal heartbeat security status value read at the same time is 1, then the statistical flow feature vector is generated after the fields are concatenated according to the current sampling order of the sliding window.

[0065] The updated steps for obtaining real-time variable trust attribute values ​​are as follows:

[0066] Extract the system security baseline feature vector preset on the platform, read the instantaneous traffic feature value and terminal heartbeat security status value in the statistical flow feature vector of the current sliding window, match the baseline instantaneous traffic feature value and baseline terminal heartbeat security status value in the system security baseline feature vector according to the vector position order, square the numerical difference of the same vector position, then accumulate and square root the square result, mark the value obtained by square root as the quantification result of access behavior abnormality, and obtain the behavior offset;

[0067] Extract the trust attribute deduction weight from the adaptive control parameter pair, read the weight value state corresponding to the trust attribute deduction weight, use the behavior offset as the base amount of the deduction amplitude, use the trust attribute deduction weight as the adjustment amount of the deduction amplitude, multiply the behavior offset and the trust attribute deduction weight, and use the value obtained from the multiplication operation as the trust deduction amplitude corresponding to the current sliding window to obtain the trust deduction step size.

[0068] Obtain the current real-time variable trust attribute value of the target third-party terminal device, read the current value of the real-time variable trust attribute value, use the real-time variable trust attribute value as the base value of the trust attribute before deduction, use the trust deduction step size as the deduction amount, deduct the trust deduction step size from the real-time variable trust attribute value, write the value after deduction into the real-time trust attribute field, and generate the updated real-time variable trust attribute value.

[0069] Specifically, the system security baseline feature vector preset on the platform is extracted. This baseline vector is obtained during the initial system deployment by collecting behavioral data from a large number of known and trusted third-party terminal devices running continuously for one week under various normal physical environments (different temperatures, electricity prices), and then statistically averaging (e.g., calculating the mean or median) the generated statistical flow feature vector. It represents the ideal behavior pattern of "absolute security." For example, the baseline instantaneous flow feature value is 0.5, and the baseline terminal heartbeat security status value is 0. Then, the instantaneous flow feature value and the terminal heartbeat security status value in the statistical flow feature vector just generated in the current sliding window are read. According to the fixed position order within the vector, the current instantaneous flow feature value is matched with the baseline instantaneous flow feature value, and the current terminal heartbeat security status value is matched with the baseline terminal heartbeat security status value. Then, the Euclidean distance between the two is calculated. Specifically, the difference between the instantaneous flow feature values ​​is calculated and squared, and the difference between the terminal heartbeat security status values ​​is calculated and squared. The two squared results are then summed, and finally, the square root operation is performed on the sum, as shown in the following calculation process. ,in It is the behavior offset. It is the current instantaneous flow characteristic value. It is the baseline instantaneous flow characteristic value. This is the current terminal heartbeat security status value. It is the baseline terminal heartbeat security status value. The value obtained by square root processing is marked as the quantification result of the abnormality of access behavior within the current sliding window, and the behavior offset is obtained.

[0070] Based on the behavioral offset calculated in the previous process, the trust attribute deduction weight in the adaptive control parameter pair generated by the deep Q-network decision is further extracted, and the specific value state corresponding to this weight is read. This weight value is dynamically generated by DQN according to the risk level of the current physical environment. For example, in an environment with peak electricity prices and abnormal temperatures, DQN may choose a higher deduction weight, such as 0.8, while in a period of normal environmental parameters, it may choose a lower weight, such as 0.2. The behavioral offset is then used as the basic metric for the trust deduction magnitude, because it directly reflects the degree of abnormality of the behavior. The deduction weight serves as an adjustment coefficient, used to adjust the severity of the deduction based on environmental risks. The two values ​​are multiplied together. For example, if the calculated behavioral offset is 1.5 and the trust attribute deduction weight selected by DQN is 0.8, the product of the two is 1.2. This product value (1.2) is defined as the final deduction amount for the trust attribute of the target third-party terminal device within the current sliding window time period. This amount takes into account both the terminal's immediate behavioral performance and the judgment of macro-environmental risks, thereby achieving dynamic and context-aware trust penalties and obtaining the trust deduction step size.

[0071] The system retrieves the current real-time variable trust attribute value maintained by the target third-party terminal device in the platform's trust model. This value is a floating-point number between 0 and 1, with an initial value of 1 representing complete trust. It dynamically changes over time and based on behavior evaluation. The system reads the current numerical state of this attribute value, for example, if the current value is 0.75. This current real-time variable trust attribute value (0.75) is used as the base amount for this deduction calculation. The system then uses the trust deduction step size (e.g., 1.2) calculated in the previous process based on the behavior offset and deduction weight as the deduction amount to be executed. The subtraction operation is performed, deducting the amount from the current real-time variable trust attribute value. In addition to the trust reduction step size, it should be noted that the trust attribute value has a lower limit of 0. Therefore, the actual calculation involves subtracting the reduction step size from the current value and taking the larger value between it and 0 to prevent the trust value from becoming negative, thus obtaining a preliminary calculation result. For example, subtracting a larger reduction step size from 0.75 may result in a value less than 0, in which case the result should be set to 0. If the reduction step size is 0.1, the result is 0.65. Finally, this calculation result constrained by the lower limit is written back to the trust attribute field of the target third-party terminal device in real time, overwriting the original value, completing the trust value reduction process, and generating an updated real-time variable trust attribute value.

[0072] The steps to obtain the frequency of reconnection requests after blocking and the pass rate of secondary authentication are as follows:

[0073] The updated real-time variable trust attribute value is written into the admission comparison field of the current judgment period. The system authorization admission limit preset by the platform is retrieved. The updated real-time variable trust attribute value is used as the comparison value, and the system authorization admission limit is used as the admission benchmark value. The target third-party terminal device identifier, the current judgment period identifier, and the source of the real-time variable trust attribute field are checked item by item. If the updated real-time variable trust attribute value is less than the system authorization admission limit, it is marked as a prohibited transmission state. If the updated real-time variable trust attribute value is greater than or equal to the system authorization admission limit, it is marked as a allowed transmission state, and the admission comparison result is obtained.

[0074] The platform reads the prohibition on continued transmission status from the admission comparison result, triggers the dynamic revocation mechanism of continuous use control, calls the target third-party terminal device identifier, energy consumption sensing node identifier, current data stream identifier, and current data stream session key identifier, marks the data transmission link between the target third-party terminal device and the energy consumption sensing node as a link to be cut off, marks the current data stream session key as a key to be destroyed, writes the link cut-off field and key destruction field to the platform gateway node, and generates an access blocking decision instruction;

[0075] According to the access blocking judgment instruction, the platform gateway node executes the link closing action corresponding to the link cutting field, cutting off the data transmission link between the target third-party terminal device and the energy consumption sensing node, and executes the key clearing action corresponding to the key destruction field, destroying the session key of the current data stream. During the preset penalty observation period after the access blocking judgment instruction is executed, the platform continuously reads the reconnection request records and secondary authentication records initiated by the target third-party terminal device, counts the cumulative number of reconnection request records, and counts the proportion of successful secondary authentication records to the total number of authentication records, thus obtaining the reconnection request frequency and secondary authentication pass rate after blocking.

[0076] Specifically, the updated real-time variable trust attribute value generated in the previous process, for example, 0.25, is written into the access comparison field of the current judgment period. The system's preset access limit is immediately retrieved from the platform. This limit is set according to the risk tolerance of the campus security policy. For example, in a high-security campus, this limit might be set to 0.4, while in a more tolerant environment it might be set to 0.2. This limit is determined by statistically analyzing the trust value distribution of historical attack samples and normal samples, selecting a balance point that effectively intercepts most attacks while reducing false positives for normal users. The updated real-time variable trust attribute value of 0.25 is then used as the comparison value, and the system... The system's authorized access limit of 0.4 is used as the access benchmark value for comparison. Before the comparison, to ensure the accuracy of the operation, it is necessary to check whether the target third-party terminal device identifier, the unique identifier of the current judgment period, and the source of the real-time variable trust attribute field are consistent. After confirming that there are no errors, the comparison operation is performed. Since the updated real-time variable trust attribute value of 0.25 is less than the system's authorized access limit of 0.4, the access status of the terminal device is marked as "prohibited from continuing transmission". Conversely, if the updated value is 0.5, it is marked as "allowed to continue transmission" because it is greater than or equal to 0.4. Finally, the judgment conclusion of this comparison is output, and the access comparison result is obtained.

[0077] The platform monitors and reads the access comparison results generated in the previous process in real time. Once the target third-party terminal device is detected to be marked as "prohibited from continuing transmission", a predefined dynamic revocation mechanism for continuous use control is immediately triggered. This mechanism first calls a series of key identification information associated with the terminal device, including the unique identifier of the target third-party terminal device, the identifier of the energy consumption sensing node it is currently communicating with, the identifier of the current data stream that identifies the data transmission session, and the session key identifier of the current data stream used to encrypt the data stream. Based on this identification information, the system internally marks the logical data transmission link between the target third-party terminal device and the corresponding energy consumption sensing node as "link to be cut off" and marks the session key in use as "key to be destroyed". After these internal markings are completed, these instructions are encapsulated into a standard instruction set and written to the configuration interface or message queue of the platform gateway node, which acts as the network traffic control hub. Specifically, a structured instruction containing "link cut off" and "key destruction" fields is generated, which clearly specifies the device and session information to be operated on. This series of operations together constitutes a complete access blocking decision instruction.

[0078] Based on the access blocking decision command generated in the previous process, the platform gateway node parses the command content. First, it executes the link closure action corresponding to the link disconnection field. This is typically achieved by modifying the gateway's firewall rules or access control lists (ACLs). For example, a new rule can be added to explicitly deny all data packets originating from a third-party terminal device and destined for an energy-sensing node, thus severing the data transmission link between them at the network layer. Next, the gateway node executes the key destruction action corresponding to the key destruction field. It locates the session key matching the current data flow identifier in its internal session management module and completely removes or overwrites it from memory and cache. The access blocking decision command is then executed successfully. After execution, a penalty observation period of a preset duration is immediately initiated. The duration of this observation period is set according to the security policy, for example, 60 seconds. During this period, the platform's authentication and connection log monitoring module will continuously listen to and record all connection attempts from the blocked target third-party terminal device IP address, and count the cumulative number of reconnection request records. If the system is configured with secondary authentication as a way to restore access, the monitoring module will also record the results of all secondary authentication attempts of the device during the observation period, and calculate the proportion of the number of successful authentication records to the total number of authentication attempt records. Finally, after the observation period ends, the statistical results are summarized to obtain the frequency of reconnection requests after blocking and the success rate of secondary authentication.

[0079] The specific steps to complete the self-learning evolution of adaptive access control rules are as follows:

[0080] Extract the cached physical environment feature vector and target action mapping record, read the frequency of reconnection requests after blocking, the preset frequency limit, and the secondary authentication pass rate, compare the frequency of reconnection requests after blocking with the preset frequency limit, and check the consistency between the secondary authentication pass rate and the full pass rate. If the frequency of reconnection requests after blocking is greater than the preset frequency limit and the secondary authentication pass rate is equal to the full pass rate, then mark the current target action corresponding to the target action mapping record as a false alarm interception. If the frequency of reconnection requests after blocking is less than the preset frequency limit, or the secondary authentication pass rate does not reach the full pass rate, then mark the current target action corresponding to the target action mapping record as a correct interception, and obtain the current target action interception judgment result.

[0081] Read the false alarm interception flag and the correct interception flag in the current target action interception judgment result, call the processed values ​​of park temperature, processed values ​​of electricity price period coefficient and Boolean value of power grid emergency command in the cached physical environment feature vector, call the candidate action index and target action identifier in the target action mapping record, if the current target action interception judgment result is a false alarm interception, write the negative reward field to the physical environment feature vector and the target action mapping record, if the current target action interception judgment result is a correct interception, write the positive reward field to the physical environment feature vector and the target action mapping record, and generate a positive reward value or a negative reward value;

[0082] If the updated real-time variable trust attribute value is greater than or equal to the system authorization access limit, then if the target third-party terminal device does not trigger a system security alarm after the current judgment period ends, a basic positive reward value will be assigned to the cached physical environment feature vector and target action mapping record.

[0083] The dynamic access control agent reads the physical environment feature vector, target action mapping record, and reward field corresponding to positive or negative reward value. It retrieves the state action evaluation value corresponding to the current neural network parameters in the deep Q network, reads the candidate action evaluation peak value for the next decision period, writes the reward field, state action evaluation value, and candidate action evaluation peak value into the error calculation channel, calculates the target loss function, and passes the correction amount to the neural network parameters of the deep Q network layer by layer according to the target loss function. It also updates the weight parameters of the deep Q network according to the correction amount, thus completing the self-learning evolution of the adaptive access control rule.

[0084] Specifically, after the penalty observation period ends, the physical environment feature vectors and target action mapping records cached before the blocking are extracted. The frequency of reconnection requests after blocking, the preset frequency limit, and the secondary authentication pass rate, obtained from the previous process, are read. The preset frequency limit is set based on statistical analysis of the behavior patterns of normal users and malicious programs. For example, a normal user might attempt to reconnect no more than 3 times after accidentally disconnecting, while an automated attack script might attempt hundreds of times in a short period. Therefore, the frequency limit can be set to 5 times. Then, logical judgment is performed: first, the frequency of reconnection requests after blocking is compared with the preset frequency limit (5 times); second, the secondary authentication pass rate is compared with the complete pass rate (i.e., 10%). A consistency check is performed at 0% or 1.0. If the result is "the frequency of reconnection requests after blocking is greater than 5 times" and "the pass rate of secondary authentication is equal to 100%", this usually indicates that the terminal itself is legitimate, but due to some reason (such as network fluctuations), it is mistakenly judged as abnormal by the system and triggers frequent automatic reconnection. Therefore, the target action corresponding to this blocking is marked as "false alarm blocking". Conversely, if "the frequency of reconnection requests after blocking is less than or equal to 5 times" or "the pass rate of secondary authentication fails to reach 100%", it indicates that the terminal behavior is suspicious or cannot pass authentication. The blocking behavior is correct. Therefore, the target action is marked as "correct blocking". Based on the above judgments, the current target action blocking judgment result is obtained.

[0085] The system reads the current target action interception judgment result generated in the previous process. Based on the "false alarm interception" or "correct interception" flag in the result, it assigns rewards or penalties to the previous decision-making behavior. Specifically, it first calls the physical environment feature vector cached before the blocking, including the processed values ​​of the park temperature, the processed values ​​of the electricity price period coefficient, and the Boolean value of the power grid emergency command. Then, it calls the corresponding target action mapping record, which contains the candidate action index and target action identifier selected by the deep Q network at that time. Next, it performs reward allocation: if the current target action interception judgment result is "false alarm interception," it means that in the environment at that time, the selected action (i.e., the specific sliding window length and signal strength) was considered a "false alarm interception." The excessively strict weighting of the deductions leads to unnecessary blocking. Therefore, the system writes a negative reward field to the mapping record between the physical environment feature vector and the target action. The size of this reward value can be set according to the severity of the false alarm, for example, a fixed negative value of -1.0. Conversely, if the current target action interception result is "correct interception", it means that the decision at that time was effective and the potential risk was successfully prevented. Therefore, the system writes a positive reward field to the mapping record. The reward value can also be set, for example, a fixed positive value of +1.0. Through this process, the subsequent feedback of the interception behavior is transformed into a quantified value, generating a positive or negative reward value.

[0086] For scenarios where behavior is normal and no blocking mechanism is triggered during the judgment period, reward allocation is still required to reinforce the correct "allow" decision. Specifically, if a target third-party terminal device's updated real-time variable trust attribute value remains above or equal to the system's authorization access limit throughout the entire judgment period, and during this period, the platform's Security Information and Event Management (SIEM) system does not record any system security alarms (such as virus reports, abnormal process startups, etc.) caused by this terminal device, then the access control rules selected by the Deep Q network during this period are deemed appropriate and secure. To encourage such actions that ensure security without compromising security, rewards are also given. For normal business decisions, after the current judgment period ends, the system will assign a basic positive reward value to the physical environment feature vector and target action mapping record cached in that period. This reward value is usually set to a small positive number, and its value must be less than the positive reward value for "correct interception". For example, if the reward for "correct interception" is +1.0, then this basic positive reward value can be set to +0.1. This setting aims to encourage the model to adopt a more lenient strategy to ensure availability while ensuring safety. At the same time, its small value also avoids the model being too "conservative" and not daring to adopt a strict strategy, thus completing the reward assignment for normal passage.

[0087] After each decision cycle or after accumulating a certain amount of experience, the dynamic access control agent initiates the parameter update process of the deep Q-network. First, it samples a batch of data from the experience replay pool. Each data point contains the physical environment feature vector (state S) at the time of the decision, the target action mapping record executed at that time (action A), and the subsequently generated positive or negative reward value (reward R). Then, for each sample, it retrieves the state-action evaluation value Q(S, A) calculated by the current neural network parameters in the deep Q-network. Next, it inputs the next state (the physical environment feature vector S' of the next decision cycle) into the network to calculate the evaluation values ​​of all possible actions in the next state. The largest of these is selected as the candidate action evaluation peak for the next decision cycle, i.e., max(Q(S', a')). Finally, the reward R, the current state action evaluation value Q(S, A), and the candidate action evaluation peak are written into the error calculation channel. The difference between the temporal difference target (TD Target) and the current Q value is calculated according to the Bellman equation, and the target loss function is calculated accordingly. The mean squared error loss function is typically used. ,in It is the target loss function. Expressing expectations, It's a reward value. It is a discount factor (e.g., 0.9, used to balance immediate and future rewards). These are the parameters of the current Q network. These are the parameters of the target Q-network. Based on the loss value calculated using the target loss function, a gradient descent algorithm (such as the Adam optimizer) is used to calculate the correction amount (i.e., gradient) for the parameters of each layer of the deep Q-network, and then the network weight parameters are adjusted along the direction opposite to the gradient. Perform small-step updates to complete the self-learning evolution of adaptive access control rules.

[0088] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for protecting the privacy of energy consumption data in a park via the Internet of Things, characterized in that, Includes the following steps: The platform-side dynamic access control agent obtains physical environment feature vectors, inputs the physical environment feature vectors into a preset deep Q-network to select candidate actions, and generates target actions. Extract the sliding window length and trust attribute deduction weight from the target action to generate an adaptive control parameter pair, and cache the physical environment feature vector and target action mapping record of the current judgment period; Based on the length of the sliding window, the access behavior data of the target third-party terminal device within the current sliding window is collected. The access behavior data includes the cumulative value of data transmission bytes, the frequency of access requests, and the terminal heartbeat security status value. Instantaneous traffic feature value is generated based on the accumulated value of data transmission bytes and the frequency of access requests. The instantaneous traffic feature value is then concatenated with the terminal heartbeat security status value to generate a statistical flow feature vector. Calculate the behavioral offset between the statistical flow feature vector and the preset system security baseline feature vector, and obtain the trust deduction step size based on the behavioral offset and the trust attribute deduction weight; Subtract the trust deduction step size from the current real-time variable trust attribute value of the target third-party terminal device to generate an updated real-time variable trust attribute value. If the updated real-time variable trust attribute value is lower than the preset system authorization access limit, the dynamic revocation mechanism of continuous use control is triggered, an access blocking judgment instruction is generated, the data transmission link between the target third-party terminal device and the energy consumption sensing node is cut off, and the session key of the current data stream is destroyed. During the preset penalty observation period after the execution of the access blocking decision instruction, the frequency of reconnection requests after blocking and the pass rate of secondary authentication of the target third-party terminal device are statistically analyzed.

2. The IoT privacy protection method for park energy consumption data according to claim 1, characterized in that, The method further includes: Based on the frequency of reconnection requests after blocking, the preset frequency limit, and the result of the secondary authentication pass rate, positive or negative reward values ​​are assigned to the cached physical environment feature vector and the target action mapping record; the target loss function is calculated in combination with the positive or negative reward values, and the neural network parameters of the deep Q network are updated to complete the self-learning evolution of the adaptive access control rules.

3. The IoT privacy protection method for park energy consumption data according to claim 1, characterized in that, The steps for obtaining the physical environment feature vector are as follows: The platform-side dynamic access control agent reads the park temperature value, electricity price period coefficient value, and power grid emergency command Boolean value within the current judgment period. It retrieves the preset upper and lower temperature values ​​for the park temperature value and performs differential scaling. It retrieves the preset upper and lower electricity price period coefficient values ​​and performs differential scaling. It retains the discrete value state of the power grid emergency command Boolean value. The fields are concatenated in a fixed order: the processed park temperature value, the processed electricity price period coefficient value, and the power grid emergency command Boolean value, to generate a physical environment feature vector.

4. The IoT privacy protection method for park energy consumption data according to claim 1, characterized in that, The steps for obtaining the adaptive control parameter pair are as follows: The dynamic access control agent inputs the processed values ​​of the park temperature, the processed values ​​of the electricity price period coefficient, and the Boolean value of the power grid emergency command from the physical environment feature vector into a preset deep Q network. It calls the candidate action index one by one, calculates the state action evaluation value corresponding to the candidate action index, sorts the state action evaluation values ​​from largest to smallest, selects the candidate action corresponding to the first state action evaluation value in the sorted list, and generates the target action. The action encoding field pre-bound in the target action is parsed, and the action encoding field is split into a sliding window length encoding segment and a trust attribute deduction weight encoding segment. The sliding window length is queried according to the sliding window length encoding segment, and the trust attribute deduction weight is queried according to the trust attribute deduction weight encoding segment. The sliding window length and trust attribute deduction weight are encapsulated in pairs to form an adaptive control parameter pair. At the same time, the physical environment feature vector and target action mapping record of the current judgment period are cached locally.

5. The IoT privacy protection method for park energy consumption data according to claim 1, characterized in that, The steps for obtaining the instantaneous flow characteristic value are as follows: Based on the sliding window length in the adaptive control parameter pair, the platform determines the start and end times of the current sliding window according to the sliding window length, continuously reads the accumulated value of data transmission bytes of the target third-party terminal device within the current sliding window, counts the frequency of access requests within the same current sliding window, reads the terminal heartbeat security status value corresponding to the end time of the current sliding window, and generates access behavior data. The platform continuously advances the sliding window along the time axis according to a preset time step. Within each current sliding window, it calls the historical mean and historical standard deviation of the accumulated data transmission bytes, performs standard deviation scaling on the accumulated data transmission bytes, calls the historical mean and historical standard deviation of the access request frequency, performs standard deviation scaling on the access request frequency, and then calls the preset traffic weight and frequency weight to perform weighted accumulation on the converted accumulated data transmission bytes and the converted access request frequency to generate instantaneous traffic feature values.

6. The IoT privacy protection method for park energy consumption data according to claim 1, characterized in that, The steps for obtaining the statistical flow feature vector are as follows: The platform calls the terminal heartbeat security status value in the access behavior data, reads the discrete value identifier of the terminal heartbeat security status value, places the instantaneous traffic feature value at the beginning of the vector, places the terminal heartbeat security status value at the end of the vector, and completes the field concatenation according to the current sliding window collection order to generate a statistical flow feature vector.

7. The IoT privacy protection method for park energy consumption data according to claim 1, characterized in that, The steps for obtaining the updated real-time variable trust attribute value are as follows: Extract the system security baseline feature vector preset on the platform, read the instantaneous traffic feature value and terminal heartbeat security status value in the statistical flow feature vector of the current sliding window, match the baseline instantaneous traffic feature value and baseline terminal heartbeat security status value in the system security baseline feature vector according to the vector position order, square the numerical difference of the same vector position, then accumulate and square root the square result, mark the value obtained by square root as the quantification result of access behavior abnormality, and obtain the behavior offset; Extract the trust attribute deduction weight from the adaptive control parameter pair, read the weight value state corresponding to the trust attribute deduction weight, use the behavior offset as the base amount of the deduction range, use the trust attribute deduction weight as the adjustment amount of the deduction range, perform a product operation on the behavior offset and the trust attribute deduction weight, and use the value obtained from the product operation as the trust deduction range corresponding to the current sliding window to obtain the trust deduction step size; Obtain the current real-time variable trust attribute value of the target third-party terminal device, read the current value status of the real-time variable trust attribute value, use the real-time variable trust attribute value as the base value of the trust attribute before deduction, use the trust deduction step size as the deduction amount, deduct the trust deduction step size from the real-time variable trust attribute value, write the value after deduction into the real-time trust attribute field, and generate the updated real-time variable trust attribute value.

8. The IoT privacy protection method for park energy consumption data according to claim 1, characterized in that, The steps for obtaining the frequency of reconnection requests after blocking and the pass rate of secondary authentication are as follows: The updated real-time variable trust attribute value is written into the admission comparison field of the current judgment period. The system authorization admission limit preset by the platform is retrieved. The updated real-time variable trust attribute value is used as the comparison value, and the system authorization admission limit is used as the admission benchmark value. The target third-party terminal device identifier, the current judgment period identifier, and the source of the real-time variable trust attribute field are checked item by item. If the updated real-time variable trust attribute value is less than the system authorization admission limit, it is marked as a prohibited transmission state. If the updated real-time variable trust attribute value is greater than or equal to the system authorization admission limit, it is marked as a allowed transmission state, and the admission comparison result is obtained. The platform reads the prohibition on continued transmission status from the admission comparison result, triggers the dynamic revocation mechanism of continuous use control, calls the target third-party terminal device identifier, energy consumption sensing node identifier, current data stream identifier, and current data stream session key identifier, marks the data transmission link between the target third-party terminal device and the energy consumption sensing node as a link to be cut off, marks the session key of the current data stream as a key to be destroyed, writes the link cut-off field and key destruction field to the platform gateway node, and generates an access blocking decision instruction; According to the access blocking decision instruction, the platform gateway node executes the link closing action corresponding to the link cutting field, cutting off the data transmission link between the target third-party terminal device and the energy consumption sensing node, and executes the key clearing action corresponding to the key destruction field, destroying the session key of the current data stream. During the preset penalty observation period after the access blocking decision instruction is executed, the platform continuously reads the reconnection request records and secondary authentication records initiated by the target third-party terminal device, counts the cumulative number of reconnection request records, and counts the proportion of successful secondary authentication records to the total number of authentication records, thereby obtaining the reconnection request frequency and secondary authentication pass rate after blocking.

9. The IoT privacy protection method for park energy consumption data according to claim 2, characterized in that, The specific steps to complete the self-learning evolution of adaptive access control rules are as follows: Extract the cached physical environment feature vector and target action mapping record, read the frequency of reconnection requests after blocking, the preset frequency limit, and the secondary authentication pass rate, compare the frequency of reconnection requests after blocking with the preset frequency limit, and check the consistency between the secondary authentication pass rate and the full pass rate. If the frequency of reconnection requests after blocking is greater than the preset frequency limit and the secondary authentication pass rate is equal to the full pass rate, then mark the current target action corresponding to the target action mapping record as a false alarm interception. If the frequency of reconnection requests after blocking is less than the preset frequency limit, or the secondary authentication pass rate does not reach the full pass rate, then mark the current target action corresponding to the target action mapping record as a correct interception, and obtain the current target action interception judgment result. Read the false alarm interception flag and the correct interception flag in the current target action interception judgment result, call the cached physical environment feature vector after processing the park temperature value, the electricity price time coefficient after processing, and the power grid emergency command boolean value, call the candidate action index and target action identifier in the target action mapping record, if the current target action interception judgment result is a false alarm interception, write a negative reward field to the physical environment feature vector and the target action mapping record, if the current target action interception judgment result is a correct interception, write a positive reward field to the physical environment feature vector and the target action mapping record, and generate a positive reward value or a negative reward value; The dynamic access control agent reads the physical environment feature vector, the target action mapping record, and the reward field corresponding to the positive or negative reward value. It retrieves the state action evaluation value corresponding to the current neural network parameters in the deep Q network, reads the candidate action evaluation peak value for the next decision period, writes the reward field, state action evaluation value, and candidate action evaluation peak value into the error calculation channel, calculates the target loss function, and transmits the correction amount to the neural network parameters of the deep Q network layer by layer according to the target loss function. It also updates the weight parameters of the deep Q network according to the correction amount, thus completing the self-learning evolution of the adaptive access control rule.