Gas user behavior prediction method based on big data analysis
Through the gas user behavior prediction method based on big data analysis, we identify user groups with consistent gas usage habits, analyze the availability and risks of the gas usage trend chart, solve the problems of lag in gas data transmission and incomplete detection services, and realize the safety management and risk prevention of gas use.
Patent Information
- Application Number
- CN202411267612.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-09-11
AI Technical Summary
During the process of data transmission, gas meters are susceptible to the influence of buildings or other frequencies, resulting in data update lag and integrity affected. The existing detectors cannot effectively provide customers with rectification or emergency repair services, and lack the functions of real-time data synchronization updates and user query.
The gas user behavior prediction method based on big data analysis is adopted. By obtaining the user's gas usage parameters, the user's gas usage trend chart is constructed, and based on the similarity comparison of the trend chart, users with consistent gas usage habits are captured, user groups are divided, user risks are analyzed, and the judgment results are feedback to the gas management end, and manual dispatch is carried out.
It has achieved the identification of user groups with consistent gas usage habits, analyzed the availability of the current gas usage trend chart of all users, evaluated the user's gas usage risks, ensured daily safety management of gas usage, and prevented non-deterministic behavior of gas users.
Smart Images

Figure CN118798658B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of gas management technology, and in particular to a gas user behavior prediction method based on big data analysis. Background Art
[0002] Gas management is crucial. It covers gas supply safety, facility maintenance, user services and many other aspects. Strict gas management ensures a stable gas supply and protects residents' lives and corporate production. By standardizing the operation of gas companies, strengthening safety inspections and publicity and education, and raising public awareness of safe gas use, we can safeguard the safe and stable operation of the city.
[0003] The invention patent with application number 201710678706.7 discloses a gas user management method, which is characterized by comprising the following steps: a file creation step, S1: a GPS module and a QR code generation module are provided in the detector, the GPS module locates the user coordinates and generates a user coordinate QR code through the QR code generation module; S2: a user personal file is established for each user in the system terminal, and the user coordinate QR code, user address, pipeline equipment information, gas equipment information, security inspection prompt steps and security inspection cycle are entered into the user personal file, the pipeline equipment information includes the user pipeline map, and the gas equipment information includes the equipment quantity, model, installation location and equipment code; S3: a QR code generation module is provided in the system terminal, and the QR code generation module encodes the user personal file to form a user personal file QR code; S4: the system terminal is connected to a GSM Modem, the GSM The modem transmits the user's personal profile QR code to the gas meter. The gas meter is provided with a GSM transmission module. The GSM transmission module transmits the daily gas consumption to the corresponding user's personal profile and the user's mobile phone APP in the system terminal. The GSM Modem of the system terminal also transmits the user's gas bill to the user's mobile phone APP on a monthly basis; security inspection step, S5: the detector is provided with a QR code scanning module, the QR code scanning module scans the user's personal profile QR code stored in the gas meter, and obtains the user's security inspection prompt step; S6: perform security inspection according to the security inspection prompt step, the detector is provided with a detection module and an image generation module, the detection module detects the leakage position and leakage concentration of the gas pipeline and equipment, and the image generation module takes pictures of the safety hazards found; S7: the security inspector sets a rectification period and assesses the level of safety hazards based on the detected leakage position and leakage concentration.
[0004] The application aims to solve the problem that "during the data transmission process of the gas meter, its wireless signal is easily affected by buildings or other frequencies. Therefore, there is a certain lag in data update, and the integrity of the data will also be affected to a certain extent. The commonly used detectors can only detect the location and concentration of gas leaks, and cannot provide customers with more effective rectification or emergency repair services. Therefore, there is currently a lack of a management system that can better network the gas meters and detectors for operation, and has not yet realized the function of real-time data synchronization update and convenient user query."
[0005] However, compared with gas users, their gas usage is random. Large-scale use of gas in a short period of time will bring management burden to the daily gas management on the gas supply side, which is not conducive to the stability of daily gas supply.
[0006] To this end, we proposed a gas user behavior prediction method based on big data analysis. Summary of the invention
[0007] In view of the above-mentioned shortcomings of the prior art, the present invention provides a gas user behavior prediction method based on big data analysis, which solves the technical problems raised in the above-mentioned background technology.
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0009] Gas user behavior prediction methods based on big data analysis include:
[0010] Preparation stage:
[0011] Obtaining the user's gas usage parameters, constructing a situation graph representing the user's gas usage situation based on the user's gas usage parameters, creating a cloud database, setting a plurality of groups of differentiated storage intervals in the cloud database, and storing the situation graph representing the user's gas usage situation based on the differentiated storage intervals, so that the situation graph stored in each differentiated storage interval is from the same user;
[0012] Retrieve the situation graphs stored in the storage intervals of each zone in the cloud database, compare the similarity of the situation graphs, capture users with consistent gas usage habits, differentiate users based on the captured results, and determine the user group with consistent gas usage habits;
[0013] Application phase:
[0014] Counting gas usage parameters of users, constructing a situation diagram representing the gas usage situation of all users based on the counted gas usage parameters of users, monitoring the distribution of users currently using gas, and evaluating the availability of the situation diagram representing the gas usage situation of all users based on the monitoring results of the distribution of users currently using gas;
[0015] Obtaining a situation diagram representing the gas usage situation of all users, and analyzing the gas usage risk of the users based on the situation diagram representing the gas usage situation of all users combined with the corresponding availability assessment results;
[0016] A threshold for determining the risk of user gas usage is set, and based on the comparison between the threshold and the result of risk analysis of user gas usage, it is determined whether there is a risk in the user's gas usage. If the determination result is yes, the determination result is fed back to the user at the gas management end, and the user at the gas management end manually schedules the gas to eliminate the risk of gas usage.
[0017] Furthermore, the user gas usage parameters include: gas usage start time and end time, gas usage amount, and when the cloud database sets differentiated storage intervals to differentiate and store the situation diagram of the user's gas usage situation, each differentiated storage interval is marked with the name of the source user of the situation diagram. When the situation diagram is constructed, the horizontal axis represents time in hours, and the vertical axis represents gas usage in cubic meters. The situation diagram corresponding to each user consists of several groups, and the user gas usage parameters used to construct each group of situation diagrams are all gas usage parameters generated by the user's use of gas within one day. Then, the corresponding date of the situation diagram stored in each group of differentiated storage intervals is a continuous and uninterrupted time period;
[0018] The time period is no less than fourteen days, and the situation diagram is a broken line segment.
[0019] Furthermore, the operation of retrieving the situation graph stored in the differentiated storage intervals of the cloud database is continuously performed, and each time the retrieval operation is performed, the retrieval target is the situation graph stored in any two sets of differentiated storage intervals in the cloud database, and when comparing the similarity of the situation graphs, one set of situation graphs is selected from the two sets of differentiated storage intervals for similarity comparison, so that any combination of the situation graphs stored in the two sets of differentiated storage intervals is subjected to similarity comparison;
[0020] When performing similarity comparison between the two groups of situation graphs, the following applies: ;
[0021] Where: S is the similarity between the two groups of situation graphs; k iA is the slope of the i-th point in the situation diagram A; k iB is the slope of the i-th point in the situation diagram B; is the average slope of situation diagram A; is the average slope of situation diagram B; α and β are weights; d i is the absolute value of the difference between the positions of the i-th point in situation graph A and situation graph B; n is the set of points in situation graph A and situation graph B; d max is the normalization factor; t olpis the cumulative duration of the overlapping period of gas use by the user in situation diagram A and situation diagram B; T is the cumulative duration of gas use corresponding to the set of situation diagrams with the largest cumulative duration of gas use in situation diagram A and situation diagram B;
[0022] The set of points in the situation graph is all the nodes on the discount line segment in the situation graph. The sum of α, β, and (1-α-β) is 1. When the similarity S of two sets of situation graphs is greater than 95%, the two sets of situation graphs are considered similar. The normalization factor d max The value is the maximum absolute value of the difference between the corresponding points in situation diagram A and situation diagram B.
[0023] Furthermore, the capture logic of users with consistent gas usage habits is expressed as:
[0024] ;
[0025] Where: Q is the consistency judgment value of the gas usage habits of user x and user y; m is the total amount of user corresponding situation graphs stored in the cloud database in the storage interval; D j (x) is the number of situation graphs determined to be similar among all situation graphs stored in the corresponding storage intervals of user y in the cloud database by the jth group of situation graphs stored in the corresponding storage intervals of user y; D j (y) is the number of situation maps determined to be similar among all situation maps stored in the corresponding storage interval of user x in the cloud database by the jth group of situation maps stored in the corresponding storage interval of user y; ω is the weight;
[0026] Among them, f[D j (x)]、f[D j (y)] represents the correction function, [D j (x)]、[D j (y)] is equal to zero, f[D j (x)]、f[D j (y)] all have the value of zero, [D j (x)]、[D j (y)] is greater than zero, f[D j (x)]、f[D j (y)] takes the value of 1.
[0027] Furthermore, the weight ω∈[1,2], and obeys D j (x), D j The larger (y) is, the larger the weight ω is, and vice versa, the smaller the weight ω is;
[0028] After the consistency judgment value of the gas usage habits of the two users is obtained, the consistency judgment of the usage habits is further performed. The judgment logic is expressed as:
[0029] ;
[0030] Where: Set a cutoff value for consistency in percentage form;
[0031] Among them, the consistency setting judgment value in percentage form User-defined, consistency setting judgment value in percentage format The initial setting is 70%, and the above formula is established, indicating that the gas usage habits of the two users corresponding to the Q value are consistent;
[0032] When executing the judgment capture for users with consistent gas usage habits, the following also applies: among three users, if two of them have consistent gas usage habits, and the gas usage habits of any one of the two users are consistent with the gas usage habits of another group of users, then it is determined that the three users have consistent gas usage habits. Based on the above logic, the user group with consistent gas usage habits is determined.
[0033] Furthermore, when constructing the situation graph representing the gas usage situation of all users, the horizontal axis represents time in hours, and the vertical axis represents gas usage in cubic meters. The horizontal axis of each group of situation graphs corresponds to a time period of one day.
[0034] The operations for monitoring the current distribution of gas users are:
[0035] Identify the user group with consistent gas usage habits to which the currently monitored gas users belong, and differentiate the currently monitored gas users based on the identification result, and the number of users belonging to each user group with consistent gas usage habits is recorded as: g1: g2: g3: g4: ...;
[0036] Among them, g1:g2:g3:g4:…, g1≥g2≥g3≥g4≥…, and the sum of g1, g2, g3, g4, … is the total number of current gas users monitored during the distribution stage of monitoring the current gas users.
[0037] Furthermore, the evaluation logic of the availability of the situation diagram representing the gas usage situation of all users is expressed as:
[0038] ;
[0039] Where: τ is the availability of the situation diagram representing the gas usage situation of all users; m g1 is the number of users in the user group corresponding to g1; m g2 is the number of users in the user group corresponding to g2; m0 is the total number of users;
[0040] in, Table correction.
[0041] Furthermore, the user gas usage risk at the situation graph level representing the gas usage situation of all users is expressed as:
[0042] ;
[0043] Where: ξ is the user's gas use risk value; u is the total amount of the situation diagram representing the gas use situation of all users; V v is the total amount of gas used in the situation diagram representing the gas use situation of all users in the vth group; V0 is the starting gas reserve on the corresponding date of the situation diagram representing the gas use situation of all users;
[0044] Where, p[(V0-V v ), (V0-V v+1 )] represents the constraint function, which takes the value of 1 or 0, V0-V v >V0-V v+1 Then, p[(V0-V v ), (V0-V v+1 )] takes the value of 1, V0-V v ≤V0-V v+1 When p[(V0-V v ), (V0-V v+1 )] takes the value of 0.
[0045] Furthermore, the user gas usage risk value ξ is always calculated by applying the latest ten groups of situation graphs representing the gas usage situation of all users;
[0046] In the latest ten groups of situation graphs representing the gas usage situation of all users, when the total amount of gas usage in any group of situation graphs is greater than or equal to V0, the user's gas usage risk value ξ=10, and it is determined that the user's gas usage is risky.
[0047] Furthermore, the operation of analyzing the user's gas use risk in combination with the corresponding availability assessment results is as follows:
[0048] ξ'=ξ×τ;
[0049] Where: ξ' is the final value of the user's gas use risk;
[0050] Among them, the larger the final value ξ' of the user's gas usage risk is, the higher the user's gas usage risk is, and vice versa, the lower the user's gas usage risk is. ξ' is the comparison target with the user's gas usage risk judgment value threshold. The gas management end user manually dispatches the gas, that is, replenishes the gas reserves.
[0051] Compared with the known public technology, the technical solution provided by the present invention has the following beneficial effects:
[0052] The present invention provides a method for predicting gas user behavior based on big data analysis. During the execution of the method, a user gas usage situation graph is constructed through the user gas usage parameters, and then based on the similarity comparison of the situation graph, users with consistent gas usage habits are judged and divided, thereby obtaining a number of user groups with consistent gas usage habits, based on the above as prior data;
[0053] Further based on the statistics of the overall gas usage parameters, a situation map representing the gas usage status of all users is simultaneously constructed. The situation map is then derived from the distribution of the user groups obtained above, and the main source user groups affected by the current situation map representing the gas usage status of all users are analyzed. Finally, the gas usage risks are analyzed and determined to ensure the daily safety management of gas use, and to prevent the uncertain behavior of gas users in using gas by means of prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0055] Figure 1 It is a flow chart of a method for predicting gas user behavior based on big data analysis;
[0056] Figure 2 This is a schematic diagram of the division results of user groups with consistent gas usage habits in the present invention. DETAILED DESCRIPTION
[0057] 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The present invention will be further described below in conjunction with the embodiments.
[0059] Embodiment 1:
[0060] The gas user behavior prediction method based on big data analysis in this embodiment is as follows: Figure 1As shown, including:
[0061] Preparation stage:
[0062] Obtaining the user's gas usage parameters, constructing a situation graph representing the user's gas usage situation based on the user's gas usage parameters, creating a cloud database, setting a plurality of groups of differentiated storage intervals in the cloud database, and storing the situation graph representing the user's gas usage situation based on the differentiated storage intervals, so that the situation graph stored in each differentiated storage interval is from the same user;
[0063] Retrieve the situation graphs stored in the storage intervals of each zone in the cloud database, compare the similarity of the situation graphs, capture users with consistent gas usage habits, differentiate users based on the captured results, and determine the user group with consistent gas usage habits;
[0064] The user's gas usage parameters include: the start time and end time of gas usage, and the amount of gas used. When the cloud database sets up differentiated storage intervals to differentiate and store the situation diagram of the user's gas usage situation, each differentiated storage interval is marked with the name of the source user of the situation diagram. When the situation diagram is constructed, the horizontal axis represents time in hours, and the vertical axis represents gas usage in cubic meters. The situation diagram corresponding to each user consists of several groups. The user gas usage parameters used to construct each group of situation diagrams are the gas usage parameters generated by the user's use of gas within one day. Then the corresponding date of the situation diagram stored in each group of differentiated storage intervals is a continuous and uninterrupted time period;
[0065] The time period is no less than fourteen days, and the situation graph is a broken line segment;
[0066] The operation of retrieving the situation graph stored in the differentiated storage intervals of the cloud database is performed continuously. Each time the retrieval operation is performed, the retrieval target is the situation graph stored in any two sets of differentiated storage intervals in the cloud database. When comparing the similarity of the situation graphs, one set of situation graphs is selected from the two sets of differentiated storage intervals for similarity comparison, so that any combination of the situation graphs stored in the two sets of differentiated storage intervals is subjected to similarity comparison;
[0067] When performing similarity comparison between two sets of situation graphs, they obey: ;
[0068] Where: S is the similarity between the two groups of situation graphs; k iA is the slope of the i-th point in the situation diagram A; k iB is the slope of the i-th point in the situation diagram B; is the average slope of situation diagram A; is the average slope of situation diagram B; α and β are weights; d iis the absolute value of the difference between the positions of the i-th point in situation graph A and situation graph B; n is the set of points in situation graph A and situation graph B; d max is the normalization factor; t olp is the cumulative duration of the overlapping period of gas use by the user in situation diagram A and situation diagram B; T is the cumulative duration of gas use corresponding to the group of situation diagrams with the largest cumulative duration of gas use in situation diagram A and situation diagram B;
[0069] The set of points in the situation graph is all the nodes on the discount line segment in the situation graph. The sum of α, β, and (1-α-β) is 1. When the similarity S of two sets of situation graphs is greater than 95%, the two sets of situation graphs are considered similar. The normalization factor d max The value is the maximum absolute value of the difference between the corresponding points in situation diagram A and situation diagram B;
[0070] The capture logic of users with consistent gas usage habits is expressed as:
[0071] ;
[0072] Where: Q is the consistency judgment value of the gas usage habits of user x and user y; m is the total amount of user corresponding situation graphs stored in the cloud database in the storage interval; D j (x) is the number of situation graphs determined to be similar among all situation graphs stored in the corresponding storage intervals of user y in the cloud database by the jth group of situation graphs stored in the corresponding storage intervals of user y; D j (y) is the number of situation maps determined to be similar among all situation maps stored in the corresponding storage interval of user x in the cloud database by the jth group of situation maps stored in the corresponding storage interval of user y; ω is the weight;
[0073] Among them, f[D j (x)]、f[D j (y)] represents the correction function, [D j (x)]、[D j (y)] is equal to zero, f[D j (x)]、f[D j (y)] all have the value of zero, [D j (x)]、[D j (y)] is greater than zero, f[D j (x)]、f[D j (y)] all have the value of 1;
[0074] Weight ω∈[1,2], and obey D j (x), D j The larger (y) is, the larger the weight ω is, and vice versa, the smaller the weight ω is;
[0075] After the consistency judgment value of the gas usage habits of the two users is obtained, the consistency judgment of the usage habits is further performed. The judgment logic is expressed as:
[0076] ;
[0077] Where: Set a cutoff value for consistency in percentage form;
[0078] Among them, the consistency setting judgment value in percentage form User-defined, consistency setting judgment value in percentage format The initial setting is 70%, and the above formula is established, indicating that the gas usage habits of the two users corresponding to the Q value are consistent;
[0079] When executing the judgment capture for users with consistent gas usage habits, the following also applies: among three users, if two of them have consistent gas usage habits, and the gas usage habits of any one of the two users are consistent with the gas usage habits of another group of users, then it is determined that the three users have consistent gas usage habits. Based on the above logic, the user group with consistent gas usage habits is determined.
[0080] Application phase:
[0081] Counting gas usage parameters of users, constructing a situation diagram representing the gas usage situation of all users based on the counted gas usage parameters of users, monitoring the distribution of users currently using gas, and evaluating the availability of the situation diagram representing the gas usage situation of all users based on the monitoring results of the distribution of users currently using gas;
[0082] Obtaining a situation diagram representing the gas usage situation of all users, and analyzing the gas usage risk of the users based on the situation diagram representing the gas usage situation of all users combined with the corresponding availability assessment results;
[0083] A threshold for determining the risk of user gas usage is set, and based on the comparison between the threshold and the result of risk analysis of user gas usage, it is determined whether there is a risk in the user's gas usage. If the determination result is yes, the determination result is fed back to the user at the gas management end, and the user at the gas management end manually schedules the gas to eliminate the risk of gas usage.
[0084] In this embodiment, by analyzing the consistency of gas users' usage habits, user groups with consistent usage habits are identified, so that the gas usage risks are analyzed and determined based on the situation graph constructed by statistics of real-time user gas usage parameters and the distribution of users from the situation graph in the user group, to ensure that the user's gas usage habits are predicted, and provide data reference for gas management users, so as to facilitate predictive gas scheduling to maintain the stability of gas supply and use. Example
[0085] At the specific implementation level, based on Example 1, this example further specifically illustrates the gas user behavior prediction method based on big data analysis in Example 1 with reference to FIG. 1 :
[0086] When constructing a situation graph representing the gas usage situation of all users, the horizontal axis represents time in hours, and the vertical axis represents gas usage in cubic meters. The horizontal axis of each situation graph corresponds to a time period of one day.
[0087] The operations for monitoring the current distribution of gas users are:
[0088] Identify the user group with consistent gas usage habits to which the currently monitored gas users belong, and differentiate the currently monitored gas users based on the identification result, and the number of users belonging to each user group with consistent gas usage habits is recorded as: g1: g2: g3: g4: ...;
[0089] Among them, g1:g2:g3:g4:..., g1≥g2≥g3≥g4≥..., and the sum of g1, g2, g3, g4,... is the total number of current gas users monitored during the distribution stage of monitoring the current gas users;
[0090] The evaluation logic of the availability of the situation diagram representing the gas usage situation of all users is expressed as:
[0091] ;
[0092] Where: τ is the availability of the situation diagram representing the gas usage situation of all users; m g1 is the number of users in the user group corresponding to g1; m g2 is the number of users in the user group corresponding to g2; m0 is the total number of users;
[0093] in, Table correction;
[0094] The user gas usage risk at the situation graph level, which represents the gas usage situation of all users, is expressed as:
[0095] ;
[0096] Where: ξ is the user's gas use risk value; u is the total amount of the situation diagram representing the gas use situation of all users; V v is the total amount of gas used in the situation diagram representing the gas use situation of all users in the vth group; V0 is the starting gas reserve on the corresponding date of the situation diagram representing the gas use situation of all users;
[0097] Where, p[(V0-V v), (V0-V v+1 )] represents the constraint function, which takes the value of 1 or 0, V0-V v >V0-V v+1 Then, p[(V0-V v ), (V0-V v+1 )] takes the value of 1, V0-V v ≤V0-V v+1 When p[(V0-V v ), (V0-V v+1 )] takes the value of 0;
[0098] The user gas usage risk value ξ is always calculated using the latest ten groups of situation graphs representing the gas usage situation of all users;
[0099] In the latest ten groups of situation graphs representing the gas usage situation of all users, when the total amount of gas usage in any group of situation graphs is greater than or equal to V0, the user's gas usage risk value ξ=10, and it is determined that the user's gas usage is risky.
[0100] In this implementation, through the above-mentioned settings, further execution logic support is provided for the execution of the method in Example 1. At the same time, by limiting the evaluation logic of the availability of the situation graph representing the gas usage status of all users and the user gas usage risk calculation formula at the level of the situation graph representing the gas usage status of all users, the availability of the situation graph representing the gas usage status of all users and the user gas usage risk are represented in digital form, which is convenient for users who use this method to read more quickly and efficiently, thereby predicting the gas usage risk.
[0101] like Figure 1 As shown in the figure, the operation of analyzing the user's gas use risk in combination with the corresponding availability assessment results is:
[0102] ξ'=ξ×τ;
[0103] Where: ξ' is the final value of the user's gas use risk;
[0104] Among them, the larger the final value ξ' of the user's gas usage risk is, the higher the user's gas usage risk is, and vice versa, the lower the user's gas usage risk is. ξ' is the comparison target with the user's gas usage risk judgment value threshold. The gas management end user manually dispatches the gas, that is, replenishes the gas reserves.
[0105] Through the above settings, the operation of analyzing the user's gas usage risk in combination with the corresponding availability assessment results is further limited, and the final value of the user's gas usage risk is calculated, providing an effective decision-making reference for gas management users.
[0106] In summary, during the execution of the method in the above embodiment, a user gas usage situation map is constructed through the user gas usage parameters, and then based on the similarity comparison of the situation map, users with consistent gas usage habits are judged and divided, so as to obtain several user groups with consistent gas usage habits, based on the above as prior data; further based on the statistical overall gas usage parameters, a situation map representing the gas usage situation of all users is synchronously constructed, and then the situation map is derived from the distribution of the above-obtained user groups, and the main source user groups affected by the current situation map representing the gas usage situation of all users are analyzed, and finally the gas usage risks are analyzed and judged to ensure that the daily safety management of gas usage is guaranteed, and the non-deterministic behavior of gas users in using gas is prevented by predictive means.
[0107] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A gas user behavior prediction method based on big data analysis, characterized in that: include: Preparation stage: Obtaining the user's gas usage parameters, constructing a situation graph representing the user's gas usage situation based on the user's gas usage parameters, creating a cloud database, setting a plurality of groups of differentiated storage intervals in the cloud database, and storing the situation graph representing the user's gas usage situation based on the differentiated storage intervals, so that the situation graph stored in each differentiated storage interval is from the same user; Retrieve the situation graphs stored in the storage intervals of each zone in the cloud database, compare the similarity of the situation graphs, capture users with consistent gas usage habits, differentiate users based on the captured results, and determine the user group with consistent gas usage habits; Application phase: Counting gas usage parameters of users, constructing a situation diagram representing the gas usage situation of all users based on the counted gas usage parameters of users, monitoring the distribution of users currently using gas, and evaluating the availability of the situation diagram representing the gas usage situation of all users based on the monitoring results of the distribution of users currently using gas; Obtaining a situation graph representing the gas usage situation of all users, and analyzing the gas usage risk of the users based on the situation graph representing the gas usage situation of all users; The user gas usage risk at the situation graph level representing the gas usage situation of all users is expressed as: ; Where: ξ is the user's gas use risk value; u is the total amount of the situation diagram representing the gas use situation of all users; V v is the total amount of gas used in the situation diagram representing the gas use situation of all users in the vth group; V0 is the starting gas reserve on the corresponding date of the situation diagram representing the gas use situation of all users; Where, p[(V0-V v ), (V0-V v+1 )] represents the constraint function, which takes the value of 1 or 0, V0-V v >V0-V v+1 Then, p[(V0-V v ), (V0-V v+1 )] takes the value of 1, V0-V v ≤V0-V v+1 When p[(V0-V v ), (V0-V v+1 )] takes the value of 0; A threshold for determining the risk of gas use by the user is set, and based on the comparison between the threshold and the result of the risk analysis of gas use by the user, it is determined whether there is a risk in the gas use by the user. If the determination result is yes, the determination result is fed back to the user at the gas management end, and the user at the gas management end manually dispatches the gas to eliminate the risk of gas use; The user gas usage parameters include: gas usage start time and end time, gas usage amount. When the cloud database sets the differentiated storage intervals to differentiate and store the situation diagram of the user's gas usage situation, each differentiated storage interval is marked with the name of the source user of the situation diagram. When the situation diagram is constructed, the horizontal axis represents time in hours, and the vertical axis represents gas usage in cubic meters. The situation diagram corresponding to each user consists of several groups. The user gas usage parameters used to construct each group of situation diagrams are all gas usage parameters generated by the user's use of gas within one day. Then, the corresponding date of the situation diagram stored in each group of differentiated storage intervals is a continuous and uninterrupted time period. Wherein, the time period is not less than fourteen days, and the situation diagram is a broken line segment; The operation of retrieving the situation graph stored in the differentiated storage intervals of the cloud database is continuously performed, and each time the retrieval operation is performed, the retrieval target is the situation graph stored in any two sets of differentiated storage intervals in the cloud database, and when comparing the similarity of the situation graphs, one set of situation graphs is selected from the two sets of differentiated storage intervals for similarity comparison, so that any combination of the situation graphs stored in the two sets of differentiated storage intervals is subjected to similarity comparison; When performing similarity comparison between the two groups of situation graphs, the following applies: ; Where: S is the similarity between the two groups of situation graphs; k iA is the slope of the i-th point in the situation diagram A; k iB is the slope of the i-th point in the situation diagram B; is the average slope of situation diagram A; is the average slope of situation diagram B; α and β are weights; d i is the absolute value of the difference between the positions of the i-th point in situation graph A and situation graph B; n is the set of points in situation graph A and situation graph B; d max is the normalization factor; t olp is the cumulative duration of the overlapping period of gas use by the user in situation diagram A and situation diagram B; T is the cumulative duration of gas use corresponding to the group of situation diagrams with the largest cumulative duration of gas use in situation diagram A and situation diagram B; The set of points in the situation graph is all the nodes on the discount line segment in the situation graph. The sum of α, β, and (1-α-β) is 1. When the similarity S of two sets of situation graphs is greater than 95%, the two sets of situation graphs are considered similar. The normalization factor d max The value is the maximum absolute value of the difference between the corresponding points in situation diagram A and situation diagram B; The capture logic of users with consistent gas usage habits is expressed as: ; Where: Q is the consistency judgment value of the gas usage habits of user x and user y; m is the total amount of user corresponding situation graphs stored in the cloud database in the storage interval; D j (x) is the number of situation graphs determined to be similar among all situation graphs stored in the corresponding storage intervals of user y in the cloud database by the jth group of situation graphs stored in the corresponding storage intervals of user y; D j (y) is the number of situation maps determined to be similar among all situation maps stored in the corresponding storage interval of user x in the cloud database by the jth group of situation maps stored in the corresponding storage interval of user y; ω is the weight; Among them, f[D j (x)]、f[D j (y)] represents the correction function, [D j (x)]、[D j (y)] is equal to zero, f[D j (x)]、f[D j (y)] all have the value of zero, [D j (x)]、[D j (y)] is greater than zero, f[D j (x)]、f[D j (y)] takes the value of 1.
2. The method for predicting gas user behavior based on big data analysis according to claim 1 is characterized in that: The weight ω∈[1,2] and obeys D j (x), D j The larger (y) is, the larger the weight ω is, and vice versa, the smaller the weight ω is; After the consistency judgment value of the gas usage habits of the two users is obtained, the consistency judgment of the usage habits is further performed. The judgment logic is expressed as: ; Where: Set a cutoff value for consistency in percentage form; Among them, the consistency setting judgment value in percentage form User-defined, consistency setting judgment value in percentage format The initial setting is 70%, and the above formula is established, indicating that the gas usage habits of the two users corresponding to the Q value are consistent; When executing the judgment capture for users with consistent gas usage habits, the following also applies: among three users, if two of them have consistent gas usage habits, and the gas usage habits of any one of the two users are consistent with the gas usage habits of another group of users, then it is determined that the three users have consistent gas usage habits. Based on the above logic, the user group with consistent gas usage habits is determined.
3. The method for predicting gas user behavior based on big data analysis according to claim 1 is characterized in that: When constructing the situation graph representing the gas usage situation of all users, the horizontal axis represents time in hours, and the vertical axis represents gas usage in cubic meters. The horizontal axis of each situation graph corresponds to a time period of one day. The operations for monitoring the current distribution of gas users are: Identify the user group with consistent gas usage habits to which the currently monitored gas users belong, and differentiate the currently monitored gas users based on the identification result, and the number of users belonging to each user group with consistent gas usage habits is recorded as: g1: g2: g3: g4: ...; Among them, g1:g2:g3:g4:…, g1≥g2≥g3≥g4≥…, and the sum of g1, g2, g3, g4, … is the total number of current gas users monitored during the distribution stage of monitoring the current gas users.
4. The method for predicting gas user behavior based on big data analysis according to claim 3 is characterized in that: The evaluation logic of the availability of the situation diagram representing the gas usage situation of all users is expressed as: ; Where: τ is the availability of the situation diagram representing the gas usage situation of all users; m g1 is the number of users in the user group corresponding to g1; m g2 is the number of users in the user group corresponding to g2; m0 is the total number of users; in, Table correction.
5. The method for predicting gas user behavior based on big data analysis according to claim 1 is characterized in that: The user gas usage risk value ξ is always calculated using the latest ten groups of situation graphs representing the gas usage situation of all users; In the latest ten groups of situation graphs representing the gas usage situation of all users, when the total amount of gas usage in any group of situation graphs is greater than or equal to V0, the user's gas usage risk value ξ=10, and it is determined that the user's gas usage is risky.
6. The method for predicting gas user behavior based on big data analysis according to claim 4 is characterized in that: The operation of analyzing the user's gas usage risk based on the situation diagram representing the gas usage situation of all users and the corresponding availability assessment results is as follows: ξ'=ξ×τ; Where: ξ' is the final value of the user's gas usage risk; τ is the availability of the situation diagram representing the gas usage situation of all users; Among them, the larger the final value ξ' of the user's gas usage risk is, the higher the user's gas usage risk is, and vice versa, the lower the user's gas usage risk is. ξ' is the comparison target with the user's gas usage risk judgment value threshold. The gas management end user manually dispatches the gas, that is, replenishes the gas reserves.
Citation Information
Patent Citations
Method for managing gas users
CN107688841A
Intelligent gas abnormal data analysis method, Internet of Things system and device and medium
CN117093883A
Multi-party data supervision system based on block chain technology
CN118552025A