A method for constructing a gas meter user gas consumption model based on AI self-learning
Patent Information
- Application Number
- CN202611229763.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]为了解决建模周期显著延长,难以在较短的时间内完成面向用户行为画像驱动机制的快速建立与动态更新的问题,本发明提供一种基于AI自学习的燃气表用户用气模型构建方法
[0085]1.在系统检测到新用户时,通过将新用户的初次用气习惯特征与已有的原始用户画像模型库进行特征比对,得到最相似的模型后按照新用户的实时数据通过增量学习方式对该匹配模型进行微调与特征替换,最终输出新用户画像模型,实现了冷启动下的高效迁移学习,避免了数据稀疏问题,保障了模型响应的即时性和准确性,同时保持模型的动态适应性;
Smart Images

Figure CN123012536A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of combustible gas monitoring technology, and in particular to a method for constructing a gas meter user gas consumption model based on AI self-learning. Background Technology
[0002] Combustible gas monitoring technology refers to a technical system that uses principles such as catalytic combustion, infrared spectroscopy, and semiconductor sensing to detect and alarm the concentration of combustible gases such as methane and carbon monoxide in the environment in real time.
[0003] In related technologies, such as Chinese patent publication number CN121486706A, a remote monitoring and management system and method for combustible gas based on the Internet of Things and AI is disclosed. The system includes a source heterogeneous sensing module, an edge AI inference module, a network communication transmission module, an AI collaborative decision-making module, and a judgment and collaborative response module that operate sequentially. Its key technical points are: This solution adopts an AI collaborative decision-making module driven by user behavior profiles and introduces multi-dimensional feature factors to achieve dynamic perception of abnormal gas usage behavior. At the same time, it also completes the fallback by configuring over-limit protection items, which to a certain extent ensures that sudden leaks and other situations are not overlooked. It overcomes the shortcomings of traditional pure data-driven models that lack interpretability and real-time performance, and integrates and binds historical behavior context with real-time physical state to complete the collaborative optimization of safety and user experience.
[0004] Regarding the aforementioned technologies, when collecting user behavior profiles after new users check in, a complete modeling process needs to be re-executed. This involves not only cleaning and feature extraction of massive amounts of data, but also extremely high computational resource consumption during the algorithm training phase, resulting in a significantly extended modeling cycle. It is difficult to quickly establish and dynamically update the user behavior profile-driven mechanism in a short period of time, making it impossible to achieve real-time remote monitoring of combustible gases, which poses a significant danger. Summary of the Invention
[0005] To address the problem of significantly extended modeling cycles and the difficulty in rapidly establishing and dynamically updating user behavior profile-driven mechanisms within a short period of time, this invention provides a method for constructing a gas meter user gas consumption model based on AI self-learning.
[0006] In a first aspect, the present invention provides a method for constructing a gas meter user gas consumption model based on AI self-learning, employing the following technical solution:
[0007] A method for constructing a gas meter user gas consumption model based on AI self-learning includes:
[0008] Step 100: Obtain current gas usage habits;
[0009] Step 101: A method to determine whether the current gas usage habits are those of a first-time gas user;
[0010] Step 102: If it is the initial gas usage habit characteristics, then define the initial gas usage habit characteristics of the new user;
[0011] Step 103: Perform feature vectorization on the initial gas usage habit characteristics to obtain the initial feature vector;
[0012] Step 104: Perform feature vectorization on all the original gas usage habit features in the preset original model set one by one to obtain the original feature vector. The original model set includes the original gas usage habit features and the original user profile model corresponding to each original gas usage habit feature.
[0013] Step 105: Calculate the feature distance between the initial feature vector and each original feature vector respectively;
[0014] Step 106: Select the original gas usage habit feature corresponding to the smallest feature distance, define it as the similar gas usage habit feature, and define the original user profile model corresponding to the similar gas usage habit feature as the matching original model;
[0015] Step 107: Based on the initial gas usage habit features, a preset incremental learning method is used to replace the similar gas usage habit features corresponding to the original model to update the original model, obtain a new user profile model, and output it.
[0016] By adopting the above technical solution, when the system detects a new user, it vectorizes the new user's initial gas usage habit features and compares them with the existing original user profile model library to find the most similar model. Then, using the new user's real-time data, it fine-tunes and replaces the matching model through incremental learning, and finally outputs the new user profile model. This achieves efficient transfer learning under cold start, avoids the data sparsity problem, ensures the immediacy and accuracy of the model response, and maintains the dynamic adaptability of the model.
[0017] Optionally, methods for obtaining the initial gas usage habits of new users include:
[0018] Step 200: Obtain the gas consumption time series data of the new user within a preset collection period. The gas consumption time series data includes the gas consumption time period, continuous gas consumption duration, and instantaneous flow rate.
[0019] Step 201: Define gas consumption time series data with a continuous gas consumption duration less than the preset continuous gas consumption lower limit duration, an instantaneous flow rate less than the preset instantaneous lower limit flow rate, and a gas consumption time period not within the preset standard gas consumption time period as suspected interference gas consumption time series data;
[0020] Step 202: Define the gas consumption time series data other than the suspected interfering gas consumption time series data as the gas consumption time series data to be matched;
[0021] Step 203: Obtain the number of valid days in which the suspected interfering gas consumption time series data appears within the collection period;
[0022] Step 204: If the number of valid days is less than the preset lower limit of valid days, the suspected interfering gas consumption time series data will be deleted as interfering gas consumption time series data;
[0023] Step 205: If the number of valid days is greater than or equal to the lower limit of valid days, the suspected interfering gas consumption time series data will be integrated with the gas consumption time series data to be matched as non-interfering gas consumption time series data and output as the initial gas consumption habit feature.
[0024] By adopting the above technical solution, after screening out suspected interference data, the valid data that was misjudged is retained based on the number of valid days and integrated into the initial gas usage habit characteristics. This effectively distinguishes random noise from the user's real low-frequency behavior, ensuring that the final output features are clean and do not mistakenly delete meaningful special gas usage patterns, thus providing high signal-to-noise ratio input data for model matching.
[0025] Optionally, it also includes an optimized method for acquiring the gas consumption time series data to be matched, the method comprising:
[0026] Step 300: After obtaining the initial gas usage habit characteristics after executing steps 200 and 205, obtain the original gas usage time series data corresponding to the original model obtained according to steps 103 to 107.
[0027] Step 301: Obtain the original gas consumption time axis corresponding to the original gas consumption time series data and the gas consumption time axis to be matched corresponding to the gas consumption time series data to be matched;
[0028] Step 302: After matching and aligning the original gas consumption timeline with the gas consumption timeline to be matched, compare the original gas consumption timeline data and the gas consumption timeline data to be matched to obtain the missing gas consumption timeline data and the number of missing data in the gas consumption timeline data to be matched;
[0029] Step 303: If the number of missing data is less than the preset upper limit threshold for missing data, fill the missing gas consumption time series data into the gas consumption time series data to be matched, obtain low confidence gas consumption time series data and output it as the initial gas consumption habit feature.
[0030] Step 304: If the number of missing data exceeds the preset upper limit threshold, the gas consumption time series data to be matched is defined as hidden gas consumption time series data, and the new gas consumption time series data is obtained after the next collection cycle.
[0031] Step 305: Integrate the hidden gas usage time series data and the newly added gas usage time series data and output them as the initial gas usage habit features.
[0032] By adopting the above technical solution, the missing gas usage events and quantities are obtained by aligning and comparing the time series data of new users to be matched with the historical time series data corresponding to the original matched model. The missing data is then filled with historical data from the model to generate low-confidence features for subsequent updates. If the missing amount is too large, the system waits for the data to be merged in the next cycle, thus avoiding model distortion caused by temporary data loss. Threshold control prevents bias introduced by over-reliance on external models, achieving a dynamic balance between the data completion strategy and the waiting strategy.
[0033] Optionally, it also includes a method for updating the new user profile model, which includes:
[0034] Step 400: Obtain the new gas consumption timeline corresponding to the new gas consumption timeline data collected in the next collection cycle;
[0035] Step 401: Match and align the newly added gas consumption timeline with the gas consumption timeline to be matched to obtain the updated gas consumption timeline data corresponding to the missing gas consumption timeline data;
[0036] Step 402: Replace the missing gas consumption time series data with the updated gas consumption time series data to obtain accurate gas consumption time series data;
[0037] Step 403: Replace the low-reliability gas usage time series data with accurate gas usage time series data and use it as the initial gas usage habit feature to update the new user profile model;
[0038] Step 404: If the updated gas consumption time series data does not exist, then maintain the low confidence level to fill the gas consumption time series data unchanged and record the number of collection cycles in which the updated gas consumption time series data does not exist;
[0039] Step 405: If the number of collection cycles is less than the preset collection cycle threshold, continue to wait for the gas consumption time series data to be matched in subsequent collection cycles;
[0040] Step 406: If the number of collection cycles is greater than the preset collection cycle threshold, the new user profile model is updated using the initial gas usage habit features after deleting the missing gas usage time series data.
[0041] By adopting the above technical solution, after acquiring new time-series data in the next collection cycle, it is aligned with the previous time axis. The missing parts previously filled are replaced with real data to achieve self-correction and optimization of the model. If the new data still does not appear, the number of waiting times is recorded, and the model continues to observe in the short term. If the threshold is exceeded, the permanently missing items are directly deleted to avoid invalid placeholders interfering with the model. Ultimately, it ensures that the new user profile model is always iteratively updated based on the current reliable measured data.
[0042] Optionally, methods for determining whether current gas usage habits are those of a first-time gas user include:
[0043] Step 500: Based on the current gas usage habits, find the historical gas usage habits of people in the same room;
[0044] Step 501: Perform feature vectorization on the current gas usage habits to obtain the current feature vector;
[0045] Step 502: Perform feature vectorization on the historical gas usage habits to obtain historical feature vectors;
[0046] Step 503: Calculate the change feature distance between the current feature vector and the historical feature vectors;
[0047] Step 504: If the distance of the change feature is higher than the preset change threshold, then the historical gas consumption habit feature is defined as the first gas consumption habit feature, and the current gas consumption habit feature is defined as the second gas consumption habit feature.
[0048] Step 505: Obtain the first occurrence count of the first gas consumption habit feature and the second occurrence count of the second gas consumption habit feature within the collection period;
[0049] Step 506: When the number of occurrences of the second occurrence exceeds the number of occurrences of the first occurrence, determine that the current gas usage habit is a first-time gas usage habit.
[0050] Step 507: If the distance of the change feature is not higher than the preset change threshold or the second occurrence number does not exceed the first occurrence number, then it is determined that the current gas usage habit feature is not the initial gas usage habit feature.
[0051] By adopting the above technical solution, the current and historical features are vectorized and the change distance is calculated. If the change feature distance is higher than the preset change value and the second occurrence number exceeds the first occurrence number, it is determined to be the first gas usage habit feature, and the subsequent model matching process is triggered; otherwise, it is regarded as a regular change, which avoids the accidental triggering of the construction of a new user profile model due to fluctuations in normal user behavior, and provides a dual verification basis based on frequency and amplitude for the initial judgment.
[0052] Optionally, when the number of times the second occurrence exceeds the number of times the first occurrence occurs, the following steps are also included:
[0053] Step 600: Retrieve the number of times the historical user profile model corresponding to the historical gas usage habit characteristics is used within the preset switching cycle, and define it as the usage frequency of the historical user profile model;
[0054] Step 601: Retrieve the number of times the new user profile model corresponding to the initial gas usage habit characteristics is used within the switching cycle, and define it as the usage frequency of the new user profile model;
[0055] Step 602: When the frequency of use of the new user profile model exceeds the frequency of use of the historical user profile model during the switching cycle, the new user profile model is defined as the primary user profile model, and the historical user profile model is used as a hidden backup model.
[0056] Step 603: If there are two or more hidden backup models, then integrate all the hidden backup models to obtain a hidden backup model library;
[0057] Step 604: Define the historical gas consumption habit characteristics of the hidden backup models in the hidden backup model library as hidden gas consumption habit characteristics;
[0058] Step 605: Obtain all hidden gas usage habit features and perform feature vectorization processing on each one to obtain hidden feature vectors;
[0059] Step 606: Calculate the hidden feature distance between the current feature vector and each hidden feature vector;
[0060] Step 607: If the distance of the hidden feature is lower than the preset hidden change threshold, then the current gas usage habit feature is determined to match the hidden gas usage habit feature, and the hidden backup model is defined as the output of the main user profile model.
[0061] By adopting the above technical solution, the high-frequency model is automatically upgraded to the primary model and the old model is downgraded to a hidden backup model by comparing the usage frequency of the new and old models. When the hidden backup model is accumulated, its features are vectorized and matched with the current gas usage habits. If a high degree of match is found, the model is switched back to the corresponding historical user profile model. This realizes the adaptive iteration of the model, the long-term retention of historical experience, and the rapid switching back when habits are repeated, thereby continuously improving the accuracy and personalized adaptation capability of gas usage prediction.
[0062] Optionally, a method for obtaining the original set of models, the method including:
[0063] Step 700: Obtain the original user profile model corresponding to the original gas usage habits of all existing users;
[0064] Step 701: Obtain the preset gas consumption policy information and define it as the current gas consumption policy information;
[0065] Step 702: Based on the current gas consumption policy information, perform timeliness verification and parameter correction on the original user profile model, and define the original user profile model that conforms to the current gas consumption policy information as a valid original model;
[0066] Step 703: Integrate all valid original models to obtain the original model set.
[0067] By adopting the above technical solution, the original user profile model is obtained, and the timeliness is verified and parameters are corrected in combination with the current gas consumption policy. Valid models are selected and integrated into a set to ensure that the models called in the future not only comply with the latest policies, but also retain historical habit characteristics, thereby improving the compliance and accuracy of predictions.
[0068] Optional, also includes:
[0069] Step 800: Obtain user information from the original model set, including floor height, gas usage time characteristics, and gas usage characteristics;
[0070] Step 801: Based on the floor height, split all valid original models in the original model set into hierarchical model groups according to the preset floor height classification threshold. The hierarchical model groups include low-level model groups, mid-level model groups, and high-level model groups.
[0071] Step 802: Obtain the gas consumption time point characteristics and gas consumption volume characteristics of the effective original models in each hierarchical model group;
[0072] Step 803: Based on the gas consumption characteristics, perform gas consumption clustering on each effective original model to obtain several gas consumption groups;
[0073] Step 804: Based on the gas consumption time point characteristics, perform gas consumption time point clustering on each effective original model to obtain several gas consumption time point groups;
[0074] Step 805: Merge the valid original models that belong to the same gas consumption group and the same gas consumption time point group to obtain the aggregated original model;
[0075] Step 806: Replace the merged valid original models with the aggregated original models to obtain the updated original model set and output it.
[0076] By adopting the above technical solution, the original model collection is first divided into low, medium and high-rise groups according to the floor height. Then, gas consumption clustering and gas consumption time point clustering are performed on each group of models. Finally, models belonging to the same order of magnitude and the same time period are merged into an aggregated model, thereby reducing redundancy, refining typical gas consumption patterns, and outputting a more concise updated collection, improving the efficiency and relevance of subsequent model retrieval.
[0077] Optionally, an optimization method is also included that integrates all valid original models to obtain a set of original models, the method comprising:
[0078] Step 900: Obtain the number of valid original models under the current gas consumption policy information;
[0079] Step 901: Obtain the previous gas consumption policy of the current gas consumption policy, and define it as the historical gas consumption policy;
[0080] Step 902: If the effective quantity is lower than the preset modeling quantity threshold, then obtain the historical effective original model corresponding to the historical gas consumption policy;
[0081] Step 903: Merge and integrate the historical valid original models with the valid original models to obtain an expanded set of original models, which is then output as the original model set.
[0082] Step 904: If the effective number is not lower than the preset modeling number threshold, no optimization will be performed.
[0083] By adopting the above technical solution, the number of effective original models under the current policy is first counted. If it is lower than the modeling threshold, the system will automatically backtrack and introduce historical effective models from the previous policy period for merging and expansion to form a more complete set. If the number meets the standard, the system will remain unchanged. This can effectively address the problem of insufficient samples in the early stage of policy switching, ensure that subsequent modeling and analysis have a sufficient model foundation, avoid prediction bias due to data sparsity, and improve the robustness and adaptability of the system.
[0084] In summary, the present invention has at least one of the following beneficial technical effects:
[0085] 1. When the system detects a new user, it compares the new user's initial gas usage habits with the existing original user profile model library to obtain the most similar model. Then, it fine-tunes and replaces the matching model using incremental learning based on the new user's real-time data, and finally outputs the new user profile model. This achieves efficient transfer learning under cold start, avoids data sparsity problems, ensures the immediacy and accuracy of model response, and maintains the dynamic adaptability of the model.
[0086] 2. After aligning and comparing the new user's time series data to be matched with the historical time series data corresponding to the matched original model, the missing gas usage events and quantities are obtained and the gaps are filled with the historical data in the model. Low-confidence features are generated for subsequent updates, avoiding model distortion caused by temporary data loss. Threshold control prevents bias introduced by over-reliance on external models, achieving a dynamic balance between data completion strategy and waiting strategy, and reducing the length of the modeling cycle gap.
[0087] 3. The original model set is first classified by floor height, and then each group of models is clustered by gas consumption and gas consumption time point, and then merged into an aggregate model to reduce model redundancy, extract typical gas consumption patterns, make the output set structure more concise, and improve the efficiency and relevance of subsequent model retrieval. Attached Figure Description
[0088] Figure 1 This is a flowchart of a method for constructing a gas meter user gas consumption model based on AI self-learning, as described in an embodiment of this application.
[0089] Figure 2 This is a flowchart of a method for obtaining the initial gas usage habits of new users;
[0090] Figure 3 This is a flowchart of a method for determining whether current gas usage habits are those of a first-time gas user;
[0091] Figure 4 This is a flowchart of the method for obtaining the original model set. Detailed Implementation
[0092] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0093] This invention discloses a method for constructing a gas meter user gas consumption model based on AI self-learning. (Refer to...) Figure 1 A method for constructing a gas meter user gas consumption model based on AI self-learning includes:
[0094] Step 100: Obtain current gas usage habits.
[0095] Current gas usage habit characteristics refer to a set of characteristic information on the user's gas usage behavior patterns obtained from gas meter data within the current collection period. The acquisition method is described in steps 200 to 205.
[0096] Step 101: A method to determine whether the current gas usage habits are those of a first-time gas user.
[0097] The characteristics of initial gas usage habits refer to the characteristics of gas usage habits identified for the first time. The judgment method is described in steps 500 to 507.
[0098] Step 102: If it is the initial gas usage habit characteristics, then define the initial gas usage habit characteristics of the new user.
[0099] If this is a first-time gas usage habit characteristic, it indicates that the current gas usage habit characteristic is the first time it has been identified, and a new user profile model needs to be built. A user profile model refers to a set of digital mapping relationships that can describe, predict, or match the user's gas usage behavior patterns.
[0100] Step 103: Perform feature vectorization on the initial gas usage habit characteristics to obtain the initial feature vector.
[0101] Feature vectorization refers to the mathematical transformation process of converting non-numerical gas usage habit features into numerical vectors, achieved through encoding mapping rules. The encoding mapping rules involve decomposing the gas usage habit features into several quantifiable dimensions, mapping each dimension to a numerical value using a different encoding rule, and finally concatenating them into a fixed-length numerical vector. The initial feature vector refers to the numerical vector result obtained after performing feature vectorization on the initial gas usage habit features; it is obtained by directly outputting the result after performing feature vectorization processing.
[0102] Step 104: Perform feature vectorization on all the original gas usage habit features in the preset original model set to obtain the original feature vectors. The original model set includes the original gas usage habit features and the original user profile model corresponding to each original gas usage habit feature.
[0103] The original model set refers to the database of old user profile models used for storage, which can be obtained through steps 700 to 703 and 800 to 806. The original gas usage habit features refer to the collected and cleaned gas usage behavior feature data corresponding to each old user in the original model set, obtained by retrieving data from the original model set. The original feature vector refers to the numerical vector result obtained after feature vectorization processing of the original gas usage habit features, obtained by directly outputting the result after performing feature vectorization processing. The original user profile model refers to the completed user profile model corresponding to each old user, obtained by retrieving data from the original model set.
[0104] Step 105: Calculate the feature distance between the initial feature vector and each original feature vector.
[0105] Feature distance refers to the distance metric between an initial feature vector and a certain original feature vector, which is calculated by a distance metric algorithm.
[0106] The formula for calculating the distance metric algorithm is as follows: ,in For feature distance, The first eigenvector is the eigenvalue of the first eigenvector. Each dimension component The first eigenvector in the original feature vector Each dimension component This represents the total dimension of the feature vectors.
[0107] Step 106: Select the original gas usage habit feature corresponding to the smallest feature distance, define it as the similar gas usage habit feature, and define the original user profile model corresponding to the similar gas usage habit feature as the matching original model.
[0108] Similar gas usage habit features refer to the original gas usage habit features most similar to the initial gas usage habit features. This is obtained by sorting and comparing all feature distances to find the smallest feature distance, and then matching the corresponding original gas usage habit feature in the original model set based on the smallest feature distance. The matched original model refers to the complete original user profile model corresponding to the similar gas usage habit features, obtained by matching the corresponding original user profile model in the original model set using the similar gas usage habit features.
[0109] Step 107: Based on the initial gas usage habit features, a preset incremental learning method is used to replace the similar gas usage habit features corresponding to the original model to update the original model, obtain a new user profile model, and output it.
[0110] Incremental learning refers to the process of using new data to locally modify and iterate the original matching model, gradually adapting the model to the initial gas usage habits while retaining the usable general data from the original matching model. It is obtained by weighting and fusing the parameters of the original matching model with the measured initial gas usage habits according to the learning rate. The calculation formula is as follows: ,in For new user profile models, For learning rate, These are the characteristics of a person using gas for the first time. This represents similar gas usage habits. The learning rate is set by the operator based on the gas usage characteristics of the area, and its value ranges from 0 to 1.
[0111] Reference Figure 2 Methods for obtaining the initial gas usage habits of new users include:
[0112] Step 200: Obtain the gas usage time sequence data of the new user within a preset collection period. The gas usage time sequence data includes the gas usage time period, continuous gas usage duration, and instantaneous flow rate.
[0113] The data acquisition period refers to the pre-set data acquisition time span, set by the operator. Gas consumption time-series data refers to detailed data of each gas consumption event recorded chronologically within the acquisition period, obtained and stored by real-time monitoring of gas flow changes in the pipeline using a gas meter. Gas consumption time period refers to the start and end times of a single gas consumption event, directly obtained from the start and end times recorded by the gas meter. Continuous gas consumption duration refers to the length of a single gas consumption event from start to finish, calculated by subtracting the start time from the end time. Instantaneous flow rate refers to the instantaneous flow velocity of gas in the pipeline at a specific moment during a single gas consumption event, obtained in real-time by a flow sensor within the gas meter at a fixed sampling frequency.
[0114] Step 201: Define gas consumption time series data that have a continuous gas consumption duration less than the preset lower limit of continuous gas consumption duration, an instantaneous flow rate less than the preset lower limit of instantaneous flow rate, and a gas consumption time period not within the preset standard gas consumption time period as suspected interference gas consumption time series data.
[0115] The minimum continuous gas consumption limit refers to the shortest continuous gas consumption duration threshold used to determine whether a gas consumption event constitutes normal gas consumption. This threshold is set by the operator based on the physical characteristics of the gas meter and normal gas consumption patterns. The minimum instantaneous flow rate limit refers to the lowest instantaneous flow rate threshold used to determine whether a gas consumption event's flow rate is within the normal gas consumption range. This threshold is set by the operator based on the accuracy of the gas meter's flow sensor and the normal gas flow rate range. The standard gas consumption period refers to the normal gas consumption time window used to determine whether a gas consumption event occurs within a reasonable gas consumption period. This threshold is set by the operator based on daily life patterns. Suspected interference gas consumption time series data refers to noise data that may be generated by non-user-initiated gas consumption behaviors such as false triggering, meter malfunction, or pipeline disturbances. This data is obtained directly after filtering the gas consumption period, continuous gas consumption duration, and instantaneous flow rate.
[0116] Step 202: Define the gas consumption time series data other than suspected interfering gas consumption time series data as gas consumption time series data to be matched.
[0117] The gas consumption time series data to be matched refers to the gas consumption time series data of gas consumption records that are considered to be initially reliable, which is obtained by subtracting suspected interfering gas consumption time series data from all gas consumption time series data.
[0118] Step 203: Obtain the number of valid days in which the suspected interfering gas consumption time series data appears within the collection period.
[0119] The number of valid days refers to the number of days that suspected interfering gas consumption time series data actually appeared within the collection period. It is obtained by deduplicating the suspected interfering gas consumption time series data by day. Deduplication by day means grouping the suspected interfering gas consumption time series data by date and counting how many different dates in the group have at least one suspected interference record. The result is the number of valid days.
[0120] Step 204: If the number of valid days is less than the preset lower limit of valid days, the suspected interfering gas consumption time series data will be deleted as interfering gas consumption time series data.
[0121] If the number of valid days is less than the preset lower limit, it indicates that the suspected interfering gas consumption time series data belongs to noise data that is not part of the user's regular gas consumption behavior. The lower limit is a threshold number of valid days used to determine whether a certain type of suspected interfering gas consumption time series data has a regular recurring characteristic; it is preset by the operator based on business experience. Interfering gas consumption time series data refers to suspected interfering gas consumption time series data with a valid number of days less than the lower limit, which is directly classified as noise data and output.
[0122] Step 205: If the number of valid days is greater than or equal to the lower limit of valid days, the suspected interfering gas consumption time series data will be integrated with the gas consumption time series data to be matched as non-interfering gas consumption time series data and output as the initial gas consumption habit feature.
[0123] If the number of valid days is greater than or equal to the lower limit of valid days, it indicates that the suspected interfering gas usage behavior has a regular recurring characteristic within the collection period and belongs to the user's real gas usage habits. Non-interfering gas usage time series data refers to real gas usage behavior with regular recurring characteristics, which is directly obtained by comparing the number of valid days.
[0124] This also includes an optimized method for acquiring gas consumption time-series data to be matched, the method comprising:
[0125] Step 300: After obtaining the initial gas usage habit characteristics after executing steps 200 and 205, obtain the original gas usage time series data corresponding to the original model obtained according to steps 103 to 107.
[0126] The original gas consumption time series data refers to the gas consumption time series data used to construct the original matching model, which is obtained by extracting it from the original matching model.
[0127] Step 301: Obtain the original gas consumption time axis corresponding to the original gas consumption time series data and the gas consumption time axis to be matched corresponding to the gas consumption time series data to be matched.
[0128] The original gas consumption timeline refers to the complete time-scale sequence of the original gas consumption time series data in the time dimension. It is obtained by extracting the gas consumption time periods from the original gas consumption time series data and expanding them into a time point sequence. The gas consumption timeline to be matched refers to the time-scale sequence of the gas consumption time series data to be matched in the time dimension. It is obtained by extracting the gas consumption time periods from the gas consumption time series data to be matched and expanding them into a time point sequence.
[0129] Step 302: After matching and aligning the original gas consumption timeline with the gas consumption timeline to be matched, compare the original gas consumption timeline data and the gas consumption timeline data to be matched to obtain the missing gas consumption timeline data and the number of missing data.
[0130] Matching and alignment refers to placing the original gas consumption timeline and the gas consumption timeline to be matched under the same time reference coordinate system, so that the two correspond one-to-one on the time scale. This is achieved by resampling both timelines with the same time granularity and unifying the start and end times, so that each timeline has a corresponding time slot at every time scale. A time slot refers to dividing the timeline into several discrete and equal-length time segments at fixed time intervals. Missing gas consumption time series data refers to gas consumption time series data that exists on the original gas consumption timeline but not on the gas consumption timeline to be matched. This is obtained by extracting the gas consumption time series data corresponding to the time slots that exist on the original gas consumption timeline but not on the timeline to be matched.
[0131] Step 303: If the number of missing data is less than the preset upper limit threshold for missing data, fill the missing gas consumption time series data into the gas consumption time series data to be matched, and obtain low-confidence filled gas consumption time series data as the initial gas consumption habit feature output.
[0132] If the number of missing data points is less than the preset upper limit threshold, it indicates that the completeness of the gas consumption time series data to be matched is relatively high. The original gas consumption time series data can be temporarily used to fill in the missing data to meet the minimum requirements for data completeness in modeling. The upper limit threshold refers to the maximum acceptable number of missing data points used to judge the degree of missing data for new users, and is set by operators based on their business experience. Low-confidence filled gas consumption time series data refers to gas consumption time series data with a low confidence level of matching with the actual gas consumption behavior of new users due to the filling of missing data. It is obtained by taking the union of the missing gas consumption time series data and the gas consumption time series data to be matched.
[0133] Step 304: If the number of missing data exceeds the preset upper limit threshold, the gas consumption time series data to be matched is defined as hidden gas consumption time series data, and the new gas consumption time series data is obtained after the next collection cycle.
[0134] If the number of missing data exceeds the preset upper limit threshold, it indicates that the completeness of the gas consumption time series data to be matched is low. Temporarily filling in the gaps using the original gas consumption time series data will lead to severe data distortion, failing to meet the minimum requirements for data completeness in modeling. Hidden gas consumption time series data refers to gas consumption time series data to be matched that does not participate in the current modeling when the difference between the gas consumption time series data to be matched and the original gas consumption time series data is too large. This is obtained by outputting gas consumption time series data to be matched with a missing data count exceeding the upper limit threshold. The next acquisition cycle refers to the next time window after the end of the current acquisition cycle. The next acquisition cycle automatically begins after the current acquisition cycle ends. Newly added gas consumption time series data refers to newly added real gas consumption records acquired in the next acquisition cycle, obtained by repeating steps 200 to 202 within the next acquisition cycle.
[0135] Step 305: Integrate the hidden gas usage time series data and the newly added gas usage time series data and output them as the initial gas usage habit features.
[0136] This also includes a method for updating the new user profile model, which includes:
[0137] Step 400: Obtain the new gas consumption timeline corresponding to the new gas consumption timeline data collected in the next collection cycle.
[0138] The newly added gas consumption time series time axis refers to the time scale sequence corresponding to the newly added gas consumption time series data. It is obtained by extracting the gas consumption time period in the newly added gas consumption time series data and expanding it into a time point sequence according to a fixed time granularity.
[0139] Step 401: Match and align the newly added gas consumption timeline with the gas consumption timeline to be matched to obtain the updated gas consumption timeline data corresponding to the missing gas consumption timeline data.
[0140] Updating gas consumption time series data refers to the actual gas consumption records collected from the new data that correspond to the time slots where the missing gas consumption time series data is located. This is achieved by aligning the new gas consumption time series time axis with the gas consumption time axis to be matched at the same time granularity, then retrieving the time slots that overlap with the time slots where the missing gas consumption time series data is located, and extracting the new gas consumption time series data records corresponding to the overlapping time slots.
[0141] Step 402: Replace the missing gas consumption time series data with the updated gas consumption time series data to obtain accurate gas consumption time series data.
[0142] Accurate gas usage time series data refers to the real gas usage time series data obtained by replacing all borrowed low-reliability missing gas usage time series data with the real collected updated gas usage time series data. This is obtained by writing the updated gas usage time series data into the corresponding time slot in the initial gas usage habit feature dataset and overwriting the original missing gas usage time series data.
[0143] Step 403: Replace the low-reliability gas usage time series data with accurate gas usage time series data and use it as the initial gas usage habit feature to update the new user profile model.
[0144] Step 404: If the updated gas consumption time series data does not exist, then maintain the low confidence level to fill the gas consumption time series data unchanged and record the number of collection cycles in which the updated gas consumption time series data does not exist.
[0145] If the updated gas consumption time series data is not available, it indicates that no actual gas consumption record corresponding to the missing time slot has been collected in the next collection cycle. The number of collection cycles refers to the cumulative number of collection cycles in which the corresponding actual data has not been obtained since the first filling of missing data, which is obtained by recording and accumulating using a counter.
[0146] Step 405: If the number of collection cycles is less than the preset collection cycle threshold, continue to wait for the gas consumption time series data to be matched in subsequent collection cycles.
[0147] If the number of data collection cycles is less than the preset data collection cycle threshold, it indicates that the number of data collection cycles is still within a reasonable range. Therefore, the low-reliability missing gas consumption time series data will continue to be retained and await further verification in subsequent data collection cycles. The data collection cycle threshold refers to the maximum allowable waiting number of data collection cycles for which updated gas consumption time series data is not available, and it is set by the operator.
[0148] Step 406: If the number of collection cycles is greater than the preset collection cycle threshold, the new user profile model is updated using the initial gas usage habit features after deleting the missing gas usage time series data.
[0149] If the number of collection cycles exceeds the preset collection cycle threshold, it indicates that the gas consumption time period corresponding to the missing gas consumption time series data does not belong to the gas consumption habit characteristics of the new user, and the missing gas consumption time series data should be deleted.
[0150] Reference Figure 3 Methods for determining whether current gas usage habits are consistent with initial gas usage habits include:
[0151] Step 500: Based on the current gas usage habits, find the historical gas usage habits of people in the same room.
[0152] Historical gas usage habit characteristics refer to the gas usage habit characteristics data accumulated and stored in the same room in the past, which are obtained by retrieving the original gas usage habit characteristics corresponding to the original user profile model in the same room.
[0153] Step 501: Perform feature vectorization on the current gas usage habits to obtain the current feature vector.
[0154] The current feature vector refers to the numerical vector result obtained after performing feature vectorization on the current gas usage habits. It is directly output after performing feature vectorization.
[0155] Step 502: Perform feature vectorization on the historical gas usage habits to obtain historical feature vectors.
[0156] Historical feature vectors refer to the numerical vector results obtained after performing feature vectorization on historical gas usage habits. They are directly output after performing feature vectorization.
[0157] Step 503: Calculate the change feature distance between the current feature vector and the historical feature vectors.
[0158] The change feature distance refers to the distance metric calculated between the current feature vector and the historical feature vectors, and the calculation method is the same as in step 105.
[0159] Step 504: If the distance of the change feature is higher than the preset change threshold, then the historical gas usage habit feature is defined as the first gas usage habit feature, and the current gas usage habit feature is defined as the second gas usage habit feature.
[0160] If the distance of the change characteristic exceeds the preset change threshold, it indicates that the current gas usage habits have changed compared to historical gas usage habits. The change threshold refers to the upper limit of the distance of the change characteristic used to determine changes in gas usage habits within the same room, and is set by the operator based on their experience.
[0161] Step 505: Obtain the first occurrence count of the first gas consumption habit feature and the second occurrence count of the second gas consumption habit feature within the collection period.
[0162] The first occurrence count refers to the number of times gas usage habits match the first gas usage habit characteristic within the data collection period. This is obtained by counting the occurrences after pattern matching of the gas usage habit characteristics of each gas usage event with the first gas usage habit characteristic within the data collection period. The second occurrence count refers to the number of times gas usage habits match the second gas usage habit characteristic within the data collection period. This is also obtained by counting the occurrences after pattern matching of the gas usage habit characteristics of each gas usage event with the second gas usage habit characteristic within the data collection period.
[0163] Step 506: When the number of occurrences of the second occurrence exceeds the number of occurrences of the first occurrence, determine that the current gas usage habit is the initial gas usage habit.
[0164] When the number of occurrences of the second occurrence exceeds the number of occurrences of the first occurrence, it indicates that the current gas usage habit is a newly emerging and widely used gas usage habit in the room, and should be output as the initial gas usage habit characteristic.
[0165] Step 507: If the distance of the change feature is not higher than the preset change threshold or the second occurrence number does not exceed the first occurrence number, then it is determined that the current gas usage habit feature is not the initial gas usage habit feature.
[0166] If the distance of the change feature is not higher than the preset change threshold or the number of second occurrences does not exceed the number of first occurrences, it indicates that the gas usage behavior has not changed significantly and cannot be directly identified as a new user.
[0167] When the number of times the second occurrence exceeds the number of times the first occurrence occurs, the following steps are also included:
[0168] Step 600: Retrieve the number of times the historical user profile model corresponding to the historical gas usage habit characteristics is used within a preset switching cycle, and define it as the usage frequency of the historical user profile model.
[0169] The historical user profile model refers to the user profile model corresponding to historical gas usage habits, obtained from the original model collection. The historical user profile model usage frequency refers to the number of times a user profile model matches a historical user profile model within the collection period, counted by performing pattern matching between the user profile model corresponding to each gas usage event and the historical user profile model within the collection period. The switching period refers to the time window used to statistically compare the usage frequency of the old and new models within the same time period, set by operators according to business needs.
[0170] Step 601: Retrieve the number of times the new user profile model corresponding to the initial gas usage habit characteristics is used within the switching cycle, and define it as the usage frequency of the new user profile model.
[0171] The frequency of use of the new user profile model refers to the number of times a user profile model matches the new user profile model within the collection period. It is obtained by counting the number of times the user profile model corresponding to each gas usage event is matched with the new user profile model within the collection period.
[0172] Step 602: If the frequency of use of the new user profile model exceeds the frequency of use of the historical user profile model during the switching cycle, the new user profile model is defined as the primary user profile model, and the historical user profile model is used as a hidden backup model.
[0173] If the frequency of use of the new user profile model exceeds that of the historical user profile model during the switching cycle, it indicates that the applicability and confidence level of the new user profile model have surpassed those of the historical model, and the primary user profile model needs to be replaced. The primary user profile model is the user profile model that is prioritized and is obtained by finding the user profile model corresponding to the current gas usage habits. The hidden backup model is the user profile model that is not currently prioritized but is still retained; it is obtained by finding the user profile model corresponding to the historical gas usage habits that have been replaced.
[0174] Step 603: If there are two or more hidden backup models, then integrate all the hidden backup models to obtain a hidden backup model library.
[0175] If there are two or more hidden backup models, it indicates that the room has undergone multiple user changes, accumulating multiple replaced historical user profile models. The hidden backup model library refers to the unified model set obtained by integrating all hidden backup models.
[0176] Step 604: Define the historical gas usage habits of the hidden backup models in the hidden backup model library as hidden gas usage habits.
[0177] Hidden gas usage habit characteristics refer to the historical gas usage habit characteristics corresponding to each hidden backup model stored in the hidden backup model library, which are obtained by retrieving the historical gas usage habit characteristics of each hidden backup model in the hidden backup model library.
[0178] Step 605: Obtain all hidden gas usage habit features and perform feature vectorization processing on each one to obtain hidden feature vectors.
[0179] The hidden feature vector refers to the numerical vector result obtained after performing feature vectorization on each hidden gas usage habit feature, which is directly output after performing feature vectorization.
[0180] Step 606: Calculate the hidden feature distance between the current feature vector and each hidden feature vector.
[0181] The hidden feature distance refers to the distance metric calculated between the current feature vector and a certain hidden feature vector. The calculation method is the same as in step 105.
[0182] Step 607: If the distance of the hidden feature is lower than the preset hidden change threshold, then the current gas usage habit feature is determined to match the hidden gas usage habit feature, and the hidden backup model is defined as the output of the main user profile model.
[0183] If the hidden feature distance is lower than the preset hidden change threshold, it indicates that the similarity between the current gas usage habit feature and the hidden gas usage habit feature has reached the matching standard, and the current gas usage habit feature is determined to be the same as the hidden gas usage habit feature. The hidden change threshold refers to the lower limit of the hidden feature distance used to determine whether the current user matches a certain hidden backup model, and it is set by the operator.
[0184] Reference Figure 4 A method for obtaining the original model set, the method includes:
[0185] Step 700: Obtain the original user profile model corresponding to the original gas usage habits of all existing users.
[0186] Step 701: Obtain the preset gas consumption policy information and define it as the current gas consumption policy information.
[0187] Gas usage policy information refers to gas usage-related policies, regulations, or industry standards issued by national or local gas management departments, obtained through automatic connection with official policy release platforms or government data interfaces. Current gas usage policy information refers to the gas usage policies currently in effect.
[0188] Step 702: Based on the current gas consumption policy information, perform timeliness verification and parameter correction on the original user profile model, and define the original user profile model that conforms to the current gas consumption policy information as a valid original model.
[0189] Timeliness verification refers to the process of checking each policy-related parameter in the original user profile model based on current gas consumption policy information. This is done by comparing the policy version number or policy parameter value stored in the original user profile model with the corresponding field in the current gas consumption policy information. Parameter correction refers to updating and adjusting the expired policy parameters in the original user profile model that failed the timeliness verification according to the current gas consumption policy information. This is done by locating parameter fields in the original user profile model that are inconsistent with the current policy information and replacing the expired values with the corresponding new values in the current gas consumption policy information. Valid original models refer to original user profile models that meet all the requirements of the current gas consumption policy information. They are obtained by screening each original user profile model and marking those that meet the current gas consumption policy information.
[0190] Step 703: Integrate all valid original models to obtain the original model set.
[0191] This also includes:
[0192] Step 800: Obtain user information from the original model set, including floor height, gas usage time characteristics, and gas usage characteristics.
[0193] User profile refers to the set of user attribute information corresponding to each valid original model in the original model collection, obtained by retrieving data from the original model collection. Floor height refers to the floor number of the user's residence, determined by the house information entered during installation. Gas usage time point characteristics refer to the distribution pattern of user gas usage behavior over time, extracted from gas usage time-series data. Gas consumption characteristics refer to the distribution pattern of user gas usage behavior over quantity, statistically calculated from gas usage time-series data. The statistical calculation method involves integrating and accumulating the instantaneous flow rate of all gas usage events within the collection period and dividing by the number of collection days to obtain the average daily gas consumption.
[0194] Step 801: Based on the floor height, split all valid original models in the original model set into hierarchical model groups according to the preset floor height classification threshold. The hierarchical model groups include low-level model groups, mid-level model groups, and high-level model groups.
[0195] The floor height classification threshold refers to the numerical boundary point used to divide floor heights into different levels, set by operators based on their experience in gas pressure stratification. A classification model group refers to several valid subsets of original models obtained after splitting according to floor height; these are directly output after splitting according to the floor height classification threshold. The low-floor model group refers to the subset of valid original models below the low-floor classification threshold. The mid-floor model group refers to the subset of valid original models between the low-floor and high-floor classification thresholds. The high-floor model group refers to the subset of valid original models above the high-floor classification threshold.
[0196] Step 802: Obtain the gas consumption time point characteristics and gas consumption volume characteristics of the effective original models in each hierarchical model group.
[0197] Step 803: Based on the gas consumption characteristics, perform gas consumption clustering on each effective original model to obtain several gas consumption groups.
[0198] Gas consumption clustering refers to the operation of automatically classifying and grouping various valid original models according to the similarity of their gas consumption values, obtained through a clustering algorithm. The clustering algorithm uses the K-Means algorithm to take the gas consumption features of each valid original model within each hierarchical model group as input feature vectors, and then iteratively calculates the similarity of each model based on the Euclidean distance between the feature vectors. Models with similar gas consumption features are automatically grouped into the same cluster, and after clustering, several gas consumption groups are output.
[0199] Step 804: Based on the gas consumption time point characteristics, perform gas consumption time point clustering on each effective original model to obtain several gas consumption time point groups.
[0200] Gas consumption time point clustering refers to the operation of automatically classifying and grouping various valid original models according to the similarity of their gas consumption time distribution, which is calculated through clustering algorithms.
[0201] Step 805: Merge the valid original models that belong to the same gas consumption group and the same gas consumption time point group to obtain the aggregated original model.
[0202] The aggregated original model refers to the unified model entity obtained by merging multiple valid original models belonging to the same gas consumption group and the same gas consumption time point group. The result is directly output after merging.
[0203] Step 806: Replace the merged valid original models with the aggregated original models to obtain the updated original model set and output it.
[0204] Updating the original model set refers to the original model set after the replacement operation, which is obtained by directly outputting the result after performing the replacement operation.
[0205] This also includes an optimization method that integrates all valid original models to obtain a set of original models, which includes:
[0206] Step 900: Obtain the number of valid original models under the current gas consumption policy information.
[0207] The effective number refers to the total number of original models marked as effective under the current gas consumption policy information, which is obtained by counting and statistically analyzing all effective original models.
[0208] Step 901: Obtain the previous gas consumption policy of the current gas consumption policy, and define it as the historical gas consumption policy.
[0209] Historical gas consumption policies refer to older versions of gas consumption policies implemented before the current policy information was issued and implemented, obtained through a version management mechanism. The version management mechanism refers to the process of automatically archiving older versions of the policy information to a historical policy record table each time the gas consumption policy information is updated.
[0210] Step 902: If the effective quantity is lower than the preset modeling quantity threshold, then obtain the historical effective original model corresponding to the historical gas consumption policy.
[0211] If the number of valid models is lower than the preset modeling quantity threshold, it indicates that the number of valid models is insufficient to support the formation of the original model set. The modeling quantity threshold refers to the minimum number of valid models required to determine whether the current number of valid original models can support the formation of the original model set. This threshold is set by the operator based on experience with clustering algorithms and matching results. Historical valid original models refer to the original user profile models marked as valid in historical gas consumption policies. These are obtained by retrieving all original user profile models marked as valid under historical gas consumption policies.
[0212] Step 903: Merge and integrate the historical valid original models with the valid original models to obtain an expanded set of original models, which is then output as the original model set.
[0213] The expanded original model set refers to a set of original models that includes historically valid original models and valid original models, which can be used to match the characteristics of initial gas usage habits.
[0214] Step 904: If the effective number is not lower than the preset modeling number threshold, no optimization will be performed.
[0215] If the effective number is not lower than the preset modeling number threshold, it indicates that the effective number is sufficient to support the formation of the original model set.
[0216] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0217] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A method for constructing a gas meter user gas consumption model based on AI self-learning, characterized in that, include: Step 100: Obtain current gas usage habits; Step 101: Determine whether the current gas usage habits are those of a first-time gas user; Step 102: If it is the initial gas usage habit characteristics, then define the initial gas usage habit characteristics of the new user; Step 103: Perform feature vectorization on the initial gas usage habit characteristics to obtain the initial feature vector; Step 104: Perform feature vectorization on all the original gas usage habit features in the preset original model set one by one to obtain the original feature vector. The original model set includes the original gas usage habit features and the original user profile model corresponding to each original gas usage habit feature. Step 105: Calculate the feature distance between the initial feature vector and each original feature vector respectively; Step 106: Select the original gas usage habit feature corresponding to the smallest feature distance, define it as the similar gas usage habit feature, and define the original user profile model corresponding to the similar gas usage habit feature as the matching original model; Step 107: Based on the initial gas usage habit features, a preset incremental learning method is used to replace the similar gas usage habit features corresponding to the original model to update the original model, obtain a new user profile model, and output it.
2. The method for constructing a gas meter user gas consumption model based on AI self-learning according to claim 1, characterized in that, Methods for obtaining initial gas usage habits of new users include: Step 200: Obtain the gas consumption time series data of the new user within a preset collection period. The gas consumption time series data includes the gas consumption time period, continuous gas consumption duration, and instantaneous flow rate. Step 201: Define gas consumption time series data with a continuous gas consumption duration less than the preset continuous gas consumption lower limit duration, an instantaneous flow rate less than the preset instantaneous lower limit flow rate, and a gas consumption time period not within the preset standard gas consumption time period as suspected interference gas consumption time series data; Step 202: Define the gas consumption time series data other than the suspected interfering gas consumption time series data as the gas consumption time series data to be matched; Step 203: Obtain the number of valid days in which suspected interfering gas consumption time series data appears within the collection period; Step 204: If the number of valid days is less than the preset lower limit of valid days, the suspected interfering gas consumption time series data will be deleted as interfering gas consumption time series data; Step 205: If the number of valid days is greater than or equal to the lower limit of valid days, the suspected interfering gas consumption time series data will be integrated with the gas consumption time series data to be matched as non-interfering gas consumption time series data and output as the initial gas consumption habit feature.
3. The method for constructing a gas meter user gas consumption model based on AI self-learning according to claim 2, characterized in that, It also includes an optimized method for acquiring gas consumption time-series data to be matched, the method comprising: Step 300: After obtaining the initial gas usage habit characteristics after executing steps 200 and 205, obtain the original gas usage time series data corresponding to the original model obtained according to steps 103 to 107. Step 301: Obtain the original gas consumption time axis corresponding to the original gas consumption time series data and the gas consumption time axis to be matched corresponding to the gas consumption time series data to be matched; Step 302: After matching and aligning the original gas consumption timeline with the gas consumption timeline to be matched, compare the original gas consumption timeline data and the gas consumption timeline data to be matched to obtain the missing gas consumption timeline data and the number of missing data in the gas consumption timeline data to be matched; Step 303: If the number of missing data is less than the preset upper limit threshold for missing data, fill the missing gas consumption time series data into the gas consumption time series data to be matched, obtain low confidence gas consumption time series data and output it as the initial gas consumption habit feature. Step 304: If the number of missing data exceeds the preset upper limit threshold, the gas consumption time series data to be matched is defined as hidden gas consumption time series data, and the new gas consumption time series data is obtained after the next collection cycle. Step 305: Integrate the hidden gas usage time series data and the newly added gas usage time series data and output them as the initial gas usage habit features.
4. The method for constructing a gas meter user gas consumption model based on AI self-learning according to claim 3, characterized in that, It also includes a method for updating the new user profile model, which includes: Step 400: Obtain the new gas consumption timeline corresponding to the new gas consumption timeline data collected in the next collection cycle; Step 401: Match and align the newly added gas consumption timeline with the gas consumption timeline to be matched to obtain the updated gas consumption timeline data corresponding to the missing gas consumption timeline data; Step 402: Replace the missing gas consumption time series data with the updated gas consumption time series data to obtain accurate gas consumption time series data; Step 403: Replace the low-reliability gas usage time series data with accurate gas usage time series data and use it as the initial gas usage habit feature to update the new user profile model; Step 404: If the updated gas consumption time series data does not exist, then maintain the low confidence level to fill the gas consumption time series data unchanged and record the number of collection cycles in which the updated gas consumption time series data does not exist; Step 405: If the number of collection cycles is less than the preset collection cycle threshold, continue to wait for the gas consumption time series data to be matched in subsequent collection cycles; Step 406: If the number of collection cycles is greater than the preset collection cycle threshold, the new user profile model is updated using the initial gas usage habit features after deleting the missing gas usage time series data.
5. The method for constructing a gas meter user gas consumption model based on AI self-learning according to claim 2, characterized in that, Methods for determining whether current gas usage habits are those of a first-time gas user include: Step 500: Based on the current gas usage habits, find the historical gas usage habits of people in the same room; Step 501: Perform feature vectorization on the current gas usage habits to obtain the current feature vector; Step 502: Perform feature vectorization on the historical gas usage habits to obtain historical feature vectors; Step 503: Calculate the change feature distance between the current feature vector and the historical feature vectors; Step 504: If the distance of the change feature is higher than the preset change threshold, then the historical gas consumption habit feature is defined as the first gas consumption habit feature, and the current gas consumption habit feature is defined as the second gas consumption habit feature. Step 505: Obtain the first occurrence count of the first gas consumption habit feature and the second occurrence count of the second gas consumption habit feature within the collection period; Step 506: When the number of occurrences of the second occurrence exceeds the number of occurrences of the first occurrence, determine that the current gas usage habit is a first-time gas usage habit. Step 507: If the distance of the change feature is not higher than the preset change threshold or the second occurrence number does not exceed the first occurrence number, then it is determined that the current gas usage habit feature is not the initial gas usage habit feature.
6. The method for constructing a gas meter user gas consumption model based on AI self-learning according to claim 5, characterized in that, When the number of times the second occurrence exceeds the number of times the first occurrence occurs, the following steps are also included: Step 600: Retrieve the number of times the historical user profile model corresponding to the historical gas usage habit characteristics is used within the preset switching cycle, and define it as the usage frequency of the historical user profile model; Step 601: Retrieve the number of times the new user profile model corresponding to the initial gas usage habit characteristics is used within the switching cycle, and define it as the usage frequency of the new user profile model; Step 602: When the frequency of use of the new user profile model exceeds the frequency of use of the historical user profile model during the switching cycle, the new user profile model is defined as the primary user profile model, and the historical user profile model is used as a hidden backup model. Step 603: If there are two or more hidden backup models, then integrate all the hidden backup models to obtain a hidden backup model library; Step 604: Define the historical gas consumption habit characteristics of the hidden backup models in the hidden backup model library as hidden gas consumption habit characteristics; Step 605: Obtain all hidden gas usage habit features and perform feature vectorization processing on each one to obtain hidden feature vectors; Step 606: Calculate the hidden feature distance between the current feature vector and each hidden feature vector; Step 607: If the distance of the hidden feature is lower than the preset hidden change threshold, then the current gas usage habit feature is determined to match the hidden gas usage habit feature, and the hidden backup model is defined as the output of the main user profile model.
7. The method for constructing a gas meter user gas consumption model based on AI self-learning according to claim 1, characterized in that, A method for obtaining the original set of models, which includes: Step 700: Obtain the original user profile model corresponding to the original gas usage habits of all existing users; Step 701: Obtain the preset gas consumption policy information and define it as the current gas consumption policy information; Step 702: Based on the current gas consumption policy information, perform timeliness verification and parameter correction on the original user profile model, and define the original user profile model that conforms to the current gas consumption policy information as a valid original model; Step 703: Integrate all valid original models to obtain the original model set.
8. The method for constructing a gas meter user gas consumption model based on AI self-learning according to claim 7, characterized in that, Also includes: Step 800: Obtain user information from the original model set, including floor height, gas usage time characteristics, and gas usage characteristics; Step 801: Based on the floor height, split all valid original models in the original model set into hierarchical model groups according to the preset floor height classification threshold. The hierarchical model groups include low-level model groups, mid-level model groups, and high-level model groups. Step 802: Obtain the gas consumption time point characteristics and gas consumption volume characteristics of the effective original models in each hierarchical model group; Step 803: Based on the gas consumption characteristics, perform gas consumption clustering on each effective original model to obtain several gas consumption groups; Step 804: Based on the gas consumption time point characteristics, perform gas consumption time point clustering on each effective original model to obtain several gas consumption time point groups; Step 805: Merge the valid original models that belong to the same gas consumption group and the same gas consumption time point group to obtain the aggregated original model; Step 806: Replace the merged valid original models with the aggregated original models to obtain the updated original model set and output it.
9. The method for constructing a gas meter user gas consumption model based on AI self-learning according to claim 7, characterized in that, It also includes an optimization method that integrates all valid original models to obtain a set of original models, which includes: Step 900: Obtain the number of valid original models under the current gas consumption policy information; Step 901: Obtain the previous gas consumption policy of the current gas consumption policy, and define it as the historical gas consumption policy; Step 902: If the effective quantity is lower than the preset modeling quantity threshold, then obtain the historical effective original model corresponding to the historical gas consumption policy; Step 903: Merge and integrate the historical valid original models with the valid original models to obtain an expanded set of original models, which is then output as the original model set. Step 904: If the effective number is not lower than the preset modeling number threshold, no optimization will be performed.
Citation Information
Patent Citations
Combustible gas remote monitoring management system and method based on Internet of Things and AI
CN121486706A
