End-to-end gas meter safety system and method applied to Internet of Things
By embedding a security chip in the gas meter terminal and using two-way authentication with an IoT platform, an end-to-end security protection system is built, solving the problems of insufficient gas meter security and low key negotiation success rate, and realizing secure data transmission and simplified terminal transformation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MING QI JIA (SHANG HAI) SHU ZI KE JI YOU XIAN GONG SI
- Filing Date
- 2024-07-03
- Publication Date
- 2026-04-21
AI Technical Summary
Existing security solutions for gas meters suffer from high hardware costs, long development cycles, insufficient security, a single key system, and low success rates in key negotiation under network conditions.
The gas meter terminal and IoT platform with built-in security chip build an end-to-end security protection system through two-way authentication, key management and encrypted transmission. It simplifies the key negotiation process, uses a four-level key system and national cryptographic algorithms, and embeds a security unit in the communication module to process protocols and data encryption and decryption.
It enables secure data communication for gas meters, improves the success rate of key negotiation, reduces the risk of commercial privacy leakage, simplifies the hardware modification and software development workload for terminal manufacturers, and adapts to network fluctuations in IoT scenarios.
Smart Images

Figure CN121907473A_ABST
Abstract
Description
Technical Field
[0001] This patent relates to the field of gas safety, specifically an end-to-end gas meter safety system and method applied to the Internet of Things. Background Technology
[0002] Existing terminal hardware often uses an external, independent security unit. Terminal meter manufacturers need to redesign circuit boards and conduct explosion-proof testing for this additional hardware unit, resulting in significant investment costs and a long development cycle, hindering market adoption. In security solutions, the security unit uses a passive invocation method, requiring the main control unit to invoke the instruction set within the security unit to perform data encryption / decryption, signature verification, and key negotiation. This method adds extra work for terminal manufacturers developing the main control unit, and the long development and testing cycle is detrimental to widespread adoption. Terminal devices mostly use traditional software encryption, which has insufficient security and a single key system. Furthermore, most terminal devices lack a session key system to ensure the security of the keys themselves. CA certificate systems are widely used in finance and websites, offering high security but complexity, making their application in the IoT gas meter field difficult. Traditional key negotiation uses standard algorithms, requiring three steps (uplink and downlink) to complete the negotiation, placing high demands on network transmission reliability and stability. However, IoT scenarios are more susceptible to network fluctuations, making it difficult to guarantee a high success rate for key negotiation. Summary of the Invention
[0003] This invention discloses an end-to-end gas meter safety system applied to the Internet of Things (IoT). Specifically, the system comprises a gas meter terminal and an IoT platform. The gas meter terminal includes a main control unit and a security module. The main control unit is used for meter operation services such as metering, and assembles and parses plaintext standard transmission protocols. The security module integrates a security chip, and security capabilities are obtained by accessing the security chip. The main control unit generates and processes the standard plaintext transmission protocol, parses uplink service data requests from the main control unit through a cellular communication module, and sends the uplink data to the security chip for protocol processing. After conversion into a secure transmission protocol, the data is transmitted to the IoT platform via the cellular network.
[0004] Furthermore, the IoT platform includes an IoT security authentication module and an IoT table management module.
[0005] Furthermore, the security chip is integrated inside the communication module, uses an I2C or UART interface for communication, and is powered by the power supply module of the communication module.
[0006] Furthermore, the security chip is a trusted module with an independent processor and storage unit inside, storing keys and feature data.
[0007] An end-to-end gas meter secure transmission method for application in the Internet of Things, characterized by comprising the following steps:
[0008] (1) The gas meter terminal generates business information and sends it to the security module, requesting data security uplink processing;
[0009] (2) The security module will parse the transmission protocol, generate a session random number, use the uplink communication key to disperse the random number to obtain a session key, use the session key to encrypt the security message counter and business data, and generate a message authentication code;
[0010] (3) The security module re-encapsulates the hardened data into transmission protocol messages and uploads them to the IoT platform;
[0011] (4) After receiving the secure transmission protocol, the IoT platform performs data authentication and decryption.
[0012] Furthermore, an end-to-end gas meter secure transmission method applied to the Internet of Things is characterized by the following steps: if there is a downlink control command requirement, the security module uses random number distribution to obtain a session key, verifies the message authentication code to ensure that the message comes from a legitimate operation service system, decrypts and restores the message data, and verifies the legitimacy of the message counter; the security module re-encapsulates the transmission message and returns it to the gas meter, performs downlink data parsing, and completes the operation management business.
[0013] Furthermore, the process includes the following steps: after the security module identifies the key negotiation request, it verifies the legality of the anti-replay factor; it uses the CA root certificate public key to check the legality of the platform certificate and obtains the platform public key from the certificate; it uses the platform public key to verify the legality of the signature; it generates a terminal negotiation key random number rB and calculates the terminal negotiation parameter RB, which, together with the platform negotiation parameter RA, calculates the shared negotiation key K; and it simultaneously calculates the negotiation key verification value Sb.
[0014] Furthermore, the system includes the following steps: when a critical operation is performed or the session key expires, the security system actively triggers a key negotiation process. The security system can choose whether to use certificate interaction in the current negotiation process. If certificate authentication is used, the system carries its own certificate during the interaction process, performs certificate validity checks using the CA root certificate, and performs message authentication using the public key in the certificate. If certificate authentication is not used, message authentication is performed based on the preset public key of the other party.
[0015] Beneficial effects
[0016] This patent utilizes a built-in security chip to achieve two-way authentication with an IoT platform, secure storage of keys and core data, and encrypted transmission of critical data for secure data communication. The IoT platform enables unified management of gas meter operations, while the IoT security authentication service system manages keys and data encryption / decryption, constructing a complete security protection system across the terminal, network, and platform layers. Encryption using a security chip, with keys stored in hardware, prevents the decryption of stolen data, thus protecting business privacy and data security. Before data interaction, the gas meter and security gateway can negotiate session keys, enhancing the security of gas meter data transmission and reducing the risk of key leakage in the business system. The security unit is embedded in the communication module and adapted to the terminal meter manufacturer. The original business logic remains unchanged; hardware integration is achieved simply by replacing the security module with the built-in security chip, making it user-friendly for terminal meter manufacturers and facilitating rapid adaptation and deployment. The security unit, integrated into the communication module, handles protocol parsing, data encryption / decryption, signature verification, and key negotiation through its built-in programs. The entire process requires no involvement of the main control unit in the security logic. Terminal manufacturers do not need to increase the development workload of the main control unit software. The key negotiation has been optimized from the standard 3 steps to 2 steps, simplifying the process, avoiding the impact of network fluctuations in IoT scenarios, and improving the success rate of key negotiation. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the system modules of this patent.
[0018] Figure 2 This is a schematic diagram of the secure communication module of this patent.
[0019] Figure 3 This is a schematic diagram of the gas meter module and the Internet of Things platform in this patent.
[0020] Figure 4 This is a schematic diagram of the key system in this patent;
[0021] Figure 5 This is a schematic diagram of the secure interaction process of this patent;
[0022] Figure 6 This is a schematic diagram of the two-way authentication key negotiation process for this patent. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] like Figure 1 The gas meter uses a built-in security chip to achieve two-way authentication with the IoT platform, secure storage of keys and core data, and encrypted transmission of critical data to ensure secure data communication. The IoT platform enables unified management of gas meter operations, while the IoT security authentication service system enables unified management of keys and data encryption / decryption management, jointly constructing a complete security protection system at the terminal, network, and platform layers.
[0025] The gas meter main control unit mainly performs metering and other meter-end operation business, assembles and parses plaintext standard transmission protocols, and does not participate in security business;
[0026] The security module is primarily used to enable network data interaction between the terminal and the platform. It also integrates a security chip, allowing users to access security capabilities. Within the overall solution, the security module acts as a bridge connecting the gas meter terminal and the platform. Besides providing basic network communication services, it also converts transmission protocols by integrating the security chip to reduce the complexity of modifying the main control unit and improve integration efficiency. The security service module is part of the IoT platform.
[0027] The gas meter's main control unit is responsible for generating and processing the standard plaintext transmission protocol. The cellular communication module is responsible for parsing the uplink business data requests from the gas meter's main control unit and sending the uplink data to the security chip for protocol processing. After being converted into a secure transmission protocol, the data is transmitted to the IoT platform via the cellular network, and vice versa. The secure communication module integrates the security chip within the original communication module, using an I2C or UART interface for communication. The power supply module of the communication module powers the security chip.
[0028] like Figure 2 Security chips are mainly used to implement security hardening and unpacking of business data, key encapsulation, authentication and other security services, build a root of trust for the terminal and provide security services for cellular modules.
[0029] A security chip is a trusted module, a device capable of independently generating, encrypting, and decrypting keys. It has its own processor and storage unit, storing keys and feature data to provide encryption and security authentication services for IoT gas meters. Encryption using a security chip means the key is stored in hardware, making stolen data undecryptable, thus protecting business privacy and data security.
[0030] like Figure 3 The functional block diagram of each unit in the entire gas meter terminal. The gas meter includes the main control unit and the safety module.
[0031] like Figure 4 The key system of this patented security module:
[0032] The symmetric key system for gas equipment is divided into four levels: group level (level 1), project level (level 2), terminal level (level 3), and session level (level 4). The three-level key architecture is implemented through two distributions (as shown in the figure below). The first distribution factor is the project number, and the second distribution factor is the unique identification code of the security module.
[0033] The asymmetric system of gas equipment uses the SM2 national cryptographic algorithm (for detailed algorithm, please refer to the national standard document GB / T32918.3-2016). The keys are divided into SM2 key pairs, supplier-issued equipment / service SM2 key pairs, chip SM2 key pairs and corresponding public key certificates. The public key certificates are uniformly issued by the CA center.
[0034] Each gas equipment safety module is pre-configured with different chip sub-keys according to key distribution rules, autonomously generates SM2 public-private key pairs, and issues public key certificates, achieving one key per chip and one certificate per table, thereby enhancing the security strength of the key system and reducing the risk of key attacks. Simultaneously, multiple sets of business keys are loaded according to different business uses, including an SM4 symmetric key (for detailed algorithms, please refer to the national standard document GB / T 32907-2016), a terminal SM2 private key, a terminal SM2 public key, and a platform SM2 public key.
[0035] The terminal's SM2 public and private keys and device certificate are used for two-way authentication with the platform, generating legitimate terminal identity information. They can also negotiate key agreements with the platform to generate session keys. The platform's SM2 public key and platform certificate are used for two-way authentication with the platform, verifying the platform's legitimate identity, and participating in key negotiation parameter calculations. Each SM4 symmetric key set contains an encryption key and an authentication key. The encryption key is used to encrypt user interaction data to ensure confidentiality and prevent information leakage. The authentication key is used to generate interaction message verification codes, enabling integrity verification of message data, message identity authentication, and ensuring the authenticity of interaction information.
[0036] like Figure 5 Safe interaction process:
[0037] Data transmission between the gas meter and the IoT platform is conducted via wireless mobile cellular communication (NBIoT, Cat.1, etc.). To ensure the security of gas meter reading data, end-to-end security must be achieved between the gas meter terminal and the IoT platform. The confidentiality, integrity, and authenticity of the data must be guaranteed, and the system should be able to withstand man-in-the-middle attacks, replay attacks, etc.
[0038] For secure communication within the NB-IoT network, a counter-based anti-replay mechanism is employed to optimize transmission efficiency in NB-IoT environments, taking into account the low power consumption and narrow bandwidth characteristics. Simultaneously, the key is distributed based on a newly generated session random number for each transmission, implementing a one-time key system. The terminal key does not directly participate in cryptographic operations, further enhancing key security.
[0039] The entire process includes:
[0040] Process description:
[0041] a) The gas meter terminal generates business information and sends it to the security module / security chip, requesting secure data uplink processing;
[0042] (b) (Key Steps) The security module will parse the transmission protocol, generate a session random number, use the uplink communication key to disperse the random number to obtain a session key, use the session key to encrypt the security message counter and business data, and generate a message authentication code;
[0043] c) (Key Step) The security module (security chip) re-encapsulates the hardened data into transmission protocol messages and uploads them to the IoT platform;
[0044] d) After receiving the secure transmission protocol, the IoT platform requests the security service system to perform data authentication and decryption;
[0045] e) The security service system identifies the security chip serial number, uses random number distribution to obtain the session key, authenticates the message authentication code, restores the plaintext interaction data, and verifies the legality of the security message counter;
[0046] f) The security service system notifies the IoT platform of the message authentication result and returns the plaintext of the interactive information, which is then processed by the operation service system.
[0047] g) If there is a need for downlink control commands, the IoT platform will send the control commands to the security service system to request downlink data packet processing;
[0048] h) The security service system generates a security message counter and generates random numbers to obtain a session key. It then encrypts the security message counter and downlink data (control commands) and generates a message authentication code.
[0049] i) The security service system returns the downlink data security packet result to the main station operation service system;
[0050] j) The main station operation service system assembles the secure transmission protocol and distributes it to the secure module / secure chip;
[0051] k)(Key Steps) The security module uses random number distribution to obtain the session key, verifies the message authentication code to ensure that the message comes from a legitimate operational service system, decrypts and restores the message data, and verifies the legitimacy of the message counter;
[0052] (l) (Key Steps) The safety module re-encapsulates the transmission message and returns it to the gas meter, performs downlink data parsing, and completes the operation and management business.
[0053] like Figure 6 The key negotiation process is as follows:
[0054] The key negotiation adopts the standard SM2 key exchange protocol "GB / T 32918.3-2016 Information Security Technology SM2 Elliptic Curve Public Key Cryptography Algorithm Part 2: Key Exchange Protocol". Both parties generate random numbers and corresponding key negotiation parameters respectively. They jointly calculate the same shared key based on the key negotiation parameters that are publicly disclosed to each other. However, the shared key cannot be recovered based on external key negotiation parameters that are publicly disclosed to each other.
[0055] To further enhance the security of smart gas meters during business transmission and reduce the risk of key leakage in business systems, the gas meter and security gateway can negotiate a session key before data interaction. Subsequent business data is then secured using the session key. The key negotiation strategy can be flexibly selected, and the negotiated key generates different components according to its purpose, such as uplink and downlink communication session keys. The key negotiation algorithm adopts the standard GB / T 32918.3-2016 "SM2 Elliptic Curve Public Key Cryptography Algorithm Part 3: Key Exchange Protocol".
[0056] (Key Technology Improvements) This system simplifies the three-step interaction process of key negotiation and two-way authentication in the key exchange protocol of standard GB / T 32918.3-2016 into two steps. At the same time, signature calculation is added to the key negotiation process to realize the identity authentication process. Furthermore, the platform can choose whether to carry a certificate during the negotiation process to verify the legitimate identities of the two parties, reducing the probability of data transmission failure due to network reasons, improving the key negotiation success rate, and thus improving the overall efficiency of the system.
[0057] The process is as follows:
[0058] (a) (Key Steps) When performing a key operation or when the session key expires, the security system actively triggers the key negotiation process. The security system can choose whether to use certificate interaction in the current negotiation process. If certificate authentication is used, the system will carry its own certificate during the interaction process, and use the CA root certificate to check the certificate's validity and use the public key in the certificate to authenticate the message. If certificate authentication is not used, the system will use the pre-set public key of the other party to authenticate the message.
[0059] b)(Key Steps) The security system generates a random number rA for the platform negotiation key and calculates the platform negotiation key parameter RA. The platform private key is used to sign the anti-replay factor, chip serial number, negotiation parameter RA, and [platform certificate].
[0060] c) The security system requests the IoT platform to issue key negotiation parameters;
[0061] d) The IoT platform sends the anti-replay factor, negotiation parameter RA, [platform certificate], and message signature to the IoT device through a standard transmission protocol;
[0062] e) (Critical Step) After the security module or security chip identification key negotiation request is received.
[0063] 1. Verify the legality of the anti-replay factor;
[0064] 2. [Use the CA root certificate public key to perform a validity check on the platform certificate and obtain the platform public key from the certificate];
[0065] 3. Verify the signature's validity using the platform's public key;
[0066] 4. The security chip generates a random number rB for the terminal negotiation key and calculates the terminal negotiation parameter RB, which, together with the platform negotiation parameter RA, yields the shared negotiation key K; simultaneously, it calculates the negotiation key verification value Sb.
[0067] 5. Use the secure unit private key to sign the anti-replay factor, chip serial number, negotiation parameter RB, checksum Sb, and [terminal certificate];
[0068] f)(Key Step) The security module or security chip sends the anti-replay factor, terminal negotiation parameter RB and check value Sb, and [terminal certificate] to the IoT platform;
[0069] g) The IoT platform requests the security system to calculate the terminal key negotiation result;
[0070] h)(Critical Step) The security system processes the terminal key negotiation request:
[0071] 1. Verify the legality of the anti-replay factor.
[0072] 2. [Verify the validity of the terminal certificate using the CA root certificate public key; and obtain the terminal public key;]
[0073] 3. Verify the signature using the terminal's public key;
[0074] 4. Calculate the shared negotiation key K along with the terminal negotiation parameter RB, and at the same time calculate the key check value and compare it with Sb; if the check values match, the key negotiation is successful.
[0075] i) The security system returns the key negotiation result.
[0076] The beneficial effects are as follows:
[0077] In summary, the gas meter achieves two-way authentication with the IoT platform, secure storage of keys and core data, and encrypted transmission of critical data through a built-in security chip, enabling secure data communication. The IoT platform provides unified management of gas meter operations, while the IoT security authentication service system manages keys and data encryption / decryption, jointly constructing a complete security protection system across the terminal, network, and platform layers. Simultaneously, the security unit is embedded in the communication module and adapted to the terminal meter manufacturer. The original business logic remains unchanged; hardware integration is achieved simply by replacing the security module with the one containing the security chip, making it user-friendly for terminal meter manufacturers and facilitating rapid adaptation and deployment. The security unit, built into the communication module, handles protocol parsing, data encryption / decryption, signature verification, and key negotiation through its built-in programs. The entire process requires no involvement of the main control unit in the security logic. Terminal manufacturers do not need to undertake additional development work for the main control unit software. Employing national cryptographic algorithms and a four-level key system (root key, project-level key, terminal-level key, and session-level key), it facilitates hierarchical management based on different business scenarios. Furthermore, each gas meter terminal uses a unique key for each device and each transaction, with periodic session key updates, significantly enhancing security. It enables lightweight application of CA certificates in IoT scenarios, optimizing certificate size, interaction logic, and processes. Key negotiation has been streamlined from the standard three steps to two, simplifying the process, mitigating the impact of network fluctuations in IoT scenarios, and improving the success rate of key negotiation.
[0078] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An end-to-end gas meter safety system applied to the Internet of Things, characterized in that, include: The gas meter terminal and the Internet of Things (IoT) platform are described. The gas meter terminal includes a main control unit and a security module. The main control unit is used for meter operation services such as metering, and assembles and parses plaintext standard transmission protocols. The security module integrates a security chip and obtains security capabilities by accessing the security chip. The main control unit generates and processes the standard plaintext transmission protocol, parses uplink business data requests from the main control unit through a cellular communication module, and sends the uplink data to the security chip for protocol processing. After being converted into a secure transmission protocol, the data is transmitted to the IoT platform via the cellular network.
2. The end-to-end gas meter safety system applied to the Internet of Things according to claim 1, characterized in that, The IoT platform includes an IoT security authentication module and an IoT table management module.
3. The end-to-end gas meter safety system applied to the Internet of Things according to claim 1, characterized in that, The security chip is integrated inside the communication module and uses an I2C or UART interface for communication. The power supply module of the communication module supplies power to the security chip.
4. The end-to-end gas meter safety system applied to the Internet of Things according to claim 1, characterized in that, The security chip is a trusted module with an independent processor and storage unit inside, storing keys and feature data.
5. A method for secure transmission of gas meter data to an end-to-end point in the Internet of Things, characterized in that, Includes the following steps: (1) The gas meter terminal generates business information and sends it to the security module, requesting data security uplink processing; (2) The security module will parse the transmission protocol, generate a session random number, use the uplink communication key to disperse the random number to obtain a session key, use the session key to encrypt the security message counter and business data, and generate a message authentication code; (3) The security module re-encapsulates the hardened data into transmission protocol messages and uploads them to the IoT platform; (4) After receiving the secure transmission protocol, the IoT platform performs data authentication and decryption.
6. The end-to-end gas meter secure transmission method applied to the Internet of Things as described in claim 5, characterized in that, It also includes the following steps: If there is a need for downlink control commands, the security module uses random numbers to obtain the session key, verifies the message authentication code, ensures that the message comes from a legitimate operation service system, decrypts and restores the message data, and verifies the legitimacy of the message counter; The safety module repackages the transmission message and returns it to the gas meter, performs downlink data parsing, and completes the operation and management business.
7. The end-to-end gas meter secure transmission method applied to the Internet of Things as described in claim 5, characterized in that, It also includes the following steps: After the security module identifies the key negotiation request, it verifies the legitimacy of the anti-replay factor. Use the CA root certificate public key to perform a validity check on the platform certificate and obtain the platform public key from the certificate; Use the platform's public key to verify the signature's validity; Generate a random number rB for the terminal negotiation key, calculate the terminal negotiation parameter RB, and calculate the shared negotiation key K together with the platform negotiation parameter RA; Simultaneously calculate the negotiated key verification value Sb.
8. The end-to-end gas meter secure transmission method applied to the Internet of Things as described in claim 5, characterized in that, The process also includes the following steps: when a critical operation is performed or the session key expires, the security system actively triggers a key negotiation process, and the security system can choose whether to use certificate interaction in the current negotiation process. If certificate authentication is used, each message will carry its own certificate during the interaction process, and the CA root certificate will be used to check the validity of the certificate, and the public key in the certificate will be used to authenticate the message. If certificate authentication is not used, message authentication is performed based on the pre-set public key of the other party.