A non-magnetic water meter multi-protocol adaptive remote meter reading method and system
By dividing the signal segments based on the response delay time of the communication protocol and counting the number of level transitions in the remote meter reading system for non-magnetic water meters, the problem of long time consumption for multi-protocol water meter identification is solved, realizing an efficient and reliable remote meter reading method suitable for resource-constrained equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANCHENG HUASHENG LIANKE INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-06-16
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies struggle to achieve efficient and stable remote meter reading when dealing with non-magnetic water meters that use different communication protocols. In particular, when multiple protocols coexist, identification is time-consuming and lacks real-time performance. Furthermore, complex signal processing algorithms are not suitable for resource-constrained devices.
By acquiring the candidate water meter types on the meter reading bus, determining the corresponding communication protocols, arranging the read command fields and sending the spliced data string, dividing the signal segments using the response delay time, and counting the number of signal level transitions, the protocol type can be quickly identified, thus achieving efficient identification and data reading of multi-protocol water meters.
It enables all water meters to respond in an orderly manner in a single communication, reducing the amount of computation and improving the identification efficiency. It is suitable for low-power embedded devices, and the reliability and robustness of identification are ensured by multiple waveform superpositions and data verification.
Smart Images

Figure CN122496733A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and in particular to a multi-protocol adaptive remote meter reading method and system for non-magnetic water meters. Background Technology
[0002] Due to factors such as historical installation batches, multiple manufacturers supplying water, and phased upgrades, non-magnetic water meters using different communication protocols are often simultaneously connected to the same meter reading bus (such as M-Bus or RS-485). These water meters differ significantly in physical layer parameters, data frame structure, command encoding, and response timing, making it difficult for remote meter reading terminals to communicate stably with all water meters in a unified manner.
[0003] Currently, the main approach used in the industry to address the issue of multiple protocol coexistence is the polling method. This involves the remote meter reading terminal pre-storing parameters for multiple possible communication protocols, sequentially sending a read command to the bus using each protocol and waiting for a response. If a valid data frame conforming to the protocol format is received within a preset waiting time, it is determined that a water meter of that protocol type exists on the bus, and its communication parameters are recorded for subsequent meter readings. This method requires a separate complete send and wait cycle for each candidate protocol. When the number of candidate protocols is large, the overall identification process is time-consuming and lacks real-time performance, severely impacting meter reading efficiency.
[0004] In addition, some solutions attempt to automatically identify the protocol type by acquiring signal waveforms on the bus and analyzing and matching the frequency domain characteristics, timing characteristics, or symbol width of the returned signal. However, these methods usually involve relatively complex signal processing algorithms, which place high demands on the computing power and storage resources of the remote meter reading terminal, making them unsuitable for large-scale deployment on resource-constrained low-power embedded devices. Summary of the Invention
[0005] This application provides a multi-protocol adaptive remote meter reading method and system for non-magnetic water meters to improve the above-mentioned problems.
[0006] To achieve the above objectives, this application adopts the following technical solution: Firstly, this application proposes a multi-protocol adaptive remote meter reading method for non-magnetic water meters, including: The process involves: acquiring candidate water meter types on the meter reading bus; determining at least two different communication protocols based on these candidate water meter types; identifying the corresponding read command fields for each communication protocol and obtaining the corresponding response delay times; determining the concatenated data string based on the read command fields and response delay times; acquiring the bus signal returned by the meter reading bus within a preset time after sending the concatenated data string; dividing the bus signal into response signal segments corresponding to the communication protocols based on the response delay times of the communication protocols in the concatenated data string; obtaining the total number of signal level transitions in each response signal segment; if the total number of signal level transitions in any response signal segment is within a preset number range corresponding to the communication protocol of the response signal segment, then determining that a water meter using the communication protocol exists on the meter reading bus; and reading the metering data of the corresponding water meter based on the determined communication protocol.
[0007] Therefore, by actively arranging the read command fields of multiple protocols into a continuously transmitted concatenated data string, a single transmission can trigger water meters of different protocols on the bus to respond within their respective, non-overlapping time windows. The protocol identification process does not rely on complex decoding or pattern matching; it only requires counting the total number of signal level transitions within each time window and comparing this number with a preset interval to quickly determine the existence of the corresponding protocol water meter, with minimal computational load.
[0008] Optionally, based on the read command field and the response delay time, the concatenated data string is determined, including: arranging the read command fields of each communication protocol in order of shortest to longest corresponding response delay time, and inserting gaps between two adjacent read command fields to meet the idle identification requirements of the communication protocol bus, so that the water meter responses triggered by the read command fields corresponding to different communication protocols in the concatenated data string do not overlap in the time window.
[0009] Therefore, it can be seen that slower-responding protocols send their read commands first, while faster-responding protocols send their read commands later, ultimately ensuring that the responses from all water meters are sequentially linked and do not overlap on the timeline. This allows for the separation of responses from different protocols simply by dividing the bus signal into segments according to a preset time window.
[0010] Optionally, the method further includes: If the total number of signal level transitions in at least two response signal segments does not fall within the corresponding preset number range, and the waveforms of the two response signals partially overlap in time, then the read command field of the communication protocol with the longer response delay time in the communication protocol corresponding to the two response signal segments will be adjusted to a earlier position in the concatenated data string, and the concatenated data string will be regenerated.
[0011] Therefore, when the actual response delay deviates from the nominal value, causing the response window to overlap, it can automatically make local fine adjustments without having to start all over again.
[0012] Optionally, based on different communication protocols, the corresponding read command fields for each communication protocol are determined, and the corresponding response delay time is obtained, including: sending a preset detection pulse to the meter reading bus, the waveform characteristics of which are constructed to trigger a response from water meters using all communication protocols; obtaining the response waveform on the meter reading bus after the detection pulse is sent; detecting the start time of the first signal level transition in the response waveform, obtaining the signal waveform within a preset short window after the start time, and determining a communication protocol whose signal waveform characteristics meet the preset transition count requirement as the target communication protocol; and determining the time difference between the start time and the transmission time of the detection pulse as the corresponding response delay time of the target communication protocol.
[0013] Therefore, without waking up the water meter to receive a complete data response, the actual response delay time of each protocol can be measured solely through the physical layer response characteristics on the bus, eliminating the deviation between theoretical and actual values and making subsequent splicing and arrangement more accurate.
[0014] Optionally, the method further includes: repeatedly sending the spliced data string at least twice, and obtaining the corresponding response signal segment after each transmission; aligning the response signal segments corresponding to the same communication protocol in time, and superimposing the sampled values of the aligned waveform point by point to obtain the superimposed waveform; obtaining the total number of signal level transitions in the superimposed waveform; if the total number of signal level transitions in the superimposed waveform falls within a preset number range, then it is determined that there is a water meter using the communication protocol on the meter reading bus.
[0015] Therefore, by taking advantage of the fact that the time position of the real signal is fixed in multiple acquisitions while the position of random noise is not fixed, the signal can be enhanced and the noise can be canceled by waveform superposition. After superposition, the number of jumps can be counted to suppress misjudgments caused by accidental interference.
[0016] Optionally, after confirming that a water meter using a communication protocol exists on the meter reading bus, the method further includes: Based on the data frame format of the established communication protocol, the response signal segment corresponding to the communication protocol is decoded to obtain the data field and the verification field; the data field is verified based on the verification field; if the verification passes, the determination that a water meter using the communication protocol exists on the meter reading bus is maintained; if the verification fails, the determination is cancelled and the communication protocol is marked as pending reconfirmation.
[0017] Therefore, it can be seen that the correctness of the protocol judgment is confirmed by using the verification mechanism of the response data itself, forming a closed-loop verification without increasing additional communication overhead.
[0018] Optionally, the data field is validated based on the validation field, including: extracting the complete data frame from the response signal fragment; and performing data integrity verification on the data frame based on the frame validation field preset by the communication protocol.
[0019] A second aspect of this invention provides a non-magnetic water meter multi-protocol adaptive remote meter reading system, comprising: The first acquisition module is used to acquire the candidate water meter types on the meter reading bus and determine at least two different communication protocols based on the candidate water meter types. The first determining module is used to determine the read command field corresponding to each communication protocol based on different communication protocols, and to obtain the corresponding response delay time. The second determining module is used to determine the concatenated data string based on the read command field and the response delay time; The second acquisition module is used to acquire the bus signal returned by the meter reading bus within a preset time period after sending the spliced data string; The partitioning module is used to divide the bus signal into response signal segments corresponding to the communication protocol based on the response delay time of the communication protocol in the spliced data string. The third acquisition module is used to acquire the total number of signal level transitions in each response signal segment. The third determining module is used to determine that if the total number of signal level transitions within any response signal segment is within a preset number range corresponding to the communication protocol of the response signal segment, then there is a water meter using the communication protocol on the meter reading bus. The reading module is used to read metering data from the corresponding water meter based on a predetermined communication protocol.
[0020] A third aspect of the present invention provides a processing apparatus, the processing apparatus comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method proposed in the first aspect of the present invention.
[0021] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in the first aspect of the present invention. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the structure of a non-magnetic water meter multi-protocol adaptive remote meter reading system proposed in an embodiment of this application.
[0023] Figure 2 This is a flowchart illustrating a multi-protocol adaptive remote meter reading method for non-magnetic water meters proposed in an embodiment of this application.
[0024] Figure 3 This is a schematic diagram of the structure of a processing device proposed in an embodiment of this application. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] In the description of the embodiments of the present invention, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in the embodiments of the present invention is merely a description of the relationship between the related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of the embodiments of the present invention, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Additionally, to facilitate a clear description of the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or order of execution, and that "first," "second," etc., are not necessarily different. Furthermore, in the embodiments of this invention, words such as "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this invention should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner for ease of understanding.
[0027] To facilitate understanding of the embodiments of the present invention, a non-magnetic water meter multi-protocol adaptive remote meter reading system is first described, which is applicable to the embodiments of the present invention, and a non-magnetic water meter multi-protocol adaptive remote meter reading method.
[0028] Specifically, Figure 1 This diagram illustrates the structure of a multi-protocol adaptive remote meter reading system for non-magnetic water meters. To achieve the aforementioned operations, as shown... Figure 1 As shown, the non-magnetic water meter multi-protocol adaptive remote meter reading system includes: The first acquisition module is used to acquire the candidate water meter types on the meter reading bus and determine at least two different communication protocols based on the candidate water meter types.
[0029] The first determining module is used to determine the read command field corresponding to each communication protocol based on different communication protocols, and to obtain the corresponding response delay time.
[0030] The second determining module is used to determine the concatenated data string based on the read command field and the response delay time.
[0031] The second acquisition module is used to acquire the bus signal returned by the meter reading bus within a preset time period after sending the spliced data string.
[0032] The partitioning module is used to divide the bus signal into response signal segments corresponding to the communication protocol based on the response delay time of the communication protocol in the spliced data string.
[0033] The third acquisition module is used to acquire the total number of signal level transitions in each response signal segment.
[0034] The third determining module is used to determine that if the total number of signal level transitions within any response signal segment is within a preset number range of the communication protocol corresponding to the response signal segment, then there is a water meter using the communication protocol on the meter reading bus.
[0035] The reading module is used to read metering data from the corresponding water meter based on a predetermined communication protocol.
[0036] Figure 2 This is a flowchart illustrating the multi-protocol adaptive remote meter reading method for non-magnetic water meters provided in an embodiment of the present invention. This method is applicable to the aforementioned system.
[0037] The specific process is as follows: S201: Obtain the candidate water meter types on the meter reading bus, and determine at least two different communication protocols based on the candidate water meter types.
[0038] Meter reading buses are typically M-Bus or RS-485 buses. Candidate water meter types can be obtained from the district's records, such as historically installed water meter models, or pre-configured manually on a remote management platform. Communication protocols include, for example, CJ / T188, DL / T645, Modbus, or other manufacturer-specific protocols. Each candidate water meter type corresponds to a known communication protocol, and the relevant parameters of this protocol are pre-stored in the remote meter reading terminal's memory.
[0039] Candidate water meter types refer to pre-known water meter models or series that may be connected to the current meter reading bus. This information can come from substation archives, equipment management databases, or manual configuration. The communication protocol used by each candidate water meter type is determined during the production or design phase. Therefore, once the candidate water meter types are determined, at least two different communication protocols can be directly derived.
[0040] For example, a residential community's meter reading bus may be equipped with two types of non-magnetic water meters: one from manufacturer A and the other from manufacturer B. Manufacturer A water meters use the CJ / T188 protocol, while manufacturer B water meters use the Modbus protocol. The system retrieves these two meter types from the district's records to determine which communication protocols, CJ / T188 and Modbus, need to be processed.
[0041] S202: Based on different communication protocols, determine the corresponding read command field for each communication protocol and obtain the corresponding response delay time.
[0042] Specifically, the read command field is the instruction code that triggers the corresponding protocol water meter to return metering data, such as the specific hexadecimal instruction sequence for reading metering data in the CJ / T188 protocol. The response delay time is the typical time interval between the water meter receiving the complete read command field and starting to send response data; for example, a protocol specifies it as 10 to 20 milliseconds, and the midpoint or a measured value can be used. The response delay time is usually specified by the protocol standard or explicitly given in the water meter technical manual.
[0043] Continuing with the previous example, the read command field for reading metering data using the CJ / T188 protocol is 0xFE0x68…, and its response latency is approximately 20 milliseconds. The read command field for the Modbus protocol is 0x010x03…, and its response latency is approximately 10 milliseconds.
[0044] Optionally, for response delays that cannot be directly passed, they can be obtained, for example, through the following steps: S2021: Send a preset detection pulse to the meter reading bus. The waveform characteristics of the detection pulse are configured to trigger a response from water meters that support all communication protocols.
[0045] The probe pulse is a short signal whose level variation pattern conforms to the minimum recognition threshold for bus activity or wake-up signals of all candidate communication protocols. Upon detecting this activity on the bus, any water meter will assume communication has occurred and thus generate an initial response, such as pulling the bus low for a very short time as a preamble or bus occupancy signal. However, the waveform of this probe pulse does not constitute a valid read command for any protocol; therefore, the water meter will not enter a full data response state and will not send a metering data frame.
[0046] S2022: Obtain the response waveform on the meter reading bus after the probe pulse is sent.
[0047] At the instant the probe pulse is sent, the meter reading terminal begins to acquire the level signal on the bus and records the waveform over a period of time. Since the water meter's response is at the physical layer level, it usually manifests as a brief pulse or a sequence of level changes. If multiple water meters with different protocols are connected to the bus, the responses of each water meter will be slightly sequential in time, forming a series of tiny level transitions.
[0048] S2023: Detect the start time of the first signal level transition in the response wave, acquire the signal waveform within a preset short window after the start time, and determine the communication protocol whose signal waveform characteristics meet the preset number of transitions requirement as the target communication protocol.
[0049] In the acquired response waveforms, pinpoint the precise moment when the first signal level transition occurs. This represents the time when the fastest-responding water meter begins to respond. Starting from this initial transition moment, capture a short waveform segment. This short window does not need to cover the entire data frame; it only needs to be long enough to capture the initial characteristics of the protocol's response signal. Within this short window, count the number of signal level transitions or other simple waveform characteristics. Since the physical layer characteristics generated by water meters of different protocols at the initial stage of response differ—for example, some protocols send a fixed-width preparation signal before responding, while others send several handshake pulses consecutively—the number of transitions within this short window can distinguish which protocol's water meter is responding. Compare the characteristics within the short window with the preset characteristics of each candidate protocol; the matching one is the target communication protocol, i.e., the protocol used by the currently responding water meter.
[0050] S2024: The time difference between the start time and the transmission time of the probe pulse is determined as the corresponding response delay time of the target communication protocol.
[0051] The time interval from the moment the probe pulse is sent to the moment the first transition occurs is the actual response delay time of the water meter in this test. This measured value will replace the nominal value originally read from the parameter table and will be used for subsequent data string assembly and calculation.
[0052] By using a lightweight probe pulse, the actual response speed of each water meter can be dynamically acquired, eliminating the deviation between theoretical and actual values and ensuring the accuracy of subsequent splicing, arrangement, and time window division. The entire process does not require any valid data returned by the water meters, does not involve complex protocol parsing, and can be completed solely based on simple waveform characteristics at the physical layer.
[0053] S203: Determine the concatenated data string based on the read command field and the response delay time.
[0054] For example, in the two protocols, Modbus has a shorter response latency (10 milliseconds), while CJ / T188 has a longer response latency (20 milliseconds). Therefore, the order of organizing the concatenated data string is as follows: first, place the CJ / T188 read command field, then insert a bus idle gap, and finally place the Modbus read command field. During transmission, the CJ / T188 water meter receives commands first, followed by the Modbus water meter. However, the Modbus water meter responds faster, and its response will appear on the bus first.
[0055] Specifically, by leveraging the differences in response speed between water meters using different protocols, and through proactive arrangement of command sending order, the responses of each water meter can be naturally staggered on the timeline, preventing overlap. Therefore, the read command fields of each communication protocol can be arranged in ascending order of their corresponding response delay times.
[0056] Understandably, a water meter with a short response delay means it reacts quickly, while a water meter with a long response delay means it reacts slowly. The order of transmission is from shortest to longest, but in actual transmission, commands from protocols with longer response delays are sent first, followed by commands from protocols with shorter response delays. In other words, the slower the water meter, the earlier it receives its command. Because slower water meters require more preparation time, they are started first; fast-responding water meters, even if they receive the command later, can reach the response stage first due to their rapid response.
[0057] Then, a spliced data string is obtained by inserting gaps between two adjacent read command fields that meet the idle identification requirements of the communication protocol bus. This ensures that the water meter responses triggered by read command fields corresponding to different communication protocols in the spliced data string do not overlap in the time window. Understandably, each communication protocol typically requires the bus to maintain an idle state between commands; otherwise, the water meter may interpret subsequent signals as continuations of previous commands and fail to correctly identify the new command. Therefore, gaps that meet the idle identification requirements of all relevant protocols are inserted between the command fields of different protocols to ensure that each water meter can independently and correctly identify its own read command. Although multiple water meters will generate responses after a single transmission, due to their different response delay times and the deliberate arrangement of the command transmission order, their response signals will present a sequential and non-overlapping distribution on the timeline.
[0058] For example, suppose there are three types of water meters on the bus, using protocols A, B, and C, with response delay times of 5 milliseconds for protocol A, 15 milliseconds for protocol B, and 30 milliseconds for protocol C. Arranged in ascending order of response delay time, A is the shortest and C is the longest. Therefore, in the concatenated data string, the order in which the read command field is sent is: C first, B second, and A last, with a bus idle gap inserted between C and B, and between B and A.
[0059] In this way, the meter reading terminal only needs to divide the entire bus signal according to the pre-calculated time window after sending the spliced data string to separate the response signals of each protocol.
[0060] S204: Obtain the bus signal returned by the meter reading bus within a preset time after sending the spliced data string.
[0061] Understandably, after the complete transmission of the concatenated data string, the meter reading terminal immediately begins recording all the level signals returned on the bus for a preset duration. This preset duration should be sufficient to cover the time required for the protocol with the longest response delay among all candidate protocols to complete its full response frame. The recorded signal is a composite signal superimposed from all water meter responses.
[0062] S205: Based on the response delay time corresponding to the communication protocol in the spliced data string, the bus signal is divided into response signal segments corresponding to the communication protocol.
[0063] Understandably, taking the moment when the concatenated data string is completely sent as the time origin, and based on the known response delay times of each protocol and the typical length of a single response data frame for each protocol, several consecutive windows are divided on the time axis. Each window corresponds specifically to a possible response signal for a particular protocol. In this way, the originally aliased bus signals are physically divided into multiple independent segments.
[0064] For example, based on the splicing order of S203, it is predicted that the response from the Modbus water meter will appear within a time period of approximately 10 to 110 milliseconds after transmission is completed, while the response from the CJ / T188 water meter will appear within a time period of approximately 20 to 120 milliseconds after transmission is completed. Accordingly, the system divides the received 300-millisecond bus signal into segments corresponding to the Modbus and segments corresponding to the CJ / T188.
[0065] S206: Obtain the total number of signal level transitions in each response signal segment.
[0066] Understandably, for each segmented response signal, the total number of times the signal changes from high to low or from low to high within that segment is counted. This count does not interpret the specific meaning of the signal, does not identify start bits, stop bits, or data content, and only performs physical layer edge counting.
[0067] S207: If the total number of signal level transitions within any response signal segment is within the preset number range of the communication protocol corresponding to the response signal segment, then it is determined that there is a water meter using the communication protocol on the meter reading bus.
[0068] For each protocol of water meter, the number of symbols contained in its complete data frame is fixed during normal response. Therefore, the total number of signal level transitions it triggers should also be close to a certain theoretical value. By adding a tolerance range to this theoretical value, a preset number interval is formed. If the number of transitions counted for a certain segment falls within the corresponding preset interval, it indicates that a response signal conforming to the characteristics of that protocol has appeared in that segment, thus determining that a water meter using that protocol exists on the bus.
[0069] Furthermore, if the total number of signal level transitions in at least two response signal segments does not fall within the corresponding preset number range, and the waveforms of the two response signals partially overlap in time, then the read command field of the communication protocol with the longer response delay time in the communication protocol corresponding to the two response signal segments is adjusted to a earlier position in the concatenated data string, and the concatenated data string is regenerated.
[0070] Under normal circumstances, if a water meter with a certain protocol exists and responds normally, the number of transitions within its corresponding segment should fall within a preset range. When the number of transitions in both segments deviates from their respective preset ranges, it indicates that no valid independent response has occurred within either segment. One possible reason is that the response signals from the two water meters partially overlap, causing their waveforms to interfere with each other and resulting in an abnormal number of transitions. This could be due to signal superposition leading to an excessive number of transitions, or signal cancellation or misalignment leading to an insufficient number of transitions.
[0071] Therefore, among the two overlapping protocols, the one with the longer response delay is identified. A longer response delay means the water meter reacts slowly and requires a longer preparation time before it can begin responding. The read command field of that protocol is moved to a earlier position in the concatenated data string, meaning the command will be sent to the bus earlier than before. Based on the adjusted command order, the concatenated data string is reassembled according to the same arrangement rules. The data is then sent again, and subsequent receiving, segmentation, and decision-making steps are executed.
[0072] Optionally, to suppress random noise interference that may occur in a single measurement and reduce the probability of misjudgment, the concatenated data string can be repeatedly sent at least twice, and the corresponding response signal segments after each transmission can be obtained. Specifically, the constructed concatenated data string is sent completely to the bus once, and the response signal segments corresponding to each protocol after this transmission are received and saved. Then, the exact same concatenated data string is sent again, and the corresponding response signal segments are received and saved again. The repetition should be at least twice, and can be more than twice. Sufficient intervals should be left between each transmission to ensure that the previous communication has completely ended and the bus has returned to idle.
[0073] Then, the response signal segments corresponding to the same communication protocol are time-aligned, and the sampled values of the aligned waveforms are superimposed point by point to obtain the superimposed waveform. Understandably, the end time of each transmitted spliced data string is taken as zero, or the start time of the response signal segment is taken as a reference, to ensure that the waveforms of the same protocol segment acquired in the two acquisitions are strictly aligned to the same sampling point position on the time axis. After alignment, the values of the corresponding sampling points of the two waveforms are directly added together, and the total number of signal level transitions in the superimposed waveform is obtained. Because the real signal part is enhanced and the noise part is suppressed, the transitions in the superimposed waveform can better reflect the true symbol structure of the water meter's response, rather than random glitches.
[0074] If the total number of signal level transitions in the superimposed waveform falls within the preset range, it confirms the presence of a water meter using the communication protocol on the meter reading bus. If it falls within the range, it indicates that a valid response from a water meter using this protocol was present in both data collections, and the signal characteristics are clearer and more reliable after superposition processing, thus the determination is valid. If it still does not fall within the range, it may be that the water meter using this protocol does not exist, or the signal quality is extremely poor, requiring more superpositions.
[0075] S208: Based on the established communication protocol, read the metering data of the corresponding water meter.
[0076] Once the water meters using which protocols are identified on the bus, the correct protocol can be used to communicate with the corresponding water meter and obtain its metering data. Data reading can be done either by directly utilizing the response signal segments divided by S205 and parsing the metering data according to the data frame format of the protocol, or by sending standard read commands to the identified protocol water meters and receiving data during subsequent regular meter reading cycles.
[0077] Determining the presence of a water meter by counting the total number of signal level transitions is essentially an inference based on physical layer characteristics. While this method is accurate in most cases, there is a theoretical possibility of misjudgment in situations such as strong periodic interference that happens to generate a pulse train with a similar number of transitions to a certain protocol.
[0078] To address the aforementioned issues, optionally, after confirming the presence of water meters using a communication protocol on the meter reading bus, the following may also be included: S301: Based on the data frame format of the existing communication protocol, decode the response signal segment corresponding to the communication protocol to obtain the data field and the check field.
[0079] Understandably, this response signal segment is decoded according to the data frame format specified in the communication protocol. The protocol's frame format typically defines the frame's start identifier, address field, control field, data field length, and check field position. The purpose of decoding is to recover the digital information from the waveform and extract fields carrying valid information such as the water meter reading as data fields, as well as a check value calculated by the water meter based on the data field content and appended to the end of the frame. This check field is used by the receiver to verify whether the data has been corrupted during transmission.
[0080] S302: Verify the data field based on the check field.
[0081] According to the verification algorithm specified in the communication protocol, such as Cyclic Redundancy Check (CRC), cumulative checksum, parity check, etc., the decoded and extracted data field is recalculated to obtain a locally calculated check value. Alternatively, a complete data frame can be extracted from the response signal segment, and data integrity verification can be performed on the data frame based on the frame check field preset by the communication protocol.
[0082] S303: If the verification passes, the determination that there is a water meter using the communication protocol on the meter reading bus is maintained.
[0083] S304: If the verification fails, the determination is revoked and the communication protocol is marked as pending reconfirmation.
[0084] This application proactively arranges the read command fields of various water meter communication protocols into a single-transmission spliced data string based on the response delay time. A single communication can trigger an orderly response from all water meters on the bus, with each response not overlapping on the time axis. The protocol identification process abandons complex waveform decoding and is completed simply by counting the total number of signal level transitions within each time window and comparing them with a preset interval. This reduces protocol identification to simple pulse counting, resulting in extremely low computational load, making it suitable for low-cost embedded devices. Furthermore, multiple waveform superposition anti-interference and data verification reverse verification mechanisms ensure high reliability and robustness of protocol determination, enabling efficient concurrent meter reading of multi-protocol water meters.
[0085] Based on the same inventive concept, embodiments of this application also propose a processing apparatus, which includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the multi-protocol adaptive remote meter reading method for non-magnetic water meters according to embodiments of this application.
[0086] Furthermore, to achieve the above objectives, embodiments of this application also propose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the non-magnetic water meter multi-protocol adaptive remote meter reading method of this application.
[0087] Figure 3 This is a schematic diagram of the structure of a processing device provided in an embodiment of the present invention. Exemplarily, this processing device may be a network device, or a chip (system) or other component or assembly that can be disposed in a network device. Figure 3 As shown, the processing device 300 may include a processor 301. Optionally, the processing device 300 may also include a memory 302 and / or a transceiver 303. The processor 301 is coupled to the memory 302 and the transceiver 303, for example, via a communication bus.
[0088] The following is combined Figure 3 A detailed description of each component of the processing equipment 300 is provided below: The processor 301 is the control center of the processing device 300. It can be a single processor or a collective term for multiple processing elements. For example, the processor 301 can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0089] Alternatively, the processor 301 can perform various functions of the processing device 300 by running or executing software programs stored in the memory 302 and by calling data stored in the memory 302.
[0090] In a specific implementation, as one example, processor 301 may include one or more CPUs, for example... Figure 3 CPU0 and CPU1 are shown in the diagram.
[0091] In a specific implementation, as one embodiment, the processing device 300 may also include multiple processors. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). Here, a processor may refer to one or more devices, circuits, and / or processing cores used for processing data (e.g., computer program instructions).
[0092] The memory 302 is used to store the software program that executes the solution of the present invention, and the processor 301 controls the execution. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.
[0093] Optionally, the memory 302 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 302 may be integrated with the processor 301 or exist independently, and may be connected via the interface circuit of the processing device 300. Figure 3 (Not shown in the image) is coupled to processor 301, and this embodiment of the invention does not specifically limit this.
[0094] Transceiver 303 is used for communication with other processing devices. For example, if processing device 300 is a terminal, transceiver 303 can be used to communicate with a network device or with another terminal device. As another example, if processing device 300 is a network device, transceiver 303 can be used to communicate with a terminal or with another network device.
[0095] Alternatively, transceiver 303 may include a receiver and a transmitter. Figure 3 (Not shown separately). The receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.
[0096] Optionally, the transceiver 303 can be integrated with the processor 301, or it can exist independently and be connected via the interface circuit of the processing device 300. Figure 3 (Not shown in the image) is coupled to processor 301, and this embodiment of the invention does not specifically limit this.
[0097] Understandable Figure 3 The structure of the processing device 300 shown does not constitute a limitation on the processing device. The actual processing device may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0098] Furthermore, the technical effects of the processing device 300 can be referred to the technical effects of the methods in the above-described method embodiments, and will not be repeated here.
[0099] It should be understood that the processor in the embodiments of the present invention can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0100] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DRRAM).
[0101] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.
[0102] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0103] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0104] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0105] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
Claims
1. A non-magnetic water meter multi-protocol adaptive remote meter reading method, characterized in that, include: Obtain the candidate water meter types on the meter reading bus, and determine at least two different communication protocols based on the candidate water meter types; Based on the different communication protocols, determine the corresponding read command field for each communication protocol and obtain the corresponding response delay time; Based on the read command field and the response delay time, determine the concatenated data string; Obtain the bus signal returned by the meter reading bus within a preset time period after sending the spliced data string; Based on the response delay time corresponding to the communication protocol in the spliced data string, the bus signal is divided into response signal segments corresponding to the communication protocol; Obtain the total number of signal level transitions in each of the response signal segments; If the total number of signal level transitions within any one of the response signal segments is within a preset number range of the communication protocol corresponding to the response signal segment, then it is determined that there is a water meter using the communication protocol on the meter reading bus. Based on the established communication protocol, the corresponding water meter is used to read metering data.
2. The multi-protocol adaptive remote meter reading method for non-magnetic water meters according to claim 1, characterized in that, Based on the read command field and the response delay time, the concatenated data string is determined, including: The read command fields of each of the communication protocols are arranged in ascending order of their corresponding response delay times, and gaps that meet the idle identification requirements of the communication protocol bus are inserted between two adjacent read command fields to obtain the spliced data string, so that the water meter responses triggered by the read command fields of different communication protocols in the spliced data string do not overlap in the time window.
3. The multi-protocol adaptive remote meter reading method for non-magnetic water meters according to claim 2, characterized in that, The method further includes: If the total number of signal level transitions in at least two of the response signal segments does not fall within the corresponding preset number range, and the waveforms of the two response signals partially overlap in time, then the read command field of the communication protocol with the longer response delay time in the communication protocol corresponding to the two response signal segments is adjusted to a earlier position in the concatenated data string, and the concatenated data string is regenerated.
4. The multi-protocol adaptive remote meter reading method for non-magnetic water meters according to claim 2, characterized in that, Based on the different communication protocols, determine the corresponding read command field for each communication protocol and obtain the corresponding response delay time, including: A preset detection pulse is sent to the meter reading bus, and the waveform characteristics of the detection pulse are configured to trigger a response from all water meters that comply with the communication protocol. After the detection pulse is sent, the response waveform on the meter reading bus is obtained; The starting time of the first signal level transition in the response wave is detected, the signal waveform within a preset short window after the starting time is obtained, and the communication protocol whose signal waveform characteristics meet the preset number of transitions requirement is determined as the target communication protocol. The time difference between the start time and the transmission time of the probe pulse is determined as the corresponding response delay time of the target communication protocol.
5. The multi-protocol adaptive remote meter reading method for non-magnetic water meters according to claim 2, characterized in that, The method further includes: The concatenated data string is sent repeatedly at least twice, and the corresponding response signal fragment is obtained after each transmission; The response signal segments corresponding to the same communication protocol are time-aligned, and the sampled values of the aligned waveforms are superimposed point by point to obtain the superimposed waveform. Obtain the total number of signal level transitions in the superimposed waveform; If the total number of signal level transitions of the superimposed waveform falls within the preset number range, then it is determined that a water meter using the communication protocol exists on the meter reading bus.
6. The multi-protocol adaptive remote meter reading method for non-magnetic water meters according to claim 2, characterized in that, After confirming that a water meter using the communication protocol exists on the meter reading bus, the method further includes: Based on the data frame format of the established communication protocol, the response signal segment corresponding to the communication protocol is decoded to obtain the data field and the verification field. The data field is validated based on the validation field; If the verification passes, the determination that there is a water meter using the communication protocol on the meter reading bus is maintained. If the verification fails, the determination is revoked, and the communication protocol is marked as pending reconfirmation.
7. The multi-protocol adaptive remote meter reading method for non-magnetic water meters according to claim 6, characterized in that, Validating the data field based on the validation field includes: Extract the complete data frame from the response signal segment; The data frame is verified for data integrity based on the frame verification field preset in the communication protocol.
8. A multi-protocol adaptive remote meter reading system for non-magnetic water meters, characterized in that, include: The first acquisition module is used to acquire the candidate water meter types on the meter reading bus and determine at least two different communication protocols based on the candidate water meter types. The first determining module is used to determine the read command field corresponding to each of the different communication protocols, and obtain the corresponding response delay time. The second determining module is used to determine the concatenated data string based on the read command field and the response delay time; The second acquisition module is used to acquire the bus signal returned by the meter reading bus within a preset time period after sending the spliced data string; A segmentation module is used to divide the bus signal into response signal segments corresponding to the communication protocol based on the response delay time corresponding to the communication protocol in the spliced data string. The third acquisition module is used to acquire the total number of signal level transitions in each response signal segment; The third determining module is used to determine that if the total number of signal level transitions within any one of the response signal segments is within a preset number range of the communication protocol corresponding to the response signal segment, then there is a water meter using the communication protocol on the meter reading bus. The reading module is used to read metering data from the corresponding water meter based on the established communication protocol.
9. A processing device, characterized in that, include: At least one processor; And, a memory communicatively connected to at least one of the processors; The memory stores instructions that can be executed by at least one of the processors, which are executed by at least one of the processors to enable the at least one of the processors to perform a multi-protocol adaptive remote meter reading method for a non-magnetic water meter as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements a multi-protocol adaptive remote meter reading method for non-magnetic water meters as described in any one of claims 1-7.