Partition metering system for gas purchase and sale difference management and control
By collecting and mapping key information of the gas supply network into the decagonal plane in the partition metering system, the problem of unreasonable partition division in the prior art is solved, and more accurate reflection of gas supply and demand conditions and purchasing and sales differences is achieved.
Patent Information
- Application Number
- CN202510404998.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-02
AI Technical Summary
The existing zoning measurement system lacks scientific basis when dividing metering partitions, resulting in unreasonable zoning divisions and inability to accurately reflect the supply and demand conditions of gas, which in turn affects the accurate identification and control of gas purchase and sales differences.
By collecting key information from the gas supply network, converting it into key data points, and by calculating the relative positional relationship between these data points and the coordinates of the decilateral vertex, mapping them onto the decilateral plane, dividing multiple metrological partitions according to distance and geometric characteristics, calculating the purchase and sales difference in real time and generating abnormal alarm signals.
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 poor situation, and improve the control efficiency and accuracy of the purchase and sales poor of gas.
Smart Images

Figure CN119919169A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a zone metering system for gas purchase and sales difference management and control. Background Art
[0002] With the rapid development of information technology, zone metering technology has gradually become an important means of controlling the difference between gas purchase and sales. By dividing the gas supply network into multiple metering zones and monitoring the difference between purchase and sales in each zone in real time, problems can be discovered and located in a timely manner, thus improving the efficiency of control. However, the existing zone metering system has the following defects: For example, some traditional schemes rely on experience or simple geographical divisions when dividing metering zones, such as divisions based on administrative divisions, road directions or natural terrain. This division method lacks scientific basis and does not fully consider the complexity of the gas supply network and the actual gas consumption of each zone. Due to the lack of scientific analysis, the zoning 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.
[0003] For example, some areas may contain multiple large gas users or complex pipeline networks, but traditional solutions may divide them into a single zone, which cannot accurately reflect the gas consumption characteristics and purchase and sales differences in the area. Due to unreasonable zoning, traditional solutions may cause the purchase and sales differences in some zones to be too large, while the purchase and sales differences in some zones are too small. 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
[0004] The technical problem to be solved by the present invention is to provide a zoned metering system for gas purchase and sales difference management and control, which can more accurately reflect the actual situation of the gas supply network and the purchase and sales difference situation.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows: In a first aspect, a zone metering system for gas purchase and sales difference control includes: 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 for projecting 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, 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; 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.
[0006] Furthermore, the key information is projected into corresponding key data points, each of which represents a specific location in the gas supply network, including its latitude and longitude 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.
[0007] Furthermore, by calculating the relative positional 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: 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.
[0008] Furthermore, 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, 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.
[0009] Furthermore, according to the distance of each key data point from the center of the decagonal structure and the geometric characteristics of the decagon, the gas supply network is divided into multiple metering zones, including: Calculate the average value of all vertex coordinates of the decagon to obtain the geometric center of the decagon; For each key data point, calculate its distance to the geometric center of the decagon; Determine the partition boundaries based on distance and decagonal geometric properties; Traverse the distances from 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, 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; Taking the center of the decagon as the origin, divide 360 degrees into N equal angle intervals. For each key data point, calculate its angle relative to the center of the decagon. Each key data point falls into the corresponding angle interval according to its angle. For key data points within each distance interval, they are allocated to N angle intervals to form multiple measurement partitions.
[0010] Furthermore, for each key data point in the distance interval, it is 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 the 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.
[0011] Furthermore, the total value of the input gas volume and the purchase and sales difference of the output gas volume of each metering zone are calculated in real time, 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.
[0012] Furthermore, 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.
[0013] In a second aspect, a zone metering method for gas purchase and sales difference control is provided, the method comprising: 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.
[0014] According to a third aspect, a computing device includes: one or more processors; The storage device is used to store 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.
[0015] In a fourth aspect, a computer-readable storage medium stores a program, and the program implements the system when executed by a processor.
[0016] The above solution of the present invention includes at least the following beneficial effects: Through the acquisition module, the system can comprehensively and accurately obtain key information of the gas supply network, including information on the main pipeline entrance, branch pipelines, gas usage points for industrial and commercial users, and gas usage areas for residential users. The conversion module projects this key information into corresponding key data points, each of which contains precise latitude and longitude coordinates.
[0017] The mapping module calculates the relative position relationship between each key data point and the coordinates of each vertex of the decagon, maps each data point to the plane of the decagon, and realizes the visualization and spatialization of the data. The partitioning module divides the gas supply network into multiple metering partitions 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.
[0018] The data processing module can calculate in real time the total value of input gas volume and the purchase and sales difference of output gas volume of each metering zone. The output gas volume value is the sum of the real-time collected gas volume of industrial and commercial users and the estimated gas volume of residential users. This enables enterprises to understand the purchase and sales difference of each zone in a timely manner.
[0019] The analysis alarm module generates an abnormal alarm signal based on the purchase and sales difference when the purchase and sales difference exceeds the preset threshold. This helps companies to promptly detect and deal with potential leaks, metering errors or illegal gas thefts and prevent losses from expanding.
[0020] The system improves the efficiency and accuracy of gas purchase and sales difference management and control through precise data collection, scientific zoning, real-time purchase and sales difference monitoring and effective abnormal alarm mechanism. Enterprises can locate problem areas more accurately, take targeted management and control measures, reduce purchase and sales difference and improve operational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic diagram of a zone metering system for gas purchase and sales difference management and control provided by an embodiment of the present invention.
[0022] Figure 2 It is a flow chart of a zone metering method for gas purchase and sales difference control provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The 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 accompanying 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 to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0024] like Figure 1 As shown, an embodiment of the present invention provides a zone metering system for gas purchase and sales difference control, including: 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 for projecting 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, 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; 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.
[0025] In the embodiment of the present invention, by collecting key information of the gas supply network, including information on the main pipeline entrance, branch pipelines, gas points for industrial and commercial users, and gas use areas for residential users, the system can fully grasp the layout and gas use of the gas supply network. The key information is projected into corresponding key data points, each of which contains precise latitude and longitude coordinates, to achieve spatial representation of the data. Spatialized data points are more convenient for spatial analysis and visualization, which helps to more intuitively understand the distribution and gas use of the gas supply network.
[0026] By calculating the relative positional relationship between the coordinates of each key data point and the coordinates of each vertex of the decagon, each data point is mapped to the plane of the decagon, achieving scientific mapping of data. After mapping to the decagonal plane, all data points are in a unified coordinate system, which is convenient for subsequent partitioning and data analysis. According to the distance of each key data point from the center of the decagonal structure and the geometric characteristics of the decagon, the gas supply network is divided into multiple metering partitions. The partitioning method is more reasonable. Reasonable partitioning helps enterprises to more clearly understand the gas usage and purchase and sales difference of each partition, which is convenient for targeted management and optimization.
[0027] The total value of input gas volume and the difference between output gas volume purchase and sales of each metering zone are calculated in real time to ensure the timeliness and accuracy of 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 of each zone. According to the difference between purchase and sales, when the difference between purchase and sales exceeds the preset threshold, an abnormal alarm signal is generated, which helps enterprises to timely discover and deal with potential leakage and metering errors. Timely abnormal alarms can reduce safety hazards, prevent losses from expanding, and improve the safety and stability of the gas supply network.
[0028] The collection module is the basis of the zoned metering system for gas purchase and sales difference control. It is responsible for comprehensively and accurately collecting key information of the gas supply network. The following is the specific implementation process of the collection module: Determine the collection scope: Determine the scope of the gas supply network that needs to be collected, including the main pipeline entrance, branch pipelines, gas consumption points for industrial and commercial users, and gas consumption areas for residential users.
[0029] Select the collection method: On-site investigation: Through field visits and measurements, obtain the specific location, diameter, length and other information of the main pipeline inlet and branch pipeline.
[0030] User survey: Questionnaires are distributed to industrial and commercial users and residential users or interviews are conducted to understand their gas usage, gas equipment, gas usage habits, etc.
[0031] Data interface connection: connect with the gas company's SCADA system, user management system, etc. to obtain real-time gas usage data, user information, etc.
[0032] Data collation and entry: The collected data shall be sorted out to remove duplicate, erroneous or invalid data, and the sorted data shall be entered into the database of the district metering system to provide a basis for subsequent data processing and analysis. The collected data shall be verified regularly to ensure the accuracy and completeness of the data, and the collected data shall be updated in a timely manner according to changes in the gas supply network and changes in users' gas usage.
[0033] For example, a city gas company is responsible for the city's gas supply. Its gas supply network includes multiple main pipeline entrances, branch pipelines, and a large number of industrial and commercial users and residential users. In order to strengthen the control of gas purchase and sales, the company decided to introduce a zone metering system and first collect key information.
[0034] Collection process: The gas company organized professionals to conduct on-site surveys of the gas supply network. They used GPS locators, rangefinders and other equipment to obtain the specific location, diameter, length and other information of the main pipeline entrance and branch pipelines. At the same time, they conducted pressure tests on some pipelines to ensure their safety and stability. They distributed questionnaires to industrial and commercial users and residential users to understand their gas usage, gas equipment, gas usage habits, etc. They conducted on-site interviews with some users to gain an in-depth understanding of their gas needs and existing problems. They connected with the gas company's SCADA system, user management system, etc. to obtain real-time gas usage data, user information, etc. Through the data interface, they realized automatic data collection and updating, improved the efficiency and accuracy of data collection, sorted the collected data, removed duplicate, erroneous or invalid data, and entered the sorted data into the database of the district metering system, providing a basis for subsequent data processing and analysis.
[0035] Through the work of the acquisition module, the gas company successfully obtained key information of the gas supply network, including the specific location, diameter, length and other information of the main pipeline entrance and branch pipelines, as well as the gas usage, gas equipment, and gas usage habits of industrial and commercial users and residential users. This information provides a solid foundation for subsequent zoning, data processing and analysis. Based on the key information collected, the gas company successfully built a zoning metering system and achieved precise control of the gas purchase and sales difference. By calculating the total value of the input gas volume and the output gas purchase and sales difference of each metering zone in real time, the system can promptly detect and deal with potential leaks, metering errors or illegal gas theft, reducing the purchase and sales difference and improving operational efficiency.
[0036] The zoning metering system that uses a decagon to control the difference between gas purchase and sales is mainly based on geometric characteristics and the convenience of zoning management. The following is a detailed explanation of the reasons for using the decagon, and a specific case is used to illustrate its application.
[0037] Among them, the reasons for using a decagon are: Geometric properties: Symmetry: The decagon has a high degree of symmetry, which helps to achieve a more balanced division when partitioning, making the area and shape of each metering partition relatively close, thus facilitating management and comparison.
[0038] The number of vertices, a decagon has 10 vertices, which provides more partition boundary points, making the partition more refined and flexible.
[0039] Convenience of partition management: Easy to divide: By calculating the distance of each key data point from the center of the decagonal structure and utilizing the geometric properties of the decagon, the gas supply network can be conveniently divided into multiple metering zones.
[0040] To facilitate monitoring, each metering zone can be used as an independent monitoring unit. By calculating the total value of input gas volume and the purchase and sales difference of output gas volume in real time, abnormal purchase and sales difference can be discovered and handled in time.
[0041] Adapting to complex networks: Flexibility: The decagonal structure can adapt to complex gas supply networks. Whether it is the main pipeline inlet, branch pipeline, industrial and commercial user gas point or residential user gas area, it can be projected and mapped onto the decagonal plane for zone management.
[0042] Scalability: As the gas supply network expands or changes, the decagonal zone metering system can be easily adjusted and expanded.
[0043] In a preferred embodiment of the present invention, the key information is projected into corresponding key data points, each of which 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 contains: data point ID, name, longitude and latitude coordinates, and type. Specifically, determine the data structure attributes. In this example, the data point ID, name, longitude and latitude coordinates, and type need to be included; based on the determined attributes, design a data structure to store this information. This can be a class (in object-oriented programming) or a structure (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 longitude and latitude coordinates can be a floating point number, and the type can be a string or an enumeration type; implement this data structure based on the design. If it is a class, you need to define the class attributes and methods; if it is a dictionary or tuple, directly define its structure.
[0044] Traverse the preprocessed key information list, for each key information, create a new key data point instance, and fill the coordinates in the key information into the data point instance, specifically including: obtain the preprocessed key information list, which may come from a file, database or other data source; use an appropriate traversal method (such as a for loop) to traverse the list, and in the traversal process, each iteration will process an element in the list, and in each iteration, access the attributes of the current element (i.e., a key information). These attributes may exist in the form of a dictionary key-value pair, or as an object attribute; in the traversal process, for each key information, create a new key data point instance, fill the attributes in the key information into the newly created key data point instance, especially, fill the latitude and longitude coordinates into the corresponding attributes of the instance, in addition to the coordinates, other attributes (such as data point ID, name and type) also need to be filled into the instance.
[0045] Adding data point instances to the key data point list includes: before the traversal begins, initializing an empty list to store key data point instances, adding this instance to the previously initialized list each time a new key data point instance is created and filled, and continuing to traverse the key information list until all elements are processed. At this time, the key data point list will contain all created key data point instances.
[0046] In the embodiment of the present invention, by defining a data structure (including data point ID, name, latitude and longitude coordinates and belonging type), key information is converted into a structured data format, which is convenient for 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, visualization and integration with other geographic information. The pre-processed key information list is traversed, and a new key data point instance is created for each key information, so that the data processing process is more automated and efficient. The data point instance is added to the key data point list, which is convenient for subsequent data operations, such as query, screening and statistics. The "belonging type" field in the data structure helps to classify and identify key data points, such as distinguishing the main pipeline entrance, branch pipeline, industrial and commercial user gas point and residential user gas use area. The type classification makes the subsequent data analysis more targeted, and can perform specific processing and analysis according to 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 non-standard processing flows.
[0047] In a preferred embodiment of the present invention, each key data point is mapped 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, including: Determine the coordinates of each vertex of the decagon and transform the coordinates of the decagon vertices and the key data points into the same reference coordinate system, including: Define the vertices of the decagon. First, determine the shape and size of the decagon. Assume that the decagon is a regular decagon (that is, all sides and angles are equal). You can choose a center point and calculate the coordinates of each vertex relative to the center point. You can use polar coordinates or rectangular coordinates to express it.
[0048] Coordinate transformation, assuming 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: ; in, ,in, .
[0049] For each key data point and each vertex of the decagon, calculate the vector 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, specifically including: For each key data point and each vertex of the decagon , calculate the vector ; For each vertex of the decagon , calculate its two adjacent vertices and The edge vector and , the vertex index needs to be processed in a loop, that is and ; Use the vector dot product formula to calculate the angle, for example, and The angle between ,in: ; Among them, the dot product , vector modulus .
[0050] According to the calculated included angle and the geometric shape of the decagon, the position of the key data point relative to the vertex of the decagon is determined, specifically including: by comparing the size of the included angle, the position of the key data point relative to the vertex of the decagon can be determined. For example, if the included angle is less than a certain threshold (such as , which is half of the interior angle of a regular decagon), the key data point may be located in a region near the vertex; based on the angle and the symmetry of the decagon, the plane can be divided into multiple regions, each corresponding to a vertex or an edge, which helps to subsequently calculate the relative coordinates of the key data points on the decagonal plane.
[0051] Calculate the distance from the key data point to each side of the decagon. Specifically, for each side, the distance from the key data point to the side can be calculated using the point-to-line distance formula. Assume that the two endpoints of the side are and , then point The distance to side AB is: .
[0052] 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.
[0053] In an embodiment of the present invention, the coordinates of the decagon vertex and the key data point coordinates are converted to the same reference coordinate system, ensuring the consistency and comparability of all coordinate data. By calculating the vector pointing from the decagon vertex to the key data point, and the angle between the two edge vectors formed by the vertex and two adjacent vertices, the positional relationship of the key data point relative to the decagon vertex can be accurately described. This precise positional relationship calculation helps to more accurately understand the distribution of data points on the decagonal plane; combining the geometric shape of the decagon to judge the position of the key data point, the symmetry and regularity of the decagon are fully utilized, making the position judgment more accurate and efficient. This analysis method based on geometric shapes helps to reveal the spatial relationship and pattern between data points. By calculating the distance from the key data point to each side of the decagon and the position of the key data point relative to the vertex of the decagon, the relative coordinates of the key data point on the decagonal plane can be calculated. The determination of this relative coordinate enables the data point to be visualized and analyzed on the decagonal plane, which is convenient for discovering the spatial distribution law and abnormal points of the data points. Mapping each key data point onto a decagonal plane makes the spatial distribution of data points more intuitive and easier to understand. This mapping method helps to quickly identify clustered areas, sparse areas, and possible anomalies of data points. Key data points mapped onto the decagonal plane can support more complex spatial analysis, such as spatial clustering, spatial interpolation, spatial association analysis, etc. These analysis methods help to deeply explore the spatial characteristics and laws of data points, and provide strong support for practical applications such as gas purchase and sales difference control. Through intuitive spatial display and precise position relationship calculation, decision makers can understand the spatial distribution and characteristics of data points more quickly, and thus make more accurate decisions. This decision-making method based on spatial analysis helps to improve decision-making efficiency and quality.
[0054] In a preferred embodiment of the present invention, each key data point is mapped onto a decagonal plane 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, specifically including: selecting a vertex from the vertex set of the decagon as the reference vertex , the selection can be arbitrary, but usually the vertex that is closer to the key data point or more convenient to calculate is selected to obtain the reference vertex The global coordinates of ; Determine the reference edge, which is the edge connecting the reference vertex and one of its adjacent vertices. Specifically, find the reference vertex An adjacent vertex of (determined by the order or index of the vertices), record the base edge The coordinates of the two endpoints and .
[0055] 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 in accordance with the clockwise rule is used as the y-axis direction. Based on the x-axis direction and the y-axis direction, the local coordinate system is constructed, including: calculating the reference edge Vector The direction of the reference edge is the x-axis direction of the local coordinate system, and the direction perpendicular to the reference edge and in accordance with the clockwise rule is the y-axis direction, which can be obtained by rotating the unit vector in the x-axis direction by 90 degrees. Clockwise rotation means rotating the vector becomes .
[0056] 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, which specifically includes: calculating the modulus of the reference edge vector ; Normalize to get the unit vector in the x-axis direction ; Calculate the unit vector in the y-axis direction: Rotate the unit vector about the x-axis 90 degrees to get the unit vector in the y-axis direction (rotate clockwise).
[0057] Multiply the unit vector in the x-axis direction by the proportional coefficient u to obtain the first movement vector, specifically including: calculating the key data points Perpendicular distance to the base edge , and key data points The perpendicular distance to another edge adjacent to the base edge ; Among them, the proportional coefficient u is the key data point Perpendicular distance to the base edge Length of the reference side The ratio of; the proportional coefficient v is the key data point The perpendicular distance to another edge adjacent to the base edge Length of adjacent side The ratio of; multiply the unit vector in the x-axis direction by the proportional coefficient u to obtain the first movement vector .
[0058] The unit vector in the y-axis direction is multiplied by the proportional coefficient v to obtain the second movement vector, which specifically includes: multiplying the unit vector in the y-axis direction by the proportional coefficient v to obtain the second movement vector .
[0059] The first movement vector and the second movement vector are added to the global coordinates of the reference vertex to obtain the global coordinates of the data point, specifically including: Add the first and second motion vectors to the reference vertex The global coordinates of the data point are calculated ; The specific calculation is: ; .
[0060] In the embodiment of the present invention, by constructing a local coordinate system, the complex global coordinate calculation is converted 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 vector in the direction of the reference edge and the vector perpendicular to the reference edge, and constructing a local coordinate system, the position of the data point relative to the decagon can be more accurately described. The introduction of the scale coefficients 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. The method is applicable to decagons of any shape and size. As long as the reference vertex and the reference edge can be determined, the local coordinate system can be constructed and the mapping calculation can be performed. For key data points of different distributions and densities, the 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 to the decagonal plane can be more easily analyzed and visualized. For example, the distribution characteristics of a data point can be evaluated by calculating the distance from each side of the decagon, or the data points can be displayed in a graphical form 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 computational efficiency, reduce the computational time and resource consumption, and for large-scale data point sets, this method can process the mapping calculation of each data point in parallel, further improving the computational efficiency.
[0061] In a preferred embodiment of the present invention, 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, including: Calculate the average value of all vertex coordinates of the decagon to obtain the geometric center of the decagon, specifically including: obtaining the coordinates of all vertices of the decagon, 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; and taking the average value of the x coordinates and the average value of the y coordinates as the geometric center of the decagon.
[0062] For each key data point, the distance from the key data point to the geometric center of the decagon is calculated, specifically including: for each key data point, the distance from the key data point to the geometric center is calculated using the Euclidean distance formula.
[0063] According to the distance and decagonal geometric characteristics, the partition boundary is determined, and the distance from all key data points to the decagonal geometric center is traversed to obtain the maximum and minimum values, including: setting the maximum value and minimum value , for each key data point the distance , update the maximum and minimum values: if ,but ; if ,but .
[0064] 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 a corresponding distance interval according to its distance, including: Calculate interval width, interval width ; Determine the interval boundaries, for each interval , whose boundaries are: Nether: ; Upper bound: ; For each key data point, according to its distance Determine the interval in which it lies.
[0065] Taking the center of the decagon as the origin, divide 360 degrees into N equal angle intervals. For each key data point, calculate its angle relative to the center of the decagon. Each key data point falls into the corresponding angle interval according to its angle. Specifically, for each key data point , calculate its relative to the geometric center Angle : ; in, The function returns a radian value, which needs to be converted to degrees: ; Divide the angle intervals, divide 360 degrees into N equal angle intervals, and the width of each interval is degrees; according to the calculated angle , determine the angle range where each key data point is located.
[0066] For key data points within each distance interval, they are allocated to N angle intervals to form multiple measurement partitions.
[0067] In an embodiment of the present invention, by dividing the gas supply network into a plurality of metering zones, the gas flow and consumption in each zone can be measured and monitored more accurately. The key data points in each zone have similar distance and angle characteristics, which helps to reduce metering errors and improve metering accuracy. Metering zones help gas companies to allocate resources more reasonably, such as gas pipelines, valves, metering equipment, etc. According to the gas consumption of each zone, equipment maintenance and upgrades can be carried out more targeted to improve resource utilization efficiency. Metering zones make the management of the gas supply network more refined, which helps to timely discover and solve problems in the network. By monitoring parameters such as gas flow and pressure in each zone, abnormal situations such as leakage and blockage can be discovered in time, and corresponding measures can be taken to deal with them. Metering zones help to reduce the safety risks of the gas supply network. By dividing the network into a plurality of independent zones, the impact range of accidents can be limited and the impact of accidents on surrounding areas can be reduced. At the same time, the gas flow and consumption in each zone can be monitored in real time, which helps to timely discover and deal with potential safety hazards. Metering zones provide gas companies with rich data resources and help to conduct more in-depth data analysis and mining.
[0068] In a preferred embodiment of the present invention, for each key data point in the distance interval, it is allocated to N angle intervals to form a plurality of 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. Specifically, it includes: determining the number of partitions N, determining the minimum and maximum values of the distance range, which should be calculated in the previous steps), creating a list of length N, and initializing each element as an empty list to store key data points that fall into the distance interval.
[0069] Create an N×N angle interval matrix, where each element in the angle interval matrix represents a "distance-angle" combination interval. The matrix is initialized to an empty angle interval matrix, which is used to store the key data points that eventually fall into the combination interval. For example, each element is initialized to an empty list, which is used to store the key data points that fall into the "distance-angle" combination interval.
[0070] 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 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 to the center of the decagon. , calculate the equidistant interval index to which the distance belongs : ; in, is the width of each distance interval, Indicates rounding down; ensure that the index In the valid range (0≤ <N), if If the value is out of range, decide how to handle it based on your needs (such as putting it in the closest interval or ignoring it), add the index of the key data point to the corresponding distance interval list; traverse all key data points again (or combine 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 inverse tangent function and taking the quadrant into account: ; in, and are the horizontal and vertical coordinates of the key data points, and is the coordinate of the center of the decagon; calculate the index of the equal angle interval to which this angle belongs , specifically including: First, normalize the angle to the range [0, 2π) (if If it is negative, add 2π); then, calculate the index: ; Use the distance interval index calculated previously and angle interval index , add the index of the key data point to the corresponding "distance-angle" combination interval list 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 indexes that fall into the corresponding "distance-angle" combination interval.
[0071] Traverse the angle interval matrix and assign a unique partition number to each combination interval to form multiple "distance-angle" combination measurement partitions, including: creating a variable partition_id with an initial value of 0, which is used to assign a unique partition number; 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.
[0072] 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 accurately. This refined division helps to reduce metering errors and improve metering accuracy. Metering partitions help gas companies to allocate resources more reasonably, such as gas pipelines, valves, metering equipment, etc., and allocate resources according to the actual needs of each partition, which can improve resource utilization efficiency and avoid resource waste. By dividing the network into multiple metering partitions, gas companies 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 discovered in time and corresponding measures can be taken. Metering partitions help reduce the safety risks of the gas supply network. By dividing the network into multiple independent partitions, the impact range of accidents can be limited and the impact of accidents on surrounding areas can be reduced. In addition, by real-time monitoring of the gas flow and consumption of each partition, potential safety hazards can be discovered in time and measures can be taken to prevent them. Metering partitions provide gas companies with rich data resources, which helps to conduct more in-depth data analysis and mining. By analyzing the gas consumption, user behavior and other data of each partition, the company can formulate more reasonable marketing strategies, price policies, etc. to provide support for decision-making. This method can be flexibly adjusted according to the actual gas supply network structure and demand. Whether it is the shape, size or number of partitions N of the decagon, it can be adjusted and optimized according to the actual situation.
[0073] In a preferred embodiment of the present invention, the total value of the input gas volume and the purchase and sale difference of the output gas volume of each metering zone are calculated in real time, 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 partition, the input gas volume values of all flow meters in the metering partition within the specified time window are summarized in real time, specifically including: 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 flow meter data with timestamps, ensuring that the data is stored in categories according to time windows (such as 1 hour, 1 day), checking the integrity of the flow meter data, eliminating or correcting abnormal values (such as sudden increases or decreases in flow), interpolating missing data, ensuring 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 in each time window, and summarizing the total input gas volume value of each flow meter according to the metering partition to which it belongs, to obtain the total input gas volume of each partition.
[0074] For each metering partition, the gas consumption values of all industrial and commercial users in the metering partition within the specified time window are summarized in real time, and the estimated gas consumption values of residential users in the corresponding metering partition within the same time window are obtained, specifically including: timestamping the industrial and commercial gas consumption data to ensure that the data is stored 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 failure), 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 values of all industrial and commercial users in each time window, and extracting the estimated gas consumption values of residential users corresponding to the current time window, so that the time window of the estimated gas consumption of residential users is consistent with the time window of the industrial and commercial gas consumption data.
[0075] The gas consumption values of all industrial and commercial users in the specified time window are integrated with the estimated gas consumption values of all residential users to obtain the output gas consumption value, including: The time windows and metering zones of industrial and commercial gas consumption and estimated residential gas consumption are completely aligned. According to the metering zones and time windows, the industrial and commercial gas consumption can be directly added to the estimated residential gas consumption to obtain the output gas volume value of each zone. The output result includes the zone identifier, time window and corresponding output gas volume value.
[0076] In an embodiment of the present invention, by summarizing the input gas volume values of all flow meters in a metering zone in real time within a specified time window, the actual input gas volume of the zone can be accurately grasped, and the gas consumption of residential users is estimated based on historical gas consumption data and user quantity data, which can more accurately reflect the actual gas consumption of residential users and reduce estimation errors. The gas consumption values of industrial and commercial users and residential users are integrated to obtain more comprehensive output gas volume values, thereby improving the accuracy of metering. The real-time calculation of the total input gas volume and the output gas purchase and sales difference helps the gas company to timely understand the supply and demand balance of each metering zone. When it is found that the input gas volume of a zone is much greater than or less than the output gas volume, the gas supply strategy can be adjusted in time to avoid insufficient or excessive gas supply. By accurately grasping the gas consumption of each metering zone, the gas company can allocate gas resources more reasonably to ensure that each zone can get sufficient gas supply. For zones with larger gas consumption, gas supply preparations can be made in advance to avoid gas supply interruption or shortage. Real-time calculation and analysis of gas usage data for each metering zone helps gas companies to promptly identify and resolve operational problems. For example, when a flow meter reading in a zone is found to be abnormal, it can be repaired or replaced in a timely manner to ensure metering accuracy. Accurate gas volume data provides strong support for gas companies' decision-making. For example, in formulating gas supply plans, adjusting gas prices, optimizing pipeline network layout, etc., decisions can be made based on accurate gas volume data, improving the scientificity and rationality of decision-making.
[0077] In a preferred embodiment of the present invention, 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 get the total historical gas consumption, and calculate the total number of residential users in the same time period, including: Collect gas consumption data of all residential users in the past multiple time periods (such as monthly, quarterly or annual), collect data on the number of residential users in the same time period, record the total number of users in each period (such as the number of users at the end of each month), check whether there are missing values or abnormal values (such as negative values, sudden increases or decreases) in the gas consumption data, ensure data integrity by interpolation or elimination of abnormal data, verify that the timestamp of the user quantity data is consistent with the gas consumption data to avoid time misalignment, add up the residential gas consumption in all time periods to obtain the historical total gas consumption (such as the total gas consumption in the past 12 months), and add 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).
[0078] Based on 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, specifically including: based on the calculated total historical gas consumption and the total number of residential users, the total historical gas consumption is divided by the total number of residential users to obtain the average gas consumption of each household in the 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 trend of historical data) to avoid outliers caused by data errors, and store the average gas consumption as an intermediate result for use in subsequent steps.
[0079] The actual number of residential users in the current metering area is used as the basis for estimation, including: Extract the actual number of residential users in the current metering area from the user management system or household registration data, ensure that the data is the latest value (such as the number of users on the current date or at a specified time point), verify the accuracy of the user quantity data, and avoid duplication or omissions.
[0080] 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, specifically including: based on the calculated average gas consumption and the actual number of residential users, the actual number of residential users is multiplied by the average gas consumption to obtain the basic estimated value (such as the total gas consumption estimate of residential users in the current zone), and the basic estimated value is checked to be reasonable (such as compared with historical data for the same period) to avoid deviations caused by data errors; the proportional coefficient is determined based on the gas consumption characteristics of the current time window (such as weekdays, weekends, seasons), and the basic estimated value is multiplied by the time window proportional coefficient to obtain the estimated gas consumption of residential users in the current time window; wherein, the proportional coefficient The calculation formula is: ; in, ; Represents the weight coefficient, the specific value is 0.4; Indicates the average gas consumption on similar dates (weekdays / weekends / holidays) in historical data; Indicates the benchmark gas consumption (the historical average of the same period in the past three years); the gas consumption on weekdays is slightly higher than the benchmark, so , due to the increase in family activities on weekends, ; The coefficient is highest during holidays due to the need for family cooking ; Represents the weight coefficient, the specific value is 0.3; ; in, It indicates the average gas consumption in the same period of history. The gas consumption in the early morning is the lowest. ; Morning / evening peaks correspond to peak demand for cooking and heating ; Off-peak hours are the benchmark value ; Represents the weight coefficient, the specific value is 0.3; ; Among them, when the heating demand surges in winter ; When in summer the need for cooking decreases ; When there is no extreme temperature requirement during the transition season .
[0081] In a preferred embodiment of the present invention, when the purchase-sales difference exceeds a preset threshold, an abnormal alarm signal is generated, which may include: Set the early warning threshold and alarm threshold for the purchase and sales difference. The early warning threshold is used to prompt potential abnormalities (such as the purchase and sales difference exceeds 80% of the normal range); the alarm threshold is used to trigger abnormal alarms (such as the purchase and sales difference exceeds 100% of the normal range). For example, set the alarm threshold to ±500 cubic meters (that is, the alarm is triggered when the absolute value of the purchase and sales difference exceeds 500 cubic meters).
[0082] Compare the thresholds of the purchase and sales difference in each time window: If |Purchase and Sales Difference|>alarm threshold, it is judged as abnormal and an alarm signal is generated.
[0083] If |Purchase and Sales Difference|≤Alarm Threshold, and |Purchase and Sales Difference|>Warning Threshold, then generate a warning signal. For example, if the purchase and sales difference = 600 cubic meters, and the alarm threshold = 500 cubic meters → trigger an alarm; Purchase and sales difference = 400 cubic meters, warning threshold = 300 cubic meters → trigger warning (if the warning function is enabled).
[0084] When the purchase and sales difference exceeds the alarm threshold, an abnormal alarm signal is generated, including the following information: Time window (e.g. "2023-10-0110:00-11:00"); The difference between purchase and sales (e.g. "+600 cubic meters"); Alarm level (such as "High" or "Urgent"), output alarm signals to the following channels: Push to the monitoring screen or alarm management interface in real time, and notify relevant personnel via SMS, email, APP push, etc.
[0085] In an embodiment of the present invention, by accumulating the total gas consumption and the sum of the number of residential users in the past multiple time periods, the long-term trend and periodic law of residential gas consumption can be more comprehensively reflected, and estimation deviations caused by short-term fluctuations can be avoided. The average gas consumption of each household in historical data is calculated, and combined with the current actual number of residential users, so that the estimated value is closer to the actual gas demand and the accuracy of the estimation is improved. Based on the estimated gas consumption of residential users in metering zones, gas companies can formulate differentiated gas supply plans for different regions, optimize pipeline pressure regulation and gas storage facility scheduling, improve resource utilization efficiency, and plan infrastructure expansion or transformation in advance by identifying high gas consumption areas and potential growth areas to avoid insufficient or excessive gas supply. The time window proportional coefficient is introduced to enable the estimated value to flexibly adapt to gas consumption fluctuations in different time periods (such as seasons, weekdays / weekends), improve the timeliness and adaptability of the estimate, and quickly adjust the estimated value during peak gas consumption or sudden changes in demand. Accurate gas usage estimation can reduce customer complaints or industrial user production interruptions caused by insufficient gas supply, reduce service costs and reputation risks, and reduce operating costs and environmental impacts by avoiding excessive gas supply, reducing gas waste and pipeline network losses. Analysis of historical gas usage data and user numbers provides gas companies with market insights, helps identify user behavior patterns (such as energy-saving trends and new user growth), and provides a basis for long-term strategic planning. The estimation results can be used as input parameters for more complex models (such as load forecasting and price elasticity analysis) to further improve the scientific nature of decision-making. Accurate gas usage estimation helps optimize bill calculations, reduce cost disputes caused by estimation errors, and improve user satisfaction.
[0086] A zone metering method for gas purchase and sales difference control, the method comprising: 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.
[0087] The embodiment of the present invention further provides a computing device, including: a processor, a memory storing a computer program, and when the computer program is executed by the processor, the system described above is executed. All implementation methods in the above system embodiment are applicable to this embodiment and can achieve the same technical effect.
[0088] The embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the system described above. All implementations in the above system embodiment are applicable to this embodiment and can achieve the same technical effect.
[0089] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection 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 for projecting 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, 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; 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: According to the distance of each key data point from the center of the decagonal structure and the geometric characteristics of the decagon, the gas supply network is divided into multiple metering zones, including: Calculate the average value of all vertex coordinates of the decagon to obtain the geometric center of the decagon; For each key data point, calculate its distance to the geometric center of the decagon; Determine the partition boundaries based on distance and decagonal geometric properties; Traverse the distances from 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, 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; Taking the center of the decagon as the origin, divide 360 degrees into N equal angle intervals. For each key data point, calculate its angle relative to the center of the decagon. Each key data point falls into the corresponding angle interval according to its angle. For key data points within each distance interval, they are allocated to N angle intervals to form multiple measurement partitions.
6. The zoned metering system for gas purchase and sales difference control according to claim 5 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.
7. The zoned metering system for gas purchase and sales difference control according to claim 6 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.
8. The zoned metering system for gas purchase and sales difference control according to claim 7 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.
9. 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 8, 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.
10. 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 8.
Citation Information
Patent Citations
Management method and system for partition metering DMA (Direct Memory Access)
CN117094528A
Method for flexibly configuring and processing geographic coordinates based on streaming data
CN117972005A
Method and system for analyzing personnel gathering condition based on real-time position data
CN118734095A
Gas leakage safety detection system based on partition pressure maintaining and partition metering
CN118881979A
An AI calculation method and system for sand ship measurement
CN119741360A