Water meter reading method and system based on M-Bus collector
By adopting a water meter meter reading system based on the M-Bus collector in the water meter management system, using the M-Bus communication bus and cyclic scanning method, the problem of poor signal of water meter reading in harsh environments is solved, and the success rate and management efficiency of meter reading are improved.
Patent Information
- Application Number
- CN202411949881.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, the signal of water meter reading in harsh environments is poor, resulting in a low success rate of remote meter reading, and it is impossible to effectively improve the intelligence level and operation and maintenance efficiency of the intelligent water meter management system.
The water meter reading system based on the M-Bus collector is adopted, and multiple M-Bus water meters are connected through the M-Bus communication bus. The water meter data is collected by cyclic scanning method, and the data is transmitted to the terminal through wireless communication.
It improves the success rate of water meter reading, reduces operation and maintenance costs, improves water resource management efficiency, and achieves low power consumption and efficient data acquisition through custom protocols and cyclic scanning methods.
Smart Images

Figure CN119854678A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intelligent meter reading, and in particular to a water meter reading method and system based on an M-Bus collector. Background Art
[0002] With the continuous advancement of science and technology, traditional mechanical water meters can no longer meet the needs of modern urban water supply management. The difficulty of reading meters in high-rise residential buildings in cities and the improvement of meter reading efficiency are becoming increasingly prominent, and a more advanced water meter technology is urgently needed to measure water consumption.
[0003] At present, most water meters are installed in underground wells 2 to 3 meters deep. The environment of the water meter installation location is harsh, and it is difficult for network signals to penetrate the well cover to reach the bottom of the well, resulting in poor signals. If wireless communication technology is used to collect water meter data and perform remote meter reading, there will be a low success rate or failure to read the meter. Therefore, it has become an urgent need for the development of the industry to develop a new water meter data collection method to improve the intelligence level of the smart water meter management system, reduce operation and maintenance costs, and improve water resource management efficiency. Summary of the invention
[0004] The embodiments of the present application provide a water meter reading method and system based on an M-Bus collector, so as to at least solve the technical problem of low success rate of remote water meter reading in the related art.
[0005] According to one aspect of an embodiment of the present application, a water meter reading system based on an M-Bus collector is provided, comprising:
[0006] A plurality of M-Bus water meters, used for interactively communicating with an M-Bus collector based on a custom protocol, and sending generated water meter data to the M-Bus collector;
[0007] An M-Bus collector is connected to the multiple M-Bus water meters based on a two-wire M-Bus communication bus, and is used to collect water meter data based on a preset cyclic scanning method, and is also used to send the water meter data to a terminal; the cyclic scanning method includes sending collection instructions to the water meters in a preset order and recording the collection results, and if a round of collection is not completely successful, re-collecting the unsuccessful water meters after a preset time;
[0008] The terminal is wirelessly connected to the M-Bus collector and is used to configure parameters of the M-Bus collector and receive water meter data transmitted by the M-Bus collector.
[0009] In one implementation, the custom protocol content includes device information authentication, function instruction data content, and data information verification.
[0010] In one implementation, the fields of the device information authentication include: meter type, meter number information, and function code;
[0011] The function instruction data content includes: corresponding function instruction;
[0012] The fields for data information verification include: a start character, an end character, and a CS check field.
[0013] In one implementation, the function instruction data content includes: a historical data query instruction and a log record query instruction.
[0014] In one implementation, the M-Bus collector collects the water meter data, including:
[0015] The M-Bus collector sends data collection instructions to each M-Bus water meter in turn according to a preset order, and records the collection results of each M-Bus water meter after waiting for a preset first time period;
[0016] The M-Bus collector determines whether all M-Bus water meters have been successfully collected after a round of scanning;
[0017] If all M-Bus water meters are successfully collected, the collection task is terminated; otherwise, a new round of collection is initiated for the M-Bus water meters that have not been successfully collected after the preset second time period;
[0018] If there are still M-Bus water meters that have not been successfully collected after the preset round of collection, the collection is stopped and the M-Bus water meters that have not been successfully collected are marked as collection failures.
[0019] In one embodiment, after the M-Bus collector sends the data collection instruction to each M-Bus water meter in sequence according to a preset order, it also includes:
[0020] After the target M-Bus water meter receives the data collection instruction, verify whether the data collection instruction is legal;
[0021] If the data collection instruction is legal, analyzing whether the data collection instruction is the meter number corresponding to the target M-Bus water meter;
[0022] If it is the meter number corresponding to the target M-Bus water meter, a command response is performed and the water meter data is returned to the M-Bus collector.
[0023] In one implementation, after receiving the water meter data returned by the target M-Bus water meter, the M-Bus collector verifies whether the data field is legal;
[0024] If the data field is legal, analyze whether the water meter data is the meter number corresponding to the target M-Bus water meter;
[0025] If it is the meter number corresponding to the target M-Bus water meter, determine whether the returned water meter data corresponds to the data collection instruction;
[0026] If it corresponds to the data collection instruction, the returned water meter data is parsed and the target M-Bus water meter is marked as successfully collected.
[0027] In one implementation, when the M-Bus collector receives a historical water meter data query instruction sent by a terminal, it also includes:
[0028] The M-Bus collector determines whether it stores the historical water meter data;
[0029] If the historical water meter data exists, returning the historical water meter data to the terminal;
[0030] If the historical water meter data does not exist, the historical water meter data query instruction is cached and the historical water meter data query instruction is sent to the M-Bus water meter.
[0031] According to another aspect of the embodiment of the present application, a water meter reading method based on an M-Bus collector is provided, comprising:
[0032] Connect with multiple M-Bus water meters based on two-wire M-Bus communication bus;
[0033] Collecting water meter data based on a preset cyclic scanning method, the cyclic scanning method includes sending collection instructions to the water meter in a preset order and recording the collection results. If a round of collection is not completely successful, re-collecting the unsuccessful water meter after a preset time;
[0034] The water meter data is sent to the terminal.
[0035] In one embodiment, water meter data is collected based on a preset cyclic scanning method, including:
[0036] Sending data collection instructions to each M-Bus water meter in turn according to a preset order, and recording the collection results of each M-Bus water meter after waiting for a preset first time period;
[0037] After a round of scanning, determine whether all M-Bus water meters have been successfully collected;
[0038] If all M-Bus water meters are successfully collected, the collection task is terminated; otherwise, a new round of collection is initiated for the M-Bus water meters that have not been successfully collected after the preset second time period;
[0039] If there are still M-Bus water meters that have not been successfully collected after the preset round of collection, the collection is stopped and the M-Bus water meters that have not been successfully collected are marked as collection failures.
[0040] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0041] The present application provides a water meter reading system based on an M-Bus collector, including multiple M-Bus water meters. The M-Bus collector can collect data from multiple M-Bus water meters at the same time, greatly improving the collection efficiency. The M-Bus communication bus is used for data collection, and then the collected data is transmitted to the terminal. This effectively improves the success rate of water meter reading in underground wells or other environments with poor signals. In order to ensure a balance between the success rate and low power consumption of the M-Bus collector, the present application proposes a cyclic scanning meter reading method that can greatly reduce the power consumption of the M-Bus collector.
[0042] Furthermore, the system M-Bus water meter of the present application interacts and communicates with the M-Bus collector based on a custom protocol, which improves the problem of insufficient transmission data in the standard CJ188 protocol. The present application can collect historical data before the installation of the M-Bus collector. It can cope with the situation where the Mbus water meter is installed in advance and the Mbus collector is installed later, and realize the supplementary copying and backtracking of the data of the pre-installed Mbus water meter. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0044] Figure 1 It is a schematic diagram of the structure of a water meter reading system based on an M-Bus collector according to an embodiment of the present application;
[0045] Figure 2 It is a schematic diagram of the interactive communication process between an M-Bus collector and an M-Bus water meter according to an embodiment of the present application;
[0046] Figure 3 It is another schematic diagram of the interactive communication process between an M-Bus collector and an M-Bus water meter according to an embodiment of the present application;
[0047] Figure 4 It is a schematic diagram of an M-Bus collector collection method according to an embodiment of the present application;
[0048] Figure 5 It is a schematic diagram of an M-Bus collector collection method according to an embodiment of the present application;
[0049] Figure 6 It is a schematic diagram of a historical data collection method according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0051] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0052] The following is combined with Figure 1-6 The water meter reading system based on the M-Bus collector of the embodiment of the present application is introduced in detail. It should be noted that the following application scenarios are only shown to facilitate understanding of the spirit and principle of the present application, and the implementation of the present application is not limited in this respect. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0053] In the embodiment of the present application, a short-distance wired remote water meter + data collection device solution is adopted, and the M-Bus collector can be installed at the wellhead (where the network signal is good), and data can be collected using the M-Bus communication bus, thereby effectively improving the success rate of meter reading in underground wells or other environments with poor signals.
[0054] like Figure 1As shown, the system mainly includes: multiple M-Bus water meters, which are used to interact and communicate with the M-Bus collector based on a custom protocol, and send the generated water meter data to the M-Bus collector. The M-Bus collector is connected to multiple M-Bus water meters based on a two-wire M-Bus communication bus, and is used to collect water meter data based on a cyclic scanning method; it is also used to send water meter data to a terminal; the terminal is wirelessly connected to the M-Bus collector, and is used to configure parameters of the M-Bus collector and receive water meter data transmitted by the M-Bus collector. It can also include a remote server, which is wirelessly connected to the M-Bus collector.
[0055] In one implementation, the M-Bus collector includes an M-Bus master chip; the M-Bus water meter includes an M-Bus slave chip.
[0056] Specifically, both the M-Bus collector and the M-Bus water meter are equipped with M-Bus chips. The M-Bus collector is the M-Bus master chip. The communication is initiated by the master, and the communication mainly consumes the energy of the master. The M-Bus water meter is the M-Bus slave chip.
[0057] The M-Bus collector and the M-Bus water meter are connected based on a two-wire M-Bus communication bus, one of which is used for data transmission and the other for power supply. This makes it easier to install the meter on site. M-Bus communication consumes almost no energy when in standby mode, and only consumes energy during communication, which can achieve lower power consumption. The communication transmission distance is long, and data can be transmitted over a distance of up to several kilometers. Multiple devices can be connected to the same bus for communication, which is convenient for centralized reading and management.
[0058] In an exemplary scenario, the M-Bus collector can be connected to 20 M-Bus water meters at the same time.
[0059] In one implementation, the M-Bus water meter interacts and communicates with the M-Bus collector based on a custom protocol, and sends the generated water meter data to the M-Bus collector. The custom protocol is improved on the basis of the standard CJ188 protocol, and expands the less transmission data in the original CJ188 protocol. The functional instructions of the CJ188 protocol are expanded.
[0060] Among them, the custom protocol content includes device information authentication, function instruction data content and data information verification. The fields of device information authentication include: meter type, meter number information, function code. Since the M-Bus collector and the M-Bus water meter are mounted on an M-Bus communication bus, all water meter devices mounted on the M-Bus communication bus will receive all communication content on the bus. When all devices receive a legal data frame, they will confirm whether the information belongs to the device through the device information authentication field, for example, to obtain data belonging to themselves through meter number information. Respond to the instructions that belong to themselves.
[0061] The function instruction data content includes: corresponding function instruction.
[0062] In one embodiment, the function instruction data content field may have different data content according to different instructions. For example, in the daily data collection instruction in this embodiment, the data content field includes the forward real-time cumulative amount, reverse real-time cumulative amount, real-time voltage, metering sensor signal strength, and yesterday's half-hour metering information. Different function instructions are designed with corresponding data content fields. You can set it according to the actual situation.
[0063] In another embodiment, the functional instruction data content also includes historical data query instructions and log record query instructions. The present application can realize historical data backtracking through historical data query instructions. In the actual water meter installation situation, M-Bus water meters are often installed in the deep well or other harsh environments first, and then the M-Bus collector is installed. However, the standard M-Bus collector will only collect metering data after the installation of the M-Bus collector, and cannot trace back abnormal events and detailed metering data of the water meter before the installation of the M-Bus collector. The M-Bus collector of the present application will be aware of the installation status of the pre-installed M-Bus water meter by issuing "historical data query" instructions and "log record query" instructions.
[0064] The fields for data information verification include: start character, end character, and CS check field. This verification mode only uses 3 bytes. For whether the data on the communication bus is legal, the M-Bus device only needs to perform data verification on these three fields.
[0065] Optionally, the hardware transmission protocol of the M-Bus interactive communication is serial communication. Different baud rates bring different communication rates, communication stability and communication energy damage. In this example, the communication rate is preferably 2400 baud, ensuring that the M-Bus acquisition in this example mounts 20 M-Bus water meters, performs data collection and data reporting once a day, and meets the 6-year service life and the daily collection success rate is above 99%.
[0066] In one embodiment, the M-Bus collector includes a magnetic key switch and an infrared transmitting and receiving device; after the magnetic key switch is turned on, the infrared transmitting and receiving device wirelessly communicates with the terminal. The terminal can be a local computer, a base station, or other equipment. This embodiment of the application is not specifically limited.
[0067] The parameter configuration of the M-Bus collector receiving terminal can collect M-Bus communication data of 1-20M-Bus water meters. The M-Bus collector has a magnetic button switch and an infrared transmitter and receiver. When the magnetic button switch is activated by a magnet, the corresponding infrared transmitter and receiver can be used to configure the parameters using a PC. The M-Bus collector communication mainly uses the table number information in the device information authentication field for confirmation, so it is necessary to use a PC to preset the table number of the target M-Bus water meter for the M-Bus collector. Ensure that the preset table number of the M-Bus collector is the same as the table number of the actually connected M-Bus water meter to ensure that the M-Bus collector and the M-Bus water meter can interact correctly for data collection.
[0068] Since M-Bus data acquisition communication is a high-power task for meters, in order to ensure a balance between the success rate and low power consumption of the M-Bus data collector, this example carefully designs a data acquisition algorithm that reasonably controls power consumption.
[0069] In one embodiment, the M-Bus collector collects water meter data, including: the M-Bus collector communicates with the M-Bus water meters in sequence based on a custom protocol in a preset order, sends a data collection instruction to each M-Bus water meter, and records the collection results of each M-Bus water meter after waiting for a preset first time. In one embodiment, after the M-Bus instruction is sent, the M-Bus collection will enter a receiving state. When a packet of M-Bus data is received, the M-Bus collector will perform information verification to ensure that the data is a packet of legal data. After the information verification is completed, the target M-Bus water meter number and the function code of the response will be verified, and the operation is to confirm whether it is the M-Bus water meter response currently issued and waited by the M-Bus collector. When the legitimacy of the data is ensured and it is also the expected response of the M-Bus water meter, the data content will be parsed and verified. Only after the data content is parsed, the M-Bus water meter will be marked as successfully collected.
[0070] After a round of scanning, the M-Bus collector determines whether all M-Bus water meters have been successfully collected; if all M-Bus water meters have been successfully collected, the collection task is terminated; otherwise, a new round of collection is re-initiated for the M-Bus water meters that have not been successfully collected after the preset second time period; if there are still M-Bus water meters that have not been successfully collected after the preset rounds of collection, the collection is stopped and the M-Bus water meters that have not been successfully collected are marked as collection failures.
[0071] Through the collection process of this application, power consumption can be greatly reduced.
[0072] like Figure 4 As shown, after starting M-Bus data collection, collect the M-Bus water meters that have not been successfully collected, and determine whether this round of collection is completed. If not, continue to collect the M-Bus water meters that have not been successfully collected. If this round of collection is completed, determine whether all M-Bus water meter collections are completed. If all water meters are successfully collected, then end the collection. If not all collections are successful, determine whether the number of data collection rounds exceeds 12. If exceeded, then end the collection. If not exceeded, wait 10 minutes to continue a new round of collection.
[0073] Specifically, in order to further understand the collection method of the embodiment of the present application, the following is combined with the attached Figure 5 Detailed description.
[0074] When M-Bus water meter collection is triggered, the M-Bus collector will start M-Bus data collection from water meter No. 1 in the pre-stored table file. The M-Bus collector communicates with the M-Bus water meter based on a custom protocol. The M-Bus collector will issue a cumulative reading command and wait for 3 seconds for the M-Bus water meter to respond to the command. If the M-Bus water meter responds or the 3-second timeout occurs, the M-Bus data collection will end and the indicator of whether the water meter has successfully collected the data will be recorded.
[0075] Specifically, when the M-Bus water meter receives the M-Bus acquisition instruction, it will first perform a validity check on the data information field, and only when the field is valid will it perform a meter number information check on the device information field. If the validity of the data information check field and the meter number information is ensured, the M-Bus water meter will exit the low power mode and respond to the data interaction.
[0076] When the M-Bus collector has sent the collection command, it will wait for the data of the M-Bus command response. When the M-Bus command is sent, the M-Bus collection will enter the receiving state. When a packet of M-Bus data is received, the M-Bus collector will perform information verification to ensure that the data is a packet of legal data. After the information verification is completed, the target M-Bus water meter number and the function code of the response will be verified. This operation is to confirm whether it is the M-Bus water meter response currently sent and waited by the M-Bus collector. When the legitimacy of the data is ensured and it is also the expected response of the M-Bus water meter, the data content will be parsed and verified. Only after the data content is parsed will the M-Bus water meter be marked as successfully collected.
[0077] Next, the second to twentieth water meters will be scanned in sequence. The scanning method is the same as above. When all the M-Bus water meters are scanned, it will be determined whether all the M-Bus water meters have completed the current round of M-Bus data collection. If all the water meters have completed data collection, the M-Bus data collection task will be closed. Otherwise, the M-Bus data collection task will be suspended. After 10 minutes, the M-Bus data collection task will be opened again. When the M-Bus data collection task starts again, the first M-Bus data collection method will be repeated again. However, if an M-Bus water meter is marked as successfully scanned this time, it will not be scanned again and will be skipped. After the scan is completed, it will be determined again whether the data collection of all smart M-Bus water meters has been completed. If not, the first round of methods will be repeated. The task will be suspended again and the M-Bus data collection task will be restarted after 10 minutes. Each M-Bus data collection task will perform 12 more rounds of M-Bus data collection. If the M-Bus water meter fails to complete data collection after 12 rounds of M-Bus data collection, it will be judged as a scan failure and M-Bus data collection will be stopped, and the corresponding smart M-Bus water meter that has not completed data collection will be marked as data collection failure.
[0078] When the M-Bus collector reaches the specified time, the M-Bus data collection process will be started, and the M-Bus will collect the information of the M-Bus water meter from the meter file in sequence. First, a metering data collection instruction will be issued, which will obtain the real-time information of the corresponding M-Bus water meter. When the metering data is collected, a metering event collection instruction will be issued, which will obtain whether there are new metering events, such as abnormally large flow, extremely poor metering sensor signals, etc.
[0079] In one embodiment, when the M-Bus collector receives a historical water meter data query instruction sent by a terminal, it also includes: the M-Bus collector determines whether it has stored historical water meter data; if there is historical water meter data, the historical water meter data is returned to the terminal; if there is no historical water meter data, the historical water meter data query instruction is cached and the historical water meter data query instruction is sent to the M-Bus water meter.
[0080] like Figure 6 As shown, the M-Bus collector and the M-Bus water meter not only support daily scheduled data collection in normal mode, but also when the M-Bus water meter and the M-Bus collector are not properly connected for a period of time and then reconnected, there will be a lack of historical metering information in the reported collection system. At this time, the collection system or PC computer queries the M-Bus collector for the historical information of the target M-Bus water meter. The M-Bus collector will first query its own storage module to ensure whether the data has been collected but not reported normally. If it stores historical data, it will return the historical data to the terminal. If it is found that the data cannot be found in the storage module of the M-Bus collector, the historical data query instruction is cached, and the historical data query instruction is sent to the water meter when the right time is available.
[0081] This application proposes a communication bus control algorithm and customized communication protocol based on the M-Bus communication bus. The bus control algorithm sends a "cumulative quantity collection" command and a "log record query" command to all mounted meters once a day to obtain data such as non-magnetic signal strength, half-hour water consumption log, daily water consumption log, water meter abnormal events, etc. Enhance the more sophisticated water metering management of traditional M-Bus collectors and M-Bus wired water meters.
[0082] The M-Bus collector of this application has a data backtracking function. In the actual installation of water meters, M-Bus water meters are often installed deep in underground wells or other harsh environments first, and the M-Bus collector will be installed later. However, the standard M-Bus collector will only collect metering data after the installation of the M-Bus collector, and cannot trace back abnormal events and detailed metering data of the water meter before the installation of the M-Bus collector. The new M-Bus collector will be aware of the installation status of the pre-installed M-Bus water meters by issuing "historical data query" instructions and "log record query" instructions.
[0083] The embodiment of the present application also provides a water meter reading method based on an M-Bus collector, including: connecting to multiple M-Bus water meters based on a two-wire M-Bus communication bus; collecting water meter data based on a preset cyclic scanning method, the cyclic scanning method including sending collection instructions to the water meters in a preset order and recording the collection results, if one round of collection is not completely successful, re-collecting the unsuccessful water meters after a preset time; and sending the water meter data to a terminal.
[0084] Specifically, first, a data collection instruction is sent to each M-Bus water meter in turn according to a preset order, and after waiting for a preset first time period, the collection result of each M-Bus water meter is recorded.
[0085] The M-Bus collector will start M-Bus data collection from water meter No. 1 in the pre-stored table file. The M-Bus collector communicates with the M-Bus water meter based on a custom protocol. The M-Bus collector will issue a cumulative reading command and wait for a period of time for the M-Bus water meter to respond to the command. If the M-Bus water meter responds or times out, the M-Bus data collection will end and record whether the water meter has successfully collected the data.
[0086] Among them, after the target M-Bus water meter receives the data collection instruction, it verifies whether the data collection instruction is legal; if the data collection instruction is legal, it analyzes whether the data collection instruction is the meter number corresponding to the target M-Bus water meter; if it is the meter number corresponding to the target M-Bus water meter, it responds to the instruction and returns the water meter data to the M-Bus collector.
[0087] like Figure 2 As shown in the figure, when the corresponding M-Bus water meter archive information is configured in the M-Bus collector, the M-Bus collector will collect data on the M-Bus at 0:15 every day. Since there may be more data interactions on the M-Bus bus, the M-Bus water meter needs to confirm whether the instruction needs to be responded to at a higher efficiency to ensure the lower power consumption of the M-Bus water meter. When the M-Bus water meter receives the M-Bus data, it will first perform a legitimacy check on the data information field. If it does not meet the requirements, the data will be discarded. The meter number information in the device information field will be checked only when the field is legal. If the legitimacy of the data information check field and the meter number information is ensured, the M-Bus water meter will exit the low power mode to respond to data interactions.
[0088] Furthermore, after the M-Bus collector receives the water meter data returned by the target M-Bus water meter, it also includes checking whether the data field is legal; if the data field is legal, parsing whether the water meter data is the meter number corresponding to the target M-Bus water meter; if it is the meter number corresponding to the target M-Bus water meter, judging whether the returned water meter data corresponds to the data collection instruction; if it corresponds to the data collection instruction, parsing the returned water meter data, and marking the target M-Bus water meter as successfully collected.
[0089] like Figure 3 As shown, after the M-Bus collector has sent the collection instruction, it will wait for the data of the M-Bus instruction response. After sending the M-Bus data collection instruction, the M-Bus collection will enter the receiving state. When a packet of M-Bus data is received, the M-Bus collector will perform information verification to ensure that the data is a packet of legal data. After the information verification is completed, the table number of the target M-Bus water meter and the function code of the response will be verified. This operation is to confirm whether it is the M-Bus water meter response currently sent and waited by the M-Bus collector. When the legitimacy of the data is ensured and it is also the expected response of the M-Bus water meter, the data content will be parsed and verified. Only after the data content is parsed will the M-Bus water meter be marked as successfully collected.
[0090] Furthermore, after a round of scanning, it is determined whether all M-Bus water meters have been successfully collected; if all M-Bus water meters have been successfully collected, the collection task is terminated; otherwise, a new round of collection is re-initiated for the M-Bus water meters that have not been successfully collected after a preset second time period; if there are still M-Bus water meters that have not been successfully collected after the preset rounds of collection, the collection is stopped and the M-Bus water meters that have not been successfully collected are marked as collection failures.
[0091] This application is based on the water meter reading method of the M-Bus collector, and has a set of collection instruction management and control processes. Since M-Bus communication will generate large power consumption, it puts forward relatively strict requirements on the efficiency of M-Bus communication. This set of collection instruction management and control processes manages instructions in a unified manner in the form of data queues. When each instruction is interrupted by an abnormal event, it will not stop the original collection process. After the abnormality is restored, it will connect to the original collection process to continue collection. This control process optimizes and improves the power consumption problem of the M-Bus collector.
[0092] The water meter reading method and the water meter reading system embodiment provided in the above embodiment belong to the same concept, and the embodiment and implementation process thereof are detailed in the system embodiment, which will not be repeated here.
[0093] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0094] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.
Claims
1. A water meter reading system based on M-Bus collector, characterized in that: include: A plurality of M-Bus water meters, used for interactively communicating with an M-Bus collector based on a custom protocol, and sending generated water meter data to the M-Bus collector; An M-Bus collector is connected to the multiple M-Bus water meters based on a two-wire M-Bus communication bus, and is used to collect water meter data based on a preset cyclic scanning method, and is also used to send the water meter data to a terminal; the cyclic scanning method includes sending collection instructions to the water meters in a preset order and recording the collection results, and if a round of collection is not completely successful, re-collecting the unsuccessful water meters after a preset time; The terminal is wirelessly connected to the M-Bus collector and is used to configure parameters of the M-Bus collector and receive water meter data transmitted by the M-Bus collector.
2. The system according to claim 1, characterized in that The custom protocol content includes device information authentication, function instruction data content and data information verification.
3. The system according to claim 2, characterized in that The fields of the device information authentication include: meter type, meter number information, and function code; The function instruction data content includes: corresponding function instruction; The fields for data information verification include: a start character, an end character, and a CS check field.
4. The system according to claim 2, characterized in that The functional instruction data content includes: historical data query instructions and log record query instructions.
5. The system according to claim 1, characterized in that The M-Bus collector collects the water meter data, including: The M-Bus collector sends data collection instructions to each M-Bus water meter in turn according to a preset order, and records the collection results of each M-Bus water meter after waiting for a preset first time period; The M-Bus collector determines whether all M-Bus water meters have been successfully collected after a round of scanning; If all M-Bus water meters are successfully collected, the collection task is terminated; otherwise, a new round of collection is initiated for the M-Bus water meters that have not been successfully collected after the preset second time period; If there are still M-Bus water meters that have not been successfully collected after the preset round of collection, the collection is stopped and the M-Bus water meters that have not been successfully collected are marked as collection failures.
6. The system according to claim 5, characterized in that After the M-Bus collector sends the data collection instruction to each M-Bus water meter in turn according to the preset order, it also includes: After the target M-Bus water meter receives the data collection instruction, verify whether the data collection instruction is legal; If the data collection instruction is legal, analyzing whether the data collection instruction is the meter number corresponding to the target M-Bus water meter; If it is the meter number corresponding to the target M-Bus water meter, a command response is performed and the water meter data is returned to the M-Bus collector.
7. The system according to claim 6, characterized in that After receiving the water meter data returned by the target M-Bus water meter, the M-Bus collector verifies whether the data field is legal; If the data field is legal, analyze whether the water meter data is the meter number corresponding to the target M-Bus water meter; If it is the meter number corresponding to the target M-Bus water meter, determine whether the returned water meter data corresponds to the data collection instruction; If it corresponds to the data collection instruction, the returned water meter data is parsed and the target M-Bus water meter is marked as successfully collected.
8. The system according to claim 1, characterized in that When the M-Bus collector receives a historical water meter data query instruction sent by the terminal, it also includes: The M-Bus collector determines whether it stores the historical water meter data; If the historical water meter data exists, returning the historical water meter data to the terminal; If the historical water meter data does not exist, the historical water meter data query instruction is cached and the historical water meter data query instruction is sent to the M-Bus water meter.
9. A water meter reading method based on M-Bus collector, characterized in that: include: Connect with multiple M-Bus water meters based on two-wire M-Bus communication bus; Collecting water meter data based on a preset cyclic scanning method, the cyclic scanning method includes sending collection instructions to the water meter in a preset order and recording the collection results. If a round of collection is not completely successful, re-collecting the unsuccessful water meter after a preset time; The water meter data is sent to the terminal.
10. The method according to claim 9, characterized in that Collect water meter data based on a preset cyclic scanning method, including: Sending data collection instructions to each M-Bus water meter in turn according to a preset order, and recording the collection results of each M-Bus water meter after waiting for a preset first time period; After a round of scanning, determine whether all M-Bus water meters have been successfully collected; If all M-Bus water meters are successfully collected, the collection task is terminated; otherwise, a new round of collection is initiated for the M-Bus water meters that have not been successfully collected after the preset second time period; If there are still M-Bus water meters that have not been successfully collected after the preset round of collection, the collection is stopped and the M-Bus water meters that have not been successfully collected are marked as collection failures.