A method, system, device and storage medium for transmitting electric meter data

By combining the use of a garbled code library with encryption methods in smart meters and central management systems, the problems of easy key cracking and frequent negotiation are solved, and the secure transmission and efficient communication of electricity consumption data are achieved.

CN119696882BActive Publication Date: 2025-10-03GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411835965.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-10-03
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

In the existing technology, the symmetric key algorithm between smart meters and central management systems is easily cracked after being used for too long, and frequent negotiation of the key algorithm will lead to high performance overhead, affecting communication efficiency and security.

Method used

A method combining a garbled code library and an encryption method is used to encrypt the electricity consumption data into ciphertext before transmission. The transmission status is detected by the server, and the encryption method and garbled code library are updated regularly or irregularly to reduce the frequency of key negotiation.

Benefits of technology

While ensuring the security of electricity usage data, it reduces performance overhead and improves communication efficiency. Through a dynamic update mechanism, the encryption method is adjusted in a timely manner when risks arise, thus balancing security and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119696882B_ABST
    Figure CN119696882B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, device, and storage medium for transmitting electricity meter data. The method includes: the electricity meter encrypts original electricity usage data into target electricity usage data according to a preset encryption method; the electricity meter extracts garbled code data matching the target electricity usage data from a preset garbled code library according to the preset encryption method, places the target electricity usage data into the garbled code data to obtain ciphertext electricity usage data, and transmits the ciphertext electricity usage data to a server; the server reads the target electricity usage data from the ciphertext electricity usage data according to the encryption method, and decrypts the target electricity usage data into the original electricity usage data; the server detects the transmission status of the ciphertext electricity usage data based on the security of the transmission time; and when the transmission status is risky, the server updates the encryption method and the garbled code library. This embodiment promptly updates the encryption method and the garbled code library when a risk occurs, thereby achieving a balance between security and performance overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grids, and in particular to a method, system, device and storage medium for transmitting electricity meter data. Background Art

[0002] Smart meters are one of the main devices in smart grids. They can achieve two-way communication with the central management system, accurately record electricity consumption data at every moment and upload the electricity consumption data to the central management system in real time, helping the central management system to carry out more effective energy scheduling.

[0003] Electricity consumption data may be intercepted and illegally tampered with during the upload process. In order to improve the security of uploaded electricity consumption data, the smart meter and the central management system regularly negotiate the symmetric key algorithm. The smart meter encrypts the electricity consumption data into ciphertext according to the agreed symmetric key algorithm and uploads the ciphertext to the central management system. The central management system decrypts the ciphertext into electricity consumption data according to the agreed symmetric key algorithm.

[0004] The key of the symmetric key algorithm is placed inside the smart meter. If the symmetric key algorithm is used for a long time, the risk of the key in the smart meter being cracked increases. If the symmetric key algorithm is used for a short time, the central management system and each smart meter frequently negotiate the symmetric key algorithm, which results in high performance overhead. Summary of the Invention

[0005] In view of this, the present invention provides a method, system, device and storage medium for transmitting electricity meter data, so as to reduce performance overhead while ensuring the security of electricity usage data uploaded by the electricity meter.

[0006] A first aspect of the present invention provides a method for transmitting electricity meter data, comprising:

[0007] The electric meter encrypts the original electricity consumption data into target electricity consumption data according to the preset encryption method;

[0008] The electric meter extracts garbled data matching the target electricity usage data from a preset garbled code library according to a preset encryption method, places the target electricity usage data into the garbled data to obtain ciphertext electricity usage data, and transmits the ciphertext electricity usage data to the service end;

[0009] The server reads the target power usage data from the ciphertext power usage data according to the encryption method, and decrypts the target power usage data into the original power usage data;

[0010] The server detects the transmission status of the encrypted electricity usage data based on the security of the transmission duration;

[0011] When the transmission status is risky, the server updates the encryption method and the garbled code library.

[0012] A second aspect of the present invention provides a system for transmitting meter data, the system comprising an electricity meter and a service end;

[0013] The electric meter comprises:

[0014] The original power consumption data encryption module is used to encrypt the original power consumption data into target power consumption data according to a preset encryption method;

[0015] a ciphertext electricity usage data generation module, configured to extract garbled code data matching the target electricity usage data from a preset garbled code library according to a preset encryption method, place the target electricity usage data into the garbled code data to obtain ciphertext electricity usage data, and transmit the ciphertext electricity usage data to a server;

[0016] The server includes:

[0017] an original electricity usage data reading module, configured to read the target electricity usage data from the ciphertext electricity usage data according to the encryption method, and decrypt the target electricity usage data into the original electricity usage data;

[0018] A transmission status detection module, configured to detect the transmission status of the encrypted electricity usage data based on the security of the transmission duration;

[0019] A data updating module is used to update the encryption method and the garbled code library when the transmission status is risky.

[0020] A third aspect of the present invention provides an electronic device, comprising:

[0021] at least one processor; and

[0022] a memory communicatively connected to the at least one processor; wherein,

[0023] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the method for transmitting electric meter data as described in the first aspect above.

[0024] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method for transmitting electric meter data as described in the first aspect above is implemented.

[0025] A fifth aspect of the present invention provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method for transmitting electric meter data as described in the first aspect.

[0026] In this embodiment, the electricity meter encrypts the original electricity usage data into target electricity usage data according to a preset encryption method; the electricity meter extracts garbled data matching the target electricity usage data from a preset garbled code library according to the preset encryption method, places the target electricity usage data in the garbled code data to obtain ciphertext electricity usage data, and transmits the ciphertext electricity usage data to the server; the server reads the target electricity usage data from the ciphertext electricity usage data according to the encryption method, and decrypts the target electricity usage data into the original electricity usage data; the server detects the transmission status of the ciphertext electricity usage data based on the security of the transmission time; when the transmission status is risky, the server updates the encryption method and the garbled code library. This embodiment uses garbled data to protect more important electricity consumption data, adds a small amount of data redundancy, and does not affect the overall communication performance. The transmission status is evaluated by the transmission time. When risks arise, the encryption method and the garbled code library are updated in time. When a longer validity period is used for the encryption method and the garbled code library, a dynamic update mechanism is added, which effectively reduces the frequency of negotiation between the server and the electricity meter on the encryption method and the garbled code library, and can ensure the security of electricity consumption data, and can achieve a balance between security and performance overhead.

[0027] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 This is a flow chart of a method for transmitting electric meter data provided in Example 1 of the present invention.

[0030] Figure 2 This is a structural diagram of a system for transmitting electric meter data provided in the second embodiment of the present invention.

[0031] Figure 3 This is a structural diagram of an electronic device provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can cover sequential implementations other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Example 1

[0035] See also Figure 1 , shows a flow chart of a method for transmitting meter data provided by the first embodiment of the present invention. The method can be executed by a transmission system for meter data. The transmission system for meter data can be implemented in the form of hardware and / or software. The transmission system for meter data can be configured in an electronic device. The electronic device includes an electric meter and a server. The electric meter is located in a distribution network, and the server is located in a central management system outside the distribution network. Cross-domain communication is achieved between the electric meter and the server. Figure 1 As shown, the method includes:

[0036] Step 101: The electric meter encrypts original electricity usage data into target electricity usage data according to a preset encryption method.

[0037] In this embodiment, the electricity meter locally uses encryption, code pre-embedding and other methods to build in a garbled code library and encryption method, and the electricity meter and the server can negotiate and update the garbled code library and encryption method regularly or irregularly.

[0038] Among them, the garbled code library contains a large amount of garbled code data, which has no actual meaning.

[0039] In addition, encryption methods usually include at least two elements:

[0040] One of the contents is the first operation information of the symmetric key algorithm, which includes information such as the type and key of the symmetric key algorithm.

[0041] Another item is the second operation information of the garbled code library. The second operation information includes amplification information, offset information and fusion information. The amplification information is used to measure the data volume of the garbled code data. The offset information is the offset address of the garbled code data in the garbled code library, indicating that the garbled code data at the offset address is read during encryption. The fusion information refers to the information for fusing the encrypted user data with the garbled code data, such as the insertion position.

[0042] Furthermore, a symmetric key algorithm, also known as a single-key algorithm, refers to an encryption algorithm that uses the same key for both encryption and decryption. In a symmetric key algorithm, the sender (e.g., a meter) and the receiver (e.g., a central management system) share the same key to encrypt and decrypt data (e.g., electricity usage data).

[0043] If the sender wants to send a message M, it uses the key K to encrypt and obtain the ciphertext C (the encryption process can be expressed as C = E K (M), where E represents the encryption function in the symmetric key algorithm). After the receiver receives the ciphertext C, it uses the same key K to decrypt it to obtain the original message M (the decryption process can be expressed as M = D K (C), where D represents the decryption function in the symmetric key algorithm).

[0044] In this embodiment, the original electricity usage data can be recorded at various times. For some more important original electricity usage data, such as electricity consumption, the preset encryption method (especially the first operation information) can be read locally regularly or irregularly, and the original electricity usage data can be encrypted into target electricity usage data according to the preset encryption method (especially the first operation information).

[0045] For example, the meter can use the AES (Advanced Encryption Standard) algorithm to encrypt the user's raw electricity usage data. During this process, the meter negotiates with the server to generate a key that complies with the AES algorithm specification and stores the key in the meter's security module. After the meter collects the user's raw electricity usage data (such as power consumption, voltage, current, and other information), it uses the AES algorithm and the stored key to encrypt the raw electricity usage data to obtain the target electricity usage data.

[0046] Step 102: The electric meter extracts garbled data matching the target electricity usage data from a preset garbled code library according to a preset encryption method, places the target electricity usage data in the garbled data to obtain ciphertext electricity usage data, and transmits the ciphertext electricity usage data to the server.

[0047] In this embodiment, considering that the length of the target electricity usage data encrypted by different symmetric key algorithms is different, in order to avoid leaking the length of the target electricity usage data, the electricity meter can extract the garbled data matching the target electricity usage data from the preset garbled code library according to the preset encryption method (especially the second operation information), and place the target electricity usage data in the garbled data to obtain the ciphertext electricity usage data.

[0048] At this time, a secure communication protocol such as HTTPS (Hypertext Transfer Protocol Secure) can be used to transmit the encrypted electricity usage data to the server.

[0049] In a specific implementation, the first byte of the target power usage data may be counted.

[0050] The first byte amount is amplified to the second byte amount according to a preset encryption method (especially the amplification information in the second operation information).

[0051] Exemplarily, the amplification information is an amplification factor, which can be a positive integer, such as 5, 7, etc. The product of the first byte amount and the amplification factor is calculated to obtain the second byte amount.

[0052] The garbled code data that meets the second byte quantity is extracted from the preset garbled code library according to the preset encryption method (especially the offset information in the second operation information).

[0053] The target electricity usage data is placed in the garbled data according to a preset encryption method (especially the fusion information in the second operation information) to obtain the ciphertext electricity usage data.

[0054] Step 103: The server reads the target electricity usage data from the ciphertext electricity usage data in an encrypted manner, and decrypts the target electricity usage data into original electricity usage data.

[0055] In this embodiment, when the server receives the ciphertext electricity usage data, it performs an inverse operation on the ciphertext electricity usage data according to a preset encryption method, that is, according to the preset encryption method (especially the fusion information in the second operation information), it eliminates the interference of garbled data from the ciphertext electricity usage data, reads the target electricity usage data, and decrypts the target electricity usage data into original electricity usage data using the preset encryption method (especially the first operation information).

[0056] Step 104: The server detects the transmission status of the encrypted electricity usage data based on the security of the transmission duration.

[0057] In actual applications, the communication link between the electricity meter and the server is fixed. Most of the time, the duration of data transmission between the electricity meter and the server through the communication link is relatively stable.

[0058] If the electricity meter is attacked, the real ciphertext electricity usage data constructed by the electricity meter will be intercepted and tampered with, and the forged ciphertext electricity usage data will be transmitted to the server. This process will take a certain amount of time, causing a certain deviation in the transmission duration. Therefore, the server can evaluate the security of the communication based on the transmission duration, thereby detecting the transmission status of the ciphertext electricity usage data.

[0059] In one embodiment of the present invention, step 104 may include the following steps:

[0060] Step 1041: Read the actual transmission duration of the encrypted electricity usage data.

[0061] In this embodiment, the timestamp when the electricity meter sends the encrypted electricity usage data can be read from the encrypted electricity usage data, and the timestamp when the server receives the encrypted electricity usage data can be queried locally. The timestamp when the server receives the encrypted electricity usage data can be subtracted from the timestamp when the electricity meter sends the encrypted electricity usage data to obtain the actual transmission duration of the encrypted electricity usage data.

[0062] Step 1042: Predict the theoretical transmission time of the encrypted electricity usage data.

[0063] In this embodiment, the theoretical transmission time of the electric meter for transmitting the encrypted electricity usage data to the server can be evaluated based on factors such as the amount of the encrypted electricity usage data and the status of the communication link.

[0064] Exemplarily, the electricity meter is notified to search for multiple groups of garbled data matching the ciphertext electricity usage data in the garbled library as test electricity usage data. The so-called matching may mean that the amount of data is equivalent to the ciphertext electricity usage data, so as to simulate transmission.

[0065] In a specific implementation, the third byte amount of the encrypted electricity usage data can be counted and divided into multiple parts according to the third byte amount, and the sum of the fourth byte amount; the number of parts of the fourth byte amount is the sum of twice the target value and 1.

[0066] The electric meter is notified to search the garbled code database for garbled code data with the target number of groups and each group meeting the third byte quantity as the test power consumption data.

[0067] If the fourth byte Z1 of the ciphertext electricity usage data is expressed as:

[0068]

[0069] Then, the total byte size Z2 of multiple sets of test power consumption data can be expressed as:

[0070]

[0071] Where S is the third byte value and n is the target value.

[0072] At this time, the electric meter is notified to transmit each group of test electricity consumption data to the server to record the transmission time of a single group of test electricity consumption data, calculate the average value of multiple single group transmission times, and obtain the theoretical transmission time of the ciphertext electricity consumption data.

[0073] In this embodiment, since the test power consumption data does not contain real power consumption data, even if the test power consumption data is intercepted, it cannot be successfully tampered with. Therefore, by averaging the transmission time of multiple sets of test power consumption data, the time error caused by the attack can be reduced.

[0074] Step 1043: Calculate the difference between the actual transmission duration and the theoretical transmission duration to obtain a transmission duration deviation.

[0075] The difference between the actual transmission time and the theoretical transmission time is subtracted to obtain the transmission time deviation.

[0076] Step 1044: If the transmission time deviation is less than or equal to the preset safety threshold, the transmission status of the encrypted electricity usage data is determined to be safe.

[0077] The transmission time deviation is compared with a preset safety threshold.

[0078] If the transmission time deviation is less than or equal to the preset security threshold, it means that the difference between the actual transmission time and the theoretical transmission time is small, then it can be determined that the transmission status of the encrypted electricity usage data is safe, that is, the probability of the encrypted electricity usage data being intercepted or tampered with is low.

[0079] Step 1045: If the transmission time deviation is greater than a preset safety threshold, the transmission status of the encrypted electricity usage data is determined to be risky.

[0080] If the transmission time deviation is greater than the preset safety threshold, it means that the difference between the actual transmission time and the theoretical transmission time is large. Then it can be determined that the transmission status of the encrypted electricity usage data is risky, that is, the probability of the encrypted electricity usage data being intercepted or tampered with is high.

[0081] In the process of transmitting multiple groups of test electricity consumption data, when the server is not transmitting the test electricity consumption data for the first time, it can notify the meter to transmit the test electricity consumption data at the interval of a single group transmission time. Then, the server can query the reception time of the current group of test electricity consumption data locally, and query the sending time of the next group of test electricity consumption data in the next group of test electricity consumption data. The server can then correct the transmission status based on the reception time and the sending time to improve the accuracy of the transmission status.

[0082] In a specific implementation, a variable may be generated as an offset, and the offset is initially 0.

[0083] The difference between the receiving time and the sending time is calculated as the time positioning deviation, and the time positioning deviation is compared with the preset positioning threshold.

[0084] Traverse each time positioning deviation, if the time positioning deviation is greater than or equal to the preset positioning threshold, the offset is accumulated by 1.

[0085] If the positioning deviations of each time are traversed, the ratio between the offset and the number of groups of test power consumption data is calculated to obtain the offset probability, and the offset probability is compared with the preset confidence threshold.

[0086] If the deviation probability is greater than or equal to the preset confidence threshold, the transmission status is determined to be risk-valid.

[0087] If the deviation probability is less than the preset confidence threshold, the transmission status is determined to be risk invalid and can be re-verified.

[0088] Step 105: When the transmission status is risky, the server updates the encryption method and the garbled code library.

[0089] When the transmission status is risky, the server discards the original electricity consumption data of the recent period and notifies the meter to retransmit the original electricity consumption data of the recent period to ensure the accuracy of the original electricity consumption data. On the other hand, the server renegotiates the encryption method and garbled code library with the meter and updates them.

[0090] Of course, in addition to updating the encryption method and the garbled code library when risks occur, the server and the electricity meter can also update the encryption method and the garbled code library regularly according to the validity period, and this embodiment does not limit this.

[0091] In this embodiment, the electricity meter encrypts the original electricity usage data into target electricity usage data according to a preset encryption method; the electricity meter extracts garbled data matching the target electricity usage data from a preset garbled code library according to the preset encryption method, places the target electricity usage data in the garbled code data to obtain ciphertext electricity usage data, and transmits the ciphertext electricity usage data to the server; the server reads the target electricity usage data from the ciphertext electricity usage data according to the encryption method, and decrypts the target electricity usage data into the original electricity usage data; the server detects the transmission status of the ciphertext electricity usage data based on the security of the transmission time; when the transmission status is risky, the server updates the encryption method and the garbled code library. This embodiment uses garbled data to protect more important electricity consumption data, adds a small amount of data redundancy, and does not affect the overall communication performance. The transmission status is evaluated by the transmission time. When risks arise, the encryption method and the garbled code library are updated in time. When a longer validity period is used for the encryption method and the garbled code library, a dynamic update mechanism is added, which effectively reduces the frequency of negotiation between the server and the electricity meter on the encryption method and the garbled code library, and can ensure the security of electricity consumption data, and can achieve a balance between security and performance overhead.

[0092] Example 2

[0093] See also Figure 2 , shows a schematic diagram of the structure of a meter data transmission system provided by the second embodiment of the present invention. Figure 2 As shown, the system includes an electric meter 210 and a service end 220;

[0094] The electric meter 210 includes:

[0095] The original power usage data encryption module 211 is used to encrypt the original power usage data into target power usage data according to a preset encryption method;

[0096] The ciphertext electricity usage data generation module 212 is configured to extract garbled code data matching the target electricity usage data from a preset garbled code library according to a preset encryption method, insert the target electricity usage data into the garbled code data to obtain ciphertext electricity usage data, and transmit the ciphertext electricity usage data to the server;

[0097] The server 220 includes:

[0098] The original power usage data reading module 221 is configured to read the target power usage data from the ciphertext power usage data according to the encryption method, and decrypt the target power usage data into the original power usage data;

[0099] A transmission status detection module 222 is used to detect the transmission status of the encrypted electricity usage data based on the security of the transmission duration;

[0100] The data updating module 223 is configured to update the encryption method and the garbled code library when the transmission status is risky.

[0101] In one embodiment of the present invention, the encrypted electricity usage data generation module 212 includes:

[0102] A first byte quantity statistics module, configured to count the first byte quantity of the target power usage data;

[0103] a second byte quantity generating module, configured to amplify the first byte quantity into a second byte quantity according to a preset encryption method;

[0104] a garbled data reading module, configured to extract garbled data that conforms to the second byte quantity from a preset garbled code library according to a preset encryption method;

[0105] The garbled data processing module is used to place the target electricity usage data into the garbled data according to a preset encryption method to obtain ciphertext electricity usage data.

[0106] In one embodiment of the present invention, the transmission status detection module 222 includes:

[0107] An actual transmission duration reading module, used to read the actual transmission duration of the ciphertext electricity usage data;

[0108] A theoretical transmission time prediction module, configured to predict a theoretical transmission time for the ciphertext electricity usage data;

[0109] a transmission time deviation calculation module, configured to calculate the difference between the actual transmission time and the theoretical transmission time to obtain a transmission time deviation;

[0110] a security determination module, configured to determine that the transmission status of the ciphertext electricity usage data is safe if the transmission duration deviation is less than or equal to a preset security threshold;

[0111] The risk determination module is configured to determine that the transmission status of the encrypted electricity usage data is risky if the transmission duration deviation is greater than a preset safety threshold.

[0112] In one embodiment of the present invention, the theoretical transmission duration prediction module includes:

[0113] a test electricity consumption data search module, configured to notify the electric meter to search the garbled code library for a plurality of groups of garbled code data that match the ciphertext electricity consumption data as test electricity consumption data;

[0114] a single-group transmission duration recording module, configured to notify the electric meter to transmit each group of the test electricity consumption data to the service end, so as to record the single-group transmission duration of the test electricity consumption data;

[0115] The theoretical transmission duration calculation module is used to calculate the average value of the multiple single-group transmission durations to obtain the theoretical transmission duration of the ciphertext electricity usage data.

[0116] In one embodiment of the present invention, the test power consumption data search module includes:

[0117] A third byte quantity statistics module, configured to count the third byte quantity of the ciphertext electricity usage data;

[0118] a fourth byte quantity splitting module, configured to split the third byte quantity into a plurality of portions of the sum of the fourth byte quantity; the number of portions of the fourth byte quantity being the sum of twice the target value and 1;

[0119] The garbled code library search module is used to notify the electric meter to search the garbled code data with the target value and each group meeting the third byte quantity in the garbled code library as the test electricity consumption data.

[0120] In one embodiment of the present invention, the server 220 further includes:

[0121] A test power data transmission module, configured to notify the electric meter to transmit the test power data at intervals of the single group transmission time when the test power data is not transmitted for the first time;

[0122] A time query module, used to query the reception time of the test power consumption data of the current group and the sending time of the test power consumption data of the next group;

[0123] The transmission status correction module is used to correct the transmission status according to the receiving time and the sending time.

[0124] In one embodiment of the present invention, the transmission status correction module includes:

[0125] An offset generation module, used to generate an offset;

[0126] A time positioning deviation calculation module, configured to calculate the difference between the receiving time and the sending time as the time positioning deviation;

[0127] an offset accumulation module, configured to accumulate 1 to the offset if the temporal positioning deviation is greater than or equal to a preset positioning threshold;

[0128] An offset probability calculation module, configured to calculate a ratio between the offset and the number of groups of the test power consumption data to obtain an offset probability;

[0129] a risk validity determination module, configured to determine that the transmission state is risk valid if the offset probability is greater than or equal to a preset confidence threshold;

[0130] The risk invalidity determination module is configured to determine that the transmission state is risk invalid if the offset probability is less than a preset confidence threshold.

[0131] The electric meter data transmission system provided in the embodiment of the present invention can execute the electric meter data transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the electric meter data transmission method.

[0132] Example 3

[0133] See also Figure 3 , shows a schematic structural diagram of an electronic device provided by an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0134] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0135] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0136] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for transmitting meter data.

[0137] In some embodiments, the method for transmitting electricity meter data can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method for transmitting electricity meter data described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the method for transmitting electricity meter data in any other suitable manner (e.g., via firmware).

[0138] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0139] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0140] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0141] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0142] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0143] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0144] Example 4

[0145] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method for transmitting electric meter data provided by any embodiment of the present invention is implemented.

[0146] The computer program product may be implemented by writing computer program code for performing the operations of the present invention in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0147] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0148] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for transmitting electric meter data, characterized in that: include: The electric meter encrypts the original electricity consumption data into target electricity consumption data according to the preset encryption method; The electric meter extracts garbled data matching the target electricity usage data from a preset garbled code library according to a preset encryption method, places the target electricity usage data into the garbled data to obtain ciphertext electricity usage data, and transmits the ciphertext electricity usage data to the service end; The server reads the target power usage data from the ciphertext power usage data according to the encryption method, and decrypts the target power usage data into the original power usage data; The server detects the transmission status of the encrypted electricity usage data based on the security of the transmission duration; When the transmission status is risky, the server updates the encryption method and the garbled code library; The service end notifies the electric meter to search the garbled code library for multiple groups of garbled code data that match the ciphertext electricity consumption data as test electricity consumption data; When the server is not transmitting the test power consumption data for the first time, the server notifies the electric meter to transmit the test power consumption data at intervals of a single group transmission time; The server queries the reception time of the test power consumption data of the current group and the sending time of the test power consumption data of the next group; The server generates an offset; Calculating the difference between the receiving time and the sending time as a time positioning deviation; If the time positioning deviation is greater than or equal to a preset positioning threshold, the offset is accumulated by 1; the ratio between the offset and the number of groups of the test power consumption data is calculated to obtain an offset probability; if the offset probability is greater than or equal to a preset confidence threshold, the transmission status is determined to be risk-valid; If the deviation probability is less than a preset confidence threshold, the transmission status is determined to be risk invalid.

2. The method according to claim 1, characterized in that The electric meter extracts garbled data matching the target electricity usage data from a preset garbled code library according to a preset encryption method, places the target electricity usage data into the garbled data, and obtains ciphertext electricity usage data, including: Counting the first byte of the target power usage data; amplifying the first byte amount into a second byte amount according to a preset encryption method; Extracting the garbled code data that matches the second byte quantity from a preset garbled code library according to a preset encryption method; The target electricity usage data is placed in the garbled data according to a preset encryption method to obtain ciphertext electricity usage data.

3. The method according to claim 1, characterized in that The detecting the transmission status of the encrypted electricity usage data based on the security of the transmission duration includes: Read the actual transmission time of the encrypted electricity usage data; Predicting a theoretical transmission time for the ciphertext electricity usage data; Calculating the difference between the actual transmission time and the theoretical transmission time to obtain a transmission time deviation; If the transmission time deviation is less than or equal to a preset safety threshold, determining that the transmission status of the encrypted electricity usage data is safe; If the transmission time deviation is greater than a preset safety threshold, the transmission status of the encrypted electricity usage data is determined to be risky.

4. The method according to claim 3, characterized in that The predicting of the theoretical transmission time of the ciphertext electricity usage data includes: Notifying the electric meter to transmit each group of the test electricity consumption data to the service end, so as to record the transmission time of each group of the test electricity consumption data; An average value of the transmission durations of the plurality of single groups is calculated to obtain a theoretical transmission duration of the ciphertext electricity usage data.

5. The method according to claim 4, characterized in that The notifying electric meter searches the garbled code library for multiple groups of garbled code data that match the ciphertext electricity usage data as test electricity usage data, including: Counting the third byte of the ciphertext electricity usage data; The sum of the fourth byte amount is divided into multiple parts according to the third byte amount; the number of parts of the fourth byte amount is the sum of twice the target value and 1; The electric meter is notified to search the garbled code library for the target value, each group of which meets the third byte quantity, as the test electricity consumption data.

6. A system for transmitting electric meter data, characterized in that: The system includes an electric meter and a service terminal; The electric meter comprises: The original power consumption data encryption module is used to encrypt the original power consumption data into target power consumption data according to a preset encryption method; a ciphertext electricity usage data generation module, configured to extract garbled code data matching the target electricity usage data from a preset garbled code library according to a preset encryption method, place the target electricity usage data into the garbled code data to obtain ciphertext electricity usage data, and transmit the ciphertext electricity usage data to a server; The server includes: an original electricity usage data reading module, configured to read the target electricity usage data from the ciphertext electricity usage data according to the encryption method, and decrypt the target electricity usage data into the original electricity usage data; A transmission status detection module, configured to detect the transmission status of the encrypted electricity usage data based on the security of the transmission duration; A data update module, configured to update the encryption method and the garbled code library when the transmission status is risky; a test electricity consumption data search module, configured to notify the electric meter to search the garbled code library for a plurality of groups of garbled code data that match the ciphertext electricity consumption data as test electricity consumption data; A test power data transmission module, configured to notify the electric meter to transmit the test power data at intervals of a single group transmission time when the test power data is not transmitted for the first time; A time query module, used to query the reception time of the test power consumption data of the current group and the sending time of the test power consumption data of the next group; An offset generation module, used to generate an offset; A time positioning deviation calculation module, configured to calculate the difference between the receiving time and the sending time as the time positioning deviation; an offset accumulation module, configured to accumulate 1 to the offset if the temporal positioning deviation is greater than or equal to a preset positioning threshold; An offset probability calculation module, configured to calculate a ratio between the offset and the number of groups of the test power consumption data to obtain an offset probability; a risk validity determination module, configured to determine that the transmission state is risk valid if the offset probability is greater than or equal to a preset confidence threshold; The risk invalidity determination module is configured to determine that the transmission state is risk invalid if the offset probability is less than a preset confidence threshold.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the method for transmitting electricity meter data according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for transmitting electric meter data according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Time-frequency synchronization method and device based on NB-IoT (Narrow Band Internet of Things) system

    CN115150240A

  • Audio information encryption method based on le-audio Bluetooth

    CN118301602A