A zonal metering system for controlling the difference between gas purchase and sales

By collecting and mapping key information of the gas supply network in the partition metering system and dividing it into multiple metering partitions, the problem of unreasonable partition division in the existing system is solved, and more accurate monitoring of the gas supply network situation and purchase and sales difference is achieved.

CN119919169BActive Publication Date: 2025-06-20SHANDONG ORDER GAS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510404998.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-06-20
Estimated Expiration
2045-04-02

AI Technical Summary

Technical Problem

The existing zoning measurement system lacks scientific basis when dividing metering partitions, resulting in unreasonable zoning divisions and inability to accurately reflect the actual gas use and poor purchase and sales of the gas supply network.

Method used

By collecting key information from the gas supply network, converting it into key data points, and calculating the relative positional relationship between the coordinates of each data point and the coordinates of the decilateral vertex, mapping it onto the decilateral plane, dividing multiple metrological partitions according to distance and geometric characteristics, calculating the purchase and sales difference of each partition in real time, and generating an abnormal alarm signal.

Benefits of technology

A more scientific and reasonable zoning division has been achieved, which can accurately reflect the actual situation of the gas supply network and the purchase and sales difference, and improve the efficiency and accuracy of the gas purchase and sales difference control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919169B_ABST
    Figure CN119919169B_ABST
Patent Text Reader

Abstract

The present invention provides a zonal metering system for controlling the difference between gas purchase and sales, which relates to the technical field of data processing. The system includes: a conversion module for projecting key information into corresponding key data points, each key data point representing a specific location in the gas supply network and including its longitude and latitude coordinates; a mapping module for mapping each key data point onto the plane of a decagon by calculating the relative position relationship between the coordinates of each key data point and the coordinates of each vertex of the decagon; a zoning module for dividing the gas supply network into multiple metering zones according to the distance of each key data point from the center of the decagon structure and the geometric characteristics of the decagon; and a data processing module for calculating the total input gas volume and the difference between the purchase and sales of the output gas volume in each metering zone in real time. The present invention can more accurately reflect the actual situation of the gas supply network and the difference between purchase and sales.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and particularly to a zonal metering system for gas purchase and sales difference control. Background Art

[0002] With the rapid development of information technology, zonal metering technology has gradually become an important means for gas purchase and sales difference control. By dividing the gas supply network into multiple metering zones and monitoring the purchase and sales difference conditions of each zone in real time, problems can be discovered and located in a timely manner, improving the control efficiency. However, the existing zonal metering systems have the following defects:

[0003] For example, when dividing metering zones in traditional solutions, some rely on experience or simple geographical division, such as dividing according to administrative regions, road directions or natural terrain. This division method lacks a scientific basis and does not fully consider the complexity of the gas supply network and the actual gas consumption conditions of each zone. Due to the lack of scientific analysis, the zone division may be too rough or unreasonable, resulting in some zones being too large or too small, and unable to accurately reflect the actual gas supply and demand situation.

[0004] For example, some areas may contain multiple large gas consumers or complex pipeline networks, but traditional solutions may divide them into a single zone, unable to accurately reflect the gas consumption characteristics and purchase and sales difference conditions of the area. Due to the unreasonable zone division, traditional solutions may lead to a too large purchase and sales difference in some zones and a too small purchase and sales difference in some zones. This uneven distribution of purchase and sales differences makes it difficult for enterprises to accurately identify problem areas and take effective control measures in a timely manner. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a zonal metering system for gas purchase and sales difference control, which can more accurately reflect the actual situation and purchase and sales difference situation of the gas supply network.

[0006] To solve the above technical problem, the technical solution of the present invention is as follows:

[0007] In a first aspect, a zonal metering system for gas purchase and sales difference control includes:

[0008] An acquisition module for acquiring key information of the gas supply network, where the key information includes information on the main pipeline inlet, branch pipelines, gas consumption points of industrial and commercial users, and gas consumption areas of residential users;

[0009] A conversion module for projecting the key information into corresponding key data points, and each key data point represents a specific location in the gas supply network and includes its longitude and latitude coordinates;

[0010] A mapping module, which is used to map each key data point onto the plane of the decagon by calculating the relative position relationship between the coordinates of each key data point and the coordinates of the vertices of the decagon;

[0011] A zoning module, which is used to divide the gas supply network into multiple metering zones according to the distance of each key data point from the center of the decagon structure and the geometric characteristics of the decagon;

[0012] A data processing module, which is used to calculate the total input gas volume and the purchase and sale difference of the output gas volume of each metering zone in real time;

[0013] An analysis and alarm module, which is used to generate an abnormal alarm signal when the purchase and sale difference exceeds a preset threshold.

[0014] Furthermore, project the key information into corresponding key data points. Each key data point represents a specific location in the gas supply network and contains its longitude and latitude coordinates, including:

[0015] Define a data structure to represent the key data point. The data structure includes: data point ID, name, longitude and latitude coordinates, and the type it belongs to;

[0016] Traverse the list of preprocessed key information. For each piece of key information, create a new instance of the key data point and fill the coordinates in the key information into the data point instance;

[0017] Add the data point instance to the list of key data points.

[0018] Furthermore, map each key data point onto the plane of the decagon by calculating the relative position relationship between the coordinates of each key data point and the coordinates of the vertices of the decagon, including:

[0019] Determine the coordinates of each vertex of the decagon, and convert the decagon vertex coordinates and the key data point coordinates to the same reference coordinate system;

[0020] For each key data point and each vertex of the decagon, calculate the vector pointing from the decagon vertex to the key data point respectively. Taking a vertex of the decagon as the origin, calculate the included angle between the two side vectors formed by the vertex and its two adjacent vertices, and the vector formed by the vertex and the key data point;

[0021] According to the calculated included angle and combined with the geometric shape of the decagon, judge the position of the key data point relative to the decagon vertex;

[0022] Calculate the distance from the key data point to each side of the decagon;

[0023] Map each key data point onto the plane of the decagon according to the distance from the key data point to each side of the decagon.

[0024] Further, according to the distances from the key data points to the sides of the decagon, each key data point is mapped onto the plane of the decagon, including:

[0025] According to the definition of relative coordinates, a reference vertex is determined as the origin of the relative coordinates;

[0026] A reference edge is determined, and the reference edge is the edge connecting the reference vertex and one of its adjacent vertices;

[0027] The direction of the reference edge is taken as the x-axis direction of the local coordinate system, and the direction perpendicular to the reference edge and conforming to the clockwise rule is taken as the y-axis direction, and a local coordinate system is constructed according to the x-axis direction and the y-axis direction;

[0028] According to the local coordinate system, a vector in the direction of the reference edge is calculated and normalized to obtain a unit vector in the x-axis direction; by rotating the unit vector in the x-axis direction by 90 degrees, a unit vector in the y-axis direction is obtained;

[0029] The unit vector in the x-axis direction is multiplied by the scale factor u to obtain a first translation vector;

[0030] The unit vector in the y-axis direction is multiplied by the scale factor v to obtain a second translation vector;

[0031] The first translation vector and the second translation vector are added to the global coordinates of the reference vertex to obtain the global coordinates of the data point.

[0032] Further, according to the distances of each key data point from the center of the decagon structure and the geometric characteristics of the decagon, the gas supply network is divided into multiple metering zones, including:

[0033] The average value of the coordinates of all vertices of the decagon is calculated to obtain the geometric center of the decagon;

[0034] For each key data point, the distance from it to the geometric center of the decagon is calculated;

[0035] According to the distance and the geometric characteristics of the decagon, the partition boundaries are determined;

[0036] The distances from all key data points to the geometric center of the decagon are traversed to obtain the maximum value and the minimum value;

[0037] According to the preset number of partitions N, the distance range is divided into N equally spaced intervals, and each key data point falls into the corresponding distance interval according to its distance;

[0038] With the center of the decagon as the origin, 360 degrees is divided into N equally angled intervals. For each key data point, the angle relative to the center of the decagon is calculated, and each key data point falls into the corresponding angle interval according to its angle;

[0039] For each key data point within a distance interval, allocate it into N angular intervals to form multiple measurement partitions.

[0040] Further, for each key data point within a distance interval, allocate it into N angular intervals to form multiple measurement partitions, including:

[0041] Create a list of distance intervals containing N elements, where each element in the list of distance intervals represents a distance interval, and initialize it as an empty list of distance intervals for storing key data points falling within the distance interval;

[0042] Create an N×N matrix of angular intervals, where each element in the matrix of angular intervals represents a "distance - angle" combined interval, and initialize it as an empty matrix of angular intervals for storing key data points finally falling within the combined interval;

[0043] Traverse all key data points, and allocate them into the corresponding distance intervals according to their distances from the center of the decagon. For each key data point, calculate the index of the equidistant interval to which its distance belongs, and add the corresponding key data point to the matrix of distance intervals;

[0044] Each element in the matrix of angular intervals is a "distance - angle" combined interval, which contains all key data points falling within that interval;

[0045] Traverse the matrix of angular intervals, and assign a unique partition number to each combined interval to form multiple measurement partitions of "distance - angle" combinations.

[0046] Further, calculate the total input gas volume value and the difference between the input and output gas volume for each measurement partition in real time, including:

[0047] Calculate the estimated gas consumption of residential users in each measurement partition based on historical gas consumption data and user quantity data;

[0048] For each measurement partition, in real time, summarize the input gas volume values of all flow meters within the measurement partition within a specified time window;

[0049] For each measurement partition, in real time, summarize the gas consumption values of all industrial and commercial users within the measurement partition within a specified time window, and obtain the estimated gas consumption value of residential users within the corresponding measurement partition within the same time window;

[0050] Fuse the gas consumption values of all industrial and commercial users within the specified time window with the estimated gas consumption values of all residential users to obtain the output gas volume value.

[0051] Further, calculate the estimated gas consumption of residential users in each measurement partition based on historical gas consumption data and user quantity data, including:

[0052] Calculate the total gas consumption of all residential users over multiple past time periods, accumulate it to obtain the historical total gas consumption, and calculate the total number of residential users in the same time period;

[0053] Calculate the average gas consumption per household in the historical data based on the ratio of the historical total gas consumption to the total number of residential users;

[0054] Use the actual number of residential users in the current metering area as the estimation base;

[0055] Calculate the product of the actual number of residential users and the historical average gas consumption per household to obtain the basic estimation value;

[0056] Fuse the basic estimation value with the time window proportionality coefficient to obtain the estimated gas consumption of residential users in the current time window.

[0057] In a second aspect, a zoning metering method for gas purchase and sales difference control, the method includes:

[0058] Collect key information of the gas supply network, where the key information includes information on the main pipeline entrance, branch pipelines, industrial and commercial user gas consumption points, and residential user gas consumption areas;

[0059] Project the key information into corresponding key data points, and each key data point represents a specific location in the gas supply network, including its longitude and latitude coordinates;

[0060] By calculating the relative position relationship between the coordinates of each key data point and the coordinates of each vertex of the decagon, map each key data point onto the plane of the decagon;

[0061] Divide the gas supply network into multiple metering areas according to the distance of each key data point from the center of the decagon structure and the geometric characteristics of the decagon;

[0062] Real-time calculate the total input gas volume and the purchase and sales difference of the output gas volume in each metering area;

[0063] Generate an abnormal alarm signal when the purchase and sales difference exceeds the preset threshold.

[0064] In a third aspect, a computing device includes:

[0065] One or more processors;

[0066] A storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the described system.

[0067] Fourth aspect, a computer-readable storage medium, in which a program is stored, and when the program is executed by a processor, the system described above is implemented.

[0068] The above solution of the present invention at least includes the following beneficial effects:

[0069] Through the acquisition module, the system can comprehensively and accurately obtain the key information of the gas supply network, including the information of the main pipeline inlet, branch pipelines, gas usage points of industrial and commercial users, and gas usage areas of residential users. The conversion module projects these key information into corresponding key data points, and each data point contains accurate longitude and latitude coordinates.

[0070] The mapping module maps each data point onto the plane of the decagon by calculating the relative position relationship between each key data point and the vertex coordinates of the decagon, realizing the visualization and spatialization of the data. The zoning module divides the gas supply network into multiple metering zones according to the distance of each key data point from the center of the decagon structure and the geometric characteristics of the decagon. This division method is more scientific and reasonable and can accurately reflect the actual situation of the gas supply network.

[0071] The data processing module can calculate the total input gas volume and the purchase and sales difference of the output gas volume of each metering zone in real time. The output gas volume value is the sum of the gas volume collected in real time from industrial and commercial users and the estimated gas volume of residential users. This enables the enterprise to timely understand the purchase and sales difference situation of each zone.

[0072] The analysis and alarm module generates an abnormal alarm signal when the purchase and sales difference exceeds the preset threshold according to the purchase and sales difference. This helps the enterprise to timely discover and handle potential problems such as leakage, metering errors, or illegal gas theft, etc., and prevent the expansion of losses.

[0073] Through accurate data acquisition, scientific zoning, real-time monitoring of the purchase and sales difference, and an effective abnormal alarm mechanism, the system improves the efficiency and accuracy of gas purchase and sales difference control. The enterprise can more accurately locate the problem area, take targeted control measures, reduce the purchase and sales difference, and improve the operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 is a schematic diagram of a zoned metering system for gas purchase and sales difference control provided by an embodiment of the present invention.

[0075] Figure 2 is a schematic flowchart of a zoned metering method for gas purchase and sales difference control provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0076] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.

[0077] As Figure 1 shown, an embodiment of the present invention provides a zonal metering system for controlling the difference between gas purchase and sales, including:

[0078] An acquisition module, configured to acquire key information of the gas supply network, where the key information includes information on the main pipeline inlet, branch pipelines, gas consumption points of industrial and commercial users, and gas consumption areas of residential users;

[0079] A conversion module, configured to project the key information into corresponding key data points, and each key data point represents a specific location in the gas supply network and includes its longitude and latitude coordinates;

[0080] A mapping module, configured to map each key data point onto the plane of a decagon by calculating the relative position relationship between the coordinates of each key data point and the coordinates of each vertex of the decagon;

[0081] A zoning module, configured to divide the gas supply network into multiple metering zones according to the distance of each key data point from the center of the decagon structure and the geometric characteristics of the decagon;

[0082] A data processing module, configured to calculate in real time the total input gas volume and the difference between gas purchase and sales of each metering zone;

[0083] An analysis and alarm module, configured to generate an abnormal alarm signal when the difference between gas purchase and sales exceeds a preset threshold.

[0084] In the embodiment of the present invention, by acquiring key information of the gas supply network, including information on the main pipeline inlet, branch pipelines, gas consumption points of industrial and commercial users, and gas consumption areas of residential users, the system can comprehensively understand the layout and gas consumption situation of the gas supply network. Projecting the key information into corresponding key data points, with each data point containing accurate longitude and latitude coordinates, realizes the spatial representation of data. The spatialized data points are more convenient for spatial analysis and visual display, and help to more intuitively understand the distribution and gas consumption situation of the gas supply network.

[0085] By calculating the relative position relationship between the coordinates of each key data point and the coordinates of the vertices of the decagon, each data point is mapped onto the plane of the decagon, realizing the scientific mapping of the data. After being mapped onto the decagon plane, all data points are in a unified coordinate system, facilitating subsequent partition division and data analysis. According to the distance of each key data point from the center of the decagon structure and the geometric characteristics of the decagon, the gas supply network is divided into multiple metering zones, and the zoning method is more reasonable. Reasonable zoning helps the enterprise to more clearly understand the gas consumption situation and the difference between purchase and sales in each zone, facilitating targeted management and optimization.

[0086] Real-time calculate the total input gas volume and the difference between purchase and sales of the output gas volume in each metering zone to ensure the timeliness and accuracy of the data. By calculating the output gas volume value (the sum of the real-time collected gas volume of industrial and commercial users and the estimated gas volume of residential users), the system can comprehensively monitor the difference between purchase and sales in each zone. According to the difference between purchase and sales, when the difference exceeds the preset threshold, an abnormal alarm signal is generated, which helps the enterprise to timely discover and handle potential problems such as leakage and metering errors. Timely abnormal alarm can reduce safety hazards, prevent the expansion of losses, and improve the safety and stability of the gas supply network.

[0087] The acquisition module is the basis of the zonal metering system for gas purchase and sales control, and is responsible for comprehensively and accurately collecting key information of the gas supply network. The following is the specific implementation process of the acquisition module:

[0088] Determine the acquisition scope:

[0089] Determine the scope of the gas supply network that needs to be acquired, including the main pipeline inlet, branch pipelines, gas consumption points of industrial and commercial users, and gas consumption areas of residential users.

[0090] Select the acquisition method:

[0091] On-site investigation: Through on-site visits, measurements, etc., obtain information such as the specific location, pipe diameter, and length of the main pipeline inlet and branch pipelines.

[0092] User survey: Distribute questionnaires or conduct interviews to industrial and commercial users and residential users to understand their gas consumption situations, gas-using equipment, gas-using habits, etc.

[0093] Data interface docking: Docking with the SCADA system, user management system, etc. of the gas company to obtain real-time gas consumption data, user information, etc.

[0094] Data sorting and entry:

[0095] Sort out the collected data, remove duplicate, incorrect or invalid data, and input the sorted data into the database of the district metering system to provide a basis for subsequent data processing and analysis. Regularly verify the collected data to ensure its accuracy and integrity. Update the collected data in a timely manner according to changes in the gas supply network and user gas consumption.

[0096] For example, a city gas company is responsible for the gas supply in the city. Its gas supply network includes multiple main pipeline inlets, branch pipelines, and a large number of industrial and commercial users and residential users. To strengthen the control of gas purchase and sales difference, the company decides to introduce a district metering system and first conducts the collection of key information.

[0097] Collection process:

[0098] The gas company organizes professional personnel to conduct on-site investigations of the gas supply network. Using equipment such as GPS locators and rangefinders, it obtains information such as the specific locations, pipe diameters, and lengths of the main pipeline inlets and branch pipelines. At the same time, pressure tests are conducted on some pipelines to ensure the safety and stability of the pipelines; questionnaires are distributed to industrial and commercial users and residential users to understand their gas consumption, gas-using equipment, gas-using habits, etc., and on-site interviews are conducted with some users to deeply understand their gas consumption needs and existing problems; it is docked with the gas company's SCADA system, user management system, etc. to obtain real-time gas consumption data, user information, etc. Through data interfaces, automatic data collection and update are realized, improving the efficiency and accuracy of data collection. Sort out the collected data, remove duplicate, incorrect or invalid data, and input the sorted data into the database of the district metering system to provide a basis for subsequent data processing and analysis.

[0099] Through the work of the collection module, the gas company has successfully obtained the key information of the gas supply network, including the specific locations, pipe diameters, lengths, etc. of the main pipeline inlets and branch pipelines, as well as the gas consumption, gas-using equipment, gas-using habits, etc. of industrial and commercial users and residential users. These information provide a solid foundation for subsequent district division, data processing and analysis. Based on the key information collected, the gas company has successfully constructed a district metering system and achieved precise control of the gas purchase and sales difference. By calculating the total input gas volume and the purchase and sales difference of the output gas volume in each metering district in real time, the system can timely discover and handle potential problems such as leaks, metering errors or illegal gas theft, reducing the purchase and sales difference and improving the operation efficiency.

[0100] The district metering system for gas purchase and sales difference control using a decagon is mainly based on geometric characteristics and the convenience of district management. The following is a detailed explanation of the reasons for using a decagon and an illustration of its application through a specific case.

[0101] Among them, the reasons for using a decagon are as follows:

[0102] Geometric properties:

[0103] Symmetry. A decagon has a high degree of symmetry, which helps to achieve a more balanced division during partitioning, making the area and shape of each metering partition relatively close, thus facilitating management and comparison.

[0104] Number of vertices. A decagon has 10 vertices, which provides more partition boundary points, making the partitioning more refined and flexible.

[0105] Convenience of partition management:

[0106] Easy to divide. By calculating the distance of each key data point from the center of the decagon structure and using the geometric properties of the decagon, the gas supply network can be conveniently divided into multiple metering partitions.

[0107] Easy to monitor. Each metering partition can be regarded as an independent monitoring unit. By calculating the total input gas volume and the difference between the purchased and sold gas volumes in real time, abnormal differences in purchases and sales can be detected and processed in a timely manner.

[0108] Adaptability to complex networks:

[0109] Flexibility. The structure of the decagon can adapt to complex gas supply networks. Whether it is the main pipeline inlet, branch pipelines, or the gas consumption points of industrial and commercial users and the gas consumption areas of residential users, they can all be partitioned and managed by projecting and mapping them onto the decagon plane.

[0110] Scalability. As the gas supply network expands or changes, the decagon partition metering system can be conveniently adjusted and expanded.

[0111] In a preferred embodiment of the present invention, the key information is projected into corresponding key data points. Each key data point represents a specific location in the gas supply network, including its longitude and latitude coordinates, and includes:

[0112] Define a data structure to represent key data points. The data structure includes: data point ID, name, latitude and longitude coordinates, and the type it belongs to. Specifically, it includes: determining the attributes of the data structure. In this example, it is necessary to include the data point ID, name, latitude and longitude coordinates, and the type it belongs to; according to the determined attributes, design a data structure to store this information. This can be a class (in object-oriented programming), a struct (in some programming languages), or a dictionary or tuple containing these attributes (in simpler data structures); define the data type for each attribute. For example, the data point ID can be an integer, the name can be a string, the latitude and longitude coordinates can be floating-point numbers, and the type it belongs to can be a string or an enumeration type; according to the design, implement this data structure. If it is a class, it is necessary to define the attributes and methods of the class; if it is a dictionary or tuple, directly define its structure.

[0113] Traverse the list of preprocessed key information. For each piece of key information, create a new instance of the key data point and fill the coordinates in the key information into the data point instance. Specifically, it includes: obtaining the list of preprocessed key information. This list may come from a file, a database, or other data sources; use an appropriate traversal method (such as a for loop) to traverse this list. During the traversal, each iteration will process an element in the list. In each iteration, access the attributes of the current element (i.e., a piece of key information). These attributes may exist in the form of key-value pairs in a dictionary or as attributes of an object; during the traversal, for each piece of key information, create a new instance of the key data point and fill the attributes in the key information into the newly created key data point instance. In particular, fill the latitude and longitude coordinates into the corresponding attributes of the instance. In addition to the coordinates, other attributes (such as the data point ID, name, and the type it belongs to) also need to be filled into the instance.

[0114] Add the data point instance to the list of key data points. Specifically, it includes: before the start of the traversal, initialize an empty list to store the key data point instances. After each new key data point instance is created and filled, add this instance to the list initialized before. Continue to traverse the list of key information until all elements are processed. At this time, the list of key data points will contain all the created key data point instances.

[0115] In the embodiments of the present invention, by defining a data structure (including data point ID, name, longitude and latitude coordinates, and the type to which it belongs), key information is converted into a structured data format, facilitating storage, query, and management. The structured data storage method improves the readability and maintainability of the data, making subsequent data processing and analysis more efficient. Each key data point contains longitude and latitude coordinates, which can accurately represent a specific location in the gas supply network. The accurate location representation is helpful for subsequent spatial analysis, visual display, and integration with other geographical information. Traverse the list of preprocessed key information and create a new key data point instance for each piece of key information, making the data processing process more automated and efficient. Add the data point instances to the list of key data points for subsequent data operations such as querying, filtering, and statistics. The "type to which it belongs" field in the data structure helps classify and identify key data points, such as distinguishing main pipeline inlets, branch pipelines, industrial and commercial user gas consumption points, and residential user gas consumption areas. Type classification makes subsequent data analysis more targeted and enables specific processing and analysis based on different types of data points. Through a unified data structure and processing flow, the consistency and accuracy of key data points are ensured, avoiding data errors or omissions caused by inconsistent data formats or irregular processing flows.

[0116] In a preferred embodiment of the present invention, by calculating the relative position relationship between the coordinates of each key data point and the coordinates of each vertex of the decagon, each key data point is mapped onto the plane of the decagon, including:

[0117] Determine the coordinates of each vertex of the decagon, and convert the decagon vertex coordinates and the key data point coordinates to the same reference coordinate system, specifically including:

[0118] Define the vertices of the decagon. First, determine the shape and size of the decagon. Assume that the decagon is a regular decagon (i.e., all sides and angles are equal). A center point can be selected, and the coordinates of each vertex relative to the center point can be calculated. Polar coordinates or rectangular coordinates can be used to represent them.

[0119] Coordinate conversion. Assume that the center of the decagon is at the origin (0, 0) and the radius is R. Then the coordinates of the i-th vertex can be expressed as:

[0120] ;

[0121] Where, , where, .

[0122] For each key data point and each vertex of the decagon, calculate the vectors pointing from the vertices of the decagon to the key data point respectively. Taking one vertex of the decagon as the origin, calculate the included angles between the two side vectors formed by the vertex and its two adjacent vertices, and the vector formed by the vertex and the key data point. Specifically, it includes:

[0123] For each key data point and each vertex of the decagon , calculate the vector ;

[0124] For each vertex of the decagon , calculate its two adjacent vertices and to form the side vectors and . The vertex indices need to be processed cyclically, that is and ;

[0125] Use the vector dot product formula to calculate the included angle. For example, calculate the included angle and between , where:

[0126] ;

[0127] Among them, the dot product , the vector modulus .

[0128] Based on the calculated included angle and combined with the geometric shape of the decagon, judge the position of the key data point relative to the vertices of the decagon. Specifically, it includes: By comparing the magnitudes of the included angles, the position of the key data point relative to the vertices of the decagon can be determined. For example, if the included angle is less than a certain threshold (such as , that is, half of the interior angle of a regular decagon), then the key data point may be located in a certain area near that vertex; According to the included angle and the symmetry of the decagon, the plane can be divided into multiple regions, and each region corresponds to a vertex or an edge, which helps to calculate the relative coordinates of the key data point on the decagon plane later.

[0129] Calculate the distances from the key data point to each side of the decagon. Specifically, for each side, the distance formula from a point to a line can be used to calculate the distance from the key data point to that side. Assuming the two endpoints of the side are and , then the distance from the point to the side AB is:

[0130] .

[0131] Map each key data point onto the plane of the decagon according to the distances from the key data points to the sides of the decagon.

[0132] In an embodiment of the present invention, the vertex coordinates of the decagon and the coordinates of the key data points are converted into the same reference coordinate system, ensuring the consistency and comparability of all coordinate data. By calculating the vector pointing from the vertex of the decagon to the key data point and the angles between the vertex and the two side vectors formed by the adjacent two vertices, the positional relationship of the key data point relative to the vertex of the decagon can be accurately described. This accurate calculation of the positional relationship helps to more accurately understand the distribution of data points on the plane of the decagon; judging the position of the key data point by combining the geometric shape of the decagon makes full use of the symmetry and regularity of the decagon, making the position judgment more accurate and efficient. This geometric shape-based analysis method helps to reveal the spatial relationships and patterns between data points. By calculating the distances from the key data points to the sides of the decagon and the positions of the key data points relative to the vertices of the decagon, the relative coordinates of the key data points on the plane of the decagon can be calculated. The determination of such relative coordinates enables the data points to be visually displayed and analyzed on the plane of the decagon, facilitating the discovery of the spatial distribution laws and outliers of the data points. Mapping each key data point onto the plane of the decagon makes the spatial distribution of the data points more intuitive and easy to understand. This mapping method helps to quickly identify the clustering areas, sparse areas and possible outliers of the data points. The key data points mapped onto the plane of the decagon can support more complex spatial analyses, such as spatial clustering, spatial interpolation, spatial association analysis, etc. These analysis methods help to deeply mine the spatial characteristics and laws of the data points, providing strong support for practical applications such as the control of the difference between gas purchase and sales. Through the intuitive spatial display and accurate calculation of the positional relationship, decision-makers can more quickly understand the spatial distribution and characteristics of the data points, and thus make more accurate decisions. This decision-making method based on spatial analysis helps to improve the decision-making efficiency and quality.

[0133] In a preferred embodiment of the present invention, mapping each key data point onto the plane of the decagon according to the distances from the key data points to the sides of the decagon includes:

[0134] Determine a reference vertex according to the definition of relative coordinates , as the origin of the relative coordinates, specifically including: selecting a vertex from the vertex set of the decagon as the reference vertex , the selection can be arbitrary, but usually a vertex closer to the key data point or more convenient for calculation is selected to obtain the global coordinates of the reference vertex ;

[0135] Determine the reference edge. The reference edge is the edge connecting the reference vertex and an adjacent vertex, specifically including: finding the reference vertex An adjacent vertex of (determined according to the order or index of the vertices), record the reference edge coordinates of the two endpoints of and .

[0136] The direction of the reference edge is used as the x-axis direction of the local coordinate system, and the direction perpendicular to the reference edge and conforming to the clockwise rule is used as the y-axis direction. According to the x-axis direction and the y-axis direction, a local coordinate system is constructed, specifically including: calculating the vector of the reference edge ; the direction of the reference edge is the x-axis direction of the local coordinate system. The direction perpendicular to the reference edge and conforming to the clockwise rule is used as the y-axis direction, which can be obtained by rotating the unit vector in the x-axis direction by 90 degrees. Clockwise rotation means changing the vector to to .

[0137] According to the local coordinate system, calculate the vector in the direction of the reference edge and normalize it to obtain the unit vector in the x-axis direction; by rotating the unit vector in the x-axis direction by 90 degrees, obtain the unit vector in the y-axis direction, specifically including: calculating the modulus length of the reference edge vector ;

[0138] Normalize to obtain the unit vector in the x-axis direction;

[0139] Calculate the unit vector in the y-axis direction:

[0140] Rotate the unit vector in the x-axis direction by 90 degrees to obtain the unit vector in the y-axis direction (clockwise rotation).

[0141] Multiply the unit vector in the x-axis direction by the proportionality coefficient u to obtain the first translation vector, specifically including: calculating the perpendicular distance from the key data point to the reference edge, and the perpendicular distance from the key data point to the other edge adjacent to the reference edge; among them, the proportionality coefficient u is the ratio of the perpendicular distance from the key data point to the reference edge to the length of the reference edge; the proportionality coefficient v is the ratio of the perpendicular distance from the key data point to the other edge adjacent to the reference edge to the length of the adjacent edge; multiply the unit vector in the x-axis direction by the proportionality coefficient u to obtain the first translation vector .

[0142] Multiply the unit vector in the y-axis direction by the scale factor v to obtain a second translation vector, specifically including: multiplying the unit vector in the y-axis direction by the scale factor v to obtain a second translation vector .

[0143] Add the first translation vector and the second translation vector to the global coordinates of the reference vertex to obtain the global coordinates of the data point, specifically including:

[0144] Add the first translation vector and the second translation vector to the global coordinates of the reference vertex, and calculate to obtain the global coordinates of the data point ;

[0145] The specific calculation is:

[0146] ;

[0147] .

[0148] In the embodiments of the present invention, by constructing a local coordinate system, the complex global coordinate calculation is transformed into a simple local coordinate calculation. In the local coordinate system, only the position of the data point relative to the reference vertex needs to be considered, without considering the complex shape and position of the entire decagon. The use of normalized unit vectors makes the calculation more standardized and simplified, avoiding complex geometric transformations and coordinate conversions. By accurately calculating the vectors in the direction of the reference edge and the vectors perpendicular to the reference edge, and constructing a local coordinate system, the position of the data point relative to the decagon can be described more accurately. The introduction of the scale factors u and v makes the mapping process more flexible, and the position of the data point in the local coordinate system can be adjusted according to actual needs, thereby improving the mapping accuracy. This method is applicable to decagons of any shape and size. As long as the reference vertex and the reference edge can be determined, a local coordinate system can be constructed and mapping calculations can be performed. For key data points with different distributions and densities, this method is also applicable because the mapping process is based on the position of each data point relative to the reference vertex. The data points mapped onto the decagon plane can be more easily analyzed and visualized. For example, the distribution characteristics can be evaluated by calculating the distances from the data points to the sides of the decagon, or the data points can be displayed graphically through visualization tools. The construction of the local coordinate system also makes the relative position relationship of the data points more intuitive and easy to understand. Since the construction and calculation process of the local coordinate system is relatively simple, this method can improve the calculation efficiency, reduce the calculation time and resource consumption. For large-scale data point sets, this method can perform the mapping calculations of each data point in parallel, further improving the calculation efficiency.

[0149] In a preferred embodiment of the present invention, according to the distance of each key data point from the center of the decagon structure and the geometric properties of the decagon, the gas supply network is divided into multiple metering zones, including:

[0150] Calculate the average value of the coordinates of all vertices of the decagon to obtain the geometric center of the decagon, specifically including: obtaining the coordinates of all vertices of the decagon, and calculating the average value of the x coordinates and the average value of the y coordinates according to the coordinates of all vertices of the decagon; taking the average value of the x coordinates and the average value of the calculated y coordinates as the geometric center of the decagon.

[0151] For each key data point, calculate its distance from the geometric center of the decagon, specifically including: for each key data point, use the Euclidean distance formula to calculate the distance from the key data point to the geometric center.

[0152] According to the distance and the geometric properties of the decagon, determine the partition boundary, and traverse the distances of all key data points to the geometric center of the decagon to obtain the maximum value and the minimum value, specifically including: setting the maximum value and the minimum value , for the distance of each key data point , update the maximum value and the minimum value:

[0153] If , then ;

[0154] If , then .

[0155] According to the preset number of partitions N, divide the distance range into N equally spaced intervals, and each key data point falls into the corresponding distance interval according to its distance, specifically including:

[0156] Calculate the interval width, and the interval width ;

[0157] Determine the interval boundary. For each interval , its boundary is:

[0158] Lower bound: ;

[0159] Upper bound: ;

[0160] For each key data point, determine the interval it belongs to according to its distance .

[0161] Taking the center of the decagon as the origin, divide 360 degrees into N equal angular intervals. For each key data point, calculate its angle relative to the center of the decagon. Each key data point falls into the corresponding angular interval according to its angle, specifically including: for each key data point , calculate its angle relative to the geometric center : :

[0162] ;

[0163] Among them, the value returned by the function is in radians and needs to be converted to degrees:

[0164] ;

[0165] Divide the angular intervals, divide 360 degrees into N equal angular intervals, and the width of each interval is degrees; according to the calculated angle , determine the angular interval where each key data point is located.

[0166] For the key data points in each distance interval, distribute them into N angular intervals to form multiple measurement partitions.

[0167] In the embodiment of the present invention, by dividing the gas supply network into multiple measurement partitions, the gas flow and consumption in each partition can be measured and monitored more accurately. The key data points in each partition have similar distance and angle characteristics, which helps to reduce measurement errors and improve the accuracy of measurement; the measurement partitions help the gas company to allocate resources more reasonably, such as gas pipelines, valves, metering equipment, etc. According to the gas consumption in each partition, equipment maintenance and upgrade can be carried out more targeted, improving resource utilization efficiency; the measurement partitions make the management of the gas supply network more refined, helping to discover and solve problems in the network in a timely manner. By monitoring parameters such as gas flow and pressure in each partition, abnormal situations such as leaks and blockages can be discovered in a timely manner and corresponding measures can be taken for treatment; the measurement partitions help to reduce the safety risks of the gas supply network. By dividing the network into multiple independent partitions, the scope of influence of accidents can be limited and the impact on the surrounding areas can be reduced. At the same time, the gas flow and consumption in each partition can be monitored in real time, which helps to discover and handle potential safety hazards in a timely manner. The measurement partitions provide rich data resources for the gas company, which helps to conduct more in-depth data analysis and mining.

[0168] In a preferred embodiment of the present invention, for the key data points in each distance interval, distribute them into N angular intervals to form multiple measurement partitions, including:

[0169] Create a list of distance intervals containing N elements. Each element in the distance interval list represents a distance interval, initially initialized as an empty distance interval list, which is used to store the key data points falling within the distance interval. Specifically, determine the number of partitions N, and determine the minimum and maximum values of the distance range. These values should be calculated in the previous steps. Create a list of length N and initialize each element as an empty list to store the key data points falling within that distance interval.

[0170] Create an N×N matrix of angular intervals. Each element in the matrix of angular intervals represents a "distance - angle" combination interval, initially initialized as an empty matrix of angular intervals, which is used to store the key data points finally falling within the combination interval. For example, initialize each element as an empty list to store the key data points falling within that "distance - angle" combination interval.

[0171] Traverse all the key data points and assign them to the corresponding distance intervals according to their distances from the center of the decagon. For each key data point, calculate the index of the equidistant interval to which its distance belongs, and add the corresponding key data point to the distance interval matrix. For example, for each key data point, calculate its Euclidean distance from the center of the decagon and calculate the index of the equidistant interval to which this distance belongs :

[0172] ;

[0173] where is the width of each distance interval, denotes floor function; ensure that the index is within the valid range (0 ≤ < N). If is out of range, decide how to handle it according to the requirements (such as assigning it to the closest interval or ignoring it), and add the index of the key data point to the corresponding distance interval list; traverse all the key data points again (or combine with the traversal in the previous step to calculate the angle while calculating the distance); for each key data point, calculate its angle relative to the center of the decagon , using the arctangent function and considering the quadrant:

[0174] ;

[0175] where and are the horizontal and vertical coordinates of the key data point respectively, and are the coordinates of the center of the decagon; calculate the index of the equiangular interval to which this angle belongs , specifically including:

[0176] First, normalize the angle to the range [0, 2π) (if it is negative, add 2π); then, calculate the index:

[0177] ;

[0178] Use the previously calculated distance interval index and angle interval index , and add the index of the key data point to the list of "distance - angle" combination intervals corresponding to the "distance - angle" combination interval in the angle interval matrix; after the above steps, the angle interval matrix has been constructed, and each element contains all the key data point indices that fall into the corresponding "distance - angle" combination interval.

[0179] Traverse the angle interval matrix, and assign a unique partition number to each combination interval to form multiple metering partitions of "distance - angle" combinations, specifically including: create a variable partition_id with an initial value of 0 for assigning unique partition numbers; for each "distance - angle" combination interval, if it is not empty, assign a unique partition number and store or print the number and its corresponding key data points.

[0180] In the embodiment of the present invention, by allocating key data points to specific "distance - angle" combination intervals, the gas flow and consumption in each partition can be understood more precisely. This refined division helps to reduce metering errors and improve metering accuracy. The metering partitions help the gas company to allocate resources more reasonably, such as gas pipelines, valves, metering equipment, etc. Allocating resources according to the actual needs of each partition can improve resource utilization efficiency and avoid resource waste. By dividing the network into multiple metering partitions, the gas company can monitor and manage the network more effectively. The key data points in each partition have similar geometric characteristics, which makes it easier to locate and solve network problems. At the same time, by monitoring parameters such as gas flow and pressure in each partition, abnormal situations can be detected in a timely manner and corresponding measures can be taken. The metering partitions help to reduce the safety risks of the gas supply network. By dividing the network into multiple independent partitions, the scope of influence of accidents can be limited, and the impact of accidents on surrounding areas can be reduced. In addition, by monitoring the gas flow and consumption in each partition in real time, potential safety hazards can be detected in a timely manner and measures can be taken for prevention. The metering partitions provide rich data resources for the gas company, which helps to conduct more in - depth data analysis and mining. By analyzing data such as gas consumption and user behavior in each partition, the company can formulate more reasonable marketing strategies, price policies, etc., providing support for decision - making. This method can be flexibly adjusted according to the actual gas supply network structure and requirements. Whether it is the shape, size of the decagon or the number of partitions N, it can be adjusted and optimized according to the actual situation.

[0181] In a preferred embodiment of the present invention, the total input gas volume and the purchase and sale difference of the output gas volume in each metering zone are calculated in real time, including:

[0182] Based on historical gas consumption data and user number data, calculate the estimated gas consumption of residential users in each metering zone;

[0183] For each metering zone, the input gas volume values of all flow meters within a specified time window are summarized in real time. Specifically, it includes: uploading the input gas volume data of all flow meters to the central database at set time intervals (such as every minute, every hour), marking the time stamps of the flow meter data to ensure that the data is stored classified by time window (such as 1 hour, 1 day), checking the integrity of the flow meter data, removing or correcting abnormal values (such as sudden increase or decrease in flow rate), performing interpolation processing on missing data to ensure the continuity of data within the time window, grouping and summarizing the flow meter data according to the specified time window (such as 8:00 - 9:00 every day), calculating the total input gas volume value of all flow meters within each time window, and summarizing the total input gas volume values of each flow meter by the metering zone to obtain the total input gas volume of each zone.

[0184] For each metering zone, the gas consumption values of all industrial and commercial users within a specified time window are summarized in real time, and the estimated gas consumption values of residential users in the corresponding metering zone within the same time window are obtained. Specifically, it includes: marking the time stamps of the industrial and commercial gas consumption data to ensure that the data is stored classified by time window, checking the integrity of the industrial and commercial gas consumption data, removing or correcting abnormal values (such as abnormal fluctuations caused by equipment failures), grouping and summarizing the gas consumption data of industrial and commercial users according to the specified time window (such as 8:00 - 9:00 every day), calculating the total gas consumption value of all industrial and commercial users within each time window, and extracting the estimated gas consumption value of residential users corresponding to the current time window to make the time window of the estimated gas consumption of residential users consistent with the time window of the industrial and commercial gas consumption data.

[0185] Fuse the gas consumption values of all industrial and commercial users within a specified time window and the estimated gas consumption values of all residential users to obtain the output gas volume value. Specifically, it includes:

[0186] Completely align the time windows and metering zones of the industrial and commercial gas consumption and the estimated gas consumption of residential users. According to the metering zone and time window, the industrial and commercial gas consumption can be directly added to the estimated gas consumption of residential users to obtain the output gas volume value of each zone. The output result includes the zone identifier, time window, and the corresponding output gas volume value.

[0187] In the embodiments of the present invention, by real-time summarizing the input gas volume values of all flow meters in the metering area within a specified time window, the actual input gas volume of the area can be accurately grasped. Based on historical gas consumption data and user quantity data, the gas consumption of residential users is estimated, which can more accurately reflect the actual gas consumption of residential users, reduce the estimation error, fuse the gas consumption values of industrial and commercial users and residential users to obtain a more comprehensive output gas volume value, improve the accuracy of metering, and calculate the difference between the total input gas volume and the output gas volume for purchase and sale in real time, which helps the gas company to timely understand the supply-demand balance situation of each metering area. When it is found that the input gas volume of a certain area is much larger or smaller than the output gas volume, the gas supply strategy can be adjusted in time to avoid the occurrence of insufficient or excessive gas supply; by accurately grasping the gas consumption situation of each metering area, the gas company can more reasonably allocate gas resources to ensure that each area can obtain sufficient gas supply. For areas with large gas consumption, gas supply preparations can be made in advance to avoid the occurrence of gas supply interruption or insufficiency. Real-time calculation and analysis of the gas consumption data of each metering area help the gas company to timely discover and solve problems in operation. For example, when it is found that the reading of the flow meter in a certain area is abnormal, it can be repaired or replaced in time to ensure the accuracy of metering. Accurate gas volume data provides strong support for the decision-making of the gas company. For example, in formulating gas supply plans, adjusting gas prices, optimizing pipe network layouts, etc., decisions can be made based on accurate gas volume data to improve the scientificity and rationality of decision-making.

[0188] In a preferred embodiment of the present invention, based on historical gas consumption data and user quantity data, calculating the estimated gas consumption of residential users in each metering area includes:

[0189] Calculating the total gas consumption of all residential users in multiple past time periods and accumulating it to obtain the historical total gas consumption, and calculating the total number of residential users in the same time period, specifically including:

[0190] Collecting the gas consumption data of all residential users in multiple past time periods (such as monthly, quarterly or annually), collecting the residential user quantity data in the same time period, recording the total number of users in each period (such as the number of users at the end of each month), checking whether there are missing values or abnormal values (such as negative values, sudden increases or decreases) in the gas consumption data, ensuring data integrity by interpolation or eliminating abnormal data, verifying that the timestamps of the user quantity data are consistent with the gas consumption data to avoid time misalignment, adding up the gas consumption of residential users in all time periods to obtain the historical total gas consumption (such as the total gas consumption in the past 12 months), and adding up the number of residential users in the same time period to obtain the total number of residential users (such as the total number of users in the past 12 months).

[0191] Calculate the average gas consumption per household in historical data based on the ratio of the total historical gas consumption to the total number of residential users. Specifically, it includes: divide the total historical gas consumption by the total number of residential users according to the calculated total historical gas consumption and the total number of residential users to obtain the average gas consumption per household in historical data (such as the average monthly gas consumption per person); check whether the average gas consumption is within a reasonable range (such as consistent with the historical data trend), avoid outliers caused by data errors, and store the average gas consumption as an intermediate result for subsequent steps.

[0192] Use the actual number of residential users in the current metering area as the estimation base, specifically including:

[0193] Extract the actual number of residential users in the current metering area from the user management system or household registration data to ensure that the data is the latest value (such as the number of users at the current date or a specified time point), verify the accuracy of the user number data, and avoid double counting or omission.

[0194] Calculate the product of the actual number of residential users and the historical average gas consumption per household to obtain the basic estimation value;

[0195] Fuse the basic estimation value with the time window proportionality coefficient to obtain the estimated gas consumption of residential users within the current time window. Specifically, it includes: multiply the actual number of residential users by the average gas consumption according to the calculated average gas consumption and the actual number of residential users to obtain the basic estimation value (such as the estimated total gas consumption of residential users in the current area), check whether the basic estimation value is reasonable (such as compared with historical data of the same period), and avoid deviations caused by data errors; determine the proportionality coefficient according to the gas consumption characteristics of the current time window (such as weekdays, weekends, seasons), and multiply the basic estimation value by the time window proportionality coefficient to obtain the estimated gas consumption of residential users within the current time window; among them, the proportionality coefficient The calculation formula is:

[0196] ;

[0197] Among them, ; represents the weight coefficient, and the specific value is 0.4; represents the average gas consumption of the same type of date (weekday / weekend / holiday) in historical data; represents the benchmark gas consumption (historical average value of the same period in the past three years); the gas consumption on weekdays is slightly higher than the benchmark. Therefore, On weekends, due to the increase in family activities, ; on holidays, due to the need for reunion cooking, the coefficient is the highest ; represents the weight coefficient, and the specific value is 0.3;

[0198] ;

[0199] Among them, represents the average gas consumption in the same historical time period. The gas consumption is the lowest in the early morning period. Therefore, ; The morning / evening peak corresponds to the peak demand for cooking and heating ; The flat peak period is the reference value ; represents the weight coefficient, and the specific value is 0.3;

[0200] ;

[0201] Among them, when it is winter, the heating demand surges ; When it is summer, the cooking demand decreases ; When it is in the transition season, there is no extreme temperature demand .

[0202] In a preferred embodiment of the present invention, when the purchase and sale difference exceeds a preset threshold, an abnormal alarm signal can be generated, including:

[0203] Set the warning threshold and alarm threshold of the purchase and sale difference. The warning threshold is used to prompt potential abnormalities (such as the purchase and sale difference exceeding 80% of the normal range); the alarm threshold is used to trigger an abnormal alarm (such as the purchase and sale difference exceeding 100% of the normal range). For example, set the alarm threshold to ±500 cubic meters (that is, when the absolute value of the purchase and sale difference exceeds 500 cubic meters, an alarm is triggered).

[0204] Compare the purchase and sale difference of each time window with the threshold:

[0205] If |purchase and sale difference| > alarm threshold, it is determined as abnormal and an alarm signal is generated.

[0206] If |purchase and sale difference| ≤ alarm threshold and |purchase and sale difference| > warning threshold, a warning signal is generated. For example, purchase and sale difference = 600 cubic meters, alarm threshold = 500 cubic meters → trigger alarm;

[0207] Purchase and sale difference = 400 cubic meters, warning threshold = 300 cubic meters → trigger warning (if the warning function is enabled).

[0208] When the purchase and sale difference exceeds the alarm threshold, an abnormal alarm signal is generated, including the following information:

[0209] Time window (such as "2023-10-01 10:00-11:00");

[0210] Purchase and sale difference (such as "+600 cubic meters");

[0211] Alarm level (such as "high" or "urgent"), and output the alarm signal to the following channels:

[0212] Push it to the monitoring big screen or the alarm management interface in real time, and notify relevant personnel by means such as SMS, email, and APP push.

[0213] In the embodiments of the present invention, by accumulating the total gas consumption and the total number of residential users in multiple past time periods, the long-term trend and periodic law of residential gas use can be more comprehensively reflected, and the estimation deviation caused by short-term fluctuations can be avoided. Calculate the average gas consumption of each household in historical data, and combine it with the current actual number of residential users to make the estimated value closer to the actual gas use demand and improve the accuracy of the estimation. Based on the estimated gas consumption of residential users in the metering area, the gas company can formulate differentiated gas supply plans for different regions, optimize the regulation of pipeline network pressure and the scheduling of gas storage facilities, improve the resource utilization efficiency, and by identifying high gas consumption areas and potential growth areas, plan the expansion or renovation of infrastructure in advance to avoid gas supply shortages or surpluses. Introduce a time window proportionality coefficient to enable the estimated value to flexibly adapt to gas use fluctuations in different time periods (such as seasons, weekdays / weekends), improve the timeliness and adaptability of the estimation, and when there is a peak gas use period or sudden demand changes, the estimated value can be quickly adjusted. Accurate gas consumption estimation can reduce customer complaints or production interruptions of industrial users caused by insufficient gas supply, reduce service costs and reputation risks, and by avoiding excessive gas supply, reduce gas waste and pipeline network losses, and reduce operating costs and environmental impacts. The analysis of historical gas use data and the number of users provides market insights for the gas company, helps identify user behavior patterns (such as energy-saving trends, new user growth), provides a basis for long-term strategic planning, and the estimation results can be used as input parameters for more complex models (such as load forecasting, price elasticity analysis) to further improve the scientificity of decision-making. Precise gas consumption estimation helps optimize bill calculation, reduce fee disputes caused by estimation errors, and improve user satisfaction.

[0214] A zoned metering method for gas purchase and sales difference control, the method comprising:

[0215] Collect key information of the gas supply network, where the key information includes information on the main pipeline inlet, branch pipelines, industrial and commercial user gas use points, and residential user gas use areas;

[0216] Project the key information into corresponding key data points, and each key data point represents a specific location in the gas supply network, including its longitude and latitude coordinates;

[0217] By calculating the relative position relationship between the coordinates of each key data point and the coordinates of each vertex of the decagon, map each key data point onto the plane of the decagon;

[0218] Divide the gas supply network into multiple metering areas according to the distance of each key data point from the center of the decagon structure and the geometric characteristics of the decagon;

[0219] Calculate the total input gas volume and the sales and purchase difference of the output gas volume in each metering area in real time;

[0220] Generate an abnormal alarm signal when the sales and purchase difference exceeds a preset threshold.

[0221] An embodiment of the present invention also provides a computing device, including: a processor and a memory storing a computer program. When the computer program is run by the processor, it executes the system described above. All implementation manners in the above system embodiment are applicable to this embodiment and can also achieve the same technical effects.

[0222] An embodiment of the present invention also provides a computer-readable storage medium storing instructions. When the instructions are run on a computer, the computer is made to execute the system described above. All implementation manners in the above system embodiment are applicable to this embodiment and can also achieve the same technical effects.

[0223] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A zone metering system for gas purchase and sales difference control, characterized in that: include: The acquisition module is used to collect key information of the gas supply network, including the main pipeline entrance, branch pipelines, industrial and commercial users' gas points and residential users' gas use areas; A conversion module, used to project the key information into corresponding key data points, each of which represents a specific location in the gas supply network, including its longitude and latitude coordinates; A mapping module, used for mapping each key data point onto the plane of the decagon by calculating the relative position relationship between the coordinates of each key data point and the coordinates of each vertex of the decagon; A partitioning module is used to divide the gas supply network into multiple metering partitions according to the distance of each key data point from the center of the decagonal structure and the geometric characteristics of the decagon, including: calculating the average value of the coordinates of all vertices of the decagon to obtain the geometric center of the decagon; for each key data point, calculating its distance to the geometric center of the decagon; determining the partition boundary according to the distance and the geometric characteristics of the decagon; traversing the distances of all key data points to the geometric center of the decagon to obtain the maximum and minimum values; according to the preset number of partitions N, dividing the distance range into N equidistant intervals, and each key data point falls into a corresponding distance interval according to its distance; taking the center of the decagon as the origin, dividing 360 degrees into N equiangular intervals, and for each key data point, calculating its angle relative to the center of the decagon, and each key data point falls into a corresponding angle interval according to its angle; for each key data point in each distance interval, allocating it to N angle intervals to form multiple metering partitions; The data processing module is used to calculate the total value of the input gas volume and the purchase and sales difference of the output gas volume of each metering zone in real time; The analysis alarm module is used to generate an abnormal alarm signal when the purchase and sales difference exceeds a preset threshold.

2. The zoned metering system for gas purchase and sales difference control according to claim 1 is characterized in that: Project the key information into corresponding key data points. Each key data point represents a specific location in the gas supply network, including its longitude and latitude coordinates, including: Define a data structure to represent key data points. The data structure includes: data point ID, name, longitude and latitude coordinates, and type; Traverse the preprocessed key information list, create a new key data point instance for each key information, and fill the coordinates in the key information into the data point instance; Adds a data point instance to the list of key data points.

3. The zoned metering system for gas purchase and sales difference control according to claim 2 is characterized in that: By calculating the relative position relationship between the coordinates of each key data point and the coordinates of each vertex of the decagon, each key data point is mapped to the plane of the decagon, including: Determine the coordinates of each vertex of the decagon, and transform the coordinates of the decagon vertex and the coordinates of the key data points into the same reference coordinate system; For each key data point and each vertex of the decagon, respectively calculate the vector pointing from the vertex of the decagon to the key data point, take one vertex of the decagon as the origin, calculate the two edge vectors formed by the vertex and the two adjacent vertices, and the angle between the vector formed by the vertex and the key data point; Based on the calculated angle and the geometric shape of the decagon, the position of the key data point relative to the vertex of the decagon is determined; Calculate the distance from the key data points to each side of the decagon; Each key data point is mapped onto the plane of the decagon according to the distance from the key data point to each side of the decagon.

4. The zoned metering system for gas purchase and sales difference control according to claim 3 is characterized in that: Map each key data point to the plane of the decagon according to the distance from the key data point to each side of the decagon, including: According to the definition of relative coordinates, determine the reference vertex as the origin of the relative coordinates; Determine the reference edge, which is the edge connecting the reference vertex and one of its adjacent vertices; The direction of the reference edge is taken as the x-axis direction of the local coordinate system, and the direction perpendicular to the reference edge and conforming to the clockwise rule is taken as the y-axis direction. Based on the x-axis direction and the y-axis direction, a local coordinate system is constructed; According to the local coordinate system, the vector in the direction of the reference edge is calculated and normalized to obtain the unit vector in the x-axis direction; the unit vector in the y-axis direction is obtained by rotating the unit vector in the x-axis direction 90 degrees; Multiply the unit vector in the x-axis direction by the proportional coefficient u to obtain the first movement vector; Multiply the unit vector in the y-axis direction by the proportional coefficient v to obtain the second movement vector; The first motion vector and the second motion vector are added to the global coordinates of the reference vertex to obtain the global coordinates of the data point.

5. The zoned metering system for gas purchase and sales difference control according to claim 4 is characterized in that: For key data points in each distance interval, they are allocated to N angle intervals to form multiple measurement partitions, including: Create a distance interval list containing N elements. Each element in the distance interval list represents a distance interval. It is initialized as an empty distance interval list to store key data points that fall into the distance interval. Create an N×N angle interval matrix. Each element in the angle interval matrix represents a "distance-angle" combination interval. The angle interval matrix is ​​initialized to an empty matrix to store the key data points that eventually fall into the combination interval. Traverse all key data points and assign them to the corresponding distance intervals according to their distance to the center of the decagon. For each key data point, calculate the equidistant interval index to which its distance belongs and add the corresponding key data point to the distance interval matrix. Each element in the angle interval matrix is ​​a "distance-angle" combination interval, which contains all key data points falling into the interval; The angle interval matrix is ​​traversed, and a unique partition number is assigned to each combined interval to form multiple "distance-angle" combined measurement partitions.

6. The zoned metering system for gas purchase and sales difference control according to claim 5 is characterized in that: Real-time calculation of the total value of input gas volume and the difference between output gas volume purchase and sales in each metering zone, including: Calculate the estimated gas consumption of residential users in each metering zone based on historical gas consumption data and user quantity data; For each metering zone, the input gas volume values ​​of all flow meters in the metering zone within the specified time window are summarized in real time; For each metering zone, the gas consumption values ​​of all industrial and commercial users in the metering zone within the specified time window are summarized in real time, and the estimated gas consumption values ​​of residential users in the corresponding metering zone within the same time window are obtained; The gas consumption values ​​of all industrial and commercial users within a specified time window are merged with the estimated gas consumption values ​​of all residential users to obtain the output gas consumption value.

7. The zoned metering system for gas purchase and sales difference control according to claim 6 is characterized in that: Based on historical gas consumption data and user quantity data, the estimated gas consumption of residential users in each metering zone is calculated, including: Calculate the total gas consumption of all residential users in the past multiple time periods, and add them up to obtain the total historical gas consumption, and calculate the total number of residential users in the same time period; According to the ratio of the total historical gas consumption to the total number of residential users, the average gas consumption of each household in the historical data is calculated; The actual number of residential users within the current metering area is used as the basis for estimation; Calculate the product of the actual number of residential users and the historical average gas consumption per household to obtain a basic estimate; The basic estimated value is combined with the time window proportional coefficient to obtain the estimated gas consumption of residential users in the current time window.

8. A zone metering method for gas purchase and sales difference control, characterized in that: The method is used to execute the system according to any one of claims 1 to 7, and the method comprises: Collect key information of the gas supply network, including the main pipeline entrance, branch pipelines, industrial and commercial users' gas points and residential users' gas use areas; Project the key information into corresponding key data points, each of which represents a specific location in the gas supply network and includes its longitude and latitude coordinates; By calculating the relative position relationship between the coordinates of each key data point and the coordinates of each vertex of the decagon, each key data point is mapped onto the plane of the decagon; The gas supply network is divided into a plurality of metering zones according to the distance of each key data point from the center of the decagonal structure and the geometric characteristics of the decagon; Real-time calculation of the total value of input gas volume and the difference between the purchase and sales of output gas volume in each metering zone; When the purchase and sales difference exceeds the preset threshold, an abnormal alarm signal is generated.

9. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the system according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A Robust Method for Distributed Traffic Subarea Division

    AU2020101943A4

  • Management method and system for partition metering DMA (Direct Memory Access)

    CN117094528A