Data completion method, device and equipment based on water meter equipment model

By establishing a data completion method based on the water meter equipment model, the lag, incompleteness and noise problems in the processing of narrowband IoT smart water meter data are solved, real-time monitoring and efficient utilization of water meter equipment data are realized, and the efficiency and quality of water management are improved.

CN119848033APending Publication Date: 2025-04-18ZHEJIANG CHINT INSTR & METER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411940092.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art has problems such as data lag, inaccurate asset identification, incomplete data and noise when processing massive IOT data generated by narrowband IoT smart water meters, resulting in the inability to fully mine and utilize these data resources.

Method used

By establishing a data completion method based on the water meter equipment model, the latest update time of the current status and historical status document of each water meter equipment is obtained, the water attribute information, water use date and water use time are extracted, the water use date is divided into missing dates and complete dates, the time period is divided and the water consumption is determined, and the missing data of the missing dates is completed based on the water use coefficient.

Benefits of technology

Real-time monitoring of water meter equipment data and the integrity of historical data, solve the problems of data lag, noise and missing values, improve the efficiency and quality of water management, and promote the continuous upgrading and improvement of water meter equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848033A_ABST
    Figure CN119848033A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electronic information processing, and discloses a data completion method, device and equipment based on a water meter equipment model.The method comprises the steps that the current state of each piece of water meter equipment and the latest updating time of historical state documents are obtained from a pre-established water meter equipment model; extracting water use attribute information, water use dates and water use time from the latest update time of the current state document and the historical state document, and dividing the water use dates into missing days and complete days based on the water use attribute information and the water use time; dividing the complete day into a plurality of time periods according to a preset time interval, and determining the water consumption of each time period; and determining a water consumption coefficient based on the water consumption of each time period, and complementing missing data of the missing day based on the water consumption coefficient. The problems of data analysis lag, data noise and missing values of water meter equipment are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic information processing, and in particular to a data completion method, device and equipment based on a water meter equipment model. Background Art

[0002] NB-IOT (Narrow Band Internet of Things, abbreviated as NB-IOT) smart water meters are widely used in the market, generating massive amounts of device IOT data. These data play a vital role in equipment operation status monitoring, fault prediction, performance optimization, etc.

[0003] However, current data analysis methods and technologies have a large amount of data lag, inaccurate asset identification of water meter equipment, and cannot efficiently process large-scale IOT (Internet of Things, IOT) data. The data is incomplete and may contain noise, missing values ​​and other problems, resulting in the inability to fully mine and utilize these valuable data resources, and thus unable to effectively feedback to the maintenance and repair of equipment and promote equipment meter production processes, material selection and motherboard programs. Summary of the invention

[0004] In view of this, the present invention provides a data completion method, device and equipment based on a water meter device model to solve the problem of missing values ​​in water meter device data.

[0005] In a first aspect, the present invention provides a data completion method based on a water meter device model, the method comprising:

[0006] Obtain the latest update time of the current status and historical status documents of each water meter device from the pre-established water meter device model;

[0007] Extract water use attribute information, water use date and water use time from the latest update time of the current status and historical status documents, and divide the water use date into missing days and complete days based on the water use attribute information and water use time;

[0008] Divide the full day into multiple periods according to preset time intervals and determine the water consumption in each period;

[0009] The water use coefficient is determined based on the water consumption in each period, and the missing data of missing days are supplemented based on the water use coefficient.

[0010] The present invention provides a data completion method based on a water meter device model. The method can obtain the current status and the latest update time of the historical status document of each water meter device from a pre-established water meter device model; extract water use attribute information, water use date and water use time from the current status and the latest update time of the historical status document, and divide the water use date into missing days and complete days based on the water use attribute information and the water use time; divide the complete day into multiple time periods according to preset time intervals, and determine the water consumption of each time period, determine the water consumption coefficient based on the water consumption of each time period, and calculate the estimated water consumption of the missing day based on the water consumption coefficient, thereby completing the data of the missing data of the missing day, solving the problems of data analysis lag, data noise and missing values ​​of the water meter device, facilitating the maintenance of the water meter device, promoting the upgrading and optimization of the water meter process, helping to improve the efficiency and quality of water management, improve water production efficiency, promote the continuous upgrading and improvement of water meter equipment, and realize the scientific management and efficient use of massive data.

[0011] In an optional implementation, the water meter device model is established in the following manner:

[0012] Establish an asset manufacturer database for water meter equipment;

[0013] The operation data of each water meter device is obtained, and a water meter device standard object model is established based on the asset manufacturer database and the operation data of each water meter device. A water meter device model is established based on the water meter device standard object model; the water meter device standard object model includes water use attribute information, service information and event information; the water meter device model is represented by standard JSON data, including the current status part of the water meter device, the historical status document part and the latest update time part of the historical status document.

[0014] The present invention provides a data completion method based on a water meter device model, which achieves the purpose of automatically generating a simulation model for a physical water meter device by establishing a water meter device model corresponding to the physical water meter device, and efficiently processes large-scale water meter devices. The analysis of the simulation model can be effectively fed back to the repair and maintenance of the water meter device and the production process of the water meter device in real time, thereby improving the network transmission performance of the water meter simulation model.

[0015] In an optional implementation, extracting water use attribute information, water use date and water use time from the latest update time of the current state and historical state documents, and dividing the water use date into missing days and complete days based on the water use attribute information and the water use time includes:

[0016] The water use attribute information is judged to be continuous and complete based on the water use date and time. If it is discontinuous, incomplete, or both discontinuous and incomplete, the data is considered missing and the corresponding water use date is marked as a missing day; if it is continuous, it is marked as a complete day.

[0017] The present invention provides a data completion method based on a water meter device model, which determines whether water use attribute information is continuous and complete according to the water use date and water use time to realize the division of missing days and complete days. The real-time status and historical data of the water meter device can be monitored through the water use attribute information, water use date and water use time, which provides conditions for the subsequent completion of the data of missing days during the operation of the water meter device.

[0018] In an optional implementation, determining the water consumption in each time period includes:

[0019] The water volume indication of each time period is extracted from the water use attribute information, and the difference between the water volume indication of the latter time period and the water volume indication of the previous time period in adjacent time periods is calculated to obtain the water consumption of each time period.

[0020] The present invention provides a data completion method based on a water meter equipment model, which extracts the water volume indication of each time period from the water use attribute information, calculates the difference between the water volume indication of the latter time period and the water volume indication of the previous time period in adjacent time periods, and obtains the water consumption of each time period, thereby realizing accurate calculation of the water consumption of each time period in a complete day, and providing conditions for the subsequent calculation of the water use coefficient.

[0021] In an optional implementation, determining a water use coefficient based on the water consumption in each time period, and completing missing data of missing days based on the water use coefficient includes:

[0022] Calculate the proportion of preset target data for each period based on the water consumption in each period, and sort each period in order according to the order of water use date, time of period and proportion of preset target data, and classify each period into off-peak period, peak period and off-peak period according to the sorting;

[0023] Based on the water consumption in each period, calculate the water consumption coefficient for the off-peak period, the water consumption coefficient for the peak period and the water consumption coefficient for the off-peak period;

[0024] According to the type of missing day, select the off-peak period water use coefficient, peak period water use coefficient and / or off-peak period water use coefficient to complete the missing data of the missing day.

[0025] The present invention provides a data completion method based on a water meter equipment model. By calculating the complete daily water consumption coefficient, the peak period water consumption coefficient and the valley period water consumption coefficient, it realizes the calculation of the missing estimated water consumption for the missing day by selecting the complete daily water consumption coefficient, the peak period water consumption coefficient and / or the valley period water consumption coefficient according to the missing day type, thereby achieving the purpose of completing the missing data and realizing the scientific management and efficient use of massive data.

[0026] In an optional implementation, the preset target data ratio of each time period is calculated based on the water consumption of each time period, and each time period is sorted in sequence according to the water use date, time period and preset target data ratio based on the preset target data ratio, and each time period is classified into a flat peak period, a peak period and a valley period according to the sorting, including:

[0027] Count the total number of water consumption records in each period and the number of water consumption records that are greater than the preset target data, and calculate the ratio of the number of water consumption records that are greater than the preset target data to the total number of water consumption records in each period to obtain the proportion of preset target data in each period;

[0028] When the proportion of preset target data in each sorted time period is equal to the preset threshold, the corresponding time period is classified as an off-peak period. When the proportion of preset target data in each sorted time period is higher than the preset threshold, the corresponding time period is classified as a peak period. When the proportion of preset target data in each sorted time period is lower than the preset threshold, the corresponding time period is classified as a trough period.

[0029] In an optional implementation, respectively calculating the water consumption coefficient for the off-peak period, the water consumption coefficient for the peak period, and the water consumption coefficient for the off-peak period based on the water consumption in each period includes:

[0030] The water consumption of all periods of a full day is accumulated to obtain the total water consumption of the full day, and the ratio of the total water consumption of the day to the full day time is calculated to obtain the average water consumption of the full day. At the same time, the ratio of the water consumption of each off-peak period to the average water consumption of the full day is calculated as the water consumption coefficient of the off-peak period;

[0031] Calculate the ratio of water consumption in each peak period to the average water consumption in a full day to obtain the water consumption coefficient in each peak period;

[0032] The water consumption coefficient for each low-peak period is obtained by calculating the ratio of the water consumption in each low-peak period to the average water consumption for the entire day.

[0033] The present invention provides a data completion method based on a water meter equipment model, which classifies multiple time periods into peak time periods and valley time periods by presetting target data proportions, thereby realizing statistics on peak time periods and valley time periods of water consumption, which helps to improve the efficiency and quality of water management, and calculates the complete day water consumption coefficient, peak time period water consumption coefficient and valley time period water consumption coefficient through the water consumption in each time period, thereby providing conditions for subsequently estimating the water consumption of missing days.

[0034] In an optional implementation, selecting the off-peak period water consumption coefficient, the peak period water consumption coefficient and / or the off-peak period water consumption coefficient according to the missing day type to complete the missing data of the missing day includes:

[0035] Get the total average water consumption for the missing days;

[0036] When the date difference between the missing day and the complete day is within the set range, the missing day is classified into the off-peak period, peak period and off-peak period according to the time period of the complete day, and the water use coefficient of the off-peak period, peak period and off-peak period is selected;

[0037] Calculate the product of the peak period water consumption coefficient and the total average water consumption of the missing day to obtain the estimated water consumption of the peak period, the product of the valley period water consumption coefficient and the total average water consumption of the missing day to obtain the estimated water consumption of the valley period, and the product of the average peak period water consumption coefficient and the total average water consumption of the missing day to obtain the estimated water consumption of the average peak period. Use the estimated water consumption of the peak period, the estimated water consumption of the valley period, and the estimated water consumption of the average peak period to complete the missing data of the missing day during the peak period, the missing data of the valley period, and the missing data of the average peak period.

[0038] When the date difference between the missing day and the complete day is outside the set range, the water consumption coefficient for the off-peak period is selected, and the product of the water consumption coefficient for the off-peak period and the total average water consumption of the missing day is calculated to obtain the estimated water consumption for each period. The estimated water consumption for each period is used to complete the missing data of the missing day.

[0039] The present invention provides a data completion method based on a water meter equipment model. By selecting a complete day water consumption coefficient, a peak period water consumption coefficient and / or a valley period water consumption coefficient according to the type of missing day, the estimated water consumption of the missing day can be calculated to complete the missing data and ensure the integrity and continuity of the data.

[0040] In an optional implementation, the data completion method based on the water meter device model further includes:

[0041] After the data completion process is completed, the update time of the current status and historical status documents in the water meter device model is updated to verify the correctness of the missing data completion;

[0042] When the water meter device corresponding to the water meter device model is offline, the update time of the current status and historical status documents in the water meter device model is stored in the local memory. When the water meter device corresponding to the water meter device model is back online, the update time of the current status and historical status documents in the water meter device model is queried to complete the missing data of the missing day.

[0043] The present invention provides a data completion method based on a water meter equipment model, which timely updates the data in the water meter equipment model to ensure that the water meter equipment model is the latest data, which is helpful for the maintenance and repair of water meter equipment, improves water production efficiency, and promotes continuous upgrading and improvement of equipment.

[0044] In a second aspect, the present invention provides a data completion device based on a water meter device model, the device comprising:

[0045] An information acquisition module is used to obtain the latest update time of the current status and historical status documents of each water meter device from a pre-established water meter device model;

[0046] A missing day and complete day classification module is used to extract water use attribute information, water use date and water use time from the latest update time of the current state and historical state documents, and to classify the water use date into missing days and complete days based on the water use attribute information and water use time;

[0047] The time period division and water consumption determination module is used to divide the full day into multiple time periods according to preset time intervals and determine the water consumption of each time period;

[0048] The data completion module is used to determine the water use coefficient based on the water consumption in each period, and to complete the missing data of the missing days based on the water use coefficient.

[0049] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data completion method based on the water meter device model of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0050] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data completion method based on a water meter device model according to the first aspect or any corresponding embodiment thereof.

[0051] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the data completion method based on a water meter device model according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 is a flow chart of a data completion method based on a water meter model according to an embodiment of the present invention;

[0054] Figure 2 is a flow chart of another data completion method based on a water meter device model according to an embodiment of the present invention;

[0055] Figure 3 is a flow chart of another data completion method based on a water meter device model according to an embodiment of the present invention;

[0056] Figure 4 is a flow chart of another data completion method based on a water meter device model according to an embodiment of the present invention;

[0057] Figure 5 is a structural block diagram of a data completion device based on a water meter device model according to an embodiment of the present invention;

[0058] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0060] According to an embodiment of the present invention, an embodiment of a data completion method based on a water meter device model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0061] In this embodiment, a data completion method based on a water meter device model is provided, which can be used in a computer terminal, such as a central processing unit, a server, etc. Figure 1 is a flow chart of a data completion method based on a water meter device model according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0062] Step S101, obtaining the latest update time of the current status and historical status documents of each water meter device from a pre-established water meter device model.

[0063] Specifically, the established water meter equipment model is the water meter equipment I model, including steps such as asset discovery and identification of water meter equipment and water meter equipment model building, to obtain the water meter equipment model. The water meter equipment model includes the attribute information, service information and event information of each water meter equipment, as well as the current status of each water meter equipment, the latest update time of the historical status document, etc. The current status is the latest status of the water meter equipment, including the attribute information of the water meter equipment, etc. The attribute information includes but is not limited to water volume indication, voltage, strong magnetism, valve status, ambient temperature, relative humidity, water temperature and water pressure, etc. The latest update time of the historical status document is the timestamp of each attribute.

[0064] Step S102: extract water use attribute information, water use date and water use time from the latest update time of the current status and historical status documents, and divide the water use date into missing days and complete days based on the water use attribute information and water use time.

[0065] Specifically, water usage information is extracted from the current state, and the timestamp corresponding to each attribute value of the corresponding water meter device is obtained from the latest update time of the historical state document to obtain the water usage date and time. The water usage time of each water meter device in each day is continuous data.

[0066] A missing day means that the water meter equipment information arranged in chronological order is not stored continuously, that is, there is a missing data. A complete day means that the water meter equipment information arranged in chronological order is stored continuously, and there is no missing data.

[0067] Step S103, dividing a full day into multiple time periods according to preset time intervals, and determining the water consumption in each time period.

[0068] Exemplarily, each full day is divided into multiple time periods according to a predetermined time interval (such as every hour). For example, a day can be divided into 24 time periods, each of which is 1 hour. For the convenience of subsequent sorting, a unique number can be assigned to each time period, for example, 00:00-01:00 is time period 1, 01:00-02:00 is time period 2, and so on.

[0069] The water consumption data for each time period is extracted from the current state of the water meter device model, and the latest value of each attribute is obtained from the historical state document. The water consumption for each time period is then calculated based on the divided time periods, time period numbers, and timestamps.

[0070] Step S104, determining the water consumption coefficient based on the water consumption in each time period, and completing the missing data of the missing days based on the water consumption coefficient.

[0071] Specifically, the water use coefficient refers to the ratio of the amount of water used for its own production or service needs to the total amount of water in the process of water resource utilization. In this embodiment, the water use coefficient includes the average water use for a complete day and the average water use for each period. The water use coefficient is used to calculate the estimated water use for the missing day to complete the missing data.

[0072] It should be noted that for missing data completion, on the one hand, it is necessary to ensure that the constructed water meter device model has the current state part (reported part), the expected state part (desired part), and the metadata part (device historical state document). On the other hand, through the device simulation of the water meter device model, the connection communication status is tested, and the goodness of the water meter network communication is adjusted to ensure that data transmission will not be delayed or lost.

[0073] The data completion method based on the water meter device model provided in this embodiment can obtain the current status and the latest update time of the historical status document of each water meter device from the pre-established water meter device model; extract water use attribute information, water use date and water use time from the current status and the latest update time of the historical status document, and divide the water use date into missing days and complete days based on the water use attribute information and water use time; divide the complete day into multiple time periods according to preset time intervals, and determine the water consumption of each time period, determine the water consumption coefficient based on the water consumption of each time period, and calculate the estimated water consumption of the missing day based on the water consumption coefficient, so as to complete the missing data of the missing day, solve the problems of data analysis lag, data noise and missing values ​​of water meter equipment, facilitate the maintenance of water meter equipment, promote the upgrading and optimization of water meter technology, help to improve the efficiency and quality of water management, improve water production efficiency, promote the continuous upgrading and improvement of water meter equipment, and realize the scientific management and efficient use of massive data.

[0074] In this embodiment, a data completion method based on a water meter device model is provided, which can be used in a computer terminal, such as a central processing unit, a server, etc. Figure 2 is a flow chart of a data completion method based on a water meter device model according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0075] Step S201, obtaining the latest update time of the current status and historical status documents of each water meter device from a pre-established water meter device model.

[0076] Specifically, Figure 4 As shown in the figure, first the NB-IOT water meter device is registered on the cloud IoT platform, and a water meter device model is created for it. The water meter device model is established in the following way:

[0077] Step S2011, establishing an asset manufacturer database for water meter equipment.

[0078] Because each manufacturer has launched various types of water meter equipment for its own unique business, NB-IOT water meter equipment is emerging in an endless stream, and each water meter equipment protocol is different, so it is necessary to build a water meter asset library and a manufacturer library. For the NB-IOT water meter equipment launched by water meter manufacturers on the market, a one-to-one corresponding manufacturer, water meter equipment assets and communication protocol database is established to solve the problems of data parsing failure and inability to parse when massive water meter equipment data is accessed, which leads to data lag and loss of timeliness.

[0079] In an optional implementation, the above step S2011 includes:

[0080] Step a1, obtaining water meter equipment asset information, manufacturer information corresponding to each water meter equipment asset, and communication protocol through multiple access methods.

[0081] Establishing an asset manufacturer database for water meter equipment is the asset discovery and identification of water meter equipment, including building a data structure, building an entry module, building a data query and statistics module, and building an NB-IOT device management module. Building an asset manufacturer database can quickly and accurately identify water meter equipment information, and report key information of the equipment (such as manufacturer, model, category, etc.) through different information channels. For example, key information of the equipment is reported through multiple access methods, including but not limited to proxy access, probe access, log, etc., to quickly discover water meter equipment assets and ensure that there are no omissions in asset inventory.

[0082] Among them, the proxy access method means that after the security SDK or security Agent for water meter device identity authentication is integrated on each water meter device, the water meter device information reported by the security SDK or security Agent is parsed through the manufacturer information model (model), water meter device information model and communication protocol in the reported data, and the device data is converted into common binary, and the water meter asset information, manufacturer information and communication protocol are matched through bytes.

[0083] It should be noted that when performing the parsing operation, the manufacturer model, communication protocol and asset model in the water meter device information are first parsed, and the manufacturer model, communication protocol and asset model are converted into binary data. Finally, the asset information, manufacturer information and communication protocol of each water meter device are identified through byte pairing.

[0084] Among them, the probe access method means deploying the data scanning and parsing software of the water meter equipment security scanner through the network, identifying the water meter equipment information by running the active scanning task or scheduled scanning task of the data scanning and parsing software, and parsing and obtaining the asset information, manufacturer information and communication protocol of each water meter equipment in each water meter equipment information.

[0085] Data scanning and parsing software is a tool that can identify, extract and process text, images and other information in documents. It is used in document management, data extraction and automated processing.

[0086] It should be noted that the parsing operation when using the probe access method is the same as the parsing operation when using the proxy access method.

[0087] Log access methods include: obtaining the water meter device operation log from the Internet of Things or proxy server through an API interface, and identifying each water meter device information based on the water meter device operation log, parsing to obtain each water meter device asset information, manufacturer information and communication protocol in each water meter device information, or obtaining each water meter device daily operation frozen data, using a smart card chip or a gateway that supports a preset communication protocol to read from the water meter storage chip, and extracting each water meter device asset information, manufacturer information and communication protocol from the water meter device daily operation frozen data through chip reading.

[0088] The water meter equipment operation log can be the data and analysis platform log of the synchronous cloud IoT platform and the log of the third-party log system (the third-party log system refers to the log recording and analysis system provided by a third party, which is mainly used to monitor and manage various log information during the system operation process). The preset communication protocols include RS485, MBus, LoRaWAN and other communication protocols.

[0089] Step a2, based on the water meter equipment asset information, the manufacturer information corresponding to each water meter equipment asset, and the communication protocol, respectively construct an asset table, a manufacturer table, a protocol table, and a maintenance record table, specifically including:

[0090] Step a21, extracting the asset ID, model, serial number, production date, installation location and equipment status information of each water meter device from the water meter device asset information and using a unified data structure to represent and generate an asset table.

[0091] Specifically, the unified data structure may be in the format of Excel, CSV, etc., which is used to standardize the relationship and storage method between data elements, and is set according to actual conditions, and is not specifically limited here.

[0092] The specific table structure of the asset table is as follows: asset_id (asset ID): uniquely identifies each device. model (model): the specific model of the device. serial_number (serial number): the unique serial number of the device. production_date (production date): the production date of the device. installation_date (installation date): the installation date of the device. location (installation location): the installation location of the device. status (device status): the current status of the device, such as online, offline, maintenance, etc.

[0093] Step a22, extracting the name, contact person, contact information, address and technical support telephone number of each water meter equipment manufacturer from the manufacturer information corresponding to each water meter equipment asset and representing them in a unified data structure to generate a manufacturer table.

[0094] The specific structure of the vendor table is as follows: vendor_name (vendor name): the name of the device manufacturer. contact_person (contact person): the name of the manufacturer's contact person. contact_info (contact information): the manufacturer's contact phone number or email address (address): the manufacturer's detailed address. support_phone (technical support phone number): the manufacturer's technical support phone number.

[0095] Step a23, extracting the communication protocol name, protocol frame structure, frame length, uplink information and downlink instructions of each water meter device from the communication protocol corresponding to each water meter device asset and representing them with a unified data structure to generate a protocol table.

[0096] The specific table structure of the protocol table is as follows: protocol_name (protocol name): the name of the device communication protocol. frame_structure (protocol frame structure): the data frame structure of the protocol. frame_length (frame length): the length of the data frame. uplink_info (uplink information): the information format sent by the device to the server. downlink_commands (downlink commands): the control command format sent by the server to the device.

[0097] Step a24, extract the maintenance record ID, asset ID, maintenance date, maintenance reason, maintenance result, maintenance personnel and maintenance cost of each water meter device from the water meter device asset information and represent them with a unified data structure to generate a maintenance record table.

[0098] The specific table structure of the maintenance record table is as follows: record_id (record ID): the unique identifier of the maintenance record. asset_id (asset ID): the ID of the equipment being repaired. maintenance_date (maintenance date): the date of the maintenance. reason (maintenance reason): the reason for the maintenance. result (maintenance result): the result of the maintenance. technician (maintenance personnel): the name of the person who performed the maintenance. cost (maintenance cost): the cost of the maintenance.

[0099] The data completion method based on the water meter device model provided in this embodiment obtains water meter device information through multiple access methods to realize the identification of each water meter device asset information, manufacturer information and communication protocol, thereby ensuring the integrity of water meter device assets and facilitating the maintenance and repair of water meter equipment.

[0100] Step a3, aggregate the asset table, manufacturer table, agreement table and maintenance record table to obtain an asset manufacturer database.

[0101] When building the asset manufacturer database, we also built a data entry module, a data query and statistics module, and a NB-IOT device management module.

[0102] The data entry module is used to access the IoT platform and supports batch import in formats such as Excel and CSV, reducing the workload of manual entry. It also performs verification during data import to ensure data integrity and accuracy.

[0103] Build a data query and statistics module to help managers quickly find and analyze asset information. Support multi-condition query, such as by asset ID, model, manufacturer, installation location information, etc. Provide statistical reports on water mark equipment asset distribution, usage, failure rate, etc., and support export to PDF, Excel and other formats. Visually display the distribution and status of assets through charts and maps.

[0104] The NB-IOT device management module integrates the NB-IOT device management function to achieve efficient management of NB-IOT devices, real-time monitoring of device status, including online status, power, signal strength, etc., receiving data uploaded by the device, parsing and storing it, and supporting remote control instructions, such as valve switching, water volume adjustment, etc. Add labels to the device, such as "high-pressure area", "key monitoring", etc., to facilitate quick search and management. Group devices according to geographical location, function type and other standards to achieve refined management.

[0105] Step S2012, obtain the operating data of each water meter device, and establish a water meter device standard model based on the asset manufacturer database and the operating data of each water meter device, and establish a water meter device model based on the water meter device standard model; the water meter device standard model includes water use attribute information, service information and event information; the water meter device model is represented by standard JSON data, including the current status part of the water meter device, the historical status document part and the latest update time part of the historical status document.

[0106] Specifically, the operation data of each water meter device is operation data from the operation log of the water meter device or the daily operation frozen data of each water meter device.

[0107] In an optional implementation, the above step S2012 includes:

[0108] Step b1, generating attribute information, service information and event information of each water meter device based on the asset manufacturer database and the operation data of each water meter device.

[0109] Specifically, the attribute information includes: water volume indication, voltage, strong magnetism, valve, valve abnormality, operating status, ambient temperature, relative humidity, water temperature, water pressure, etc. Service information includes: water meter valve switch, water volume value adjustment, etc. Event information includes: voltage abnormality alarm, strong magnetism alarm, valve abnormality alarm, etc.

[0110] Step b2: establishing a water meter equipment standard object model based on attribute information, service information and event information.

[0111] Specifically, the water meter equipment standard model is as follows:

[0112] Attributes: water_meter_reading (water meter reading), voltage (voltage), magnetic_field (strong magnetism), valve_status (valve status), valve_abnormal (valve abnormality), operating_state (operating state), environment_temperature (environmental temperature), relative_humidity (relative humidity), water_temperature (water temperature), water_pressure (water pressure).

[0113] Services: open_valve (open valve), close_valve (close valve), adjust_water_flow (adjust water flow).

[0114] Events: voltage_anomaly_alert (voltage abnormal alarm), magnetic_field_alert (strong magnetic field alarm), valve_abnormal_alert (valve abnormal alarm).

[0115] Step b3, converting the water meter equipment standard object model into standard JSON data to obtain the water meter equipment model, wherein the standard JSON data includes the expected state, report state, state document, latest update time and version number of the water meter equipment model.

[0116] Specifically, a water meter device model is established based on the water meter device standard object model, and the shadow is converted into standard JSON data (JavaScript Object Notation, a lightweight data exchange format). Taking a single NB-IOT remote valve-controlled water meter as an example, the constructed water meter device model is as follows: The desired part means the expected state of the device. The desired part is included only when the water meter device model document has services and expected states.

[0117] The reported part means the current status of the device. The water meter device writes data in the reported part to report its latest status, and reads the parameter value to obtain the status of the water meter device.

[0118] The metadata part refers to the device history status document, which records the device status change history. The water meter device model will automatically update the metadata value after the device history status document is updated.

[0119] timestamp is the latest update time of the shadow document, expressed as the timestamp of each attribute.

[0120] version is the version number of the water meter device model, which is synchronized with the version number of the water meter device itself and is used to ensure that the document being updated is the latest version.

[0121] Step S202: extract water use attribute information, water use date and water use time from the latest update time of the current status and historical status documents, and divide the water use date into missing days and complete days based on the water use attribute information and water use time.

[0122] Specifically, Figure 4 As shown, the water meter device model and device simulator are used to simulate the real device to establish a connection with the cloud IoT platform network layer, and the simulated data is used to test the communication capability between the platform and the device, so as to realize the data collection and preliminary classification of the water meter device and establish the effective data for the analysis period.

[0123] For water meter device simulation, simulate the real device to establish a connection with the network layer. Use uplink communication and downlink instructions to simulate the device, build big data analysis, build simulation data based on water volume coefficient and time period water volume data, and use simulation data to test the communication and positioning issues between the cloud IoT platform and the device end.

[0124] It is further described as follows: the water meter device model is connected to the network layer, and a variety of transmission protocols (such as MQTT (Message Queuing Telemetry Transport), 689, 485, 4G / 5G, TCP / IP, Modbus (serial communication protocol), etc.) are used to establish a data transmission bridge between the water meter device model and the network layer data to ensure safe and efficient data transmission. Through wireless remote transmission of smart devices, data forwarding of collectors / gateways, and data integration, storage and backup of smart terminals, water meter device data can be effectively reported.

[0125] In the uplink communication, the water meter device model establishes a long connection with the cloud IoT platform through the MQTT protocol, and publishes the device ID and load data (payload) to the platform. After the data is accessed, parsed, and stored by the platform, it is transferred to the Web business server in real time through the AMQP consumer group, and then called through the business API.

[0126] For downlink instructions, the business application platform or mobile application can issue instructions, and the business server calls the API interface based on the HTTPS protocol to publish to a specific topic, and pushes the instructions to the cloud IoT platform. The cloud IoT platform then transmits the instructions to the device end quickly and efficiently through the MQTT protocol to realize the execution of device instructions.

[0127] Water meter equipment data collection and preliminary classification specifically include:

[0128] 1) Configure the data source Topic1, which is the data source obtained from device 1, including data or status information collected by various water meters. These data are usually transmitted in JSON data format or other structured forms.

[0129] 2) Determine the SQL (Structured Query Language) expression, process the data configuration flow in the transformation data source Topic1 through SQL statements, process the data according to the preset rules, and output the results to the target data source Topic2.

[0130] Preset rules include: ① Data validation rules to ensure that the received data conforms to the expected format and range. For example: check whether the water meter reading is a positive number, or verify whether the timestamp format is correct; ② Data conversion rules: perform necessary conversions on the original data to make it easier to process or more suitable for storage. For example: convert the water meter reading from liters (L) to cubic meters (m 3 ). ③ Aggregation rules: Aggregate multiple readings over a period of time to generate statistical data. For example, calculate the total water consumption in a day, or find the average water consumption rate. ④ State change detection rules: Identify changes in equipment status, such as switching from normal operation to failure mode, abnormal valve closure, etc., and take corresponding actions accordingly. ⑤ Event trigger rules: Trigger certain actions based on the occurrence of specific conditions. For example, automatically generate a bill on the first day of each month. ⑥ Data cleaning rules: Remove noise data, erroneous records or duplicates to improve data quality and the accuracy of analysis results.

[0131] 3) Message communication: Using lightweight message protocols such as MQTT and CoAP (Constrained Application Protocol) ensures efficient and reliable communication between devices, servers and IoT platforms.

[0132] 4) Uplink instruction simulation and downlink specified debugging, custom TOPIC, attribute reporting, and event reporting.

[0133] The custom TOPIC operation is: custom Topic for message reporting, enter Payload data (valid data), and set QoS (Quality of Service) to 0 or 1.

[0134] The maximum expiration time (seconds) of QoS 0 messages is 86400 seconds, and the maximum expiration time (seconds) of QoS1 messages is 604800 seconds. If the message expiration time (seconds) is not set, the maximum time of the corresponding QoS message is used by default.

[0135] Among them, attribute reporting, through the established water meter equipment standard object model, establishes values ​​that conform to the attribute data type and value range. Numerical type attributes support setting random numbers, and random(a,b) represents a random number between the integer a and the integer b. Set sending instructions, policy push, set development scheduled tasks, and regularly push tests.

[0136] Among them, event reporting, according to the attributes generated by the object model and the corresponding event selected in the event, configure the event reporting data in the JSON data format required by the event, such as {"Valve":"OPEN"}.

[0137] The above step S202 includes:

[0138] Step c, judging whether the water use attribute information is continuous and complete based on the water use date and time, if it is discontinuous, incomplete, or both, it is determined that the data is missing, and the corresponding water use date is marked as a missing day; if it is continuous, it is marked as a complete day.

[0139] Specifically, step c specifically includes:

[0140] Step c1: The water meter device regularly uploads water use attribute data to the cloud IoT platform. Attribute data include but are not limited to water volume indication, voltage, strong magnetism, valve status, ambient temperature, relative humidity, water temperature and water pressure, etc. The device shadow model in the cloud platform will record the real-time status and historical data of the water meter. The reported part of the water meter device model, i.e., the current status of the device, contains the latest device status, while the metadata part, i.e., the device historical status document, records the update time of each attribute data.

[0141] Step c2, data cleaning, remove invalid or erroneous data, such as values ​​that are obviously beyond the normal range. Data integrity check: Check whether the data of each water use date is complete and continuous. If the data of a certain time period is discontinuous, incomplete, or discontinuous and incomplete, the data is considered missing and the date is marked as "missing day", otherwise it is marked as "complete day".

[0142] Step S203, dividing a full day into multiple time periods according to preset time intervals, and determining the water consumption in each time period.

[0143] Specifically, the above step S203 includes:

[0144] Step S2031, divide the time interval, determine the time interval, and divide each full day into multiple time periods according to the predetermined time interval (such as every hour). For example, a day can be divided into 24 time periods, each time period is 1 hour. A unique number is assigned to each time period, for example, 00:00-01:00 is time period 1, 01:00-02:00 is time period 2, and so on.

[0145] Step S2032, extracting the water volume indication of each time period from the water use attribute information, calculating the difference between the water volume indication of the latter time period and the water volume indication of the previous time period in adjacent time periods, and obtaining the water consumption of each time period.

[0146] Specifically, the water volume indication in each time period is extracted from the reported part of the water meter device model, the metadata part is read, the latest value corresponding to the latest update time of each attribute is obtained, and then the water consumption in each time period is calculated based on the divided time period, time period number and timestamp.

[0147] Step S204: determine the water consumption coefficient based on the water consumption in each period, and fill in the missing data of the missing days based on the water consumption coefficient. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0148] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0149] The data completion method based on the water meter device model provided in this embodiment achieves the purpose of automatically generating a simulation model for the physical water meter device by establishing a water meter device model corresponding to the physical water meter device, and efficiently processes large-scale water meter devices. The analysis of the simulation model can be effectively fed back to the maintenance of the water meter device and the production process of the water meter device in real time, thereby improving the network transmission of the water meter simulation model. The water use attribute information is judged to be continuous and complete according to the water use date and water use time to realize the division of missing days and complete days. The real-time status and historical data of the water meter device can be monitored through the water use attribute information, water use date and water use time, and the water volume indication of each time period is extracted from the water use attribute information. The difference between the water volume indication of the latter time period and the water volume indication of the previous time period in the adjacent time period is calculated to obtain the water consumption of each time period, thereby realizing the accurate calculation of the water consumption of each time period of the complete day, and providing conditions for the subsequent data completion of the missing days during the operation of the water meter device.

[0150] In this embodiment, a data completion method based on a water meter device model is provided, which can be used in a computer terminal, such as a central processing unit, a server, etc. Figure 3 is a flow chart of a data completion method based on a water meter device model according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0151] Step S301, obtain the latest update time of the current status and historical status documents of each water meter device from the pre-established water meter device model. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.

[0152] Step S302: extract water use attribute information, water use date and water use time from the latest update time of the current status and historical status documents, and divide the water use date into missing days and complete days based on the water use attribute information and water use time. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.

[0153] Step S303: Divide the entire day into multiple time periods according to preset time intervals, and determine the water consumption in each time period. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.

[0154] Step S304, determining the water consumption coefficient based on the water consumption in each time period, and completing the missing data of the missing days based on the water consumption coefficient.

[0155] Specifically, the above step S304 includes:

[0156] Step S3041, calculate the proportion of preset target data for each time period based on the water consumption in each time period, and sort each time period in sequence according to the order of water use date, time period and the proportion of preset target data, and classify each time period into off-peak period, peak period and off-peak period according to the sorting.

[0157] In an optional implementation, step S3041 includes:

[0158] Step e1, counting the total number of water consumption records in each time period and the number of water consumption records greater than the preset target data, and calculating the ratio of the number of water consumption records greater than the preset target data to the total number of water consumption records in each time period to obtain the preset target data ratio in each time period.

[0159] Specifically, step e1 includes:

[0160] Step e11, build a water consumption table structure based on water consumption, the table structure is as follows: id: primary key, auto-increment; asset_id: asset ID; date: date; hour: hour; water_meter_reading: water meter reading; voltage: voltage; magnetic_field: strong magnetism; valve_status: valve status; valve_abnormal: valve abnormality; operating_state: operating status; environment_temperature: environment temperature; relative_humidity: relative humidity; water_temperature: water temperature; water_pressure: water pressure; timestamp: timestamp.

[0161] Step e12, preset target data is set to 0. Extract data from the water consumption table structure, filter out dates with complete data, that is, records with water consumption that is not empty and greater than or equal to 0, and obtain the number of records with water consumption greater than 0 in each period and the total number of records in each period.

[0162] Step e13, define a CTE (Common Table Expression) to calculate the total number of records in each time period and the number of records with water consumption greater than 0.

[0163] Filter out dates with complete data, that is, the number of records with water consumption values ​​that are not empty and greater than or equal to 0, group by date and hour to calculate the data for each period, select the required sequence from CTE, calculate the number of records with water consumption greater than zero * 1.0 / total number of records, and thus calculate the proportion of records with water consumption greater than 0 in each period to the total number of records, that is, the preset target data proportion. Finally, sort by date and hour so that the results are arranged in chronological order.

[0164] Finally, the output format for a certain day is generated, namely: Date Hour Total-Records Non-Zero-Records Non-Zero-Ratio. This order of arrangement facilitates subsequent analysis and calculation.

[0165] Step e2, when the proportion of preset target data in each sorted time period is equal to the preset threshold, the corresponding time period is classified as a flat time period; when the proportion of preset target data in each sorted time period is higher than the preset threshold, the corresponding time period is classified as a peak time period; when the proportion of preset target data in each sorted time period is lower than the preset threshold, the corresponding time period is classified as a valley time period.

[0166] Specifically, the preset threshold is set according to actual conditions and is not specifically limited here. The preset threshold in this embodiment is set to 200.

[0167] like Figure 4 As shown, when calculating the proportion of data with water consumption greater than zero in each subdivided time period, the time period can be further classified in order to analyze the water consumption pattern in more detail.

[0168] a. Peak period: When the preset target data ratio of each period is higher than the preset threshold of 200, the corresponding period is marked as peak period, i.e., the period with higher water consumption. For example, it occurs in certain fixed time periods of the day. Morning (6:00-9:00), evening (17:00-21:00). Peak period is also called active period.

[0169] b. Valley period: When the preset target data ratio of each period is lower than the preset threshold of 200, the corresponding period is marked as a valley period, i.e. a period of time with low water consumption, such as at night or in the early morning, late at night (23:00-5:00). Valley period is also called inactive period.

[0170] c. Off-peak period: the time period between peak period and off-peak period when water consumption is relatively stable. Morning (9:00-12:00), afternoon (12:00-17:00), evening (21:00-23:00).

[0171] d. Divide a day into 24 periods, each of which is 1 hour. Classify each period according to the defined peak period, off-peak period, and off-peak period.

[0172] Step S3042, based on the water consumption in each time period, calculate the water consumption coefficient for the off-peak period, the water consumption coefficient for the peak period, and the water consumption coefficient for the off-peak period.

[0173] Based on the statistical results of actual water consumption data, the peak period, valley period and off-peak period are dynamically divided. The average and standard deviation of water consumption in each period are calculated, and the period type is dynamically divided according to the distribution of water consumption. For example, the period when the water consumption is higher than the average plus one standard deviation is defined as the peak period, the period when the water consumption is lower than the average minus one standard deviation is defined as the valley period, and the rest of the period is defined as the off-peak period.

[0174] In an optional implementation, step S3042 includes:

[0175] Step f1, the water consumption of all time periods of a complete day is accumulated to obtain the total water consumption of the complete day, and the ratio of the total water consumption of the day to the complete day time is calculated to obtain the average water consumption of the complete day, and at the same time, the ratio of the water consumption of each off-peak period to the average water consumption of the complete day is calculated as the water consumption coefficient of the off-peak period.

[0176] Exemplarily, assume that the water usage data is as follows: period 0:100; period 1:120; period 2:80; period 3:90; period 4:70; period 5:60; period 6:300; period 7:350; period 8:400; period 9:150; period 10:180; period 11:200; period 12:160; period 13:170; period 14:190; period 15:210; period 16:220; period 17:320; period 18:360; period 19:410; period 20:450; period 21:250; period 22:230; period 23:110.

[0177] Average daily water consumption = (100+120+80+...+230+110) / 24 = 200.

[0178] Standard deviation: σ≈100.

[0179] Calculate the average water consumption for each complete day and the average water consumption for each off-peak period, peak period, and off-peak period to obtain daily_avg and hourly_avg, and calculate the water consumption coefficient for each peak period / off-peak period. The formula is: period*hourly_avg / daily_avg=usage_coefficients (water consumption coefficient).

[0180] Step f2, calculating the ratio of the water consumption in each peak period to the average water consumption in the whole day to obtain the water consumption coefficient in each peak period.

[0181] Step f3, calculating the ratio of the water consumption in each off-peak period to the average water consumption in the whole day to obtain the water consumption coefficient in each off-peak period.

[0182] For example, from the above calculation, we can see that the mean value (μ) = 200 and the standard deviation (σ) ≈ 100.

[0183] Peak period: water consumption > μ+σ=200+100=300; trough period: water consumption < μ-σ=200-100=100; off-peak period: other periods (i.e. water consumption between 100 and 300).

[0184] For the period when the water consumption is 300, the peak period water consumption coefficient = 300 / 200 = 1.5; for the period when the water consumption is 100, the off-peak period water consumption coefficient = 100 / 200 = 0.5; for the period when the water consumption is equal to the average value of 200, the off-peak period water consumption coefficient = 200 / 200 = 1.0.

[0185] The water consumption coefficient for each period is determined by the ratio of the actual water consumption to the average water consumption for each period. The water consumption coefficient for peak periods is generally greater than 1, the water consumption coefficient for off-peak periods is generally less than 1, and the water consumption coefficient for flat periods is close to 1.

[0186] When the time axis is extended (such as one year), when calculating the average water consumption coefficient for a certain day, the day is divided into peak period, low peak period and flat peak period, and the calculation rules are the same as the rules for each period of each day.

[0187] Step S3043, selecting the off-peak period water consumption coefficient, the peak period water consumption coefficient and / or the off-peak period water consumption coefficient according to the missing day type to complete the missing data of the missing day.

[0188] In an optional implementation, step S3043 includes:

[0189] Step g1, obtain the total average water consumption of the missing days.

[0190] Specifically, assuming there is a missing day date missing_date, obtain the total average water consumption missing_daily_avg_usage of that day.

[0191] Step g2, when the date difference between the missing day and the complete day is within the set range, the missing day is classified into off-peak period, peak period and off-peak period according to the time period of the complete day, and the water consumption coefficient of the off-peak period, the water consumption coefficient of the peak period and the water consumption coefficient of the off-peak period are selected.

[0192] Step g3, respectively calculate the product of the peak period water consumption coefficient and the total average water consumption of the missing day to obtain the estimated peak period water consumption, the product of the valley period water consumption coefficient and the total average water consumption of the missing day to obtain the estimated valley period water consumption, and the product of the flat period water consumption coefficient and the total average water consumption of the missing day to obtain the estimated flat period water consumption, and use the peak period estimated water consumption, valley period estimated water consumption and flat period estimated water consumption to complete the missing data of the peak period, valley period and flat period of the missing day.

[0193] The set range refers to a relatively close range. For example, if the missing day and the complete day are in the same month, the peak water usage coefficient and the trough water usage coefficient of the previous complete day closest to the missing day are selected, and the peak water usage coefficient*missing_daily_avg_usage is calculated to obtain the estimated peak water usage. The trough water usage coefficient*missing_daily_avg_usage is calculated to obtain the estimated trough water usage. The product of the average water usage coefficient for the flat period and the total average water usage of the missing day is calculated to obtain the estimated average water usage. The estimated peak water usage, trough water usage and average water usage are used to complete the missing data of the peak period, trough period and flat period of the missing day.

[0194] like Figure 4 As shown, missing data on days during non-peak and non-off-peak periods can also be filled with zeros.

[0195] Step g4, when the date difference between the missing day and the complete day is outside the set range, select the off-peak water consumption coefficient, and calculate the product of the off-peak water consumption coefficient and the total average water consumption of the missing day to obtain the estimated water consumption for each period, and use the estimated water consumption for each period to complete the missing data of the missing day.

[0196] For example, if the missing day and the complete day are in different months but in the same year, the water consumption coefficient for the off-peak period is selected, and the product of the water consumption coefficient for the off-peak period and the total average water consumption of the missing day is calculated to obtain the estimated water consumption for each period, and the estimated water consumption for each period is used to complete the missing data of the missing day.

[0197] Step S305, after the data completion process is completed, the update time of the current state and historical state documents in the water meter device model is updated to verify the correctness of the missing data completion.

[0198] Step S306, when the water meter device corresponding to the water meter device model is offline, the update time of the current status and historical status documents in the water meter device model is stored in the local memory. When the water meter device corresponding to the water meter device model is back online, the update time of the current status and historical status documents in the water meter device model is queried to complete the missing data of the missing day.

[0199] Specifically, if a water meter device is offline for a certain period of time, you can complete the data by following the steps below:

[0200] Pre-offline status record: Before the water meter device goes offline, its current status (such as water meter reading) will be recorded in the water meter device model.

[0201] Local temporary data storage: The water meter device still records local water meter data during offline period, but it cannot be uploaded.

[0202] Synchronization after re-launching: After the water meter device is online, query the current status in the water meter device model and upload the locally stored data.

[0203] Data completion: Based on the time points and offline data recorded in the water meter device model, the estimated data for the missing time period is calculated and the missing data is completed.

[0204] It should be noted that when the device uploads the locally stored data to the cloud IoT platform, it is merged with the current state in the water meter device model. During the merging process, the water meter device model and the cloud IoT platform application can decide how to handle the data during the offline period according to the preset rules. For example, the average usage rate of the device during the offline period or the last reported data value can be used as a substitute value to fill in the missing data. In order to ensure data consistency, the update of the water meter device model is usually atomic, that is, either all succeed or all fail, which helps to avoid data conflicts and inconsistencies.

[0205] Steps S301 to S306 provided in this embodiment are integrated into a set of automated processes. The entire data processing and completion process can be automatically executed without human intervention. The integrated automated process can be implemented in the following manner:

[0206] Batch jobs: You can schedule batch jobs to run periodically, which automatically load new data, perform data cleaning, calculate statistics (such as mean and standard deviation), divide time periods, and update water use coefficients.

[0207] Workflow management system: Integrate into a workflow engine for management (such as Zapier, or a custom developed workflow engine) to orchestrate complex business logic. This can include a series of steps starting from receiving raw data until the final report is generated.

[0208] Cloud IoT Platform: Integrated into a platform that supports a rules engine to trigger corresponding actions when specific messages are received. When a new water meter reading is received, the platform automatically evaluates the data and adjusts the time period type according to predefined rules.

[0209] The data completion method based on the water meter equipment model provided in this embodiment can calculate the estimated water consumption of the missing day by selecting the complete day water consumption coefficient, peak period water consumption coefficient and / or valley period water consumption coefficient according to the missing day type, so as to complete the missing data and ensure the integrity and continuity of the data. Timely updating the data in the water meter equipment model to ensure that the water meter equipment model is the latest data is helpful for the maintenance and repair of the water meter equipment, improves the water service production efficiency, and promotes the continuous upgrading and improvement of the equipment.

[0210] In this embodiment, a data completion device based on a water meter device model is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0211] This embodiment provides a data completion device based on a water meter device model. Figure 5 As shown, including:

[0212] The information acquisition module 501 is used to acquire the current status and the latest update time of the historical status document of each water meter device from the pre-established water meter device model.

[0213] The missing day and complete day classification module 502 is used to extract water use attribute information, water use date and water use time from the latest update time of the current status and historical status documents, and divide the water use date into missing days and complete days based on the water use attribute information and water use time.

[0214] The time period division and water consumption determination module 503 is used to divide a full day into multiple time periods according to preset time intervals and determine the water consumption of each time period.

[0215] The data completion module 504 is used to determine the water consumption coefficient based on the water consumption in each time period, and to complete the missing data of the missing days based on the water consumption coefficient.

[0216] In some optional implementations, the information acquisition module 501 includes:

[0217] The water meter equipment model establishment unit is used to establish an asset manufacturer database for water meter equipment; obtain the operating data of each water meter equipment, and establish a water meter equipment standard object model based on the asset manufacturer database and the operating data of each water meter equipment, and establish a water meter equipment model based on the water meter equipment standard object model; the water meter equipment standard object model includes water use attribute information, service information and event information; the water meter equipment model is represented by standard JSON data, including the current status part of the water meter equipment, the historical status document part and the latest update time part of the historical status document.

[0218] In some optional implementations, the missing day and complete day division module 502 includes:

[0219] The missing day and complete day division unit is used to determine whether the water use attribute information is continuous and complete based on the water use date and time. If it is discontinuous, incomplete, or discontinuous and incomplete, the data is determined to be missing, and the corresponding water use date is marked as a missing day; if it is continuous, it is marked as a complete day.

[0220] In some optional implementations, the time period division and water consumption determination module 503 includes:

[0221] The water consumption determination unit is used to extract the water consumption indication of each time period from the water consumption attribute information, calculate the difference between the water consumption indication of the latter time period and the water consumption indication of the previous time period in adjacent time periods, and obtain the water consumption of each time period.

[0222] In some optional implementations, the data completion module 504 includes:

[0223] The preset target data ratio calculation unit is used to calculate the preset target data ratio of each time period based on the water consumption in each time period, and sort each time period in sequence according to the order of water use date, time period and the size of the preset target data ratio, and classify each time period into off-peak period, peak period and off-peak period according to the sorting.

[0224] The water consumption coefficient calculation unit is used to calculate the water consumption coefficient for the off-peak period, the peak period and the off-peak period based on the water consumption in each period.

[0225] The data completion unit is used to complete the missing data of the missing days by selecting the off-peak period water consumption coefficient, the peak period water consumption coefficient and / or the valley period water consumption coefficient according to the missing day type.

[0226] In some optional implementations, the preset target data ratio calculation unit includes:

[0227] The preset target data ratio calculation subunit is used to count the total number of water consumption records in each time period and the number of water consumption data records greater than the preset target, and calculate the ratio of the number of water consumption data records greater than the preset target to the total number of water consumption records in each time period to obtain the preset target data ratio for each time period.

[0228] The peak period, trough period and off-peak period marking subunits are used to classify the corresponding period as an off-peak period when the proportion of preset target data in each sorted period is equal to the preset threshold, classify the corresponding period as a peak period when the proportion of preset target data in each sorted period is higher than the preset threshold, and classify the corresponding period as a trough period when the proportion of preset target data in each sorted period is lower than the preset threshold.

[0229] In some optional implementations, the water coefficient calculation unit includes:

[0230] The off-peak water consumption coefficient calculation subunit is used to accumulate the water consumption of all time periods in a complete day to obtain the total water consumption for the complete day, and calculate the ratio of the total daily water consumption to the complete day time to obtain the average water consumption for the complete day, and at the same time calculate the ratio of the water consumption of each off-peak time period to the average water consumption for the complete day as the off-peak water consumption coefficient.

[0231] The peak time water consumption coefficient calculation subunit is used to calculate the ratio of the water consumption in each peak time period to the average water consumption in a complete day to obtain the water consumption coefficient in each peak time period;

[0232] The off-peak period water consumption coefficient calculation subunit is used to calculate the ratio of the water consumption in each off-peak period to the average water consumption of the whole day to obtain the water consumption coefficient of each off-peak period.

[0233] In some optional implementations, the data completion unit includes:

[0234] The total average water consumption acquisition subunit for the missing days is used to obtain the total average water consumption for the missing days.

[0235] The water use coefficient selection subunit is used to select the water use coefficient of the flat peak period, the water use coefficient of the peak period and the water use coefficient of the valley period when the date difference between the missing day and the complete day is within the set range, and the missing day is classified into the off-peak period, the peak period and the valley period according to the time period of the complete day;

[0236] The first data completion subunit is used to calculate the product of the peak period water consumption coefficient and the total average water consumption of the missing day to obtain the estimated water consumption during the peak period, the product of the valley period water consumption coefficient and the total average water consumption of the missing day to obtain the estimated water consumption during the valley period, and the product of the flat period water consumption coefficient and the total average water consumption of the missing day to obtain the estimated water consumption during the flat period. The estimated water consumption during the peak period, the estimated water consumption during the valley period and the estimated water consumption during the flat period are used to complete the missing data of the peak period, the valley period and the flat period on the missing day.

[0237] The second data completion subunit is used to select the water consumption coefficient for the off-peak period when the date difference between the missing day and the complete day is outside the set range, and calculate the product of the water consumption coefficient for the off-peak period and the total average water consumption of the missing day to obtain the estimated water consumption for each period, and use the estimated water consumption for each period to complete the missing data of the missing day.

[0238] In an optional implementation, the data completion device based on the water meter device model includes:

[0239] The first updating module is used to update the update time of the current state and historical state documents in the water meter device model after the data completion process is completed, so as to verify the correctness of the missing data completion.

[0240] The second update module is used to store the update time of the current status and historical status documents in the water meter device model in the local memory when the water meter device corresponding to the water meter device model is offline, and to query the update time of the current status and historical status documents in the water meter device model when the water meter device corresponding to the water meter device model is back online to complete the missing data of the missing day.

[0241] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0242] The data completion device based on the water meter equipment model in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0243] The embodiment of the present invention also provides a computer device having the above Figure 5 The data completion device based on the water meter equipment model is shown.

[0244] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0245] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0246] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0247] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0248] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0249] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0250] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0251] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0252] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0253] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A data completion method based on a water meter equipment model, characterized in that: The method comprises: Obtain the latest update time of the current status and historical status documents of each water meter device from the pre-established water meter device model; Extracting water use attribute information, water use date and water use time from the latest update time of the current state and historical state documents, and dividing the water use date into missing days and complete days based on the water use attribute information and water use time; Dividing the full day into a plurality of time periods according to preset time intervals, and determining the water consumption in each time period; The water use coefficient is determined based on the water consumption in each time period, and the missing data of the missing days are supplemented based on the water use coefficient.

2. The method according to claim 1, characterized in that The water meter equipment model is established in the following way: Establish an asset manufacturer database for water meter equipment; The operation data of each water meter device is obtained, and a water meter device standard object model is established based on the asset manufacturer database and the operation data of each water meter device, and a water meter device model is established based on the water meter device standard object model; the water meter device standard object model includes water use attribute information, service information and event information; the water meter device model is represented by standard JSON data, including the current status part of the water meter device, the historical status document part and the latest update time part of the historical status document.

3. The method according to claim 1, characterized in that Extracting water use attribute information, water use date and water use time from the latest update time of the current state and historical state documents, and dividing the water use date into missing days and complete days based on the water use attribute information and water use time includes: The water use attribute information is judged to be continuous and complete based on the water use date and time. If it is discontinuous, incomplete, or both discontinuous and incomplete, the data is considered missing and the corresponding water use date is marked as a missing day; if it is continuous, it is marked as a complete day.

4. The method according to claim 1, characterized in that: Determining the water consumption in each time period includes: The water volume indication of each time period is extracted from the water use attribute information, and the difference between the water volume indication of the latter time period and the water volume indication of the previous time period in adjacent time periods is calculated to obtain the water consumption of each time period.

5. The method according to claim 1, characterized in that Determine the water use coefficient based on the water consumption in each period, and fill in the missing data of the missing days based on the water use coefficient, including: Calculate the proportion of preset target data for each period based on the water consumption in each period, and sort each period in order according to the order of water use date, time of period and proportion of preset target data, and classify each period into off-peak period, peak period and off-peak period according to the sorting; Based on the water consumption in each period, calculate the water consumption coefficient for the off-peak period, the water consumption coefficient for the peak period and the water consumption coefficient for the off-peak period; According to the type of missing day, the off-peak period water use coefficient, the peak period water use coefficient and / or the off-peak period water use coefficient are selected to complete the missing data of the missing day.

6. The method according to claim 5, characterized in that The preset target data ratio of each time period is calculated based on the water consumption of each time period, and each time period is sorted in sequence according to the water use date, time period and preset target data ratio based on the preset target data ratio, and each time period is classified into flat peak period, peak period and valley period according to the sorting, including: Count the total number of water consumption records in each period and the number of water consumption records that are greater than the preset target data, and calculate the ratio of the number of water consumption records that are greater than the preset target data to the total number of water consumption records in each period to obtain the proportion of preset target data in each period; When the proportion of preset target data in each sorted time period is equal to the preset threshold, the corresponding time period is classified as an off-peak period. When the proportion of preset target data in each sorted time period is higher than the preset threshold, the corresponding time period is classified as a peak period. When the proportion of preset target data in each sorted time period is lower than the preset threshold, the corresponding time period is classified as a trough period.

7. The method according to claim 5, characterized in that The calculation of the water consumption coefficient for the flat-peak period, the water consumption coefficient for the peak period and the water consumption coefficient for the off-peak period based on the water consumption in each period includes: The water consumption of all periods of a full day is accumulated to obtain the total water consumption of the full day, and the ratio of the total water consumption of the day to the full day time is calculated to obtain the average water consumption of the full day. At the same time, the ratio of the water consumption of each off-peak period to the average water consumption of the full day is calculated as the water consumption coefficient of the off-peak period; Calculate the ratio of water consumption in each peak period to the average water consumption in a full day to obtain the water consumption coefficient in each peak period; The water consumption coefficient for each low-peak period is obtained by calculating the ratio of the water consumption in each low-peak period to the average water consumption for the entire day.

8. The method according to claim 5, characterized in that The selecting the off-peak period water use coefficient, the peak period water use coefficient and / or the off-peak period water use coefficient according to the missing day type to complete the missing data of the missing day includes: Get the total average water consumption for the missing days; When the date difference between the missing day and the complete day is within the set range, the missing day is classified into the off-peak period, peak period and off-peak period according to the time period of the complete day, and the water use coefficient of the off-peak period, peak period and off-peak period is selected; Calculate the product of the peak period water consumption coefficient and the total average water consumption of the missing days to obtain the estimated peak period water consumption, the product of the valley period water consumption coefficient and the total average water consumption of the missing days to obtain the estimated valley period water consumption, and the product of the flat period water consumption coefficient and the total average water consumption of the missing days to obtain the estimated flat period water consumption. Use the peak period estimated water consumption, valley period estimated water consumption, and flat period estimated water consumption to fill in the missing data of the peak period, valley period, and flat period of the missing days, and fill in the missing data of the non-peak period and non-valley period missing days with zeros. When the date difference between the missing day and the complete day is outside the set range, the water consumption coefficient for the off-peak period is selected, and the product of the water consumption coefficient for the off-peak period and the total average water consumption of the missing day is calculated to obtain the estimated water consumption for each period. The estimated water consumption for each period is used to complete the missing data of the missing day.

9. The method according to claim 1, characterized in that: The method further comprises: After the data completion process is completed, the update time of the current status and historical status documents in the water meter device model is updated to verify the correctness of the missing data completion; When the water meter device corresponding to the water meter device model is offline, the update time of the current status and historical status documents in the water meter device model is stored in the local memory. When the water meter device corresponding to the water meter device model is back online, the update time of the current status and historical status documents in the water meter device model is queried to complete the missing data of the missing day.

10. A data completion device based on a water meter equipment model, characterized in that: The device comprises: An information acquisition module is used to obtain the latest update time of the current status and historical status documents of each water meter device from a pre-established water meter device model; A missing day and complete day classification module, configured to extract water use attribute information, water use date and water use time from the latest update time of the current state and historical state documents, and to classify the water use date into missing days and complete days based on the water use attribute information and water use time; A time period division and water consumption determination module, used to divide the full day into multiple time periods according to preset time intervals, and determine the water consumption of each time period; The data completion module is used to determine the water consumption coefficient based on the water consumption in each time period, and to complete the missing data of the missing days based on the water consumption coefficient.

11. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data completion method based on the water meter device model according to any one of claims 1 to 9 by executing the computer instructions.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data completion method based on the water meter device model according to any one of claims 1 to 9.