Gas meter reporting method, gas meter controller and computer readable storage medium
Through a general -purpose gas meter method to adapt to different configuration conditions, the problem of high configuration error rate and high maintenance costs in existing technologies have been solved, and the effect of simplifying configuration and reducing maintenance costs.
Patent Information
- Application Number
- CN202411254510.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-01-21
AI Technical Summary
The existing gas meter reporting procedures need to be written separately according to different configurations (single IP address, single domain name, multiple IP address, and multiple domain name), resulting in high configuration error rate of manufacturers and high maintenance costs.
Provide a general -purpose gas meter preparation method to determine whether to enable IP addresses or domain names, and obtain valid addresses in multiple groups of IP addresses or domain names. Set the invalid address, re -take turns all addresses to sue to reduce invalidation reports. action.
The error rate of gas meter manufacturers when configured the program, simplified the maintenance process of gas suppliers, and reduced the operating load of the gas data management terminal platform.
Smart Images

Figure CN119342034A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a reporting method of a gas meter, a gas meter controller, and a computer-readable storage medium, and belongs to the technical field of gas meters. Background Art
[0002] With the continuous development and progress of electronic technology, gas meters have evolved from the original purely decentralized offline mechanical mode meters to the current smart IoT meters. A rigid requirement of smart IoT meters is to report meter information to the gas data management terminal platform. The MCU controller inside the gas meter executes the set program and selects an IP address or a domain name of the gas meter to report the meter information.
[0003] The IP address or domain name of the gas meter is set by the gas meter manufacturer before leaving the factory based on the information or requirements provided by the gas supplier. However, the requirements of the gas supplier are changeable or inconsistent. Some gas meters need to be configured with one IP address, some gas meters need to be configured with multiple IP addresses, some gas meters need to be configured with one domain name, and some gas meters need to be configured with multiple domain names.
[0004] When the gas meter is configured with only one IP address, the manufacturer needs to configure the MCU controller of the gas meter to select a unique IP address to report the meter-end information through the reporting procedure one. When the gas meter is configured with only one domain name, the manufacturer needs to configure the MCU controller of the gas meter to select a unique domain name to report the meter-end information through the reporting procedure two. When the gas meter is configured with multiple IP addresses, the manufacturer needs to configure the MCU controller of the gas meter to select one of the valid IP addresses for flexible reporting through the reporting procedure three. When the gas meter is configured with multiple domain names, the manufacturer needs to configure the MCU controller of the gas meter to select one of the valid domain names for flexible reporting through the reporting procedure four.
[0005] That is to say, the current reporting procedure used for reporting gas meters can only report one of the following situations: the gas meter is configured with only one IP address, only one domain name, multiple IP addresses, multiple domain names, etc. This has great limitations, which leads to: 1. Due to the large variety of reporting procedures, gas meter manufacturers are prone to errors when configuring reporting procedures for gas meters. For example, when configuring the reporting procedure, if a manufacturer leaves the workstation for a period of time due to some temporary matters and comes back to continue the configuration, they may forget or make a mistake, resulting in the gas meter that should have been configured with reporting procedure 1 being configured with reporting procedure 2.
[0006] 2. For gas suppliers, when the MCU controller fails, it takes a lot of manpower and material resources to find out which gas meter has failed, which results in high maintenance costs. Summary of the invention
[0007] In view of the shortcomings of the prior art, the present application provides a gas meter reporting method, which can be applicable to various situations such as the gas meter is configured with only one IP address, only one domain name, multiple IP addresses, multiple domain names, etc. Therefore, only one set of reporting program is needed for the reporting. It can not only reduce the error rate of gas meter manufacturers when configuring programs for gas meters, but also facilitate gas suppliers to maintain programs conveniently and quickly when the MCU controller fails.
[0008] A gas meter reporting method, comprising: Step S1: Determine whether IP address reporting is enabled, if yes, proceed to step S2, if no, proceed to step S3; Step S2: Determine whether only one group of IP addresses is enabled for reporting. If so, enable the group of IP addresses for reporting. Otherwise, proceed to step S4. Step S3: Determine whether only one set of domain name appeals are enabled, if so, enable the domain name appeals, otherwise, proceed to step S5; Step S4: Obtain a valid IP address from the enabled multiple groups of IP addresses for appeal, and determine whether the appeal is successful. If successful, set the appealed group of IP addresses as valid IP addresses; otherwise, set the appealed group of IP addresses as invalid. Step S5: Obtain a valid domain name from the enabled multiple groups of domain names for appeal, and determine whether the appeal is successful. If successful, set the appealed group of domain names as valid domain names, otherwise set the appealed group of domain names as invalid.
[0009] Preferably, in step S4, when obtaining a valid IP address from multiple enabled IP address groups for appeal, if all IP addresses are invalid, then: send an invalid IP address data packet to the gas data management terminal platform, and obtain an IP address activation information packet sent by the gas data management terminal platform; and appeal again in turn with all IP addresses.
[0010] Preferably, the IP address activation information packet contains multiple groups of IP addresses that are different from the multiple groups of IP addresses that have been enabled; and the re-appealing of all IP addresses in rotation specifically comprises: re-appealing of all the multiple groups of IP addresses contained in the IP address activation information packet in rotation.
[0011] Preferably, the IP address activation information packet includes multiple groups of IP addresses that have been enabled but set to invalid in the gas meter, which are sent by the gas data management terminal platform at the reporting time node set by the gas meter when the number of received invalid IP address data packets reaches a dangerous threshold; the re-reporting of all IP addresses in rotation is specifically: re-reporting of all IP addresses that have been enabled but set to invalid.
[0012] Preferably, when obtaining valid domain names for appeal from multiple groups of enabled domain names, if all domain names are invalid, then: send a domain name invalid data packet to the gas data management terminal platform, and obtain the domain name activation information packet sent by the gas data management terminal platform; and appeal again in turn for all domain names.
[0013] Preferably, the domain name activation information package includes multiple groups of domain names that are different from the multiple groups of domain names that have been activated; The re-appealing of all domain names in rotation specifically includes: re-appealing of all the multiple groups of domain names included in the domain name activation information package in rotation.
[0014] Preferably, the domain name activation information package includes multiple groups of domain names that have been enabled but set to invalid, which are sent by the gas data management terminal platform at the appeal time node set by the gas meter when the number of invalid domain name data packets received reaches a dangerous threshold; the re-appeal of all domain names in rotation is specifically: re-appeal of all domain names that have been enabled but set to invalid.
[0015] Preferably, when the gas meter reports a problem, the reported content includes the gas meter number, and the IP address or domain name information bound to the gas meter number.
[0016] A gas meter controller comprises a memory and a processor; the memory is used to store a computer program; the processor is used to implement the appeal method described in any of the above technical solutions when executing the computer program.
[0017] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the appeal method described in any of the above technical solutions.
[0018] In summary, the present invention has the following beneficial effects: 1: The reporting method in the present invention can be applied to various situations such as the gas meter is configured with only one IP address, only one domain name, multiple IP addresses, multiple domain names, etc. Therefore, only one set of reporting program is needed for reporting. It can not only reduce the error rate of gas meter manufacturers when configuring programs for gas meters, but also facilitate gas suppliers to maintain programs conveniently and quickly when the MCU controller fails.
[0019] 2: In the present invention, when a gas meter reports, the content reported includes the gas meter number and the IP address / domain name information bound to the gas meter number, so that when the gas data management terminal platform receives the report information reported via different IP addresses / domain names, it can identify whether the data sources reported by different IP addresses / domain names are from the same meter end, so as to avoid confusion with the data sources reported by other meter ends.
[0020] 3: The present invention prevents the IP address or domain name from being mistakenly determined as an invalid domain name by the gas meter by re-appealing the IP address or domain name that is considered invalid, thereby reducing the operating load of the gas data management terminal platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 The first step is to report the gas meter. Figure 2 This is the second process for reporting the gas meter. DETAILED DESCRIPTION
[0022] The present invention will be further described below through specific embodiments in conjunction with the accompanying drawings.
[0023] Embodiment 1: Before formally introducing the gas meter reporting method, let's first briefly introduce the gas meter architecture system and applications.
[0024] The gas meter manufacturer sets an IP address or domain name before leaving the factory based on information provided by the gas supplier or requirements. The gas meter manufacturer sets an IP address, a domain name, multiple IP addresses, or multiple domain names. The MCU controller inside the gas meter also stores a reporting program. The MCU controller selects an IP address or a domain name of the gas meter to report the meter information by executing the reporting program.
[0025] This embodiment provides a gas meter reporting method, which is executed by the MCU controller built into the gas meter. It can be applicable to various situations such as the gas meter is configured with only one IP address, only one domain name, multiple IP addresses, multiple domain names, etc. Therefore, only one set of reporting program is needed for the reporting. It can not only reduce the error rate of gas meter manufacturers when configuring programs for gas meters, but also facilitate gas suppliers to maintain programs conveniently and quickly when the MCU controller fails.
[0026] Specifically, Figure 1 As shown, the gas meter reporting method includes: Step S1: The MCU controller determines whether to enable IP address reporting. If yes, proceed to step S2; if no, proceed to step S3; Step S2: Determine whether only one group of IP addresses is enabled for reporting. If so, start reporting for this group of IP addresses. That is to say, regardless of whether the IP address is valid or not, report directly to meet the mandatory requirements for reporting. Otherwise, proceed to step S4. Step S4 is specifically as follows: obtain a valid IP address from the enabled multiple groups of IP addresses for reporting, and determine whether the reporting is successful. If successful, set the reported group of IP addresses as valid IP addresses, otherwise set the reported group of IP addresses as invalid. This action excludes the situation where the IP address is valid but cannot be reported (for example, this situation will occur if the hardware device corresponding to the IP address, such as the network cable, is damaged) from the valid range of the IP address. Each subsequent report will no longer select it for reporting, thereby reducing invalid reporting actions and achieving flexible reporting. At the same time, the reporting time can be controlled within a short time, and the power consumption of the meter can also be controlled within a smaller range.
[0027] Step S3: Determine whether only one group of domain name appeal is enabled. If so, start the domain name appeal, that is, regardless of whether the domain name is valid, directly appeal to meet the mandatory requirements of the appeal, otherwise, proceed to step S5; step S5 is specifically: obtain a valid domain name from the multiple groups of enabled domain names for appeal, and determine whether the appeal is successful. If successful, set the group of domain names appealed to valid domain names, otherwise set the group of domain names appealed to invalid. This action excludes the situation where the domain name is valid but cannot be appealed (for example, this situation will occur if the hardware device corresponding to the domain name, such as the network cable, is damaged) from the scope of the valid domain name. Each subsequent appeal will no longer select it for appeal, reducing invalid appeal actions and achieving flexible appeal. At the same time, the appeal time can be controlled within a short time, and the power consumption of the meter can also be controlled within a smaller range.
[0028] The gas meter has its own unique gas meter number. When the gas meter reports using the above method, the content of the report must not only include the necessary information such as the gas usage, current time, gas quality, etc. corresponding to the gas meter number, but also include the IP address or domain name information bound to the gas meter number. These IP addresses or domain names are the IP addresses or domain names configured for the gas meter. In this way, when the gas data management terminal platform receives the report information reported via different IP addresses or domain names, it can identify whether the data sources reported by different IP addresses or domain names are from the same meter end, so as to avoid confusion with the data sources reported by other meter ends.
[0029] Because the gas meter can reset the IP addresses that are valid but cannot actually be reported to invalid, after long-term use, it is possible that all IP addresses are determined to be invalid addresses by the gas meter. At this time, in step S4, when obtaining a valid IP address from the enabled multiple groups of IP addresses for reporting, no valid IP address can be obtained, and all IP addresses are invalid. Therefore, see Figure 2 As shown, the MCU controller inside the gas meter re-rotates all IP addresses for appeal. Here, re-rotating all IP addresses for appeal means abandoning these IP addresses and enabling new IP addresses for appeal. Generally speaking, when all IP addresses are invalid, the MCU controller sends an invalid IP address data packet to the gas data management terminal platform. The invalid IP address data packet contains invalid information indicating that all enabled IP addresses are invalid. After receiving the invalid IP address data packet, the gas data management terminal platform sends an IP address activation information packet to the MCU controller. The IP address activation information packet contains multiple groups of IP addresses that are different from the multiple groups of IP addresses that have been started. The MCU controller receives the IP address activation information packet, allocates new multiple groups of IP addresses to the gas meter, and starts the new IP address for appeal.
[0030] Similarly, for the method of domain name appeal, because the gas meter can reset the domain names that are valid but cannot actually be appealed to invalid, after a long period of use, it is possible that all domain names are determined by the gas meter to be invalid domain names. At this time, in step S5, when obtaining a valid domain name for appeal from the multiple groups of enabled domain names, no valid domain name can be obtained, and all domain names are invalid. The MCU controller re-appeals all domain names in rotation. Here, re-appealing all domain names in rotation means abandoning these domain names and enabling new domain names for appeal. Generally speaking, when all domain names are invalid, the MCU controller sends a domain name invalid data packet to the gas data management terminal platform. The domain name invalid data packet contains invalid information indicating that all enabled domain names are invalid. After receiving the domain name invalid data packet, the gas data management terminal platform sends a domain name activation information packet to the MCU controller. The domain name activation information packet is different from the multiple groups of domain names of the multiple groups of enabled domain names. The MCU controller receives the domain name activation information packet, allocates new multiple groups of domain names to the gas meter, and starts the new domain name for appeal.
[0031] Embodiment 2: In actual use, the gas meter generally reports at a set time node according to the default rules set by the manufacturer. At this time node, it is possible that all IP addresses during this period cannot be reported due to network fluctuations. At this time, all IP addresses are determined by the gas meter as invalid addresses. However, in fact, at least part of these IP addresses that are determined to be invalid addresses can be reported after the network fluctuations are eliminated. At the same time, network fluctuations will cause thousands of gas meters in a certain area to fail at the same time. The gas data management terminal platform receives thousands of invalid IP address data packets at the time of network fluctuations. If the IP addresses are reallocated to the gas meters according to Example 1, the operating load of the gas data management terminal platform will be increased, and even the gas data management terminal platform will crash.
[0032] To this end, the gas data management terminal platform calculates the number of invalid IP address data packets at the current reporting time node based on all the invalid IP address data packets currently received. When the invalid IP address data packets exceed the danger threshold, an IP address activation information packet is sent to the MCU controller of the gas meter. Taking Hangzhou as an example, there are 10,000 gas meters installed within 5 square kilometers, and the danger threshold is 1000. The IP address activation information packet contains multiple groups of IP addresses that have been activated but set to invalid in the gas meter. After receiving the IP address activation information packet, the MCU controller will re-report all the enabled but invalid IP addresses in turn to prevent the IP addresses from being mistakenly judged as invalid addresses by the gas meter.
[0033] Similarly, for the domain name appeal method, it is possible that due to network fluctuations, all domain names during the period cannot be appealed, and all domain names are determined by the gas meter as invalid domain names. However, in fact, at least some of the domain names determined as invalid domain names can be appealed after the network fluctuations are eliminated. At the same time, network fluctuations will cause thousands of gas meters in a certain area to fail at the same time. The gas data management terminal platform receives thousands of invalid domain name data packets at the time of network fluctuations. If the domain name is reallocated to the gas meter according to Example 1, the operating load of the gas data management terminal platform is increased, and even the gas data management terminal platform crashes.
[0034] To this end, the gas data management terminal platform calculates the number of invalid domain name data packets at the current appeal time node based on all the invalid domain name data packets currently received. When the number of invalid domain name data packets exceeds the danger threshold, a domain name activation information packet is sent to the MCU controller of the gas meter. Similarly, taking Hangzhou as an example, the number of gas meters installed within 5 square kilometers is 10,000, and the danger threshold is 1000. The domain name activation information packet contains multiple groups of domain names that have been enabled but set to invalid. After receiving the domain name activation information packet, the MCU controller of the gas meter will re-appeal all the domain names that have been enabled but set to invalid in turn to prevent the domain name from being mistakenly judged as an invalid domain name by the gas meter.
[0035] Embodiment 3: Embodiment 3 relates to a gas meter controller, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to implement the reporting method in Embodiment 1 or Embodiment 2 when executing the computer program. The gas meter controller using this reporting method has good versatility.
[0036] Embodiment 4: Embodiment 4 relates to a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the appeal method in Embodiment 1 or Embodiment 2. The computer-readable storage medium using the appeal method is used in combination with a processor and has good versatility.
[0037] The above embodiments are only for describing the preferred implementation of the present invention, and are not intended to limit the concept and scope of the present invention. Without departing from the design concept of the present invention, various modifications and improvements made by ordinary persons in the art to the technical solution of the present invention should fall within the protection scope of the present invention, and the technical contents for which protection is sought in the present invention have been fully recorded in the claims.
Claims
1. A method for reporting a gas meter, characterized in that: Include: Step S1: Determine whether IP address reporting is enabled, if yes, proceed to step S2, if no, proceed to step S3; Step S2: Determine whether only one group of IP addresses is enabled for reporting. If so, enable the group of IP addresses for reporting. Otherwise, proceed to step S4. Step S3: Determine whether only one set of domain name appeals are enabled, if so, enable the domain name appeals, otherwise, proceed to step S5; Step S4: Obtain a valid IP address from the enabled multiple groups of IP addresses for appeal, and determine whether the appeal is successful. If successful, set the appealed group of IP addresses as valid IP addresses; otherwise, set the appealed group of IP addresses as invalid. Step S5: Obtain a valid domain name from the enabled multiple groups of domain names for appeal, and determine whether the appeal is successful. If successful, set the appealed group of domain names as valid domain names, otherwise set the appealed group of domain names as invalid.
2. A method for reporting a gas meter according to claim 1, characterized in that: In step S4, when obtaining valid IP addresses from multiple enabled IP addresses for appeal, if all IP addresses are invalid, then: Send an IP address invalid data packet to the gas data management terminal platform, and obtain an IP address activation information packet sent by the gas data management terminal platform; All IP addresses are rotated again to make appeals.
3. A method for reporting a gas meter according to claim 2, characterized in that: The IP address activation information packet includes a plurality of groups of IP addresses different from the plurality of groups of IP addresses that have been activated; The re-appealing of all IP addresses in rotation specifically includes: re-appealing of all the multiple groups of IP addresses contained in the IP address activation information packet in rotation.
4. A method for reporting a gas meter according to claim 2, characterized in that: The IP address activation information packet contains multiple groups of IP addresses that have been activated but set to invalid in the gas meter, and is sent by the gas data management terminal platform at the reporting time node set by the gas meter when the number of received IP address invalid data packets reaches a dangerous threshold; The re-appealing of all IP addresses in rotation specifically includes: re-appealing of all IP addresses that have been enabled but set to be invalid in rotation.
5. A method for reporting a gas meter according to claim 1, characterized in that: When obtaining valid domain names from multiple enabled domain names for appeal, if all domain names are invalid, then: Send a domain name invalidation data packet to the gas data management terminal platform, and obtain a domain name activation information packet sent by the gas data management terminal platform; Re-appeal all domain names in turn.
6. A method for reporting a gas meter according to claim 5, characterized in that: The domain name activation information package includes multiple groups of domain names that are different from the multiple groups of domain names that have been activated; The re-appealing of all domain names in rotation specifically includes: re-appealing of all the multiple groups of domain names included in the domain name activation information package in rotation.
7. A method for reporting a gas meter according to claim 5, characterized in that: The domain name activation information packet includes multiple groups of domain names that have been activated but set to be invalid, and is sent by the gas data management terminal platform at the reporting time node set by the gas meter when the number of received domain name invalid data packets reaches a dangerous threshold; The re-appealing of all domain names in rotation specifically includes: re-appealing of all domain names that have been enabled but set to be invalid in rotation.
8. A method for reporting a gas meter according to claim 1, characterized in that: When a gas meter reports a problem, the reported content includes the gas meter number, and the IP address or domain name information bound to the gas meter number.
9. A gas meter controller, comprising a memory and a processor; the memory is used to store a computer program; characterized in that: The processor is used to implement the appeal method described in any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that: It stores a computer program, and when the computer program is executed by a processor, it implements the appeal method described in any one of claims 1 to 8.