Meter, metering method thereof and meter system

By introducing a dual-control module architecture into the meter, data synchronization and redundant storage between the main control module and the metering control module are achieved, solving the problem of unreliable metering when the module fails in traditional meters, and improving the reliability of metering and data security.

CN120971786APending Publication Date: 2025-11-18天津新智感知科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511196895.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Traditional smart meters cannot function properly when the control module fails, affecting the reliability of metering.

Method used

The system adopts a dual control module architecture, including a main control module and a metering control module. The metering control module independently receives and stores metering data and continues to work when the main control module fails. The main control module controls the meter to stop working when the metering control module fails, ensuring data synchronization and redundant storage.

Benefits of technology

It improves the metering reliability, avoids data loss and erroneous measurement due to module failure, and ensures the security and reliability of metering data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120971786A_ABST
    Figure CN120971786A_ABST
Patent Text Reader

Abstract

The invention discloses a meter, a metering method thereof and a meter system. The metering method of the meter comprises the steps that when the main control module and the metering control module work normally, the metering control module receives and stores metering data collected by the metering sampling module and transmits the metering data to the main control module, and the main control module receives and stores the metering data and transmits the metering data to the metering sampling module. The data synchronization between the metering control module and the main control module is realized; when the main control module fails, the metering control module continues to receive and store the metering data acquired by the metering sampling module; and when the metering control module fails, the main control module controls the meter to stop using. According to the invention, the metering reliability of the meter can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of metrology, and in particular to a meter, its metrology method, and its metering system. Background Technology

[0002] With the continuous advancement of technology, people's expectations for the performance and functionality of smart meters are constantly increasing. In the current technological environment, traditional smart meters, limited by design costs and miniaturization requirements, typically use a control module as the main control system. The metering module connects to the control module, transmitting metering data to achieve meter readings. However, when the control module fails, the metering function also malfunctions, affecting the reliability of the meter's measurements. Summary of the Invention

[0003] This invention provides a meter, its measurement method, and a metering system to improve the reliability of meter measurement.

[0004] According to one aspect of the present invention, a measurement method for a meter is provided, the meter comprising: a main control module, a measurement control module, and a measurement sampling module; the measurement control module is connected to the measurement sampling module and the main control module respectively;

[0005] The measurement method of the meter includes:

[0006] During normal operation of both the main control module and the metering control module, the metering control module receives and stores the metering data collected by the metering sampling module and transmits the metering data to the main control module. The main control module receives and stores the metering data, thereby achieving data synchronization between the metering control module and the main control module.

[0007] When the main control module fails, the metering control module continues to receive and store the metering data collected by the metering sampling module;

[0008] When the metering control module fails, the main control module controls the meter to stop being used.

[0009] Optionally, the main control module and the metering control module interact with each other in real time; the process of one information interaction between the main control module and the metering control module includes:

[0010] The metering control module sends communication data to the main control module;

[0011] Upon receiving the communication data, the main control module generates response data based on the legality of the communication data and transmits it to the metering control module.

[0012] The metering control module receives the response data and processes it.

[0013] The communication data includes the metering data or abnormal data; the abnormal data is used to indicate that the metering control module has failed.

[0014] If the communication data is valid, after the main control module generates response data and transmits it to the metering control module, it further includes:

[0015] When the communication data is the metering data, the main control module receives and stores the metering data to achieve data synchronization between the metering control module and the main control module;

[0016] When the communication data is abnormal, the main control module controls the meter to stop being used.

[0017] Optionally, upon receiving the communication data, the main control module generates response data based on the validity of the communication data and transmits it to the metering control module, including:

[0018] If the communication data is valid, then generate the first response data;

[0019] If the communication data is invalid, a second response data is generated;

[0020] The metering control module receives the response data and processes the response data, including:

[0021] If the response data is the first response data, then the metering control module parses the first response data, obtains the control command corresponding to the first response data, and responds to the control command to execute the corresponding action;

[0022] If the response data is the second response data, then the metering control module parses the second response data and resends the communication data to the main control module.

[0023] Optionally, before the main control module receives the communication data sent by the metering control module, the method further includes:

[0024] In the event of a communication timeout between the main control module and the metering control module:

[0025] The main control module determines whether a first condition is met; wherein, the first condition is that the main control module has already determined whether the metering control module and the metering sampling module are damaged;

[0026] If so, the main control module checks whether the communication between the main control module and the metering control module is normal;

[0027] If not, the main control module controls the meter to stop using and checks whether the main control module and the metering control module are communicating normally.

[0028] If no communication timeout occurs between the main control module and the metering control module, the main control module checks whether the communication between the main control module and the metering control module is normal.

[0029] Wherein, when the main control module and the metering control module communicate normally, the main control module receives the communication data;

[0030] Upon receiving the communication data, the main control module generates response data based on the validity of the communication data and transmits it to the metering control module. The method further includes:

[0031] The main control module records the communication time of this information exchange; wherein, the main control module determines whether a communication timeout has occurred based on the recorded communication time.

[0032] Optionally, the meter further includes a valve control module and an audible alarm module, both connected to the main control module;

[0033] The main control module controls the meter to stop being used, including:

[0034] The main control module controls the valve control module to perform a valve closing operation, so that no medium to be detected flows through the metering sampling module in the metering meter.

[0035] The main control module controls the sound alarm module to perform alarm operations.

[0036] Optionally, before the metering control module sends communication data to the main control module, the method further includes:

[0037] When the metering control module determines that it needs to communicate with the main control module, it determines whether it is currently communicating with the main control module.

[0038] If so, determine whether the metering control module has received the reply data from the main control module;

[0039] If not, set the communication flag;

[0040] After the metering control module receives and processes the response data, it further includes:

[0041] Clear the "Communication in Progress" flag.

[0042] Optionally, the meter further includes a power module, which is connected to the main control module and the metering control module respectively;

[0043] The method further includes:

[0044] When the power module synchronously powers on the main control module and the metering control module, both the metering control module and the main control module perform power-on initialization; and during the power-on initialization, the metering control module and the main control module exchange information to achieve data synchronization.

[0045] The meter further includes: a display module connected to the main control module; the method further includes:

[0046] After storing the measurement data, the main control module controls the display module to display the measurement data;

[0047] The meter also includes: a wireless communication module, which is connected to the main control module and wirelessly connected to the host computer;

[0048] The method further includes:

[0049] When the main control module controls the meter to stop being used, it uploads the meter's fault information to the host computer through the wireless communication module.

[0050] The meter also includes a storage module, a valve control module, a button module, and an audible alarm module, all of which are connected to the main control module;

[0051] The method further includes:

[0052] The metering control module detects whether the metering control module itself and the metering sampling module are abnormal, and uploads the abnormal information to the main control module.

[0053] The main control module detects whether the main control module itself, the storage module, the valve control module, the display module, the wireless communication module, and the button module are abnormal;

[0054] When at least one of the main control module, the storage module, the valve control module, the display module, the wireless communication module, and the button module malfunctions, the main control module controls the sound alarm module to sound an alarm.

[0055] According to another aspect of the present invention, a meter is provided, comprising: a main control module, a metering control module, and a metering sampling module; the meter performs measurement using the metering method provided in any embodiment of the present invention.

[0056] Optionally, the metering control module and the main control module exchange information via a serial port;

[0057] The meter also includes a power module, which is connected to the main control module and the metering control module, and is used to supply power to both the main control module and the metering control module simultaneously.

[0058] The meter also includes a storage module, a valve control module, a display module, a button module, a wireless communication module, and an audible alarm module, all of which are connected to the main control module.

[0059] According to another aspect of the present invention, a metering system is provided, characterized in that it includes: a host computer and at least one meter as provided in any embodiment of the present invention, wherein each meter is communicatively connected to the host computer.

[0060] The technical solution of this invention is based on a dual-control module architecture consisting of a main control module and a metering control module. The metering control module independently extracts metering data. During normal operation of both the main control module and the metering control module, the metering data collected by the metering sampling module can be synchronized between the two modules, enabling redundant storage of metering data. This ensures the normal operation and prevents data loss, guaranteeing the security and reliability of the metering data, thereby improving the reliability of the metering. Even after the main control module fails, the metering control module can continue to receive and store metering data, ensuring that the original metering function of the meter remains unaffected. After the main control module resumes operation, data synchronization between the metering control module and the main control module continues, ensuring that metering data is not lost, thus guaranteeing metering reliability. When the metering control module fails, the main control module stops the meter from use, preventing erroneous metering or data loss in case of failure, and facilitating timely meter maintenance by the user. In summary, the metering method provided by this invention can improve the reliability of metering.

[0061] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0062] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0063] Figure 1A schematic diagram of the structure of a meter provided in an embodiment of the present invention;

[0064] Figure 2 A flowchart illustrating a measurement method using a meter provided in an embodiment of the present invention;

[0065] Figure 3 A flowchart illustrating an information exchange between a main control module and a metering control module, provided as an embodiment of the present invention;

[0066] Figure 4 A schematic diagram of a structure for synchronous power-on and power-off of a main control module and a metering control module provided in an embodiment of the present invention;

[0067] Figure 5 A flowchart illustrating another measurement method using a measuring instrument provided in an embodiment of the present invention;

[0068] Figure 6 A flowchart illustrating another measurement method using a measuring instrument provided in an embodiment of the present invention;

[0069] Figure 7 A flowchart illustrating another measurement method using a measuring instrument provided in an embodiment of the present invention;

[0070] Figure 8 This is a schematic diagram of another meter structure provided in an embodiment of the present invention. Detailed Implementation

[0071] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.

[0072] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and their variations, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0073] This invention provides a measurement method for a measuring instrument. For ease of understanding, the structure of the measuring instrument will first be described. Figure 1 A schematic diagram of the structure of a meter provided in an embodiment of the present invention is shown below. Figure 1 The meter includes: a main control module 10, a metering control module 20, and a metering sampling module 30; the metering control module 20 is connected to the metering sampling module 30 and the main control module 10 respectively.

[0074] Both the main control module 10 and the metering control module 20 can be MCUs (Micro Controller Units). The meter can be a water meter, electricity meter, or gas meter. By setting the meter to include the main control module 10 and the metering control module 20, it is equivalent to adding the metering control module 20 to the traditional meter's main control system, which uses an MCU. The metering control module 20 receives metering data from the metering sampling module 30, thus avoiding the problem of the meter's metering function failing if the main control module 10 fails.

[0075] The measurement method of the meter provided in the embodiments of the present invention will be described in detail below. Figure 2 A flowchart of a measurement method for a meter provided in an embodiment of the present invention is shown below. Figure 2 The measurement methods of the meter include:

[0076] S110. During normal operation of both the main control module and the metering control module, the metering control module receives and stores the metering data collected by the metering sampling module and transmits the metering data to the main control module. The main control module receives and stores the metering data, thereby achieving data synchronization between the metering control module and the main control module.

[0077] The metering sampling module is used to collect the flow rate of the medium to be tested flowing through the metering sampling module. The main control module and the metering control module operate independently without interfering with each other. That is, if one of them fails, the other can continue to work, ensuring the reliable use of the meter.

[0078] Specifically, the metering control module independently receives the metering data collected by the metering sampling module and stores it in its own storage unit. Then, it transmits the metering data to the main control module through a dedicated communication interface to achieve data synchronization between the two. This ensures that both the main control module and the metering control module store metering data, guaranteeing that the data is normal and not lost.

[0079] S120. When the main control module fails, the metering control module continues to receive and store the metering data collected by the metering sampling module.

[0080] Specifically, because the metering control module operates independently, the failure of the main control module will not affect its ability to receive and store metering data collected by the metering sampling module, ensuring the reliable operation of the meter. When the main control module resumes operation, the metering control module synchronizes its data with the main control module to ensure no data loss. At this point, the main control module essentially stores a backup of the metering data.

[0081] S130. When the metering control module fails, the main control module controls the meter to stop being used.

[0082] Specifically, the metering data collected by the sampling module is directly transmitted to the metering control module, where it is stored before being transmitted to the main control module for data synchronization. Therefore, if the metering control module fails, it cannot receive and store metering data, resulting in data loss. Consequently, the metering data in the main control module will not be updated, affecting the meter's metering function and causing inconvenience and losses for users and businesses. Conversely, if the metering control module fails, the main control module, being functioning normally, can stop the meter from operating, preventing the metering data collected by the sampling module from failing to be transmitted to the main control module in a timely manner, thus avoiding inaccurate and unreliable metering data in the main control module. Once the metering control module resumes operation, the main control module can restart the metering and synchronize data with the metering control module, ensuring the safety and reliability of the metering data.

[0083] The technical solution of this invention is based on a dual-control module architecture consisting of a main control module and a metering control module. The metering control module independently extracts metering data. During normal operation of both the main control module and the metering control module, the metering data collected by the metering sampling module can be synchronized between the two modules, enabling redundant storage of metering data. This ensures the normal operation and prevents data loss, guaranteeing the security and reliability of the metering data, thereby improving the reliability of the metering. Even after the main control module fails, the metering control module can continue to receive and store metering data, ensuring that the original metering function of the meter remains unaffected. After the main control module resumes operation, data synchronization between the metering control module and the main control module continues, ensuring that metering data is not lost, thus guaranteeing metering reliability. When the metering control module fails, the main control module stops the meter from use, preventing erroneous metering or data loss in case of failure, and facilitating timely meter maintenance by the user. In summary, the metering method provided by this invention can improve the reliability of metering.

[0084] Based on the above embodiments, the main control module and the metering control module exchange information in real time to ensure the reliability of metering data storage. For example, the metering control module sends a heartbeat signal to the main control module at fixed intervals to indicate that the metering control module is operating normally. For ease of explanation, the specific interaction process of one information exchange between the main control module and the metering control module will be described as an example.

[0085] Figure 3 A flowchart illustrating an information exchange between the main control module and the metering control module, provided as an embodiment of the present invention, is shown below. Figure 3 The process of information exchange between the main control module and the metering control module includes:

[0086] S201, The metering control module sends communication data to the main control module.

[0087] The communication data includes metering data or abnormal data; abnormal data is used to indicate that the metering control module has failed.

[0088] Specifically, when the metering control module is operating normally, it receives and stores the metering data collected by the metering sampling module, and sends the metering data to the main control module to achieve data synchronization between the main control module and the metering control module.

[0089] In the event of a failure of the metering control module, the metering control module sends abnormal data to the main control module, informing the main control module that an abnormality has occurred in the metering control module itself. The main control module then controls the meter to stop metering.

[0090] Understandably, when the main control module needs to synchronize data, it can initiate a communication to remind the metering control module.

[0091] S202. Upon receiving communication data, the main control module generates response data based on the legality of the communication data and transmits it to the metering control module.

[0092] In this context, "valid communication data" can be understood as data transmitted according to a pre-set fixed format; otherwise, the communication data is considered invalid. The specific pre-set fixed format can be set according to the communication interface type and communication protocol used between the main control module and the metering control module.

[0093] Specifically, the main control module first determines whether it has received communication data sent by the metering control module. If it has received the communication data, the main control module determines whether the communication data is transmitted in a fixed format, and then generates a reply data to be transmitted to the metering control module.

[0094] It is understandable that the main control module generates different response data depending on whether the communication data is valid or invalid, so that the metering control module can perform different actions based on different response data to ensure the normal operation of the meter.

[0095] S203. The metering control module receives the response data and processes it.

[0096] Specifically, the metering control module parses the response data and then performs corresponding actions based on the information in the parsed response data.

[0097] Optionally, provided the communication data is valid, after the main control module generates response data and transmits it to the metering control module, it further includes:

[0098] 1) When the communication data is metering data, the main control module receives and stores the metering data to achieve data synchronization between the metering control module and the main control module.

[0099] 2) When the communication data is abnormal, the main control module will stop the meter from being used.

[0100] Optionally, upon receiving communication data, the main control module generates response data based on the validity of the communication data and transmits it to the metering control module, including:

[0101] 1) If the communication data is valid, that is, the communication data is transmitted to the main control module in a fixed format, the main control module generates the first response data and transmits it to the metering control module.

[0102] 2) If the communication data is invalid, that is, the communication data is not transmitted to the main control module in a fixed format, the main control module generates second response data and transmits it to the metering control module.

[0103] Understandably, the first and second response data are different. For example, the second response data may contain 2E error data to indicate that the current communication data is invalid.

[0104] The metering control module then receives the response data and processes it, including:

[0105] 1) If the response data is the first response data, the metering control module parses the first response data, obtains the control command corresponding to the first response data, and responds to the control command to execute the corresponding action.

[0106] Specifically, the first response data contains control commands issued by the main control module, which are used to control the metering control module to perform corresponding actions.

[0107] 2) If the response data is the second response data, the metering control module will parse the second response data and then resend the communication data to the main control module. This ensures that the information exchange process between the main control module and the metering control module can proceed normally.

[0108] Optionally, before the main control module receives the communication data sent by the metering control module, the method further includes:

[0109] In the event of a communication timeout between the main control module and the metering control module:

[0110] 1) The main control module determines whether the first condition is met.

[0111] The first condition is that the main control module has already determined whether the metering control module and the metering sampling module are damaged. For example, whether the metering control module and the metering sampling module are damaged can be determined by checking whether the relevant trigger counter is damaged.

[0112] 2) If so, the main control module checks whether the communication between the main control module and the metering control module is normal in order to determine whether the metering control module has recovered and can communicate normally with the main control module.

[0113] 3) If not, the main control module will stop the meter from being used and check whether the main control module and the metering control module are communicating normally.

[0114] Meanwhile, if the main control module determines that the first condition is not met during this process, it will set a single-sided flag, which indicates that the metering control module and the metering sampling module have been damaged.

[0115] In this embodiment, by directly detecting whether the main control module and the metering control module are communicating normally when the first condition is met, and by directly setting the unilateral flag and controlling the meter to stop using when the first condition is not met, the looping alarm of the main control module can be avoided.

[0116] Understandably, if the main control module detects that the communication between the main control module and the metering control module is normal, the unilateral flag will be cleared.

[0117] If no communication timeout occurs between the main control module and the metering control module, the main control module checks whether the communication between the main control module and the metering control module is normal.

[0118] When the main control module and the metering control module communicate normally, the main control module receives communication data.

[0119] Optionally, after the main control module receives communication data, generates response data based on the validity of the communication data, and transmits it to the metering control module, the method further includes:

[0120] The main control module records the communication time of this information exchange; it then uses this recorded time to determine if a communication timeout has occurred. In other words, the main control module uses the existence of a communication timeout between itself and the metering control module to determine whether the metering control module and the metering sampling module are damaged.

[0121] Optionally, the meter also includes a valve control module and an audible alarm module, both connected to the main control module. Therefore, the main control module can control the meter to stop operating by:

[0122] The main control module controls the valve control module to perform a valve-closing operation, ensuring that no medium to be detected flows through the metering sampling module, thus guaranteeing the accuracy of the metering data. Additionally, the main control module controls the audible alarm module to issue an alarm, promptly alerting relevant personnel to take appropriate measures to prevent accidents.

[0123] Optionally, before the metering control module sends communication data to the main control module, the method further includes:

[0124] 1) When the metering control module determines that it needs to communicate with the main control module, it determines whether it is currently communicating with the main control module.

[0125] Specifically, during this process, a communication trigger flag can be set to initiate the communication process.

[0126] 2) If so, determine whether the metering control module has received the reply data from the main control module.

[0127] Specifically, if the metering control module receives response data from the main control module, it generates response data based on the validity of the communication data and transmits it to the metering control module; if the metering control module does not receive response data from the main control module, the communication ends.

[0128] 3) If not, set the communication flag.

[0129] Specifically, during this process, the trigger communication flag is cleared and the communication in progress flag is set to indicate that the current functional module is in a communication state, thus preventing other functional modules from repeatedly initiating communication requests and interfering with the current communication operation.

[0130] Optionally, after the metering control module receives and processes the response data, it further includes:

[0131] Clearing the "Communication in Progress" flag indicates that communication is complete, preparing for the next communication. This helps ensure that each communication is independent and not affected by the status of the previous communication.

[0132] Optionally, the meter also includes a power module, which is connected to both the main control module and the metering control module. Specifically, Figure 4 This is a schematic diagram illustrating the synchronous power-on and power-off structure of the main control module and the metering control module, provided in an embodiment of the present invention. (See attached diagram.) Figure 4 Based on the above embodiments, both the main control module 10 and the metering control module 20 are connected to a power supply module, i.e., a single power management system is used to achieve synchronous power-on and power-off. Further, the power supply module may include a power-on detection unit 41 and a power-off detection unit 42, respectively connected to the main control module 10 and the metering control module 20, to detect the power-on and power-off states of the main control module 10 and the metering control module 20. Specifically, the main control module 10 and the metering control module 20 synchronize data during synchronous power-on. For example, the main control module 10 and the metering control module 20 are connected via a serial port and communicate using UART (Universal Asynchronous Receiver / Transmitter). After synchronous power-off, they store the metering data they have received.

[0133] Specifically, when the power supply module synchronously powers on the main control module and the metering control module, both the metering control module and the main control module perform power-on initialization; and during the power-on initialization, the metering control module and the main control module exchange information to achieve data synchronization.

[0134] Optionally, the meter also includes a display module connected to the main control module; therefore, the meter's measurement methods also include:

[0135] After storing the metering data, the main control module controls the display module to display the metering data.

[0136] Optionally, the meter also includes a wireless communication module, which connects to the main control module and wirelessly communicates with the host computer; therefore, the meter's measurement method also includes:

[0137] When the main control module stops using the meter, it uploads the meter's fault information to the host computer via the wireless communication module.

[0138] Optionally, the meter also includes: a storage module, a valve control module, a button module, and an audible alarm module, all connected to the main control module; therefore, the meter's measurement methods also include:

[0139] The metering control module detects whether there are any abnormalities in itself and the metering sampling module, and uploads the abnormality information to the main control module.

[0140] The main control module detects whether there are any abnormalities in itself, the storage module, the valve control module, the display module, the wireless communication module, and the button module;

[0141] When at least one of the following modules malfunctions: the main control module itself, the storage module, the valve control module, the display module, the wireless communication module, and the button module, the main control module controls the sound alarm module to sound an alarm.

[0142] The fault information may include information indicating that at least one of the following modules has malfunctioned: metering control module, metering sampling module, main control module, storage module, valve control module, display module, wireless communication module, and button module.

[0143] Figure 5 A flowchart of another measurement method for a meter provided in an embodiment of the present invention can be found here. Figure 5 Based on the above embodiments, the operating logic of the main control module includes:

[0144] S301, the main control module performs power-on initialization; and during the power-on initialization period, it exchanges information with the metering control module to achieve data synchronization.

[0145] S302. The main control module processes the communication data transmitted by the metering control module.

[0146] S303, the main control module controls the storage module, valve control module, display module, button module, and wireless communication module to perform anomaly detection-related actions.

[0147] S304. The main control module determines whether the above modules are abnormal based on the action results of the storage module, valve control module, display module, button module, display module and wireless communication module, and detects whether the main control module itself is abnormal.

[0148] In this embodiment, the main control module can perform anomaly detection separately or simultaneously when controlling each functional module.

[0149] S305. When at least one of the following modules malfunctions: the main control module itself, the storage module, the valve control module, the display module, the wireless communication module, and the button module, the main control module controls the sound alarm module to sound an alarm.

[0150] Among them, the fault information related to metering is detected by the metering control module and reported to the main control module.

[0151] S306. After storing the metering data, the main control module controls the display module to display the metering data.

[0152] For example, the display module can also display power level, valve on / off status, and whether any abnormality has occurred in each module.

[0153] After completing S306, the process can return to S302, allowing the main control module's operating logic to run continuously, enabling real-time monitoring of the status of each functional module and rapid response to various events.

[0154] Figure 6 A flowchart of another measurement method for a meter provided in an embodiment of the present invention can be found here. Figure 6 Based on the above embodiments, the operating logic of the metering control module includes:

[0155] S401, the metering control module performs power-on initialization; and during the power-on initialization period, it exchanges information with the main control module to achieve data synchronization.

[0156] S402. The metering control module detects whether the metering control module itself and the metering sampling module are abnormal.

[0157] S403. The metering control module transmits communication data to the main control module, receives the response data transmitted by the main control module, and processes the response data.

[0158] When the metering control module and the metering sampling module are functioning normally, the metering control module sends metering data to the main control module. When the metering control module and the metering sampling module fail, the metering control module sends abnormal data to the main control module.

[0159] For example, after completing S403, the process can return to S402 so that the operating logic of the metering control module can run continuously, enabling it to detect whether it and the metering sampling module are abnormal in real time and to collect metering data in real time, ensuring the timeliness and accuracy of the metering data.

[0160] In conclusion, Figure 5 and Figure 6 The paper presents the independent operating logic of the main control module and the metering control module, with each having its own set of anomaly detection logic to ensure that the main logic of the two does not affect each other; and the two exchange information after power-on initialization and anomaly detection to ensure the accuracy of the metering data stored in the main control module.

[0161] Figure 7 A flowchart of another measurement method for a meter provided in an embodiment of the present invention can be found here. Figure 7 The metering control module executes S501-S506, and the main control module executes S508-S518. Specifically, the process of one information exchange between the main control module and the metering control module in the meter includes:

[0162] The metering control module needs to execute:

[0163] S501. Determine whether communication is needed; if yes, execute S502; if no, end the current information exchange.

[0164] Specifically, this step involves the metering control module determining whether communication with the main control module is necessary. If the metering control module determines that communication with the main control module is required, it can set a trigger communication flag to initiate the communication process.

[0165] S502. Determine if communication is in progress; if yes, execute S503; if no, execute S505.

[0166] Specifically, this step involves the metering control module determining whether it is communicating with the main control module.

[0167] S503. Determine whether a response data has been received from the main control module; if yes, execute S504; if no, end this information exchange.

[0168] S504. Process the data replied by the main control module and clear the "Communication in Progress" flag.

[0169] S505, Set the communication flag.

[0170] Specifically, in this step, the trigger communication flag set in the aforementioned process is cleared.

[0171] S506, Send communication data to the main control module.

[0172] For the main control module, the following needs to be executed:

[0173] S508. Determine if communication timeout has occurred; if yes, proceed to S509; otherwise, proceed to S511.

[0174] Specifically, the main control module receives heartbeat signals from the metering control module at fixed intervals. If it does not receive a heartbeat signal from the metering control module within a preset time, it determines that the communication between the main control module and the metering control module has timed out. For example, the metering control module sends a heartbeat signal to the main control module every 2 minutes. If the main control module does not receive a heartbeat signal from the metering control module within 5 minutes, it determines that the communication between the main control module and the metering control module has timed out.

[0175] S509. Has the trigger counter been determined to be faulty? If yes, then execute S511; if no, then execute S510.

[0176] Specifically, this step is equivalent to the main control module determining whether the first condition is met; the first condition is that the main control module has already determined whether the metering control module and the metering sampling module are damaged, that is, it has already determined that the relevant trigger counter is faulty.

[0177] S510 sets a single-sided indicator and controls valve closure and alarms.

[0178] Specifically, setting the one-sided flag is equivalent to the main control module marking at least one of the metering control module and the metering sampling module as damaged, while controlling the valve closure is equivalent to stopping the meter from use. For example, the one-sided flag can be cleared when communicating normally with the metering control module.

[0179] S511. Check if communication with the metering control module is established; if yes, execute S512; otherwise, end the current information exchange.

[0180] Specifically, this step involves the main control module checking whether the communication between the main control module and the metering control module is normal.

[0181] S512. Determine whether communication data has been received; if yes, execute S513; if no, end this information exchange.

[0182] S513. Determine if the communication data is valid; if yes, proceed to S514; if no, proceed to S515.

[0183] Specifically, this step involves the main control module receiving communication data, generating response data based on the legality of the communication data, and transmitting it to the metering control module.

[0184] S514, Reply Metering Control Module.

[0185] Specifically, this step involves generating first response data and transmitting it to the metering control module if the communication data is valid.

[0186] S515, Error 2E.

[0187] Specifically, this step involves generating second response data and transmitting it to the metering control module if the communication data is invalid.

[0188] It is understandable that, as shown by the dashed arrow, data transmission between the main control module and the metering control module can be based on UART.

[0189] S516, Enable low-power serial port and synchronize communication time.

[0190] Specifically, up to this step, the data transmission function based on the serial port in this information exchange has been completed. At this time, the serial port is set to low power operation to reduce power consumption without affecting the subsequent processing of the main control module.

[0191] Specifically, the synchronization communication time is used to determine whether a communication timeout has occurred. For example, if the end time of this communication is 4:00, and the start time of the next communication is later than 4:05, then a communication timeout is determined.

[0192] S517, Processing communication data.

[0193] The communication data includes either metering data or abnormal data. Specifically, when the communication data is metering data, the main control module receives and stores the metering data, achieving data synchronization between the metering control module and the main control module; when the communication data is abnormal data, the main control module stops the meter from being used.

[0194] S518. Perform anomaly detection.

[0195] Specifically, this step involves the main control module checking whether there are any abnormalities in the main control module itself, the storage module, the valve control module, the display module, the wireless communication module, and the button module.

[0196] It should be noted that, in order to ensure the reliability and security of the measurement data, a separate encryption technology can be used for the measurement control module.

[0197] In summary, the meter provided in this embodiment of the invention uses a dual MCU (main control module and metering control module) design and provides complete operating logic for the dual MCUs. This is equivalent to allowing the meter's most important metering function to operate independently, unaffected by the failure of the main control module, thus ensuring the reliability of the metering function to the greatest extent. At the same time, the metering control module adopts a separate encryption technology, which also ensures the security of the data.

[0198] This invention also provides a measuring instrument that uses the measuring method described in any of the above embodiments for measurement. Therefore, this measuring instrument has corresponding beneficial effects. The structure of the measuring instrument can be found in [reference needed]. Figure 1 The metering control module 20 is connected to the main control module 10 and the metering sampling module 30 respectively.

[0199] Figure 8 For another structural diagram of a meter provided in an embodiment of the present invention, see [link / reference]. Figure 8 Based on the above embodiments, optionally, the metering control module 20 and the main control module 10 interact via a serial port. For example, the metering control module 20 and the main control module 10 can be connected via a UART interface.

[0200] Optionally, the meter also includes a power supply module 40, which is connected to the main control module 10 and the metering control module 20, and is used to supply power to both the main control module 10 and the metering control module 20 simultaneously.

[0201] Optionally, the meter also includes: a storage module 50, a valve control module 60, a display module 70, a button module 80, a wireless communication module 90, and a sound alarm module 100, all connected to the main control module 10. For example, the storage module 50 stores various data received by the main control module 10; the valve control module 60 controls the opening and closing of the valve according to the instructions of the main control module 10 to regulate the flow rate of the medium passing through the meter; the display module 70 presents key information (such as metering data, status information, alarm information, etc.) to the user in a visual manner; the button module 80 controls and sets the meter via buttons; the wireless communication module 90 enables information transmission between the main control module 10 and the host computer; and the sound alarm module 100 alarms when any functional module sends an abnormality, reminding the user or operator to handle it promptly.

[0202] The meter can be a gas meter.

[0203] This invention also provides a metering system, including a host computer and at least one meter provided in any embodiment of this invention, each meter being communicatively connected to the host computer. Therefore, this metering system has corresponding beneficial effects. For example, the host computer is used to receive various information uploaded by each meter, such as fault information.

[0204] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0205] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A measurement method using a measuring instrument, characterized in that, Meters include: Main control module, metering control module, and metering sampling module; The metering control module is connected to the metering sampling module and the main control module respectively; The measurement method of the meter includes: During normal operation of both the main control module and the metering control module, the metering control module receives and stores the metering data collected by the metering sampling module and transmits the metering data to the main control module. The main control module receives and stores the metering data, thereby achieving data synchronization between the metering control module and the main control module. When the main control module fails, the metering control module continues to receive and store the metering data collected by the metering sampling module; When the metering control module fails, the main control module controls the meter to stop being used.

2. The measurement method of the meter according to claim 1, characterized in that, The main control module and the metering control module interact with each other in real time; the process of one information interaction between the main control module and the metering control module includes: The metering control module sends communication data to the main control module; Upon receiving the communication data, the main control module generates response data based on the legality of the communication data and transmits it to the metering control module. The metering control module receives the response data and processes it. The communication data includes the metering data or abnormal data; the abnormal data is used to indicate that the metering control module has failed. If the communication data is valid, after the main control module generates response data and transmits it to the metering control module, it further includes: When the communication data is the metering data, the main control module receives and stores the metering data to achieve data synchronization between the metering control module and the main control module; When the communication data is abnormal, the main control module controls the meter to stop being used.

3. The measurement method of the meter according to claim 2, characterized in that, Upon receiving the communication data, the main control module generates response data based on the validity of the communication data and transmits it to the metering control module, including: If the communication data is valid, then generate the first response data; If the communication data is invalid, a second response data is generated; The metering control module receives the response data and processes the response data, including: If the response data is the first response data, then the metering control module parses the first response data, obtains the control command corresponding to the first response data, and responds to the control command to execute the corresponding action; If the response data is the second response data, then the metering control module parses the second response data and resends the communication data to the main control module.

4. The measurement method of the meter according to claim 2, characterized in that, Before the main control module receives the communication data sent by the metering control module, the method further includes: In the event of a communication timeout between the main control module and the metering control module: The main control module determines whether a first condition is met; wherein, the first condition is that the main control module has already determined whether the metering control module and the metering sampling module are damaged; If so, the main control module checks whether the communication between the main control module and the metering control module is normal; If not, the main control module controls the meter to stop using and checks whether the main control module and the metering control module are communicating normally. If no communication timeout occurs between the main control module and the metering control module, the main control module checks whether the communication between the main control module and the metering control module is normal. Wherein, when the main control module and the metering control module communicate normally, the main control module receives the communication data; Upon receiving the communication data, the main control module generates response data based on the validity of the communication data and transmits it to the metering control module. The method further includes: The main control module records the communication time of this information exchange; wherein, the main control module determines whether a communication timeout has occurred based on the recorded communication time.

5. The measurement method of the measuring instrument according to any one of claims 1-4, characterized in that, The meter also includes a valve control module and an audible alarm module, both of which are connected to the main control module; The main control module controls the meter to stop being used, including: The main control module controls the valve control module to perform a valve closing operation, so that no medium to be detected flows through the metering sampling module in the metering meter. The main control module controls the sound alarm module to perform alarm operations.

6. The measurement method of the meter according to claim 2, characterized in that, Before the metering control module sends communication data to the main control module, the method further includes: When the metering control module determines that it needs to communicate with the main control module, it determines whether it is currently communicating with the main control module. If so, determine whether the metering control module has received the reply data from the main control module; If not, set the communication flag; After the metering control module receives and processes the response data, it further includes: Clear the "Communication in Progress" flag.

7. The measurement method of the meter according to claim 1, characterized in that, The meter also includes a power module, which is connected to the main control module and the metering control module respectively; The method further includes: When the power module synchronously powers on the main control module and the metering control module, both the metering control module and the main control module perform power-on initialization; and during the power-on initialization, the metering control module and the main control module exchange information to achieve data synchronization. The meter further includes: a display module connected to the main control module; the method further includes: After storing the measurement data, the main control module controls the display module to display the measurement data; The meter also includes: a wireless communication module, which is connected to the main control module and wirelessly connected to the host computer; The method further includes: When the main control module controls the meter to stop being used, it uploads the meter's fault information to the host computer through the wireless communication module. The meter also includes a storage module, a valve control module, a button module, and an audible alarm module, all of which are connected to the main control module; The method further includes: The metering control module detects whether the metering control module itself and the metering sampling module are abnormal, and uploads the abnormal information to the main control module. The main control module detects whether the main control module itself, the storage module, the valve control module, the display module, the wireless communication module, and the button module are abnormal; When at least one of the main control module, the storage module, the valve control module, the display module, the wireless communication module, and the button module malfunctions, the main control module controls the sound alarm module to sound an alarm.

8. A measuring instrument, characterized in that, include: The meter comprises a main control module, a metering control module, and a metering sampling module; the metering instrument uses the metering method described in any one of claims 1-7 for measurement.

9. The measuring instrument according to claim 8, characterized in that, The metering control module and the main control module exchange information via a serial port; The meter also includes a power module, which is connected to the main control module and the metering control module, and is used to supply power to both the main control module and the metering control module simultaneously. The meter also includes a storage module, a valve control module, a display module, a button module, a wireless communication module, and an audible alarm module, all of which are connected to the main control module.

10. A metering system, characterized in that, It includes: a host computer and at least one meter as described in any one of claims 8-9, each of the meter being communicatively connected to the host computer.