Substation gateway meter terminal time synchronization method and system based on use and acquisition system

By deploying sensors and data acquisition equipment at the substation gate meter terminal of the power system, combining convolutional neural network, recurrent neural network and attention mechanism, the reinforcement learning model is used to realize remote time synchronization calibration of the substation gate meter, which solves the problem of time synchronization error in the existing technology, and improves the accuracy of measurement and transaction fairness.

CN120090749APending Publication Date: 2025-06-03STATE GRID JIBEI ELECTRIC POWER COMPANY LIMITED CHENGDE POWER SUPPLY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510165796.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The existing technology cannot realize remote matching of substation gate meters in the power system, resulting in time synchronization errors, affecting the accuracy of electricity usage measurement and transaction fairness.

Method used

By deploying sensors and data acquisition devices at the substation gate meter terminals, synchronous time and environmental data are collected and data is transmitted to the central processing server using the improved MQTT data transmission protocol. The server uses convolutional neural network and recurrent neural network to extract timing features, combines attention mechanism to fusion, and builds a time synchronization calibration model based on reinforcement learning to achieve real-time synchronization calibration.

Benefits of technology

It improves the accuracy and efficiency of time synchronization, enhances the intelligence level and adaptability of the system, ensures the safety and efficiency of power grid operation, and reduces time and errors during artificial schooling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120090749A_ABST
    Figure CN120090749A_ABST
Patent Text Reader

Abstract

The invention relates to a transformer substation gateway meter terminal time synchronization method and system based on a use and acquisition system, and the method comprises the following steps: deploying a sensor and data acquisition equipment at a transformer substation gateway meter terminal, and collecting and synchronizing time data and environment data; transmitting the collected data to a central processing server by adopting an improved MQTT data transmission protocol, and performing preprocessing; feature extraction is performed on different types of data, the extracted features are fused by adopting an attention mechanism, information of different data sources is integrated, and a training data set is constructed; constructing a time synchronization calibration model based on the reinforcement learning model, and training based on the training data set; and the trained time synchronization calibration model is utilized to analyze data acquired in real time, and an accurate time synchronization calibration result is provided. According to the invention, the precision and efficiency of time synchronization are improved, and the intelligent level and adaptability of the system are enhanced through intelligent data processing and machine learning technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and system for time synchronization of substation gateway meter terminals based on a power consumption and collection system, and belongs to the field of power system terminal detection. Background Art

[0002] In a power system, after the gateway meter has been operating for a period of time, or fails to work during a primary line maintenance or a secondary voltage circuit fault of a voltage transformer, it is easy to cause clock drift of the gateway watt-hour meter. In the spot trading of the power market, the clock drift of the gateway meter will directly affect the accuracy of electricity consumption metering for users in each time period, resulting in a certain deviation between the electricity consumption measured by users in each time period and the actual electricity consumption. When settling according to the electricity price rates in different time periods, it will affect the fairness of both trading parties.

[0003] Currently, the power consumption and collection sub-stations in the power system are widely used. The power consumption and collection sub-station is the user electricity information collection system. The user electricity information collection system realizes electricity consumption monitoring, implements ladder pricing, load management, and line loss analysis through the collection and analysis of electricity consumption data of distribution transformers and end-users, and finally achieves the purposes of automatic meter reading, peak load shifting, electricity consumption inspection (anti-theft electricity), load forecasting, and cost saving of electricity consumption. Establishing a comprehensive user electricity information collection system requires the construction of a system master station, a transmission channel, collection equipment, and electronic watt-hour meters (i.e., smart meters). However, the existing power consumption and collection sub-stations do not have the function of remotely synchronizing the time of the electric energy information collection terminal, nor can they directly perform remote time synchronization on the substation gateway meter. Manual on-site time calibration has low efficiency and poor timeliness. Summary of the Invention

[0004] The purpose of the present invention is to provide a method and system for time synchronization of substation gateway meter terminals based on a power consumption and collection system, which not only improves the accuracy and efficiency of time synchronization, but also enhances the intelligent level and adaptability of the system through intelligent data processing and machine learning technology, and solves the above problems existing in the prior art.

[0005] To achieve the above purpose, the present invention adopts the following technical solutions:

[0006] A method for time synchronization of substation gateway meter terminals based on a power consumption and collection system includes the following steps:

[0007] S1: Deploy sensors and data collection devices at the substation gateway meter terminal to collect synchronization time data and environmental data;

[0008] S2: Adopt an improved MQTT data transmission protocol to transmit the collected data to a central processing server and perform preprocessing;

[0009] S3: Extract features from the data, and use the attention mechanism to fuse the extracted features, integrate the information from different data sources, and construct a training dataset, specifically as follows:

[0010] Use the convolutional neural network CNN to extract the temporal features of the synchronization data, and use the recurrent neural network RNN to extract the temporal features of the environmental data;

[0011] Let the synchronization data sequence X = {x 1 , x 2 ,..., x N}, and the environmental data sequence Y = {y 1 , y 2 ,.., y N};

[0012] Then the temporal feature of the synchronization data is F CNN = CNN(X); the temporal feature of the environmental data is F RNN = RNN(X);

[0013] Use the attention mechanism to fuse the extracted features, integrate the information of the data sources, and construct a training dataset:

[0014] Calculate the attention weights:

[0015] e ij = v T tanh(W f F CNN + W g F RNN + b)

[0016] where e ij is the calculation result of the attention weights, representing the correlation between the i-th CNN feature and the j-th RNN feature; v is the learned weight matrix, used to adjust the scaling and translation of the attention scores; W f , W g are the learned weight matrices, used for linear transformation of the features, and b is the bias term;

[0017] Normalize the attention weights:

[0018]

[0019] Fuse the features extracted by CNN and RNN through the attention weights to obtain the final fused features:

[0020]

[0021] where F ij represents the extracted feature vector;

[0022] S4: Build a time synchronization calibration model based on the reinforcement learning model and train it based on the training dataset;

[0023] S5: Use the trained time synchronization calibration model to analyze the real-time collected data and provide accurate time synchronization calibration results.

[0024] A substation gateway meter terminal time synchronization system based on a collection and utilization system, including a data collection unit, a data transmission unit, and a central processing server; the central processing server consists of a preprocessing module, a feature extraction module, and a time synchronization calibration module;

[0025] The data collection unit includes sensors and data collection devices deployed at the substation gateway meter terminal to collect synchronous time data and environmental data;

[0026] The data transmission unit uses an improved MQTT data transmission protocol to transmit the collected data to the central processing server;

[0027] The preprocessing module preprocesses the collected data;

[0028] The feature extraction module extracts features for different types of data, and uses an attention mechanism to fuse the extracted features, integrate information from different data sources, and construct a training dataset, specifically as follows:

[0029] Use a convolutional neural network CNN to extract the temporal features of synchronous data, and use a recurrent neural network RNN to extract the temporal features of environmental data;

[0030] Let the synchronous data sequence X = {x 1 ,x 2 ,...,x N}, and the environmental data sequence Y = {y 1 ,y 2 ,..,y N};

[0031] Then the temporal feature of the synchronous data is F CNN = CNN(X); the temporal feature of the environmental data is F RNN = RNN(X);

[0032] Use an attention mechanism to fuse the extracted features, integrate information from different data sources, and construct a training dataset:

[0033] Calculate the attention weights:

[0034] e ij = v T tanh(W f F CNN + W g FRNN +b)

[0035] Among them, e ij is the calculation result of the attention weight, representing the correlation between the i-th CNN feature and the j-th RNN feature; v is the learned weight matrix, used to adjust the scaling and translation of the attention score; W f , W g is the learned weight matrix, used for linear transformation of features, and b is the bias term;

[0036] Normalized attention weight:

[0037]

[0038] The features extracted by CNN and RNN are weighted and fused through the attention weight to obtain the final fused feature:

[0039]

[0040] Among them, F ij represents the extracted feature vector;

[0041] The time synchronization calibration module analyzes the real-time collected data and provides accurate time synchronization calibration results; the time synchronization calibration model is constructed based on the reinforcement learning model and trained based on the training data set.

[0042] The present invention has the following beneficial effects:

[0043] 1. The present invention not only improves the accuracy and efficiency of the time synchronization of the gateway meter, but also enhances the intelligence level and adaptability of the system through advanced data processing and machine learning technologies;

[0044] 2. The present invention selects the appropriate QoS level according to the importance and real-time requirements of the data, combines the persistent connection and the configured will message function to ensure the reliability and efficiency of data transmission, and can still receive important messages when the device is abnormally offline;

[0045] 3. The present invention extracts features for different types of data and uses the attention mechanism for feature fusion, which can effectively integrate information from different data sources, and the time synchronization calibration model constructed based on reinforcement learning can adaptively learn the optimal time calibration strategy, can continuously adapt to new data changes, improve the long-term stability and reliability of the system; and can provide accurate time synchronization results in real time, which is crucial for ensuring the safety and efficiency of power grid operation. Description of the Drawings

[0046] Figure 1 is the flow chart of the method of the present invention;

[0047] Figure 2 This is the system architecture diagram in the embodiment of the present invention. Detailed implementation manners

[0048] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0049] Refer to Figure 1 , in this embodiment, a time synchronization method for a substation gateway meter terminal based on a collection system is provided, which is characterized by including the following steps:

[0050] S1: Deploy sensors and data acquisition devices at the substation gateway meter terminal to collect synchronous time data and environmental data;

[0051] S2: Adopt an improved MQTT data transmission protocol to transmit the collected data to the central processing server and perform preprocessing;

[0052] S3: Extract features for different types of data, and use the attention mechanism to fuse the extracted features, integrate the information of different data sources, and construct a training data set, specifically as follows:

[0053] Use the convolutional neural network CNN to extract the temporal features of synchronous data, and use the recurrent neural network RNN to extract the temporal features of environmental data;

[0054] Let the synchronous data sequence X = {x 1 , x 2 ,..., x N}, and the environmental data sequence Y = {y 1 , y 2 ,.., y N};

[0055] Then the temporal feature of the synchronous data is F CNN = CNN(X); the temporal feature of the environmental data is F RNN = RNN(X);

[0056] Use the attention mechanism to fuse the extracted features, integrate the information of different data sources, and construct a training data set:

[0057] Calculate the attention weights:

[0058] e ij = v T tanh(W f F CNN + W g F RNN + b)

[0059] Where, e ijis the calculation result of the attention weight, representing the correlation between the i-th CNN feature and the j-th RNN feature; v is the learned weight matrix used to adjust the scaling and translation of the attention score; W f and W g are learned weight matrices used for linear feature transformation, and b is the bias term;

[0060] Normalized attention weight:

[0061]

[0062] The features extracted by CNN and RNN are weighted and fused through the attention weight to obtain the final fused feature:

[0063]

[0064] where F ij represents the extracted feature vector;

[0065] S4: Construct a time synchronization calibration model based on the reinforcement learning model and train it based on the training dataset;

[0066] S5: Use the trained time synchronization calibration model to analyze the real-time collected data and provide accurate time synchronization calibration results.

[0067] Preferably, improve the MQTT data transmission protocol as follows:

[0068] Select an appropriate QoS level according to the importance and real-time requirements of the data, including at least once delivery, at most once delivery, or exactly once delivery;

[0069] Configure a persistent connection at the MQTT Client side to ensure that the device remains connected to the MQTT Broker, reducing the overhead of connection and disconnection;

[0070] Configure the will message content and topic, and set the will message when the device is connected to ensure that messages can still be received when the device goes offline abnormally;

[0071] The sensors and data acquisition devices deployed at the substation gateway meter terminal publish data messages to the MQTT Broker, and the messages are delivered according to the configured QoS level;

[0072] The central processing server subscribes to the data messages, receives and processes the data; when the device goes offline abnormally, the MQTT Broker sends the configured will message to the subscriber.

[0073] Preferably, the preprocessing includes data cleaning and data denoising, specifically as follows: perform missing value processing on the original data, and fill in the missing values with the mean; detect and process outliers, identify outliers using Z-Score and process them; delete duplicate values to ensure the uniqueness and accuracy of the data; perform format conversion on the data to unify the data format for subsequent processing; and use a filtering method to smooth the data and remove noise interference.

[0074] Preferably, the CNN consists of a convolutional layer, a pooling layer, and a fully connected layer, and is used to extract the spatial features of the data, specifically as follows:

[0075] The convolutional layer performs a convolution operation, specifically:

[0076] h u = f(w · x u:u+k′-1 + b)

[0077] where x u:u+k′-1 is a local region of the synchronous data sequence, w is the convolution kernel, b is the bias term, and f is the activation function;

[0078] Output feature: H = [h 1 , h 2 ,..., h u ,..., h N-k′+1

[0079] where k' is the size of the convolution kernel;

[0080] The pooling layer performs a pooling operation, specifically:

[0081] p u = pooling(h u:u+s-1 )

[0082] where h u:u+s-1 is the pooling region, pooling is the pooling function, and s is the size of the pooling kernel;

[0083] Output pooling result:

[0084] P = [p 1 , p 2 ,..., p u ,..., p N-s+1 .

[0085] Preferably, a time synchronization calibration model is constructed based on a reinforcement learning model, specifically:

[0086] The state space includes the features of the synchronous data and the features of the environmental data, and encodes the synchronous data features and the environmental data features into a state representation that can be processed by the model;

[0087] ​The action space includes adjustment parameters for time synchronization calibration, and a reward function is designed to measure the performance of the model in the time synchronization calibration task:

[0088] At each time step t, the agent selects an action a according to the current state s t and after executing the action, the environment transitions to the next state s t and obtains a reward r t+1 . The framework of reinforcement learning is represented as: t s

[0089] t , a t →r t , s t+1 t ;

[0090] The reward function is a combination of a time synchronization error function and a function of the environmental data stability:

[0091] R(s t , a t ) = α·E(s t , a t ) + β·S(s t , a t );

[0092] where E(s t , a t ) = -Δt is the time synchronization error function, and S(s t , a t ) = -σ 2 is the environmental data stability function; Δt represents the time synchronization error; σ 2 is the variance of the environmental data; α, β are weight coefficients.

[0093] Preferably, the training of the time synchronization calibration model is as follows:

[0094] According to the processed training data set, samples containing synchronous data features and environmental data features, each sample containing information on the input state, selected action, reward, and next state;

[0095] Use a deep neural network as the estimator of the Q function. The input is the state feature, and the output is the Q value for each possible action, adopting a multi-layer fully connected neural network structure;

[0096] Use the Q-learning algorithm to update the Q value, and the update rule is as follows:

[0097] Q(s t , a t ) ← Q(s t , a t ) + α′·(r t+γ·maxQ(s t+1 , a) - Q(s t , a t ));

[0098] Among them, Q(s t , a t ) is the Q - value of the state - action pair (s t , a t ); α′ is the learning rate, γ is the discount factor, maxQ(s t+1 , a) is the maximum Q - value of the selectable actions in the next state, r t is a reward score;

[0099] Use the experience replay technique to randomly sample from the experience pool for training to reduce the correlation between samples;

[0100] Use the target network to stabilize the training process and regularly update the parameters of the target network;

[0101] In each training cycle, select an action according to the current state, update the Q - value, repeat the training cycle until convergence, and obtain the trained time - synchronization calibration model.

[0102] A substation gateway meter terminal time - synchronization system based on a sampling system, including a data acquisition unit, a data transmission unit, and a central processing server; the central processing server includes a pre - processing module, a feature extraction module, and a time - synchronization calibration module; the data acquisition unit includes sensors and data acquisition devices deployed at the substation gateway meter terminal to collect synchronization time data and environmental data; the data transmission unit uses the MQTT data transmission protocol to transmit the collected data to the central processing server.

[0103] The pre - processing module pre - processes the collected data; the feature extraction module extracts features for different types of data, and uses the attention mechanism to fuse the extracted features, integrate the information of different data sources, and construct a training data set, specifically as follows:

[0104] Use the convolutional neural network CNN to extract the temporal features of the synchronization data, and use the recurrent neural network RNN to extract the temporal features of the environmental data;

[0105] Let the synchronization data sequence X = {x 1 , x 2 ,..., x N}, and the environmental data sequence Y = {y 1 , y 2 ,.., y N};

[0106] Then the temporal feature of the synchronization data is F CNN= CNN(X); The temporal feature of environmental data is F RNN = RNN(X);

[0107] The attention mechanism is used to fuse the extracted features, integrate the information of different data sources, and construct a training dataset;

[0108] Calculate the attention weights:

[0109] e ij = v T tanh(W f F CNN + W g F RNN + b)

[0110] Among them, e ij is the calculation result of the attention weights, indicating the correlation between the i-th CNN feature and the j-th RNN feature; v is the learned weight matrix, used to adjust the scaling and translation of the attention scores; W f , W g is the learned weight matrix, used for linear transformation of features, and b is the bias term;

[0111] Normalize the attention weights:

[0112]

[0113] The features extracted by CNN and RNN are weighted and fused through the attention weights to obtain the final fused features:

[0114]

[0115] Among them, F ij represents the extracted feature vector;

[0116] The time synchronization calibration module analyzes the data collected in real time and provides accurate time synchronization calibration results;

[0117] The time synchronization calibration model is constructed based on a reinforcement learning model and trained based on the training dataset.

[0118] Preferably, the MQTT data transmission protocol is as follows:

[0119] Select an appropriate QoS level according to the importance and real-time requirements of the data, including at least once delivery, at most once delivery, or exactly once delivery;

[0120] Configure a persistent connection at the MQTT Client side to ensure that the device remains connected to the MQTT Broker, reducing the overhead of connection and disconnection;

[0121] Configure the will message content and subject, and set the will message when the device is connected to ensure that messages can still be received when the device goes offline abnormally;

[0122] The sensors and data acquisition devices deployed at the substation gateway meter terminal publish data messages to the MQTT Broker, and the messages are transmitted according to the configured QoS level;

[0123] The central processing server subscribes to the data messages, receives and processes the data; when the device goes offline abnormally, the MQTT Broker sends the configured will message to the subscribers.

[0124] In this embodiment, the preprocessing includes data cleaning and data denoising, specifically as follows: perform missing value processing on the original data, and fill the missing values with the mean; detect and process outliers, use Z-Score to identify outliers and process them; delete duplicate values to ensure the uniqueness and accuracy of the data; perform format conversion on the data to unify the data format for subsequent processing; and use filtering methods to smooth the data and remove noise interference.

[0125] Preferably, the CNN consists of a convolutional layer, a pooling layer, and a fully connected layer, and is used to extract the spatial features of the data, specifically as follows:

[0126] The convolutional layer performs a convolution operation, specifically:

[0127] h u = f(w · x u:u+k′-1 + b)

[0128] where x u:u+k′-1 is the local area of the synchronous data sequence, w is the convolution kernel, b is the bias term, and f is the activation function;

[0129] Output feature: H = [h 1 , h 2 ,..., h u ,..., h N-k′+1

[0130] where k' is the size of the convolution kernel;

[0131] The pooling layer performs a pooling operation, specifically:

[0132] p u = pooling(h u:u+s-1 )

[0133] where h u:u+s-1 is the pooling area, pooling is the pooling function, and s is the size of the pooling kernel;

[0134] Output pooling result:

[0135] P = [p​1 ,p 2 ,...,p u ,...,p N-s+1 ].

[0136] Preferably, a time synchronization calibration model is constructed based on a reinforcement learning model, specifically:

[0137] The state space includes the features of the synchronization data and the features of the environment data, and encodes the synchronization data features and the environment data features into state representations that can be processed by the model;

[0138] The action space includes the adjustment parameters of time synchronization calibration, and the reward function is designed to measure the performance of the model in the time synchronization calibration task:

[0139] At each time step t, the agent takes the current state s t Select action a t , after executing the action, the environment transfers to the next state s t+1 , and receive a reward t , the framework of reinforcement learning is expressed as:

[0140] s t , a t →r t ,s t+1 ;

[0141] The reward function is a combination of the time synchronization error function and the function of environmental data stability:

[0142] R(s t ,a t )=α·E(s t ,a t )+β·S(s t ,a t );

[0143] Among them, E(s t , a t )=-Δt is the time synchronization error function, S(s t ,a t )=-σ 2 is the stability function of environmental data; Δt represents the time synchronization error; σ 2 is the variance of environmental data; α, β are weight coefficients.

[0144] Preferably, the training of the time synchronization calibration model is as follows:

[0145] According to the processed training data set, samples of synchronization data features and environment data features are included, and each sample contains information about the input state, the selected action, the reward, and the next state;

[0146] The deep neural network is used as the estimator of the Q function. The input is the state feature, and the output is the Q value of each possible action. A multi-layer fully connected neural network structure is adopted;

[0147] The Q-learning algorithm is used to update the Q value, and the update rule is as follows:

[0148] Q(s t ,a t )←Q(s t ,a t )+α′·(r t +γ·maxQ(s t+1 ,a)-Q(s t ,a t ));

[0149] Among them, Q(s t ,a t ) is the Q value of the state-action pair (s t ,a t ); α′ is the learning rate, γ is the discount factor, maxQ(s t+1 ,a) is the maximum Q value of the selectable actions in the next state, and r t is a reward score;

[0150] The experience replay technique is used to randomly extract samples from the experience pool for training to reduce the correlation between samples;

[0151] The target network is used to stabilize the training process, and the parameters of the target network are updated regularly;

[0152] In each training cycle, an action is selected according to the current state, the Q value is updated, and the training cycle is repeated until convergence to obtain the trained time synchronization calibration model.

[0153] Embodiments of the present invention may be provided as a method, a system, or a computer program product. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0154] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one or more flows and / or blocks in the flow Figure 1 one or more flows and / or blocks Figure 1 or means for implementing the functions specified in one or more blocks or multiple blocks.

[0155] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in one or more flows and / or blocks in the flow Figure 1 one or more flows and / or blocks Figure 1 or means for implementing the functions specified in one or more blocks or multiple blocks.

[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows and / or blocks in the flow Figure 1 one or more flows and / or blocks Figure 1 or means for implementing the functions specified in one or more blocks or multiple blocks.

[0157] As described above, it is only a preferred embodiment of the present invention, and it is not a limitation of the present invention in other forms. Any person skilled in the art may use the disclosed technical content to make changes or modifications into equivalent embodiments with equivalent changes. However, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution content of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims

1. A time synchronization method for a substation gateway meter terminal based on a user acquisition system, characterized in that: The following steps are involved: S1: Deploy sensors and data acquisition equipment at the substation gateway terminal to collect synchronous time data and environmental data; S2: Using the improved MQTT data transmission protocol, the collected data is transmitted to the central processing server and pre-processed; S3: Extract features from the data, use the attention mechanism to fuse the extracted features, integrate information from different data sources, and construct a training data set, as follows: The convolutional neural network (CNN) is used to extract the temporal features of the synchronization data, and the recurrent neural network (RNN) is used to extract the temporal features of the environmental data; Assume that the synchronization data sequence X = {x1, x2, ..., x N }, environmental data sequence Y = {y1,y2,..,y N }; Then the timing characteristics of the synchronous data are F CNN =CNN(X); the temporal characteristics of environmental data are F RNN =RNN(X); The attention mechanism is used to fuse the extracted features, integrate the information of the data source, and construct a training data set: Calculate the attention weights: e ij =v T tanh(W f F CNN +W g F RNN +b) Among them, e ij is the result of attention weight calculation, which indicates the correlation between the i-th CNN feature and the j-th RNN feature; v is the learned weight matrix, which is used to adjust the scaling and translation of the attention score; W f , W g is the learned weight matrix used for linear transformation features, and b is the bias term; Normalized attention weights: The features extracted by CNN and RNN are weighted and fused through attention weights to obtain the final fused features: Among them, F ij represents the extracted feature vector; S4: Build a time synchronization calibration model based on the reinforcement learning model and train it based on the training dataset; S5: Use the trained time synchronization calibration model to analyze the data collected in real time and provide accurate time synchronization calibration results.

2. According to the method of claim 1, a substation gateway meter terminal synchronization method based on a user acquisition system is characterized in that: The improved MQTT data transmission protocol is as follows: Select the appropriate QoS level based on the importance and real-time requirements of the data, including at least once delivery, at most once delivery, or only once delivery; Configure a persistent connection on the MQTT Client to ensure that the device remains connected to the MQTT Broker and reduce the overhead of connection and disconnection; Configure the will message content and subject, and set the will message when the device is connected to ensure that the message can still be received when the device is abnormally offline; Sensors and data acquisition devices deployed at the substation gateway terminals publish data messages to the MQTT Broker, which delivers messages according to the configured QoS level; The central processing server subscribes to data messages, receives and processes data; when the device is abnormally offline, the MQTT Broker sends the configured will message to the subscriber.

3. According to the method of claim 1, the time synchronization method of the substation gateway meter terminal based on the use and collection system is characterized in that: The CNN consists of a convolutional layer, a pooling layer, and a fully connected layer, which are used to extract the spatial features of the data, as follows: The convolution layer performs convolution operations, specifically: h u =f(w·x u:u+k′-1 +b) Among them, x u:u+k′-1 is the local area of ​​the synchronized data sequence, w is the convolution kernel, b is the bias term, and f is the activation function; Output features: H = [h1,h2,...,h u ,...,h N-k′+1 ] Among them, k′ is the size of the convolution kernel; The pooling layer performs pooling operations, specifically: p u =pooling(h u:u+s-1 ) Among them, h u:u+s-1 is the pooling area, pooling is the pooling function, and s is the size of the pooling kernel; Output pooling result: P=[p1,p2,...,p u ,...,p N-s+1 ]。 4. According to the method of claim 1, the time synchronization method of the substation gateway meter terminal based on the use and collection system is characterized in that: The time synchronization calibration model is constructed based on the reinforcement learning model, specifically: The state space includes the features of the synchronization data and the features of the environment data, and encodes the synchronization data features and the environment data features into state representations that can be processed by the model; The action space includes the adjustment parameters of time synchronization calibration, and the reward function is designed to measure the performance of the model in the time synchronization calibration task: At each time step t, the agent takes the current state s t Select action a t , after executing the action, the environment transfers to the next state s t+1 , and receive a reward t , the framework of reinforcement learning is expressed as: s t ,a r →r t ,s t+1 ; The reward function is a combination of the time synchronization error function and the function of environmental data stability: R(s t ,a t )=α·E(s t ,a t )+β·S(s t ,a t ); Among them, E(s t , a t )=-Δt is the time synchronization error function, S(s t ,a t )=-σ 2 is the stability function of environmental data; Δt represents the time synchronization error; σ 2 is the variance of environmental data; α, β are weight coefficients.

5. According to the method of claim 1, the time synchronization method of the substation gateway meter terminal based on the use and collection system is characterized in that: The training of the time synchronization calibration model is as follows: According to the processed training data set, samples of synchronization data features and environment data features are included, and each sample contains information about the input state, the selected action, the reward, and the next state; Use a deep neural network as the estimator of the Q function. The input is the state feature, and the output is the Q value of each possible action. A multi-layer fully connected neural network structure is used. Use the Q-learning algorithm to update the Q value. The update rules are as follows: Q(s t ,a t )←Q(s t ,a t )+α′·(r t +γ·maxQ(s t+1 ,a)-Q(s t ,a t )); Among them, Q(s t ,a t ) is the state-action pair (s t ,a t )’s Q value; α′ is the learning rate, γ is the discount factor, maxQ(s t+1 ,a) is the maximum Q value of the action that can be selected in the next state, r t For one bonus point; Use experience replay technology to randomly extract samples from the experience pool for training to reduce the correlation between samples; Use the target network to stabilize the training process and regularly update the parameters of the target network; In each training cycle, an action is selected according to the current state, the Q value is updated, and the training cycle is repeated until convergence to obtain a trained time synchronization calibration model.

6. A substation gateway meter terminal time synchronization system based on a user acquisition system, characterized in that: It includes a data acquisition unit, a data transmission unit and a central processing server; the central processing server is composed of a preprocessing module, a feature extraction module and a time synchronization calibration module; The data acquisition unit includes sensors and data acquisition equipment deployed at the substation gateway meter terminal to collect synchronous time data and environmental data; The data transmission unit adopts an improved MQTT data transmission protocol to transmit the collected data to a central processing server; The preprocessing module preprocesses the collected data; The feature extraction module extracts features from different types of data, and uses the attention mechanism to fuse the extracted features, integrate information from different data sources, and construct a training data set, as follows: The convolutional neural network (CNN) is used to extract the temporal features of the synchronization data, and the recurrent neural network (RNN) is used to extract the temporal features of the environmental data; Assume that the synchronization data sequence X = {x1, x2, ..., x N }, environment data sequence Y = {y1,y2,..,y N }; Then the timing characteristics of the synchronous data are F CNN =CNN(X); the temporal characteristics of environmental data are F RNN =RNN(X); The attention mechanism is used to fuse the extracted features, integrate information from different data sources, and construct a training dataset: Calculate the attention weights: e ij =v T tanh(W f F CNN +W g F RNN +b) Among them, e ij is the result of attention weight calculation, which indicates the correlation between the i-th CNN feature and the j-th RNN feature; v is the learned weight matrix, which is used to adjust the scaling and translation of the attention score; W f , W g is the learned weight matrix used for linear transformation features, and b is the bias term; Normalized attention weights: The features extracted by CNN and RNN are weighted and fused through attention weights to obtain the final fused features: Among them, F ij represents the extracted feature vector; The time synchronization calibration module analyzes the data collected in real time and provides accurate time synchronization calibration results; The time synchronization calibration model is constructed based on a reinforcement learning model and is trained based on a training data set.

7. A substation gateway meter terminal time synchronization system based on a user acquisition system according to claim 6, characterized in that: The improved MQTT data transmission protocol is as follows: Select the appropriate QoS level based on the importance and real-time requirements of the data, including at least once delivery, at most once delivery, or only once delivery; Configure a persistent connection on the MQTT Client to ensure that the device remains connected to the MQTT Broker and reduce the overhead of connection and disconnection; Configure the will message content and subject, and set the will message when the device is connected to ensure that the message can still be received when the device is abnormally offline; Sensors and data acquisition devices deployed at the substation gateway terminals publish data messages to the MQTT Broker, which delivers messages according to the configured QoS level; The central processing server subscribes to data messages, receives and processes data; when the device is abnormally offline, the MQTT Broker sends the configured will message to the subscriber.

8. The substation gateway meter terminal time synchronization system based on the use and collection system according to claim 6 is characterized in that: The CNN consists of a convolutional layer, a pooling layer, and a fully connected layer, which are used to extract the spatial features of the data, as follows: The convolution layer performs convolution operations, specifically: h u =f(w·x u:u+k′-1 +b) Among them, x u:u+k′-1 is the local area of ​​the synchronized data sequence, w is the convolution kernel, b is the bias term, and f is the activation function; Output features: H = [h1,h2,...,h u ,...,h N-k′+1 ] Among them, k′ is the size of the convolution kernel; The pooling layer performs pooling operations, specifically: p u =pooling(h u:u+s-1 ) Among them, h u:u+s-1 is the pooling area, pooling is the pooling function, and s is the size of the pooling kernel; Output pooling result: P=[p1,p2,...,p u ,...,p N-s+1 ]。 9. The substation gateway meter terminal time synchronization system based on the use and collection system according to claim 6 is characterized in that: The time synchronization calibration model is constructed based on the reinforcement learning model, specifically: The state space includes the features of the synchronization data and the features of the environment data, and encodes the synchronization data features and the environment data features into state representations that can be processed by the model; The action space includes the adjustment parameters of time synchronization calibration, and the reward function is designed to measure the performance of the model in the time synchronization calibration task: At each time step t, the agent takes the current state s t Select action a t , after executing the action, the environment transfers to the next state s t+1 , and receive a reward t , the framework of reinforcement learning is expressed as: s t ,a t →r t ,s t+1 ; The reward function is a combination of the time synchronization error function and the function of environmental data stability: R(s t ,a t )=α·E(s t ,a t )+β·S(s t ,a t ); Among them, E(s t , a t )=-Δt is the time synchronization error function, S(s t ,a t )=-σ 2 is the stability function of environmental data; Δt represents the time synchronization error; σ 2 is the variance of environmental data; α, β are weight coefficients.

10. A substation gateway meter terminal time synchronization system based on a user acquisition system according to claim 9, characterized in that: The training of the time synchronization calibration model is as follows: According to the processed training data set, samples of synchronization data features and environment data features are included, and each sample contains information about the input state, the selected action, the reward, and the next state; Use a deep neural network as the estimator of the Q function. The input is the state feature, and the output is the Q value of each possible action. A multi-layer fully connected neural network structure is used. Use the Q-learning algorithm to update the Q value. The update rules are as follows: Q(s t ,a t )←Q(s t ,a t )+α′·(r t +γ·maxQ(s t+1 ,a)-Q(s t ,a t )); Among them, Q(s t ,a t ) is the state-action pair (s t ,a t )’s Q value; α′ is the learning rate, γ is the discount factor, maxQ(s t+1 ,a) is the maximum Q value of the action that can be selected in the next state, r t For one bonus point; Use experience replay technology to randomly extract samples from the experience pool for training to reduce the correlation between samples; Use the target network to stabilize the training process and regularly update the parameters of the target network; In each training cycle, an action is selected according to the current state, the Q value is updated, and the training cycle is repeated until convergence to obtain a trained time synchronization calibration model.