A communication method and system for an intelligent water meter
Through intelligent water meter collection and analysis of water meter data, adaptively adjusting the LoRa communication mode, solving the problem that smart water meter is difficult to respond to water meter data requirements in the underground environment, and achieving efficient and low-power LoRa communication.
Patent Information
- Application Number
- CN202510045231.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-01-13
AI Technical Summary
It is difficult for intelligent water meter to switch the LoRa communication unit mode according to the actual water network operating conditions in complex underground environments, resulting in long-term standby time, high power consumption, and difficulty in responding to water meter data needs in a timely manner.
The water meter data at each moment is collected through the intelligent water meter, comprehensive scores are constructed based on data differences, abnormal possibilities of peak points are screened, communication urgent coefficients are calculated, initial decision value and communication switching decision value are constructed based on historical communication data, and LoRa communication mode is adaptively adjusted.
The intelligent water meter adaptively adjusts the LoRa communication mode according to the working conditions of the water network, avoiding long-term standby and high power consumption, and improving the timely response capability of the water meter data and the response rate of the intelligent water network project.
Smart Images

Figure CN119484591B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data communication technologies, and specifically relates to a communication method and system for intelligent water meters. Background Art
[0002] With the development of digital technologies, the work of water resource management, water conservation, and scientific water use cannot be carried out without flow measurement instruments. Among them, water meters, as the main component of flow measurement instruments, account for a large market share. In water use scenarios such as smart water services and intelligent water network projects, the wireless communication module of intelligent water meters plays an increasingly important role. It can not only improve the efficiency and accuracy of water service management through automated collection and transmission of intelligent water meter data, but also enable intelligent water meters to be quickly integrated into existing intelligent water network projects, facilitating network expansion and upgrade.
[0003] LoRa (Long Range Radio) is a wireless communication technology based on spread spectrum modulation technology, with characteristics such as long-distance communication ability, low power consumption, low cost, and open standards. It is widely used in fields such as intelligent meters, smart cities, smart buildings, and environmental sensing in life infrastructure. At present, usually at fixed intervals, the working mode of the LoRa communication unit in the intelligent water meter is switched to achieve intelligent water meter data communication. However, the working environment of underground water meters is complex, and various safety accidents are likely to occur. At this time, it is necessary for the intelligent water meter to provide water meter data in a timely manner to achieve rapid response. It is difficult for intelligent water meters to adaptively switch the mode of the LoRa communication unit according to the actual water network conditions, while ensuring the rapid response of the intelligent water network project and minimizing the power consumption of the intelligent water meter. Summary of the Invention
[0004] In order to solve the above technical problems, the purpose of this application is to provide a communication method and system for intelligent water meters, and the specific technical solutions adopted are as follows:
[0005] In a first aspect, an embodiment of this application provides a communication method for an intelligent water meter. The method includes the following steps:
[0006] Collect various water meter data at each moment through the intelligent water meter, and distinguish historical water meter data and water meter data to be transmitted based on the collection moment; use a preset duration as a state judgment interval;
[0007] In the time period occupied by the water meter data to be transmitted, construct a comprehensive score for each moment based on the difference between the water meter data in each state judgment interval and the normal data; combine the differences in the neighborhood of the peak points in the sequence composed of the comprehensive scores of all moments to construct the abnormal possibility of each peak point, and screen out the suspected abnormal points among the peak points; construct the communication urgency coefficient of each state judgment interval based on the change trend of the abnormal possibility of the suspected abnormal points;
[0008] In the time period occupied by the historical water meter data, construct a historical communication times sequence based on the data transmission times of other smart water meters within the neighborhood range of the current smart water meter; construct a historical communication urgency sequence based on the communication urgency coefficients of each state judgment interval; based on the similarity between the historical communication times sequence and the historical communication urgency sequence, combine the data transmission times to construct an initial decision value;
[0009] Combine the change trend of the communication urgency coefficient of the water meter data to be transmitted, construct a communication switching decision value for each state judgment interval of the water meter data to be transmitted, and perform smart water meter communication based on the communication switching decision value.
[0010] In one embodiment, the acquisition process of the historical water meter data and the water meter data to be transmitted is as follows:
[0011] Obtain the moment when the smart water meter last performed data transmission as the boundary moment, record the water meter data within a preset time period before the boundary moment as historical water meter data, and record the water meter data after the boundary moment as the water meter data to be transmitted, where each item of water meter data includes flow rate, water pressure, water temperature, pH value, turbidity, and chromaticity.
[0012] In one embodiment, the acquisition process of the comprehensive score is as follows:
[0013] Obtain the water meter data collected when the last adjacent communication time interval is the maximum communication interval duration as each item of normal water meter data, calculate the average value of all data in each item of normal water meter data, and record it as the first mean value;
[0014] Record the sequence composed of the collection times of all data in each item of water meter data in each state judgment interval as the to-be-transmitted sequence of each item of water meter data; calculate the difference between each element in the to-be-transmitted sequence and the corresponding first mean value, and record it as the characterization difference value;
[0015] Record the matrix composed of the characterization difference values of all elements in the to-be-transmitted sequences of all items of water meter data as the characterization difference matrix, and use the characterization difference matrix as the input of the Topsis algorithm. Among them, regard the data of each dimension in the characterization difference matrix as the extremely large type index of the Topsis algorithm, and output the comprehensive score of each moment in each state judgment interval.
[0016] In one embodiment, the process of constructing the abnormal possibility of each peak point and screening the suspected abnormal points among the peak points is as follows:
[0017] Record the sequence composed of the comprehensive scores of all moments as the abnormal score sequence; in the abnormal score sequence, construct a neighborhood window for each peak point centered on each peak point, and record the sequence composed of all data points in the neighborhood window as the near-neighbor sequence of each peak point;
[0018] For any peak point in the abnormal score sequence, calculate the difference degree between the any peak point and the neighbor sequences of each peak point in the abnormal score sequence, denoted as the first difference degree; the abnormal possibility of the any peak point is positively correlated with the comprehensive score of the any peak point and the first difference degree respectively;
[0019] Take the peak points in the abnormal score sequence whose abnormal possibility is greater than or equal to the preset segmentation threshold as suspected abnormal points.
[0020] In one embodiment, the process of obtaining the communication urgency coefficient is as follows:
[0021] Denote the sequence composed of the abnormal possibilities of all suspected abnormal points in each state judgment interval as the abnormal possibility sequence; take the abnormal possibility sequence as the input of the trend test algorithm, and output the trend statistic, denoted as the abnormal interference increasing degree;
[0022] Denote the sequence composed of the moments corresponding to all suspected abnormal points in each state judgment interval as the abnormal time sequence, take the first-order difference sequence of the abnormal time sequence as the input of the slope estimation algorithm, output the slope estimation value, and denote the opposite number of the slope estimation value as the abnormal working condition frequent occurrence degree;
[0023] Take the fusion value of the abnormal interference increasing degree and the abnormal working condition frequent occurrence degree as the communication urgency coefficient of each state judgment interval.
[0024] In one embodiment, the process of obtaining the historical communication times sequence and the historical communication urgency sequence is as follows:
[0025] Obtain other intelligent water meters within the neighborhood range of the current intelligent water meter, calculate the sum of the data transmission times of all the other intelligent water meters in each state judgment interval, denoted as the interval times; denote the sequence composed of the interval times of all state judgment intervals as the historical communication times sequence; denote the sequence composed of the communication urgency coefficients of all state judgment intervals of the historical water meter data as the historical communication urgency sequence.
[0026] In one embodiment, the calculation expression of the initial decision value is:
[0027] , where is the initial decision value, is the total number of times that all other intelligent water meters in the neighborhood range of the intelligent water meter perform LoRa communication respectively within the previous 1h, is to calculate the Pearson correlation coefficient between the historical communication times sequence , the historical communication urgency sequence , is the normalization function.
[0028] In one embodiment, the process of obtaining the communication switching decision value is as follows:
[0029] In the time period occupied by the water meter data to be transmitted, the sequence composed of the communication urgency coefficients of the first to the t-th state judgment intervals is linearly fitted by a linear fitting algorithm, and the slope of the fitted straight line is calculated and denoted as ; The communication switching decision value of the t-th state judgment interval is denoted as , The calculation expression of
[0030] is: where is the initial decision value, and
[0031] In one embodiment, the intelligent water meter communication based on the communication switching decision value is specifically as follows:
[0032] In each state judgment interval, when the communication switching decision value of the state judgment interval is greater than the preset decision threshold, the intelligent water meter is switched from the sleep mode to the standby mode, the water meter data to be transmitted is extracted from the data storage module, a transmission data packet is constructed, and written into the FIFO buffer; then it is switched to the transmission mode, and modulated into a signal by LoRa technology and sent to the LoRa gateway.
[0033] In a second aspect, an embodiment of the present application further provides a communication system for an intelligent water meter, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the method described in any one of the above are implemented.
[0034] The embodiments of the present application have at least the following beneficial effects:
[0035] The present application adopts the LoRa communication method, adaptively switches the LoRa communication unit mode based on the actual water network working conditions of the intelligent water meter, and avoids the problems of long-term standby and high power consumption of LoRa communication; by analyzing the historical behavior information of the intelligent water meter, an initial decision value for switching the LoRa communication working mode by constructing the water meter data to be transmitted is constructed. The beneficial effect is that according to the historical situation of the water network working conditions, it is avoided to enter a new communication cycle with less effective information, it is difficult to identify the abnormal water network working conditions of the water meter data to be transmitted, and there is a problem of untimely LoRa communication. At the same time, the response rate of the intelligent water network project is improved; through comprehensive analysis from multiple scales of the water meter data to be transmitted, a communication switching decision value for the state judgment interval is constructed. The beneficial effect is that it can accurately extract the potential trend of changes in abnormal water network working conditions in the water meter data to be transmitted, and improve the accuracy of the intelligent water meter for communication mode switching. Description of the Drawings
[0036] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0037] Figure 1 It is a flowchart of the steps of a communication method for an intelligent water meter provided by an embodiment of the present application;
[0038] Figure 2 It is a schematic diagram of the abnormal score sequences corresponding to normal working conditions, intelligent scheduling, and pipeline leakage;
[0039] Figure 3 It is a schematic diagram of the peak points in the abnormal score sequence;
[0040] Figure 4 It is a schematic diagram of each adjacent element point of the peak point. Detailed Embodiments
[0041] In order to further elaborate on the technical means and effects adopted by the present application to achieve the intended invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, will detail the specific embodiments, structures, features, and effects of a communication method and system for an intelligent water meter proposed according to the present application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.
[0043] The following will specifically describe the specific solutions of a communication method and system for an intelligent water meter provided by the present application with reference to the accompanying drawings.
[0044] Please refer to Figure 1 , which shows a flowchart of the steps of a communication method for an intelligent water meter provided by an embodiment of the present application. The method includes the following steps:
[0045] Step S1, set the maximum interval time between two adjacent wireless communications of the intelligent water meter, denoted as the maximum communication interval duration; use the preset duration as a state judgment interval; collect various water meter data; obtain the water meter data that has been transmitted within the preset time period, denoted as historical water meter data, and obtain the water meter data that has not been transmitted yet, denoted as water meter data to be transmitted.
[0046] Intelligent water meters usually work in underground pipe networks. The physical length of the pipe network is large, and it is not convenient to lay power lines for each intelligent water meter. Therefore, intelligent water meters usually adopt LoRa technology for low-power data transmission and only need to send data regularly. Therefore, in this application, 30 minutes is used as the maximum communication interval duration of the LoRa communication unit, that is, the time interval between two adjacent wireless communications of the LoRa communication unit does not exceed 30 minutes at most; at the same time, 5 minutes is used as the status judgment interval of the LoRa communication unit. Every 5 minutes, it is judged whether the LoRa communication unit performs mode switching. It should be noted that for the setting of the maximum communication interval duration and the status judgment interval, in other embodiments of this application, the implementer can set it according to the actual situation, and this application does not make specific restrictions.
[0047] This application uses the LoRa communication unit of the intelligent water meter to obtain the moment of the most recent data transmission as the boundary moment. The various water meter data of the intelligent water meter collected within 1 hour before the boundary moment are recorded as historical water meter data, and the water meter data after the boundary moment and at the boundary moment are recorded as water meter data to be transmitted. It should be noted that for the acquisition period of historical water meter data, the implementer can set it according to the actual situation, and this application does not make specific restrictions.
[0048] For the acquisition of water meter data at each collection moment, specifically:
[0049] Install intelligent water meters on the pipe network, and obtain various water meter data through ultrasonic intelligent water meters. The water meter data includes flow rate, water pressure, water temperature, pH value, turbidity, and chromaticity. Preferably, in the embodiments of this application, the acquisition frequency of various water meter data is set to 1 Hz, and every 2 minutes, the collected various water meter data are transmitted to the data storage module through the I2C bus. It should be noted that for the data acquisition frequency and the interval time for transmitting water meter data to the data storage module, in other embodiments of this application, the implementer can set it according to the actual situation, and this application does not make specific restrictions.
[0050] Step S2, construct the comprehensive score of each moment based on the difference between the water meter data and the normal data in each status judgment interval; combine the differences in the neighborhood of the peak points in the sequence composed of the comprehensive scores of all moments to construct the abnormal possibility of each peak point, and screen the suspected abnormal points among the peak points; construct the communication urgency coefficient of each status judgment interval based on the change trend of the abnormal possibility of the suspected abnormal points.
[0051] (1) Construct the representation difference matrix of the water meter data to be transmitted based on the difference between the data at each moment in the water meter data to be transmitted and the water meter data under normal conditions; calculate the comprehensive score of each moment in the representation difference matrix by the technique for order preference by similarity to ideal solution (TOPSIS) method, and construct the abnormal score sequence:
[0052] Under the normal operating conditions of the intelligent water meter, all water meter data are stable. Within the state judgment interval, there are no abnormal behaviors, and there is no need for mode switching and LoRa communication. Under normal circumstances, the time interval between two adjacent wireless communications is the maximum communication interval. Therefore, the water meter data collected when the time interval between the last adjacent communications is the maximum communication interval are recorded as the normal water meter data for each item. The average value of the data at all times in each item of normal water meter data is calculated and recorded as the first average value;
[0053] Taking the data in the t-th state judgment interval as an example, the following analysis is carried out for the time period occupied by the water meter data to be transmitted:
[0054] First, for the x-th item of water meter data, the data at all the collection times of this item of water meter data in the water meter data to be transmitted are arranged in ascending order of time to obtain the sequence to be transmitted of this item of water meter data;
[0055] Calculate the difference between each element in the sequence to be transmitted and the corresponding first average value, and record it as the characterization difference value.
[0056] Preferably, in an embodiment of the present application, the characterization difference value may be the absolute value of the difference between each element in the sequence to be transmitted and the first average value; in other embodiments of the present application, the characterization difference value may be the square of the difference between each element in the sequence to be transmitted and the first average value.
[0057] The matrix composed of the characterization difference values of all elements in the sequences to be transmitted of all items of water meter data is recorded as the characterization difference matrix, where each row represents the characterization difference values of all items of water meter data at each moment, and each column represents the characterization difference values of all moments of each item of water meter data.
[0058] Then, the characterization difference matrix of the water meter data to be transmitted is used as the input of the Topsis (Technique for Order Preference by Similarity to Ideal Solution) algorithm. Among them, the data in each dimension of the characterization difference matrix are regarded as the extremely large indicators of the Topsis algorithm, and the comprehensive scores at each moment are output. The higher the comprehensive score at any moment, the greater the difference between the water meter data measured by the intelligent water meter at this moment and the water meter data under normal water network conditions, and the more likely the water network is in an abnormal condition at this moment. The sequence composed of the sorting results of the comprehensive scores at all moments in ascending order of time is recorded as the abnormal score sequence. Among them, the Topsis algorithm is a well-known technology, and the specific process will not be elaborated.
[0059] (2)Based on the differences between the neighborhood data of different peak points in the anomaly score sequence, and combining the comprehensive scores of each peak point, construct the anomaly possibility of each peak point:
[0060] During the operation of the water network project, due to the complex pipe network environment, it is vulnerable to the influence of routine operations such as intelligent scheduling, resulting in fluctuations in the anomaly score sequence of the water meter data to be transmitted. However, once an abnormal behavior occurs in the water network, such as pipeline leakage, the anomaly score sequence of the water meter data to be transmitted will also show fluctuations. The fluctuations caused by abnormal working conditions of the water network are quite different from those caused by normal working conditions. As Figure 2 shown, Figure 2 the three curves in it are respectively the anomaly score sequence corresponding to the normal water network working condition, the anomaly score sequence corresponding to intelligent scheduling, and the anomaly score sequence corresponding to pipeline leakage.
[0061] Taking the anomaly score sequence in the t-th state judgment interval as an example, the following processing is carried out:
[0062] First, take the anomaly score sequence as the input of the Automatic Multiscale-based Peak Detection (AMPD) algorithm, and output all peak points. As Figure 3 shown, where the black dots are the output peak points. Among them, the automatic multiscale peak search algorithm is a well-known technology, and the specific process will not be elaborated here. It can be understood that for the search of peak points in the anomaly score sequence, this application only provides a method for searching peak points. There are many existing methods for searching peak points, and implementers can also use other peak search algorithms to search for peak points in the anomaly score sequence. This application does not make specific restrictions.
[0063] Then, in the anomaly score sequence, construct a neighborhood window centered on each peak point, and take the sequence composed of all data points in the neighborhood window as the near-neighbor sequence of each peak point. As Figure 4 shown, where Figure 4 the diamond points in it are the adjacent element points of the peak points, that is, the data points in the neighborhood window. Among them, when there are insufficient data elements in the neighborhood window, the mean filling method can be used for supplementation. Preferably, in an embodiment of this application, the size of the neighborhood window is set to . In other embodiments of this application, the implementer can set the size of the neighborhood window according to the actual situation.
[0064] Finally, based on the differences between the near-neighbor sequences of the peak points in the anomaly score sequence, calculate the anomaly possibility of each peak point:
[0065] For any peak point in the anomaly score sequence, calculate the KL divergence between the any peak point and the neighbor sequences of each peak point in the anomaly score sequence, denoted as the first difference degree; the anomaly possibility of the any peak point is positively correlated with the comprehensive score of the any peak point and the first difference degree. Among them, the KL divergence is a well-known technology, and the specific process will not be elaborated.
[0066] It should be noted that the first difference degree described in this application refers to the degree of difference between two neighbor sequences. The greater the degree of difference, the lower the similarity. The first difference degree can be calculated through a similarity algorithm. For the calculation of the first difference degree, this application only provides a method to obtain the first difference degree through a similarity calculation method. There are many existing methods for calculating the first difference degree, and implementers can also use other similarity algorithms to calculate the first difference degree. This application does not make specific restrictions;
[0067] The positive correlation relationship described in this application means that the independent variable increases as the dependent variable increases, and the independent variable decreases as the dependent variable decreases. The specific application process of the positive correlation relationship can be determined according to the actual situation, and this application does not make special restrictions.
[0068] Preferably, in an embodiment of this application, the calculation expression of the anomaly possibility of each peak point can be:
[0069]
[0070] In the formula, is the anomaly possibility of the a-th peak point in the anomaly score sequence, is the comprehensive score of the a-th peak point in the anomaly score sequence, is the neighbor sequence of the a-th peak point in the anomaly score sequence, is the neighbor sequence of the b-th peak point in the anomaly score sequence, B is the total number of peak points in the anomaly score sequence, is the neighbor sequence The KL divergence between them. Among them, the KL divergence is a well-known technology, and the specific process will not be elaborated.
[0071] When is larger, it indicates that the fluctuation characteristics of the water network working condition corresponding to the peak point are more different from the fluctuation characteristics of the water network working conditions corresponding to other peak points. At the same time, when is larger, it indicates that the water network working condition corresponding to the peak point is more special, then the moment corresponding to the peak point is more likely to have an abnormal water network working condition, is larger.
[0072] (3) Obtain suspected abnormal points based on the magnitude of the anomaly possibility of peak points, and construct the communication urgency coefficient of this state judgment interval based on the change trend of the anomaly possibility of the suspected abnormal points:
[0073] In the intelligent water network project, each intelligent water meter corresponds to a pipeline measurement position in the water network project. The water network conditions of the intelligent water meter are vulnerable to the interference of abnormal behaviors at other pipeline positions. As time goes by, the greater the degree of interference suffered by the water meter data of the intelligent water meter and the more frequent the abnormal water network conditions occur, that is, the more significant the abnormal water network conditions are. In order to avoid the continuous adverse effects caused by the abnormal water network conditions and provide data support for the intelligent water network project, the intelligent water meter should switch its working mode more and conduct LoRa communication in a timely manner.
[0074] Taking the abnormal score sequence in the t-th state judgment interval as an example, the following processing is carried out:
[0075] First, taking the abnormal possibilities of all peak points in the abnormal score sequence as inputs, and using the Otsu method to obtain the segmentation threshold. The Otsu method is a well-known technology, and the specific process will not be elaborated here. It should be noted that for the calculation of the segmentation threshold, this application only provides a threshold segmentation method. There are many existing threshold segmentation methods, and implementers can also use other threshold segmentation algorithms to calculate the segmentation threshold. This application does not make specific restrictions.
[0076] Taking the peak points in the abnormal score sequence whose abnormal possibilities are greater than or equal to the segmentation threshold as suspected abnormal points.
[0077] Then, in order to evaluate the significance of the abnormal water network conditions of the water meter data in this state judgment interval, sort the abnormal possibilities of all suspected abnormal points in this state judgment interval in ascending order according to the corresponding moments of the suspected abnormal points. The formed sequence is denoted as the abnormal possibility sequence; taking this abnormal possibility sequence as the input of the MK (Mann-Kendall) trend test algorithm, and outputting the trend statistic, denoted as the abnormal interference increasing degree . Among them, the MK (Mann-Kendall) trend test algorithm is a well-known technology, and the specific process will not be elaborated here.
[0078] The larger it is, the more different the water network conditions of the intelligent water meter are from the normal water network conditions as time goes by in the state judgment interval, which means that the intelligent water meter may be more and more affected by the abnormal water network conditions, the more significant the abnormal water network conditions are, and the more timely the working mode of the LoRa communication unit should be switched.
[0079] Further, sort the moments corresponding to all suspected abnormal points in the state judgment interval in ascending order of moments. The formed sequence is denoted as the abnormal moment sequence, and use the first-order difference sequence of the abnormal moment sequence as the input for Sen slope estimation. Output the slope estimation value, and denote the opposite number of the slope estimation value as the frequency of abnormal working conditions. Among them, the first-order difference sequence and Sen slope estimation are both well-known technologies, and the specific process will not be elaborated here. It should be noted that for the slope estimation of the first-order difference sequence, this application only provides a trend estimation method. There are many existing trend estimation methods, and implementers can also use other trend estimation algorithms for the slope estimation of the first-order difference sequence.
[0080] The larger it is, the more frequently the abnormal working conditions of the water network of the intelligent water meter appear over time within the state judgment interval, the more significant the abnormal working conditions of the water network are, and the more urgently the working mode of the LoRa communication unit should be switched.
[0081] Finally, use the fusion value of the abnormal interference increasing degree and the frequency of abnormal working conditions as the communication urgency coefficient of this state judgment interval.
[0082] It should be noted that the "fusion" in this application refers to combining multiple variables. The specific fusion method can be determined according to the actual situation during application, and this application does not make special restrictions.
[0083] Preferably, in an embodiment of this application, the calculation expression of the communication urgency coefficient can be: , where is the communication urgency coefficient of the t-th state judgment interval, is the increasing degree of abnormal interference of the water meter data to be transmitted within the t-th state judgment interval, is the frequency of abnormal working conditions of the water meter data to be transmitted within the t-th state judgment interval, and Norm( ) is the normalization function.
[0084] In other embodiments of this application, the calculation expression of the communication urgency coefficient can be: .
[0085] Based on the water meter data in each state judgment interval during the time period of the historical water meter data, use the same calculation method as the communication urgency coefficient to obtain the communication urgency coefficient of each state judgment interval in the historical water meter data.
[0086] Step S3, obtain all other intelligent water meters within the neighborhood range of the current intelligent water meter, and obtain the corresponding transmission time for each other intelligent water meter each time data is transmitted through the feedback data packet of the LoRa gateway.
[0087] In the embodiment of the present application, the LoRa communication unit adopts the bi-directional transmission terminal (Class A) in the LoRaWAN protocol. After each upload of the water meter data by the LoRa communication unit of the intelligent water meter, a receiving window will follow immediately, and the receiving module realizes the monitoring of the LoRa signal to obtain the feedback data packet from the LoRa gateway. Among them, in this embodiment, the feedback data packet specifically includes the transmission times of all other intelligent water meters within the neighborhood range (within 500 m) of the intelligent water meter in the previous 1 h for LoRa communication respectively. After the receiving module obtains the feedback data packet, it immediately turns off the PLL and the radio frequency module, and through physical layer demodulation, obtains all the transmission times corresponding to the feedback data packet.
[0088] Step S4: Construct a historical communication times sequence based on the data transmission times of other intelligent water meters within the neighborhood range of the current intelligent water meter; construct a historical communication urgency sequence based on the communication urgency coefficients of each state judgment interval; construct an initial decision value based on the similarity between the historical communication times sequence and the historical communication urgency sequence, and in combination with the change trend of the communication urgency coefficient of the water meter data to be transmitted, construct a communication switching decision value, and perform mode switching based on the communication switching decision value.
[0089] The water meter data of the intelligent water meter contains a large amount of water network working condition information, and the intelligent water meters are intertwined with each other. In the previous 1 h, the more times of LoRa communication within the neighborhood range of the intelligent water meter and the more severely the intelligent water meter is affected by other intelligent water meters within the neighborhood range, the less the intelligent water meter should perform LoRa communication when reaching the maximum communication interval duration. The higher the initial decision value for the LoRa communication working mode switching of the water meter data to be transmitted, the higher the accuracy of the decision-making for the intelligent water network project can be improved.
[0090] Based on the number of the transmission times, count the data transmission times of each other intelligent water meter, and count the sum of the data transmission times of all other intelligent water meters within each state judgment interval, which is denoted as the interval times; denote the sequence composed of the interval times of all state judgment intervals as the historical communication times sequence ; denote the sequence composed of the communication urgency coefficients of all state judgment intervals of the historical water meter data as the historical communication urgency sequence .
[0091] The present application calculates the initial decision value for the LoRa communication working mode switching of the water meter data to be transmitted through the following formula , and its beneficial effect lies in: deeply mining the historical behavior information of the intelligent water meter, and according to the historical situation of the water network working condition, the intelligent water meter performs LoRa communication in a timely manner, improving the response rate of the intelligent water network project:
[0092]
[0093] In the formula, is the total number of times that all other smart water meters in the neighborhood of the smart water meter perform LoRa communication within the previous 1 hour, is to calculate the historical communication count sequence , the historical communication urgency sequence between the Pearson correlation coefficients.
[0094] When is larger, it reflects that the number of times other smart water meters in the neighborhood of the smart water meter perform LoRa communication is more, and the probability of abnormal water network conditions occurring at other pipeline positions in the neighborhood is higher. When calculating the weight is higher. At the same time, when is larger, it reflects that the smart water meter is more strongly affected by the water network conditions of other smart water meters in the neighborhood, and the smart water meter should perform LoRa communication in a timely manner, that is is larger.
[0095] In the time period occupied by the water meter data to be transmitted, taking the t-th state judgment interval as an example in this application, the communication urgency coefficients of the 1st to t-th state judgment intervals are composed of the local communication urgency sequence of the smart water meter. The local communication urgency sequence is linearly fitted by the least squares method, and the slope of the fitted straight line is calculated . Among them, both the least squares method and the calculation of the straight line slope are well-known technologies, and the specific process will not be elaborated. It should be noted that the implementer can also use other methods for straight line fitting, and this application does not make specific restrictions. Its beneficial effect is to consider the potential trend of changes in abnormal water network conditions in the water meter data to be transmitted, and improve the accuracy of the communication mode switching of the smart water meter.
[0096] Through the following formula, the communication switching decision value of the t-th state judgment interval can be obtained :
[0097]
[0098] When is larger, from the perspective of the historical behavior information of the smart water meter, the smart water meter should perform LoRa communication in a timely manner; when is larger, from the scale of a single state judgment interval, it reflects that the abnormal water network conditions of the smart water meter in the state judgment interval are more significant; when is larger, it shows that from the scale of multiple state judgment intervals, the water meter data to be transmitted has a greater tendency of abnormal water network behavior, and LoRa communication should be performed is higher.
[0099] For each status judgment interval, only when the communication switching decision value of the status judgment interval is greater than the decision threshold (1 in this embodiment) or the communication interval duration between two adjacent LoRa communications is greater than or equal to 30 minutes, the judgment module sends a transmission instruction to the LoRa communication unit of the wireless communication module.
[0100] Step S5: Store various water meter data and the communication urgency coefficients corresponding to each status judgment interval.
[0101] The data storage module stores the water meter data to be transmitted of the intelligent water meter, stores various water meter data within 1 hour before the last LoRa communication and the communication urgency coefficients corresponding to each status judgment interval, and can be compressed and stored by means of run-length encoding, and stored on the storage chip of the intelligent water meter.
[0102] Step S6: Conduct intelligent water meter communication through mode adjustment.
[0103] The wireless communication module includes a LoRa communication unit and a Bluetooth communication unit.
[0104] Among them, the LoRa communication unit has a sleep mode, a standby mode, and a transmission mode. The LoRa communication unit is default in the sleep mode. When the LoRa communication unit receives a transmission instruction, it immediately switches to the standby mode, starts the radio frequency, PLL, and PA modules of the LoRa communication unit, initializes the Tx module, extracts the water meter data to be transmitted from the data storage module, constructs a transmission data packet, and writes it into the FIFO (First In, First Out) cache; the LoRa communication unit switches to the transmission mode again, modulates it into a signal through LoRa technology and sends it to the LoRa gateway. After the transmission is completed, the LoRa communication unit will generate a TxDone interrupt and switch back to the sleep mode, waiting for the next transmission instruction in the judgment mode.
[0105] The LoRa gateway transmits the water meter data of each intelligent water meter to the cloud or data center through 5G technology / Ethernet communication, etc., for managers to make decision analysis, realizing intelligent reading and remote monitoring of water meter data.
[0106] Bluetooth communication unit: When an external device establishes a connection with the Bluetooth communication unit, using Bluetooth technology, the intelligent water meter can transmit all the data in the data storage module to the external device.
[0107] Based on the same inventive concept as the above method, the embodiment of the present application also provides a communication system for an intelligent water meter, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above methods for a communication method for an intelligent water meter.
[0108] In summary, the embodiment of the present application provides a communication method for an intelligent water meter. The LoRa communication method is adopted, and the LoRa communication unit mode is adaptively switched based on the actual water network conditions of the intelligent water meter, avoiding the problems of long standby time and high power consumption of LoRa communication. By analyzing the historical behavior information of the intelligent water meter, an initial decision value for switching the LoRa communication working mode for constructing the water meter data to be transmitted is built. The beneficial effect is that according to the historical situation of the water network conditions, it is avoided to enter a new communication cycle with less effective information, making it difficult to identify abnormal water network conditions of the water meter data to be transmitted, and there is a problem of untimely LoRa communication. At the same time, the response rate of the intelligent water network project is improved. By comprehensively analyzing from multiple scales of the water meter data to be transmitted, a communication switching decision value for constructing a state judgment interval is built. The beneficial effect is that it can accurately extract the potential trend of changes in abnormal water network conditions in the water meter data to be transmitted, and improve the accuracy of the intelligent water meter for switching the communication mode.
[0109] It should be noted that the above sequence of embodiments of the present application is only for description and does not represent the superiority or inferiority of the embodiments. And the above specific embodiments of the present application have been described. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0110] Each embodiment in the present application is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key point of each embodiment is to illustrate the differences from other embodiments.
[0111] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present application shall be included in the protection scope of the present application.
Claims
1. A communication method for a smart water meter, characterized in that: The method comprises the following steps: The water meter data of each time is collected through the smart water meter, and the historical water meter data and the water meter data to be transmitted are distinguished based on the collection time; the preset time length is used as a state judgment interval; In the time period occupied by the water meter data to be transmitted, the comprehensive score of each moment is constructed based on the difference between each water meter data and normal data in each state judgment interval; the abnormal possibility of each peak point is constructed by combining the difference in the peak point neighborhood in the sequence composed of the comprehensive scores of all moments, and the suspected abnormal points in the peak points are screened; the communication urgency coefficient of each state judgment interval is constructed based on the change trend of the abnormal possibility of the suspected abnormal points; In the time period occupied by the historical water meter data, a historical communication number sequence is constructed based on the number of data transmissions of other smart water meters within the neighborhood of the current smart water meter; a historical communication urgency sequence is constructed based on the communication urgency coefficient of each state judgment interval; based on the similarity between the historical communication number sequence and the historical communication urgency sequence, an initial decision value is constructed in combination with the data transmission number; In combination with the change trend of the communication urgency coefficient of the water meter data to be transmitted, the communication switching decision value of each state judgment interval of the water meter data to be transmitted is constructed, and the smart water meter communication is performed based on the communication switching decision value.
2. A communication method for a smart water meter according to claim 1, characterized in that: The acquisition process of the historical water meter data and the water meter data to be transmitted is as follows: The time when the smart water meter last transmitted data is obtained as the boundary time, and the water meter data within the preset time period before the boundary time is recorded as historical water meter data, and the water meter data after the boundary time is recorded as water meter data to be transmitted, wherein the water meter data include flow rate, water pressure, water temperature, pH value, turbidity and chromaticity.
3. A communication method for a smart water meter according to claim 1, characterized in that: The process of obtaining the comprehensive score is as follows: Obtain various water meter data collected when the most recent adjacent communication time interval is the maximum communication interval, record them as various normal water meter data, calculate the average value of all data in various normal water meter data, record them as the first mean value; Recording a sequence composed of data at all collection times of each water meter data in each state judgment interval as a sequence to be transmitted for each water meter data; calculating the difference between each element in the sequence to be transmitted and the corresponding first mean value, and recording it as a representative difference value; The matrix composed of the representation difference values of all elements in the sequence to be transmitted of all items of water meter data is recorded as the representation difference matrix, and the representation difference matrix is used as the input of the Topsis algorithm, wherein the data of each dimension in the representation difference matrix is regarded as the extremely large indicator of the Topsis algorithm, and the comprehensive score of each moment in each state judgment interval is output.
4. A communication method for a smart water meter as claimed in claim 1, characterized in that: The process of constructing the abnormal possibility of each peak point and screening the suspected abnormal points among the peak points is as follows: The sequence composed of the comprehensive scores at all times is recorded as the abnormal score sequence; in the abnormal score sequence, a neighborhood window of each peak point is constructed with each peak point as the center, and the sequence composed of all data points in the neighborhood window is used as the neighbor sequence of each peak point; For any peak point in the abnormal score sequence, the difference between the peak point and the neighboring sequence of each peak point in the abnormal score sequence is calculated, which is recorded as the first difference; the abnormal possibility of any peak point is positively correlated with the comprehensive score of any peak point and the first difference respectively; The peak points in the anomaly score sequence whose anomaly probability is greater than or equal to the preset segmentation threshold are regarded as suspected anomalies.
5. A communication method for a smart water meter as claimed in claim 1, characterized in that: The acquisition process of the communication urgency coefficient is: Record the sequence of abnormal possibilities of all suspected abnormal points in each state judgment interval as an abnormal possibility sequence; use the abnormal possibility sequence as the input of the trend detection algorithm, and output the trend statistic, which is recorded as the increasing degree of abnormal interference; The sequence of moments corresponding to all suspected abnormal points in each state judgment interval is recorded as the abnormal moment sequence, the first-order difference sequence of the abnormal moment sequence is used as the input of the slope estimation algorithm, the slope estimation value is output, and the opposite number of the slope estimation value is recorded as the frequency of abnormal working conditions; The fusion value of the increasing degree of abnormal interference and the frequency of abnormal working conditions is used as the communication urgency coefficient of each state judgment interval.
6. A communication method for a smart water meter as claimed in claim 1, characterized in that: The acquisition process of the historical communication number sequence and the historical communication urgency sequence is as follows: Obtain other smart water meters within the neighborhood of the current smart water meter, calculate the sum of the data transmission times of all other smart water meters in each state judgment interval, and record it as the interval times; record the sequence composed of the interval times of all state judgment intervals as the historical communication times sequence; record the sequence composed of the communication urgency coefficients of all state judgment intervals of historical water meter data as the historical communication urgency sequence.
7. A communication method for a smart water meter as claimed in claim 1, characterized in that: The calculation expression of the initial decision value is: , where is the initial decision value, is the total number of LoRa communications performed by all other smart water meters in the neighborhood of the smart water meter within the previous hour. It is the sequence of historical communication times , Historical Communication Urgent Sequence The Pearson correlation coefficient between is the normalization function.
8. A communication method for a smart water meter as claimed in claim 1, characterized in that: The process of obtaining the communication switching decision value is as follows: In the time period occupied by the water meter data to be transmitted, the sequence composed of the communication urgency coefficients of the 1st to tth state judgment intervals is linearly fitted through a linear fitting algorithm, and the slope of the fitting line is calculated, which is recorded as ; The communication switching decision value of the tth state judgment interval is recorded as , The calculation expression is: , where is the initial decision value, is the communication urgency coefficient of the t-th state judgment interval.
9. A communication method for a smart water meter according to claim 1, characterized in that: The smart water meter communication based on the communication switching decision value is specifically: In each state judgment interval, when the communication switching decision value of the state judgment interval is greater than the preset decision threshold, the smart water meter is switched from sleep mode to standby mode, the water meter data to be transmitted is extracted from the data storage module, the sending data packet is constructed, and written into the FIFO cache; then it is switched to the sending mode, modulated into a signal through LoRa technology and sent to the LoRa gateway.
10. A communication system for a smart water meter, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Real-time data optimization transmission method for automobile electronic control unit
CN118740939A
Systems and methods for anomaly detection
US20180324199A1