Electric energy metering data communication method and device, storage medium and communication transmission system
By calculating the entropy of each communication link in the communication network, data compression and unpacking are performed, and sub-data packets are dynamically allocated. Combined with the encrypted communication protocol, the problems of delay and insufficient security during power metering data transmission are solved, and efficient, secure and reliable data transmission is achieved.
Patent Information
- Application Number
- CN202510210218.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-05-09
AI Technical Summary
In the prior art, the transmission delay of the power metering data is relatively long, and there is a risk of data leakage and tampering, the transmission efficiency is low, and it is susceptible to interference to lead to packet loss or delay jitter, which seriously affects the effect of on-site application.
By calculating the entropy of the short message used by each communication link in the communication network to transmit the power metering data packet, the compressible space of the short message is determined, and the data packet is compressed to obtain the compressed data packet. The compressed data packet is unpacked using the unpacking decision function, several sub-data packets are obtained, and dynamically allocated to each communication link, and sent to the main station of the user service center at the sending rate. At the same time, an encrypted secure communication protocol is used to ensure the confidentiality, integrity and reliability of data.
It reduces the transmission delay of power metering data, improves transmission efficiency and link stability, ensures data security and reliability, and is suitable for application scenarios of high real-time and distributed meter.
Smart Images

Figure CN119967370A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric energy metering and intelligent communication, and in particular to an electric energy metering data communication method, device, storage medium and communication transmission system. Background Art
[0002] As the core of electric energy metering devices, electric energy meters and mutual inductors are the only two devices in the power grid that can sense electric power parameters. Their accurate and reliable operation is related to the fairness and justice of electricity trade settlement for thousands of households. Therefore, they have long been included in the national mandatory inspection catalog. Manual periodic inspections must be carried out as required to detect and replace abnormal equipment.
[0003] The rapid development of smart grids has put forward higher requirements for the real-time, security and reliability of electricity metering data. As the core equipment for electricity trade settlement, the accurate collection and efficient transmission of metering data of electricity meters directly affect the efficiency of grid operation and user fairness. At present, the communication transmission of metering data mainly relies on the following technologies:
[0004] (1) Wired communication (such as RS-485 and power line carrier communication): This type of technology uses physical lines to achieve data transmission and has high stability, but the deployment cost is high and the scalability is poor, especially in remote areas or complex terrains. In addition, the lines are easily affected by environmental interference and have high maintenance costs, which cannot meet the real-time data collection needs of large-scale distributed meters.
[0005] (2) Cellular network wireless communication (such as GPRS, 4G / 5G): Dependent on the operator's network coverage, communication interruptions are prone to occur in areas with weak signals (such as mountainous areas and underground distribution rooms), resulting in data loss. At the same time, public cellular networks have data security risks, such as unencrypted plaintext transmissions that may be stolen or tampered with. In addition, network congestion delays fluctuate greatly (usually 100ms to several seconds), making it difficult to meet the needs of high real-time scenarios.
[0006] (3) Low-power wide area network technology (such as LoRa and NB-IoT): Although it is suitable for long-distance low-power transmission, the bandwidth is limited (for example, NB-IoT only transmits a few dozen bytes at a time), and the metering data needs to be sent in multiple packets, which significantly increases the transmission delay. For example, the patent application document with publication number CN119310518A proposes uploading metering data to the cloud database through the NB-IoT communication module for loss compensation to ensure data integrity and metering accuracy. However, due to interference factors, high latency or even packet loss may occur.
[0007] (4) Beidou short message communication: The Beidou satellite system has a wide coverage range and is suitable for scenarios without ground network coverage. For example, the patent application document with publication number CN106059848A proposes to use Beidou short messages to realize power data collection and transmission. However, short message transmission is not optimized for electricity metering data. It adopts a fixed packetization strategy, resulting in redundant data occupying limited bandwidth (a single message is only 78 bytes) and low transmission efficiency. In addition, the existing Beidou communication protocol lacks an end-to-end encryption mechanism, and data transmission in plain text is easy to be intercepted, resulting in insufficient security.
[0008] Therefore, the energy metering data collection and communication method in the prior art has the risk of data leakage and tampering because it does not protect the data. In addition, the traditional packetization strategy does not dynamically adapt to the network status, and redundant data occupies bandwidth, resulting in low transmission efficiency (such as multiple interactions are required for a single transmission of Beidou short messages). The transmission delay is high, and the link transmission delay is not optimized. It relies on fixed links and does not dynamically select the optimal path based on the real-time network quality. It is easily affected by interference, resulting in packet loss or delay jitter, which seriously affects the on-site application effect. Summary of the invention
[0009] The technical problem to be solved by the present invention is how to reduce the transmission delay of electric energy metering data.
[0010] The present invention solves the above technical problems by the following technical means:
[0011] A method for communicating electric energy metering data is proposed, the method comprising:
[0012] Calculate the entropy of a short message used to transmit an electric energy metering data packet in each communication link in the communication network;
[0013] Determine the compressible space of the short message based on the entropy of the short message, and compress the data packet to obtain a compressed data packet;
[0014] Using the unpacking decision function to unpack the compressed data packet to obtain several sub-data packets;
[0015] Several sub-data packets are dynamically allocated to each communication link and sent to the user service center main station according to the sending rate.
[0016] Furthermore, the step of calculating the entropy of a short message used to transmit an electric energy metering data packet in each communication link in the communication network includes:
[0017] Using Shannon's theorem, the entropy of the ith communication link used to transmit the energy metering data packet is calculated as:
[0018]
[0019] In the formula, x i Represents the electric energy metering data, λi represents the compression strength coefficient of the data on the i-th communication link, P i Indicates the probability that there is compressible space in the data packet, N i It represents the number of symbols in the data transmitted by the i-th communication link, j represents the number of judgments, and the size of the information entropy is accurately counted by traversing all the symbols in the data.
[0020] Furthermore, the calculation formula of the compression strength coefficient is:
[0021]
[0022] Where, L i is the current network load of the ith communication link, M i is the size of the data packet transmitted on the i-th link, BW i is the current available bandwidth of the i-th communication link.
[0023] Furthermore, the compressed data packet is unpacked using the unpacking decision function to obtain a plurality of sub-data packets, including:
[0024] The unpacking decision function is used to calculate the unpacking index, and the formula is expressed as:
[0025] Φ i =α·(1-L i )+β·U i +γ·Q i
[0026] In the formula, Φ i is the unpacking index of the ith communication link, L i is the current network load of the ith communication link, U i is the data urgency, Q i is the link quality index, α, β, γ are weight coefficients respectively;
[0027] Based on the unpacking index of the ith communication link, unpack the compressed data packet transmitted on the ith communication link to determine the unpacking size M′ corresponding to the ith communication link i :
[0028]
[0029] Where M max is the maximum allowed unpacking size, is the upward rounding function, tanh() is the hyperbolic tangent function;
[0030] According to the unpacking size M' i The compressed data packet is unpacked to obtain several sub-data packets.
[0031] Furthermore, the link quality index is a set of link quality indexes fed back by the user service center master station [Q i ], the link quality indexes in the link quality index set are arranged in ascending order, Q i is the link quality index of the ith communication link, and the calculation formula is:
[0032]
[0033] Where RTT i is the round trip delay of the ith communication link, BW i is the current available bandwidth of the ith communication link, BW max is the maximum value of the available bandwidth of the ith communication link, LossRate i is the link packet loss rate, δ, ε, ∈ are weight coefficients respectively.
[0034] Furthermore, the dynamically allocating a plurality of sub-data packets to each communication link and sending them to the user service center main station according to the sending rate includes:
[0035] receiving a sending rate fed back by the user service center master station;
[0036] Dynamically assigning a number of sub-data packets to each communication link and sending them to the user service center main station according to the sending rate;
[0037] The calculation formula of the sending rate is:
[0038]
[0039] Where Rnew is the current updated sending rate of the user service center master station, Rold is the old sending rate, and L i is the current network load of the ith communication link, Lthreshold is the load threshold, and Lmax is the maximum load.
[0040] Furthermore, the dynamically allocating a plurality of sub-data packets to each communication link and sending them to the user service center main station according to the sending rate includes:
[0041] According to the congestion window set [CWND i ] and the link quality index set [Q i ] Dynamically allocate several sub-packets to each communication link, and the formula is expressed as:
[0042]
[0043] Where k is the number of sub-packets to be transmitted, CWND n is the congestion window of the nth communication link, Qn-1 is the link quality index of the n-1th communication link, Q n is the link quality index of the nth communication link.
[0044] Furthermore, before dynamically allocating the plurality of sub-data packets to the communication links and sending them to the user service center main station at the sending rate, the method further includes:
[0045] Sending an identity request to a user service center main station, the identity request carrying a first digital certificate, so that the user service center main station verifies the first digital certificate;
[0046] Receiving a second digital certificate returned by the user service center main station and verifying the second digital certificate, wherein the second digital certificate is returned when the user service center main station verifies the first digital certificate;
[0047] When the second digital certificate is verified, a symmetric encryption key is generated with the user service center main station through the Diffie-Hellman protocol.
[0048] Furthermore, the method of dynamically allocating a plurality of sub-data packets to each communication link and sending them to the user service center main station at a sending rate also includes:
[0049] Encrypting the sub-data packet using the symmetric encryption key and calculating a hash value of the sub-data packet;
[0050] The encrypted data, hash value, sub-packet number, total number of packets, data identification, data type encoding, and key ID are encapsulated in the protocol frame according to the communication protocol format and sent to the user service center main station at the sending rate.
[0051] In addition, the present invention also proposes an electric energy metering data communication device, comprising:
[0052] A message entropy calculation module, used to calculate the entropy of a short message used to transmit an electric energy metering data packet in each communication link in the communication network;
[0053] A compression module, used for determining the compressible space of the short message based on the entropy of the short message, and compressing the data packet to obtain a compressed data packet;
[0054] The unpacking module is used to unpack the compressed data packet using the unpacking decision function to obtain a number of sub-data packets;
[0055] The data sending module is used to dynamically allocate several sub-data packets to each communication link and send them to the user service center main station according to the sending rate.
[0056] In addition, the present invention also proposes a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the electric energy metering data communication method as described above is implemented.
[0057] In addition, the present invention also proposes an electric energy metering data communication transmission system, including a data acquisition module, a user service center main station and an electric energy metering data communication device, the output of the data acquisition module is connected to the electric energy metering data communication device, and the electric energy metering data communication device is connected to the user service center main station;
[0058] The data acquisition module is used to collect electric energy metering data;
[0059] The electric energy metering data communication device is used to execute the electric energy metering data communication method as described above;
[0060] The user service center main station is used to receive the electric energy metering data packet sent by the electric energy metering data communication device.
[0061] Furthermore, the user service center main station includes:
[0062] A decryption module, used for decrypting the electric energy metering data packet using a pre-shared symmetric encryption key;
[0063] A hash verification module is used to verify the hash value carried by the electric energy metering data packet;
[0064] The storage module is used to store the electric energy metering data packets.
[0065] Furthermore, the user service center main station also includes:
[0066] The data low-latency transmission control module is used to evaluate the link quality index of each communication link and the transmission rate of each communication link and feed back to the electric energy metering data communication device.
[0067] Furthermore, the user service center main station also includes:
[0068] The execution module is used for error monitoring, status evaluation, and operation and maintenance management based on electric energy metering data.
[0069] The advantages of the present invention are:
[0070] (1) The present invention addresses the problem of redundant information in electric energy metering data messages. Under the premise that the data is not distorted, the redundant data is deleted as much as possible, and reasonable unpacking is performed according to the size of the data packet, thereby providing a guarantee for reducing the transmission delay of Beidou message data.
[0071] (2) A low-latency data transmission algorithm based on link selection and rate adjustment is adopted at the main station of the user service center to regulate the entire electric energy metering data transmission process, thereby reducing the data transmission delay while increasing the link stability.
[0072] (3) An encrypted secure communication protocol is used between the communication device and the user service center master station to transmit the electric energy metering data, ensuring the confidentiality, integrity and reliability of the electric energy metering data transmission.
[0073] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 It is a flow chart of an electric energy metering data communication method proposed in one embodiment of the present invention;
[0075] Figure 2 is a schematic diagram of a frame format structure of a communication protocol in one embodiment of the present invention;
[0076] Figure 3 It is a structural schematic diagram of an electric energy metering data communication device proposed in one embodiment of the present invention;
[0077] Figure 4 It is a structural schematic diagram of an electric energy metering data communication transmission system proposed in one embodiment of the present invention. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0079] like Figure 1 As shown, the first embodiment of the present invention provides an electric energy metering data communication method, the method comprising the following steps:
[0080] S10, calculating the entropy of the short message used to transmit the electric energy metering data packet in each communication link in the communication network;
[0081] S20, determining the compressible space of the short message based on the entropy of the short message, and compressing the data packet to obtain a compressed data packet;
[0082] It should be noted that, in this embodiment, the Beidou short message form is specifically adopted to transmit the electric energy metering data packet, and the electric energy metering data contained in the electric energy metering data packet includes voltage, current, harmonics and other data.
[0083] Due to the problem of redundant information in the short message of electricity metering data (for example, reducing input by deleting it through message compression, for example, the original data is ABABABAB, which can be compressed to 4AB), redundant data is deleted as much as possible without distortion of the data, and the short message is compressed to reduce data transmission delay.
[0084] S30, unpacking the compressed data packet using an unpacking decision function to obtain a plurality of sub-data packets;
[0085] It should be noted that, in this embodiment, the compressed data packet is unpacked to adjust the size of the electric energy metering data packet to adapt to the data transmission characteristics of the electric energy metering network and shorten the data transmission time.
[0086] S40, dynamically allocating a number of sub-data packets to each communication link and sending them to the user service center main station according to the sending rate.
[0087] As a further preferred technical solution, the step S10: calculating the entropy of the short message used to transmit the electric energy metering data packet in each communication link in the communication network specifically includes the following steps:
[0088] The entropy of the short message used to transmit the energy metering data packet on each communication link is calculated using Shannon's theorem:
[0089]
[0090] In the formula, x i Represents the electric energy metering data, λ i represents the compression strength coefficient of the i-th link data, P i Indicates the probability that there is compressible space in the data packet, N i represents the number of symbols in the i-th link data, and j represents the number of decisions.
[0091] It should be noted that this embodiment uses Shannon's theorem to count the information in Beidou data and calculates the entropy of each Beidou short message data, so as to determine the compressible space in the existing short message. The entropy of the calculated short message is The larger the value is, the larger the compressible space of the short message is. The data packet can be compressed according to the compressible space of the short message to obtain a compressed data packet.
[0092] Preferably, the calculation formula of the compression strength coefficient is:
[0093]
[0094] Where, L i is the current network load of the ith communication link, M i is the size of the initial data packet transmitted on the i-th link (subsequent depacketization is based on the initial data packet), M′ i BW is the amount of data that can be compressed for the data packet transmitted on the i-th link. i is the current available bandwidth of the ith communication link (unit: Mbps).
[0095] It should be noted that the current network load L of the i-th communication link i The value range is [0,1]. When L=0, it means the network is idle, and when L=1, it means the network is fully loaded. i When it is higher (such as L i >0.8), increase the compressive strength λ i To reduce the amount of data transmission; when L i When it is low (such as L i <0.2), reduce the compressive strength λ i In order to retain more data details, it reduces transmission delay and ensures that the content is not distorted.
[0096] As a further preferred technical solution, the step S30: unpacking the compressed data packet using the unpacking decision function to obtain a plurality of sub-data packets specifically includes the following steps:
[0097] S31. Calculate the unpacking index using the unpacking decision function, and the formula is expressed as:
[0098] Φ i =α·(1-L i )+β·U i +γ·Q i
[0099] In the formula, Φ i is the unpacking index of the ith communication link, L i is the current network load of the ith communication link, U i is the data urgency, Q i is the link quality index, α, β, γ are weight coefficients respectively;
[0100] Specifically, this embodiment divides the abnormal level of the electric energy metering data according to indicators such as voltage sag and harmonic exceeding the standard, and determines the emergency level U of the electric energy metering data. i , data urgency U i Divided into 1 to 5 levels, U i =level / 5; weight coefficients α, β, γ are dynamically optimized through reinforcement learning to satisfy 0≤α, β, γ≤1; α+β+γ=1, and their initial values are set as α=0.5, β=0.3, γ=0.2.
[0101] It should be noted that according to the unpacking index Φ of the communication link i The size of the energy metering data packet is adjusted in real time to adapt to the network load and data urgency during energy metering network data transmission, and high-bandwidth, low RTT links are preferred, thereby shortening the data transmission time.
[0102] S32, unpacking the compressed data packet transmitted on the i-th communication link based on the unpacking index of the i-th communication link, and determining the unpacking size M′ corresponding to the i-th communication link i :
[0103]
[0104] Where M max is the maximum allowed unpacking size, is the upward rounding function, tanh() is the hyperbolic tangent function;
[0105] Specifically, when Φ i >0.8 (network idle, data urgent, link stable), M′ i Close to M max , reduce the number of unpacking to reduce protocol overhead; when Φ i <0.3 (network congestion, normal data, link fluctuation), M′ i Nearly 0.5M max , increase unpacking redundancy to improve reliability.
[0106] S33, according to the unpacking size M' i The compressed data packet is unpacked to obtain several sub-data packets.
[0107] It should be noted that this embodiment adjusts the unpacking size in real time based on the designed unpacking decision function, which can take into account both transmission efficiency and reliability.
[0108] As a further preferred technical solution, the link quality index is a link quality index set [Q i ], the link quality indexes in the link quality index set are arranged in ascending order, Q i is the link quality index of the ith communication link, and the calculation formula is:
[0109]
[0110] Where RTT i is the round trip delay of the ith communication link, BW i is the current available bandwidth of the ith communication link, BW max is the maximum value of the available bandwidth of the ith communication link, LossRatei is the link packet loss rate, δ,ε,∈ are weight coefficients respectively.
[0111] It should be noted that the weight coefficients δ, ε, ∈ satisfy δ+ε+∈=1, set as δ=0.5, ε=0.3, ∈=0.2, and can be adjusted according to actual needs. If the electric energy metering data has high real-time requirements, δ should be given a higher weight. If large-capacity data needs to be transmitted, ε needs to be increased. If it is in a scene with severe interference (such as mountainous areas), ∈ needs to be increased. This embodiment can make a more accurate description of link quality through multi-dimensional quantitative evaluation (considering comprehensive evaluation of delay, bandwidth and packet loss rate) and dynamic weight adaptation, which is particularly suitable for the high real-time and high-reliability transmission requirements of electric energy metering data.
[0112] Since the various parameters required for calculating the link quality can only be obtained after the data is transmitted from the communication unit to the user service center main station, in this embodiment, the user service center main station calculates the link quality index and arranges the link quality index in ascending order to generate the final link quality set [Q i ].
[0113] As a further preferred technical solution, the step S40: dynamically allocating a number of sub-data packets to each communication link and sending them to the user service center main station according to the sending rate, specifically includes the following steps:
[0114] S41, receiving the sending rate fed back by the user service center master station;
[0115] S42, dynamically allocating a number of sub-data packets to each communication link and sending them to the user service center main station according to the sending rate;
[0116] The calculation formula of the sending rate is:
[0117]
[0118] Where Rnew is the current updated sending rate of the user service center master station, Rold is the old sending rate, and L i is the current network load of the ith communication link, Lthreshold is the load threshold, and Lmax is the maximum load.
[0119] It should be noted that the user service center main station uses the INT (In-Network Telemetry)-based congestion control algorithm to record accurate path load information through the switch, and transmits this information back to the sender through the ACK packet, thereby guiding the sender to make accurate rate adjustments. iDynamically adjust the data packet sending rate of the Beidou communication unit. If the load is low, increase the transmission rate for fast transmission; otherwise, reduce the rate to avoid packet loss and delay caused by congestion. This method can significantly improve the transmission efficiency and reduce delay of the data communication network for data energy metering.
[0120] As a further preferred technical solution, the step S42: dynamically allocating a number of sub-data packets to each communication link and sending them to the user service center main station according to the sending rate, specifically includes:
[0121] According to the congestion window set [CWND i ] and the link quality index set [Q i ] Dynamically allocate several sub-packets to each communication link, and the formula is expressed as:
[0122]
[0123] Where k is the number of sub-packets to be transmitted, CWND n is the congestion window of the nth communication link, Q n-1 is the link quality index of the n-1th communication link, Q n is the link quality index of the nth communication link.
[0124] Assuming that k electric energy metering data packets need to be transmitted, the above formula is used to determine whether the nth link is used to transmit the data packet. If the conditions are met, the data packet is allocated to the nth link; otherwise, the n-1th link is judged in turn until all allocations are completed.
[0125] It should be noted that, in this embodiment, [Q i ]Prefer high-bandwidth, low RTT electricity metering data transmission links to reduce transmission time.
[0126] As a further preferred technical solution, before the step S40: dynamically allocating a plurality of sub-data packets to each communication link and sending them to the user service center main station at a sending rate, the method further includes the following steps:
[0127] Sending an identity request to a user service center main station, the identity request carrying a first digital certificate, so that the user service center main station verifies the first digital certificate;
[0128] Receiving a second digital certificate returned by the user service center main station and verifying the second digital certificate, wherein the second digital certificate is returned when the user service center main station verifies the first digital certificate;
[0129] When the second digital certificate is verified, a symmetric encryption key is generated with the user service center main station through the Diffie-Hellman protocol.
[0130] It should be noted that before transmitting the energy metering data, the Beidou communication device first sends an identity request to the user service center master station, with its first digital certificate attached. The user service center master station verifies the first digital certificate. If the verification is successful, it sends its second digital certificate to the Beidou communication device. The Beidou communication device verifies the digital certificate of the user service center master station. If the verification is successful, the two parties generate a symmetric encryption key through the Diffie-Hellman protocol for encryption and decryption of energy metering data.
[0131] As a further preferred technical solution, the step S40: dynamically allocating a number of sub-data packets to each communication link and sending them to the user service center main station according to the sending rate, further includes:
[0132] Encrypting the sub-data packet using the symmetric encryption key and calculating a hash value of the sub-data packet;
[0133] The encrypted data, hash value, sub-packet number, total number of packets, data identification, data type encoding, and key ID are encapsulated in the protocol frame according to the communication protocol format and sent to the user service center main station at the sending rate.
[0134] It should be noted that the Beidou communication device uses a symmetric encryption key to perform AES-GCM encryption on the data and calculates the SHA-256 hash value of the data. The encrypted data and hash value are then sent together to the user service center main station. After receiving the data, the user service center main station uses the symmetric encryption key to decrypt the data and verify the hash value.
[0135] Specifically, the short message communication protocol between the user service center master station and the Beidou communication device is the basis for ensuring the secure transmission of data. This embodiment first designs the communication protocol of the user service center master station, and its protocol frame format is as follows: Figure 2 shown.
[0136] Among them, the message transmission starts with a fixed-length message header, which contains a protocol header and a data identifier. The protocol header is for compatibility and distinction with the standard Beidou data format, and the data identifier is used to indicate whether the data is compressed or encrypted. The total number of packets can be used to indicate the total number of subpackets. The subpacket number indicates which subpacket the current data packet belongs to. The data type code is used to represent the encoding of different business data, such as temperature, humidity, electric field strength and other data. The number of Beidou users is the real data collected. The hash value field is the SHA-256 hash value used to store data. The key ID field identifies the ID of the symmetric encryption key currently used. Finally, the checksum is calculated to verify the integrity of the data.
[0137] It should be noted that the communication protocol designed in this embodiment is intended to improve the communication security between the Beidou communication module and the user service center main station, and to ensure the confidentiality, integrity and reliability of electricity metering data transmission by introducing mechanisms such as data encryption, identity authentication, and data integrity verification.
[0138] In addition, if Figure 3 As shown, another embodiment of the present invention provides an electric energy metering data communication device, the device comprising:
[0139] The message entropy calculation module 10 is used to calculate the entropy of the short message used to transmit the electric energy metering data packet in each communication link in the communication network;
[0140] A compression module 20, used to determine the compressible space of the short message based on the entropy of the short message, and compress the data packet to obtain a compressed data packet;
[0141] The unpacking module 30 is used to unpack the compressed data packet using the unpacking decision function to obtain a plurality of sub-data packets;
[0142] The data sending module 40 is used to dynamically allocate a number of sub-data packets to each communication link and send them to the user service center main station according to the sending rate.
[0143] As a further preferred technical solution, the message entropy calculation module 10 is used to calculate the entropy of each communication link used to transmit the energy metering data packet using Shannon's theorem:
[0144]
[0145] In the formula, x i Represents the electric energy metering data, λ i represents the compression strength coefficient of the data on the i-th communication link, P i Indicates the probability that there is compressible space in the data packet, N i It represents the number of symbols in the data transmitted by the i-th communication link, j represents the number of judgments, and the size of the information entropy is accurately counted by traversing all the symbols in the data.
[0146] As a further preferred technical solution, the calculation formula of the compression strength coefficient is:
[0147]
[0148] Where, L i is the current network load of the ith communication link, M i is the size of the data packet transmitted on the i-th link, BW i is the current available bandwidth of the i-th communication link.
[0149] As a further preferred technical solution, the unpacking module 30 specifically includes:
[0150] The unpacking index calculation unit is used to calculate the unpacking index using the unpacking decision function. The formula is expressed as:
[0151] Φ i =α·(1-L i )+β·U i +γ·Q i
[0152] In the formula, Φ i is the unpacking index of the ith communication link, L i is the current network load of the ith communication link, U i is the data urgency, Q i is the link quality index, α, β, γ are weight coefficients respectively;
[0153] The unpacking size calculation unit is used to unpack the compressed data packet transmitted on the i-th communication link based on the unpacking index of the i-th communication link, and determine the unpacking size M′ corresponding to the i-th communication link i :
[0154]
[0155] Where M max is the maximum allowed unpacking size, is the upward rounding function, tanh() is the hyperbolic tangent function;
[0156] Unpacking unit, used to unpack according to the size M' i The compressed data packet is unpacked to obtain several sub-data packets.
[0157] As a further preferred technical solution, the link quality index is a link quality index set [Q i ], the link quality indexes in the link quality index set are arranged in ascending order, Q i is the link quality index of the ith communication link, and the calculation formula is:
[0158]
[0159] Where RTT i is the round trip delay of the ith communication link, BW i is the current available bandwidth of the ith communication link, BW max is the maximum value of the available bandwidth of the ith communication link, LossRate i is the link packet loss rate, δ, ε, ∈ are weight coefficients respectively.
[0160] As a further preferred technical solution, the data sending module 40 specifically includes:
[0161] A rate receiving unit, used to receive the sending rate fed back by the user service center master station;
[0162] A data packet sending unit, used to dynamically allocate a number of sub-data packets to each communication link and send them to the user service center main station according to the sending rate;
[0163] The calculation formula of the sending rate is:
[0164]
[0165] Where Rnew is the current updated sending rate of the user service center master station, Rold is the old sending rate, and L i is the current network load of the ith communication link, Lthreshold is the load threshold, and Lmax is the maximum load.
[0166] As a further preferred technical solution, the data packet sending unit is specifically used to:
[0167] According to the congestion window set [CWND i ] and the link quality index set [Q i ] Dynamically allocate several sub-packets to each communication link, and the formula is expressed as:
[0168]
[0169] Where k is the number of sub-packets to be transmitted, CWND n is the congestion window of the nth communication link, Q n-1 is the link quality index of the n-1th communication link, Q n is the link quality index of the nth communication link.
[0170] As a further preferred technical solution, the device further includes:
[0171] A request unit, configured to send an identity request to a user service center main station, wherein the identity request carries a first digital certificate, so that the user service center main station verifies the first digital certificate;
[0172] A certificate verification unit, used for receiving a second digital certificate returned by the user service center main station and verifying the second digital certificate, wherein the second digital certificate is returned when the user service center main station verifies the first digital certificate;
[0173] The key generation unit is used to generate a symmetric encryption key through the Diffie-Hellman protocol with the user service center main station when the second digital certificate is verified.
[0174] As a further preferred technical solution, the data packet sending unit is further specifically used for:
[0175] An encryption subunit, used to encrypt the sub-data packet using the symmetric encryption key and calculate the hash value of the sub-data packet;
[0176] The encapsulation and sending subunit is used to encapsulate the encrypted data, hash value, subpacket number, total number of packets, data identification, data type code, and key ID into a protocol frame according to the communication protocol format, and then send it to the user service center main station at the sending rate.
[0177] It should be noted that other embodiments or specific implementation methods of the electric energy metering data communication device of the present invention can refer to the above-mentioned method embodiments, which will not be described in detail here.
[0178] In addition, another embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the electric energy metering data communication method described in the above embodiment is implemented.
[0179] In addition, if Figure 4 As shown, another embodiment of the present invention further proposes an electric energy metering data communication transmission system, including a data acquisition module, a user service center main station and an electric energy metering data communication device, the output of the data acquisition module is connected to the electric energy metering data communication device, and the electric energy metering data communication device is connected to the user service center main station;
[0180] The data acquisition module 100 is used to collect electric energy metering data;
[0181] The electric energy metering data communication device 200 is used to execute the electric energy metering data communication method described in the above embodiment;
[0182] The user service center main unit 300 is used to receive the electric energy metering data packet sent by the electric energy metering data communication device.
[0183] As a further preferred technical solution, a secure communication channel needs to be established before the electric energy metering data communication device 200 and the user service center master station 300 communicate with each other, specifically:
[0184] The electric energy metering data communication device 200 sends an identity request to the user service center main station 300, wherein the identity request carries the first digital certificate, so that the user service center main station 300 verifies the first digital certificate;
[0185] The electric energy metering data communication device 200 receives the second digital certificate returned by the user service center main station 300 and verifies the second digital certificate, wherein the second digital certificate is returned when the user service center main station 300 verifies the first digital certificate successfully;
[0186] When the second digital certificate is verified, the electric energy metering data communication device 200 and the user service center master station 300 generate a symmetric encryption key through the Diffie-Hellman protocol.
[0187] The electric energy metering data communication device 200 uses AES-GCM to encrypt data, calculates the SHA-256 hash value, encapsulates the protocol frame (including encrypted data, hash value, key ID and other fields), and sends it to the user service center main station 300 at the sending rate.
[0188] The user service center main station 300 receives the encrypted data packet, decrypts the electric energy metering data packet using the pre-shared symmetric encryption key, and then verifies the hash value carried by the electric energy metering data packet. After the verification is passed, the electric energy metering data packet is stored in the database.
[0189] As a further preferred technical solution, the user service center main station 300 also includes:
[0190] The data low-latency transmission control module is used to evaluate the link quality index of each communication link and the transmission rate of each communication link and feed back to the electric energy metering data communication device.
[0191] Specifically, the process of calculating the link quality index and the process of calculating the sending rate by the user service center main station 300 are detailed in the above embodiment.
[0192] Specifically, the data acquisition module 100 is used to collect electric energy metering data and transmit it to the electric energy metering data communication device 200, wherein the electric energy metering data includes parameters such as voltage, current, harmonics, etc.; the electric energy metering data communication device specifically adopts Beidou short message communication. The electric energy metering data communication device 200 transmits the data to the user service center main station 300 through the Beidou satellite link, and there is an encrypted communication protocol between the electric energy metering data communication device 200 and the user service center main station 300. Data compression and unpacking are performed in the electric energy metering data communication device 200, which provides a basis for reducing delays. Then, the user service center main station 300 adopts a low-latency data transmission algorithm based on link selection and rate adjustment to regulate the entire process, thereby reducing the delay of data during the communication process. The collected data is then further processed and applied (error monitoring, status evaluation, operation and maintenance management, etc.).
[0193] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0194] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0195] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0196] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0197] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for communicating electric energy metering data, characterized in that: include: Calculate the entropy of a short message used to transmit an electric energy metering data packet in each communication link in the communication network; Determine the compressible space of the short message based on the entropy of the short message, and compress the data packet to obtain a compressed data packet; Using the unpacking decision function to unpack the compressed data packet to obtain several sub-data packets; Several sub-data packets are dynamically allocated to each communication link and sent to the user service center main station according to the sending rate.
2. The electric energy metering data communication method according to claim 1, characterized in that: The step of calculating the entropy of a short message used to transmit an electric energy metering data packet in each communication link in the communication network includes: Using Shannon's theorem, the entropy of each communication link used to transmit the energy metering data packet is calculated as: In the formula, x i Represents the electric energy metering data, λ i represents the compression strength coefficient of the data on the i-th communication link, P i Indicates the probability that there is compressible space in the data packet, N i It represents the number of symbols in the data transmitted by the i-th communication link, and j represents the number of determinations.
3. The electric energy metering data communication method according to claim 2, characterized in that: The calculation formula of the compression strength coefficient is: Where, L i is the current network load of the ith communication link, M i is the size of the data packet transmitted on the i-th link, BW i is the current available bandwidth of the i-th communication link.
4. The electric energy metering data communication method according to claim 1, characterized in that: The compressed data packet is unpacked using the unpacking decision function to obtain a plurality of sub-data packets, including: The unpacking decision function is used to calculate the unpacking index, and the formula is expressed as: F i =α·(1-L i )+β·U i +γ·Q i In the formula, Φ i is the unpacking index of the ith communication link, L i is the current network load of the ith communication link, U i is the data urgency, Q i is the link quality index, α, β, γ are weight coefficients respectively; Based on the unpacking index of the ith communication link, unpack the compressed data packet transmitted on the ith communication link to determine the unpacking size M corresponding to the ith communication link i ′: Where M max is the maximum allowed unpacking size, is the upward rounding function, tanh() is the hyperbolic tangent function; According to the unpacking size M i ' Unpack the compressed data packet to obtain several sub-data packets.
5. The electric energy metering data communication method according to claim 4, characterized in that: The link quality index is a set of link quality indexes fed back by the user service center master station [Q i ], the link quality indexes in the link quality index set are arranged in ascending order, Q i is the link quality index of the ith communication link, and the calculation formula is: Where RTT i is the round trip delay of the ith communication link, BW i is the current available bandwidth of the ith communication link, BW max is the maximum value of the available bandwidth of the ith communication link, which is, LossRate i is the link packet loss rate, δ, ε, ∈ are weight coefficients respectively.
6. The electric energy metering data communication method according to claim 1, characterized in that: The method of dynamically allocating a plurality of sub-data packets to each communication link and sending the sub-data packets to the user service center main station according to the sending rate includes: receiving a sending rate fed back by the user service center master station; Dynamically assigning a number of sub-data packets to each communication link and sending them to the user service center main station according to the sending rate; The calculation formula of the sending rate is: Where Rnew is the current updated sending rate of the user service center master station, Rold is the old sending rate, and L i is the current network load of the ith communication link, Lthreshold is the load threshold, and Lmax is the maximum load.
7. The electric energy metering data communication method according to claim 6, characterized in that: The method of dynamically allocating a plurality of sub-data packets to each communication link and sending the sub-data packets to the user service center main station according to the sending rate includes: According to the congestion window set [CWND i ] and the link quality index set [Q i ] Dynamically allocate several sub-packets to each communication link, and the formula is expressed as: Where k is the number of sub-packets to be transmitted, CWND n is the congestion window of the nth communication link, Q n-1 is the link quality index of the n-1th communication link, Q n is the link quality index of the nth communication link.
8. The electric energy metering data communication method according to claim 7, characterized in that: Before dynamically allocating the plurality of sub-data packets to the communication links and sending them to the user service center main station at the sending rate, the method further includes: Sending an identity request to a user service center main station, the identity request carrying a first digital certificate, so that the user service center main station verifies the first digital certificate; Receiving a second digital certificate returned by the user service center main station and verifying the second digital certificate, wherein the second digital certificate is returned when the user service center main station verifies the first digital certificate; When the second digital certificate is verified, a symmetric encryption key is generated with the user service center main station through the Diffie-Hellman protocol.
9. The electric energy metering data communication method according to claim 8, characterized in that: The method of dynamically allocating a plurality of sub-data packets to each communication link and sending the sub-data packets to the user service center main station at a sending rate also includes: Encrypting the sub-data packet using the symmetric encryption key and calculating a hash value of the sub-data packet; The encrypted data, hash value, sub-packet number, total number of packets, data identification, data type encoding, and key ID are encapsulated in the protocol frame according to the communication protocol format and sent to the user service center main station at the sending rate.
10. An electric energy metering data communication device, characterized in that: include: A message entropy calculation module, used to calculate the entropy of a short message used to transmit an electric energy metering data packet in each communication link in the communication network; A compression module, used to determine the compressible space of the short message based on the entropy of the short message, and compress the data packet to obtain a compressed data packet; The unpacking module is used to unpack the compressed data packet using the unpacking decision function to obtain a number of sub-data packets; The data sending module is used to dynamically allocate several sub-data packets to each communication link and send them to the user service center main station according to the sending rate.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the electric energy metering data communication method according to any one of claims 1 to 9 is implemented.
12. An electric energy metering data communication transmission system, characterized in that: It includes a data acquisition module, a user service center main station and an electric energy metering data communication device, wherein the output of the data acquisition module is connected to the electric energy metering data communication device, and the electric energy metering data communication device is connected to the user service center main station; The data acquisition module is used to collect electric energy metering data; The electric energy metering data communication device is used to execute the electric energy metering data communication method according to any one of claims 1 to 9; The user service center main station is used to receive the electric energy metering data packet sent by the electric energy metering data communication device.
13. The electric energy metering data communication transmission system according to claim 12, characterized in that: The user service center main station includes: A decryption module, used for decrypting the electric energy metering data packet using a pre-shared symmetric encryption key; A hash verification module is used to verify the hash value carried by the electric energy metering data packet; The storage module is used to store the electric energy metering data packets.
14. The electric energy metering data communication transmission system according to claim 12, characterized in that: The user service center main station also includes: The data low-latency transmission control module is used to evaluate the link quality index of each communication link and the transmission rate of each communication link and feed back to the electric energy metering data communication device.
15. The electric energy metering data communication transmission system according to claim 12, characterized in that: The user service center main station also includes: The execution module is used for error monitoring, status evaluation, and operation and maintenance management based on electric energy metering data.
Citation Information
Patent Citations
BeiDou short message communication-based electric power data acquisition transmission processing system and method
CN106059848A
Electric quantity loss compensation device and method for abnormal metering of electric energy meter
CN119310518A