Sewage treatment area division method, device, equipment and storage medium
Through digital terrain model and distance clustering technology, combined with road lines and valley lines, the problem of unreasonable division of rural sewage treatment areas is solved, and the accuracy and efficiency of the division of sewage treatment areas are improved.
Patent Information
- Application Number
- CN202410662192.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-05-27
AI Technical Summary
The division of rural sewage treatment areas has problems of unreasonable division and low efficiency. Mainly due to differences in topography and facilities, it is difficult to accurately divide existing technologies.
By obtaining the digital terrain model of the target area, integrating house data, performing distance clustering and secondary clustering, using road lines and valley lines to determine the boundaries of the clustering area, and then dividing reasonable sewage treatment areas.
It improves the accuracy and efficiency of sewage treatment area division, is suitable for rural areas with fewer road lines, and ensures reasonable division of sewage treatment areas.
Smart Images

Figure CN118245826B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of sewage treatment, and in particular to a method, device, equipment and storage medium for dividing sewage treatment areas. Background Art
[0002] At present, sewage treatment areas are divided mainly based on the experience of experts.
[0003] However, rural domestic sewage treatment is still in the exploratory stage, the accumulated experience in rural domestic sewage treatment is relatively shallow, there are obvious differences in the topography and supporting facilities between rural and urban areas, and rural natural villages are scattered and numerous, resulting in unreasonable and inefficient division of rural sewage treatment areas. Summary of the invention
[0004] The purpose of this application is to provide a method, device, equipment and storage medium for dividing sewage treatment areas, which can improve the efficiency of sewage treatment area division and make the sewage treatment area division more reasonable.
[0005] The present application provides a method for dividing sewage treatment areas, including:
[0006] Obtain a digital terrain model of the target area;
[0007] fusing the houses in the target area into the digital terrain model to obtain a fused model;
[0008] Performing distance clustering on the houses, so that two houses whose mutual distance is not greater than the first clustering distance are classified into the same cluster, and obtaining a plurality of first clustering areas;
[0009] Performing distance clustering on the first clustering areas, so that two first clustering areas whose mutual distance is not greater than the second clustering distance are divided into the same cluster, to obtain a plurality of second clustering areas; the mutual distance between two first clustering areas is determined by a road line or a valley line between the two first clustering areas;
[0010] The sewage treatment area into which the target area is divided is determined according to the first clustering area and / or the second clustering area.
[0011] In some embodiments, fusing the houses in the target area into the digital terrain model to obtain a fused model includes:
[0012] Generating contour surfaces in the digital terrain model to obtain a digital contour terrain model;
[0013] adding the house to the digital contour terrain model;
[0014] The contour surfaces that the house does not fall within are eliminated, and after elimination, the adjacent contour surfaces are merged to obtain the fusion model.
[0015] In some embodiments, generating a contour surface in the digital terrain model to obtain a digital contour terrain model includes:
[0016] Interpolating elevation information of the digital terrain model to obtain an interpolated digital terrain model;
[0017] The contour surface is generated according to the resolution of the interpolated digital terrain model, and the shape of the contour surface is split into simple polygons to obtain the digital contour terrain model.
[0018] In some embodiments, the distance clustering of the houses is performed so that two houses whose distance from each other is not greater than a first clustering distance are divided into the same cluster, and a plurality of first clustering areas are obtained, including:
[0019] Calculate the Euclidean distance between the houses to obtain the Euclidean distance between the houses;
[0020] Traversing all the houses, dividing two houses whose Euclidean distance is not greater than the first clustering distance into the same cluster, and obtaining a plurality of first clusters;
[0021] The first cluster is divided into regions with edges according to the location of the house and the adjacent road lines to obtain the first cluster region.
[0022] In some embodiments, the distance clustering is performed on the first clustering regions so that two first clustering regions whose mutual distance is not greater than the second clustering distance are divided into the same cluster, and a plurality of second clustering regions are obtained, including:
[0023] Determining whether there is the road line between the two first clustering areas;
[0024] If yes, using the road line to determine the distance between the two first clustering areas;
[0025] If not, using the valley line between the two first clustering areas to determine the distance between the two first clustering areas;
[0026] All the first clustering regions are traversed, two first clustering regions whose mutual distance is not greater than the second clustering distance are divided into the same cluster, and the region edges of the first clustering regions are adjusted to obtain the second clustering regions.
[0027] In some embodiments, the determining the mutual distance between the two first clustering areas by using the road line includes:
[0028] When two first clustering areas are connected to the same road line, a first distance is used as the mutual distance between the two first clustering areas; the first distance is a distance from an intersection point of one of the first clustering areas and the road line to an intersection point of another of the first clustering areas and the road line along the road line;
[0029] When the two first clustering areas are not connected to the same road line, a second distance is used as the mutual distance between the two first clustering areas; the second distance is the distance along the road line from the shortest connection line between one of the first clustering areas and the road line to the shortest connection line between the other first clustering area and the road line;
[0030] When one of the first clustering areas is connected to a road line and the other first clustering area is not connected to the road line, a third distance is used as the mutual distance between the two first clustering areas; the third distance is the distance along the road line from the intersection of one of the first clustering areas and the road line to the shortest line between the other first clustering area and the road line.
[0031] In some embodiments, the determining the mutual distance between the two first clustering areas by using the valley line between the two first clustering areas includes:
[0032] When two first clustering areas are connected to the same valley line, a fourth distance is used as the mutual distance between the two first clustering areas; the fourth distance is a distance along the valley line from an intersection point of one of the first clustering areas and the valley line to an intersection point of another of the first clustering areas and the valley line;
[0033] When two first clustering areas are not connected to the same valley line, the fifth distance is used as the mutual distance between the two first clustering areas; the fifth distance is the distance along the valley line from the shortest line between one of the first clustering areas and the valley line to the shortest line between the other first clustering area and the valley line;
[0034] When one of the first clustering regions is connected to a valley line and another of the first clustering regions is not connected to the valley line, a sixth distance is used as the mutual distance between the two first clustering regions; the sixth distance is a distance along the valley line from an intersection of one of the first clustering regions and the valley line to a shortest line connecting another of the first clustering regions and the valley line;
[0035] When there is a mountain range between two first clustering areas, the seventh distance is used as the mutual distance between the two first clustering areas; the seventh distance is the distance from one of the first clustering areas to the other of the first clustering areas along the two valley lines formed along the mountain range.
[0036] The present application also provides a sewage treatment area division device, including:
[0037] The first module is used to obtain a digital terrain model of the target area;
[0038] The second module is used to fuse the houses in the target area into the digital terrain model to obtain a fused model;
[0039] The third module is used to perform distance clustering on the houses, so that two houses whose mutual distance is not greater than the first clustering distance are divided into the same cluster, and a plurality of first clustering areas are obtained;
[0040] The fourth module is used to perform distance clustering on the first clustering areas, so that two first clustering areas whose mutual distance is not greater than the second clustering distance are divided into the same cluster, and a plurality of second clustering areas are obtained; the mutual distance between the two first clustering areas is determined by the road line or the valley line between the two first clustering areas;
[0041] The fifth module is used to determine the sewage treatment area divided by the target area according to the first cluster area and / or the second cluster area.
[0042] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned sewage treatment area division method when executing the computer program.
[0043] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned sewage treatment area division method is implemented.
[0044] The beneficial effects of the present application are as follows: first, the houses in the target area are clustered by distance, so that two houses whose mutual distance is not greater than the first clustering distance are divided into the same cluster, and several first clustering areas are obtained; then, the mutual distance between the two first clustering areas is determined by the road line or valley line of the target area; the first clustering area is clustered by distance, so that two first clustering areas whose mutual distance is not greater than the second clustering distance are divided into the same cluster, and several second clustering areas are obtained; finally, the sewage treatment area divided by the target area is determined according to the clustering result, and the clustering record is displayed on the digital terrain model of the target area. Since the distance along the line is used as the judgment criterion for secondary clustering, the defect of inaccurate clustering caused by using only the straight-line distance of the house as the clustering judgment criterion is overcome; the valley line is used as a reference for the distance along the line, and in the case of missing roads, it can be used as a supplement to the distance along the line information, which is more suitable for rural areas with fewer road lines, further improving the accuracy of regional clustering, improving the efficiency of sewage treatment area division, and making sewage treatment area division more reasonable. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a flow chart of the sewage treatment area division method provided in an embodiment of the present application.
[0046] Figure 2 It is a flowchart of the specific method of step S102 provided in an embodiment of the present application.
[0047] Figure 3 It is a flowchart of the specific method of step S103 provided in an embodiment of the present application.
[0048] Figure 4 It is a flowchart of the specific method of step S104 provided in an embodiment of the present application.
[0049] Figure 5 It is a structural schematic diagram of a sewage treatment area division device provided in an embodiment of the present application.
[0050] Figure 6 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0054] See also Figure 1 , Figure 1 is a flow chart of a method for dividing sewage treatment areas provided in an embodiment of the present application. In some embodiments of the present application, Figure 1 The method may specifically include but is not limited to steps S101 to S105. Figure 1 These five steps are introduced in detail.
[0055] Step S101, obtaining a digital terrain model of a target area.
[0056] In this embodiment, a digital elevation model (DEM) is selected as the digital terrain model. The digital elevation model is a physical ground model that uses limited terrain elevation data to realize digital simulation of the ground terrain (i.e., a digital expression of the terrain surface morphology). It is a kind of ordered numerical array form to represent the ground elevation.
[0057] In step S101, the digital terrain model of the target area is obtained. The target area can be measured directly from the ground. The instruments involved include horizontal guide rails, measuring needles, measuring needle holders, relative elevation measurement plates and other components. High-end instruments such as GPS, total stations, and field measurements can also be used. Alternatively, the digital terrain model of the target area can be obtained based on aerial or aerospace images through photogrammetry, such as stereo coordinate instrument observation and aerial triangulation, analytical mapping, digital photogrammetry, etc., or information on the target area can be collected from existing topographic maps, such as grid reading method, digitizer hand-held tracking, and semi-automatic acquisition by scanners, and then DEM is generated through interpolation.
[0058] Step S102, fusing the houses in the target area into the digital terrain model to obtain a fused model.
[0059] In step S102, the house data of the target area is obtained, the house data includes house location information, house shape information and house size information, the centroid of the house is extracted according to the house data, the corresponding house is represented by the centroid of the house, and inserted into the digital terrain model to obtain a fusion model, and the centroid of the house is displayed as a point in the fusion model.
[0060] like Figure 2 As shown, in some embodiments, step S102 may specifically include but is not limited to steps S201 to S203. Figure 2 These three steps are introduced in detail.
[0061] Step S201, generating contour surfaces in the digital terrain model to obtain a digital contour terrain model.
[0062] In step S201, in the digital terrain model, corresponding contour surfaces are generated according to the elevation information of known points, thereby obtaining a digital contour terrain model.
[0063] In some embodiments, step S201 specifically includes the following steps:
[0064] Interpolating the elevation information of the digital terrain model to obtain an interpolated digital terrain model;
[0065] According to the resolution of the interpolated digital terrain model, a contour surface is generated, and the shape of the contour surface is split into simple polygons to obtain a digital contour terrain model.
[0066] Specifically, the elevation information of other locations can be inferred from the elevation information of known points in the digital terrain model. Various mathematical functions (such as polynomials, spline functions, etc.) can be used to approximate the continuity of the surface, thereby generating uniformly distributed elevation data, improving the resolution of the digital terrain model, and obtaining an interpolated digital terrain model. Then, the corresponding contour surface is generated according to the resolution of the interpolated digital terrain model. When the shape of the generated contour surface is a multi-polygon (MultiPolygon), the shape of the contour surface is split into simple polygons (Polygon) to obtain a digital contour terrain model.
[0067] Step S202, adding houses to the digital contour terrain model.
[0068] Step S203, remove the contour surfaces that the house does not fall into, and merge the adjacent contour surfaces after removal to obtain a fusion model.
[0069] In step S203, after adding the house to the digital contour terrain model, the contour surface on which the house falls is identified, and the contour surfaces on which no house falls are removed. The adjacent contour surfaces remaining after the removal are merged so that the adjacent contour surfaces are merged into a whole to obtain a fusion model.
[0070] Step S103, performing distance clustering on the houses so that two houses whose mutual distance is not greater than the first clustering distance are classified into the same cluster, and obtaining a plurality of first clustering areas.
[0071] It should be noted that distance clustering is a clustering analysis method based on the distance between data points. Its core idea is to divide data points into different clusters according to the distance between them. In distance clustering, the calculation of similarity or distance is a key step. Commonly used distance measurement methods include Euclidean distance, Mahalanobis distance and Manhattan distance. In distance clustering, the selection of appropriate distance measurement methods and initial cluster centers has an important impact on the final clustering results. For example, the K-means algorithm uses Euclidean distance as the distance metric and selects the initial cluster center through the K-means++ algorithm to improve the quality and stability of clustering. The goal of distance clustering is to make the distance between data points in the same cluster as small as possible, and the distance between different clusters as large as possible, so as to discover patterns and structures in the data.
[0072] like Figure 3 As shown, in some embodiments, step S103 may specifically include but is not limited to steps S301 to S303. Figure 3 These three steps are introduced in detail.
[0073] Step S301, calculating the Euclidean distance between each pair of houses to obtain the Euclidean distance between the houses.
[0074] Step S302, traverse all houses, and classify two houses whose Euclidean distance is not greater than the first clustering distance into the same cluster, to obtain a plurality of first clusters.
[0075] Step S303: dividing the first cluster into regional edges according to the location of the house and the adjacent road lines to obtain a first cluster region.
[0076] In step S301 to step S303, firstly, a cluster center is selected. Firstly, several houses can be randomly selected from each house as the cluster center, and then other houses are assigned to the nearest cluster center. By calculating the Euclidean distance from other houses to each cluster center and assigning them to the nearest cluster center, the Euclidean distance between other houses and the nearest cluster center is calculated. When the Euclidean distance is not greater than the first cluster distance, it is determined that the house as the cluster center and the current house can be divided into the same cluster. And so on. After traversing other houses assigned to the nearest cluster center, the above cluster calculation process is repeated with other houses in the same cluster as cluster centers until all houses are traversed to obtain several first clusters. Then, according to the positions of the houses in each first cluster and the adjacent road lines, the first clusters are divided into regional edges to determine the regional range of each first cluster to obtain several first cluster areas.
[0077] Step S104: distance clustering is performed on the first clustering regions, so that two first clustering regions whose mutual distance is not greater than the second clustering distance are divided into the same cluster, thereby obtaining a plurality of second clustering regions.
[0078] The mutual distance between the two first clustering areas is determined by the road line or the valley line between the two first clustering areas. It can be understood that the mutual distance between the two first clustering areas is determined by the local route length of the road line or the local route length of the valley line, which can be the length distance from one reference point to another reference point along the route of the road line after the reference points of the two first clustering areas are determined, or the length distance from one reference point to another reference point along the route of the valley line after the reference points of the two first clustering areas are determined.
[0079] In step S104, first determine whether to use road lines or valley lines to determine the mutual distance between two first clustering areas, then select cluster centers, randomly select several first clustering areas as cluster centers, and then assign other first clustering areas to the nearest cluster center. By calculating the mutual distance between the first clustering areas, assign other first clustering areas to the nearest cluster center. When the distance between the two first clustering areas is not greater than the second clustering distance, determine that the first clustering area as the cluster center and the current first clustering area can be divided into the same cluster. And so on. After traversing other first clustering areas assigned to the nearest cluster center, repeat the above clustering calculation process with other first clustering areas in the same cluster as cluster centers until all houses are traversed and several second clusters are obtained. Then, according to the positions of the houses in each second cluster and the adjacent road lines, the second clusters are divided into regional edges to determine the regional range of each second cluster, and finally several second clustering areas are obtained.
[0080] like Figure 4As shown, in some embodiments, step S104 may specifically include but is not limited to steps S401 to S404. Figure 4 These four steps are introduced in detail.
[0081] Step S401: determine whether there is a road line between two first clustering areas.
[0082] If yes, execute step S402; if no, execute step S404.
[0083] Step S402: using road lines to determine the distance between two first clustering areas.
[0084] Step S403: using the valley line between the two first clustering regions to determine the distance between the two first clustering regions.
[0085] Step S404, traverse all first clustering regions, divide two first clustering regions whose mutual distance is not greater than the second clustering distance into the same cluster, adjust the region edges of the first clustering regions, and obtain second clustering regions.
[0086] In some embodiments, step S402 specifically includes the following steps: when two first clustering areas are connected to the same road line, the first distance is used as the mutual distance between the two first clustering areas; when the two first clustering areas are not connected to the same road line, the second distance is used as the mutual distance between the two first clustering areas; when one first clustering area is connected to a route and the other first clustering area is not connected to the road line, the third distance is used as the mutual distance between the two first clustering areas. The first distance is the distance along the road line from the intersection of one first clustering area and the road line to the intersection of the other first clustering area and the road line, the second distance is the distance along the road line from the shortest connection line between one first clustering area and the road line to the shortest connection line between the other first clustering area and the road line, and the third distance is the distance along the road line from the intersection of one first clustering area and the road line to the shortest connection line between the other first clustering area and the road line.
[0087] In some embodiments, step S403 specifically includes the following steps: when two first clustering areas are connected to the same valley line, the fourth distance is used as the mutual distance between the two first clustering areas; when the two first clustering areas are not connected to the same valley line, the fifth distance is used as the mutual distance between the two first clustering areas; when one first clustering area is connected to a valley line and the other first clustering area is not connected to the valley line, the sixth distance is used as the mutual distance between the two first clustering areas; when there is a mountain range between the two first clustering areas, the seventh distance is used as the mutual distance between the two first clustering areas. Among them, the fourth distance is the distance along the valley line from the intersection of one first cluster area and the valley line to the intersection of another first cluster area and the valley line, the fifth distance is the distance along the valley line from the shortest line between one first cluster area and the valley line to the shortest line between another first cluster area and the valley line, the sixth distance is the distance along the valley line from the intersection of one first cluster area and the valley line to the shortest line between another first cluster area and the valley line, and the seventh distance is the distance from one first cluster area to another first cluster area along the two valley lines formed along the mountain range.
[0088] Step S105: determining the sewage treatment area into which the target area is divided according to the first cluster area and / or the second cluster area.
[0089] In step S105, if only the first clustering area is obtained (each first clustering area cannot be clustered into the second clustering area), the sewage treatment area divided by the target area is determined based on the first clustering area, specifically, each first clustering area is used as the corresponding sewage treatment area, and the corresponding sewage treatment unit is arranged; if only the second clustering area is obtained (each first clustering area is clustered into the second clustering area), the sewage treatment area divided by the target area is determined based on the second clustering area, specifically, each second clustering area is used as the corresponding sewage treatment area, and the corresponding sewage treatment unit is arranged; if both the first clustering area and the second clustering area are obtained (some first clustering areas are clustered into the second clustering area), the sewage treatment area divided by the target area is determined based on the first clustering area and the second clustering area, specifically, each first clustering area and the second clustering area is used as the corresponding sewage treatment area, and the corresponding sewage treatment unit is arranged.
[0090] In some embodiments, if the number of houses in the first clustering area and / or the second clustering area is less than a preset number of houses, a sewage treatment unit is separately arranged for each house in the first clustering area and / or the second clustering area.
[0091] See also Figure 5 The embodiment of the present application further provides a sewage treatment area division device, which can implement the above-mentioned sewage treatment area division method, and the device includes:
[0092] The first module 501 is used to obtain a digital terrain model of a target area;
[0093] The second module 502 is used to fuse the houses in the target area into the digital terrain model to obtain a fused model;
[0094] The third module 503 is used to perform distance clustering on the houses, so that two houses whose mutual distance is not greater than the first clustering distance are divided into the same cluster, and a plurality of first clustering areas are obtained;
[0095] The fourth module 504 is used to perform distance clustering on the first clustering areas, so that two first clustering areas whose mutual distance is not greater than the second clustering distance are divided into the same cluster, thereby obtaining a plurality of second clustering areas; the mutual distance between the two first clustering areas is determined by the road line or the valley line between the two first clustering areas;
[0096] The fifth module 505 is used to determine the sewage treatment area divided by the target area according to the first cluster area and / or the second cluster area.
[0097] The specific implementation of the sewage treatment area division device is basically the same as the specific implementation of the above-mentioned sewage treatment area division method, and will not be repeated here.
[0098] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment.
[0099] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present disclosure is described. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0100] like Figure 6 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0101] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present disclosure described in the above sewage treatment area division method part of this specification.
[0102] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0103] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0104] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0105] The electronic device 600 may also communicate with one or more external devices 600' (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0106] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned sewage treatment area division method is implemented.
[0107] The sewage treatment area division method, device, equipment and storage medium provided in the embodiment of the present application firstly performs distance clustering on the houses in the target area so that two houses whose mutual distance is not greater than the first clustering distance are divided into the same cluster, and obtains a plurality of first clustering areas, then determines the mutual distance between the two first clustering areas through the road line or valley line of the target area, performs distance clustering on the first clustering area so that two first clustering areas whose mutual distance is not greater than the second clustering distance are divided into the same cluster, and obtains a plurality of second clustering areas, and finally determines the sewage treatment area divided by the target area according to the clustering result, and displays the clustering record on the digital terrain model of the target area. Since the distance along the line is used as the judgment criterion for secondary clustering, the defect of inaccurate clustering caused by using only the straight-line distance of the house as the clustering judgment criterion is overcome, and the valley line is used as a reference for the distance along the line. In the case of missing roads, it can be used as a supplement to the distance along the line information, which is more suitable for rural areas with fewer road lines, further improves the accuracy of regional clustering, improves the efficiency of sewage treatment area division, and makes sewage treatment area division more reasonable.
[0108] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the implementation of the present disclosure.
[0109] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0110] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0111] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0112] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
[0113] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0114] The exemplary embodiments of the present disclosure are specifically shown and described above. It should be understood that the present disclosure is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present disclosure is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.
Claims
1. A method for dividing sewage treatment areas, characterized in that: include: Obtain a digital terrain model of the target area; fusing the houses in the target area into the digital terrain model to obtain a fused model; Performing distance clustering on the houses, so that two houses whose mutual distance is not greater than the first clustering distance are classified into the same cluster, and obtaining a plurality of first clustering areas; Performing distance clustering on the first clustering areas, so that two first clustering areas whose mutual distance is not greater than the second clustering distance are divided into the same cluster, to obtain a plurality of second clustering areas; the mutual distance between two first clustering areas is determined by a road line or a valley line between the two first clustering areas; Determining the sewage treatment area divided by the target area according to the first cluster area and the second cluster area; The distance clustering is performed on the first clustering regions so that two first clustering regions whose mutual distance is not greater than the second clustering distance are divided into the same cluster, and a plurality of second clustering regions are obtained, including: Determining whether there is the road line between the two first clustering areas; If yes, using the road line to determine the distance between the two first clustering areas; If not, using the valley line between the two first clustering areas to determine the distance between the two first clustering areas; Traversing all the first clustering regions, dividing two first clustering regions whose mutual distance is not greater than the second clustering distance into the same cluster, and adjusting the region edges of the first clustering regions to obtain the second clustering regions; The determining the mutual distance between the two first clustering areas by using the valley line between the two first clustering areas includes: When two first clustering areas are connected to the same valley line, a fourth distance is used as the mutual distance between the two first clustering areas; the fourth distance is a distance along the valley line from an intersection point of one of the first clustering areas and the valley line to an intersection point of another of the first clustering areas and the valley line; When two first clustering areas are not connected to the same valley line, the fifth distance is used as the mutual distance between the two first clustering areas; the fifth distance is the distance along the valley line from the shortest line between one of the first clustering areas and the valley line to the shortest line between the other first clustering area and the valley line; When one of the first clustering regions is connected to a valley line and another of the first clustering regions is not connected to the valley line, a sixth distance is used as the mutual distance between the two first clustering regions; the sixth distance is a distance along the valley line from an intersection of one of the first clustering regions and the valley line to a shortest line connecting another of the first clustering regions and the valley line; When there is a mountain range between two first clustering areas, the seventh distance is used as the mutual distance between the two first clustering areas; the seventh distance is the distance from one of the first clustering areas to the other of the first clustering areas along the two valley lines formed along the mountain range.
2. The method for dividing sewage treatment areas according to claim 1, characterized in that: The step of fusing the houses in the target area into the digital terrain model to obtain a fused model includes: Generating contour surfaces in the digital terrain model to obtain a digital contour terrain model; adding the house to the digital contour terrain model; The contour surfaces that the house does not fall within are eliminated, and after elimination, the adjacent contour surfaces are merged to obtain the fusion model.
3. The method for dividing sewage treatment areas according to claim 2, characterized in that: The step of generating a contour surface in the digital terrain model to obtain a digital contour terrain model comprises: Interpolating elevation information of the digital terrain model to obtain an interpolated digital terrain model; The contour surface is generated according to the resolution of the interpolated digital terrain model, and the shape of the contour surface is split into simple polygons to obtain the digital contour terrain model.
4. The method for dividing sewage treatment areas according to claim 1, characterized in that: The distance clustering is performed on the houses so that two houses whose distance from each other is not greater than the first clustering distance are divided into the same cluster, and a plurality of first clustering areas are obtained, including: Calculate the Euclidean distance between the houses to obtain the Euclidean distance between the houses; Traversing all the houses, dividing two houses whose Euclidean distance is not greater than the first clustering distance into the same cluster, and obtaining a plurality of first clusters; The first cluster is divided into regions with edges according to the location of the house and the adjacent road lines to obtain the first cluster region.
5. The method for dividing sewage treatment areas according to claim 1, characterized in that: The determining the mutual distance between the two first clustering areas by using the road line includes: When two first clustering areas are connected to the same road line, a first distance is used as the mutual distance between the two first clustering areas; the first distance is a distance from an intersection point of one of the first clustering areas and the road line to an intersection point of another of the first clustering areas and the road line along the road line; When the two first clustering areas are not connected to the same road line, a second distance is used as the mutual distance between the two first clustering areas; the second distance is the distance along the road line from the shortest connection line between one of the first clustering areas and the road line to the shortest connection line between the other first clustering area and the road line; When one of the first clustering areas is connected to a road line and the other first clustering area is not connected to the road line, a third distance is used as the mutual distance between the two first clustering areas; the third distance is the distance along the road line from the intersection of one of the first clustering areas and the road line to the shortest line between the other first clustering area and the road line.
6. A sewage treatment area division device, characterized in that: include: The first module is used to obtain a digital terrain model of the target area; The second module is used to fuse the houses in the target area into the digital terrain model to obtain a fused model; The third module is used to perform distance clustering on the houses, so that two houses whose mutual distance is not greater than the first clustering distance are divided into the same cluster, and a plurality of first clustering areas are obtained; The fourth module is used to perform distance clustering on the first clustering areas, so that two first clustering areas whose mutual distance is not greater than the second clustering distance are divided into the same cluster, and a plurality of second clustering areas are obtained; the mutual distance between the two first clustering areas is determined by the road line or the valley line between the two first clustering areas; A fifth module is used to determine the sewage treatment area divided by the target area according to the first cluster area and the second cluster area; The distance clustering is performed on the first clustering regions so that two first clustering regions whose mutual distance is not greater than the second clustering distance are divided into the same cluster, and a plurality of second clustering regions are obtained, including: Determining whether there is the road line between the two first clustering areas; If yes, using the road line to determine the distance between the two first clustering areas; If not, using the valley line between the two first clustering areas to determine the distance between the two first clustering areas; Traversing all the first clustering regions, dividing two first clustering regions whose mutual distance is not greater than the second clustering distance into the same cluster, and adjusting the region edges of the first clustering regions to obtain the second clustering regions; The determining the mutual distance between the two first clustering areas by using the valley line between the two first clustering areas includes: When two first clustering areas are connected to the same valley line, a fourth distance is used as the mutual distance between the two first clustering areas; the fourth distance is a distance along the valley line from an intersection point of one of the first clustering areas and the valley line to an intersection point of another of the first clustering areas and the valley line; When two first clustering areas are not connected to the same valley line, the fifth distance is used as the mutual distance between the two first clustering areas; the fifth distance is the distance along the valley line from the shortest line between one of the first clustering areas and the valley line to the shortest line between the other first clustering area and the valley line; When one of the first clustering regions is connected to a valley line and another of the first clustering regions is not connected to the valley line, a sixth distance is used as the mutual distance between the two first clustering regions; the sixth distance is a distance along the valley line from an intersection of one of the first clustering regions and the valley line to a shortest line connecting another of the first clustering regions and the valley line; When there is a mountain range between two first clustering areas, the seventh distance is used as the mutual distance between the two first clustering areas; the seventh distance is the distance from one of the first clustering areas to the other of the first clustering areas along the two valley lines formed along the mountain range.
7. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the sewage treatment area division method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for dividing sewage treatment areas according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Automobile and terrain interaction simulation method for automobile simulator
CN111524237A
Task generation method for making high-precision map
CN112883136A
Ridge line and valley line extraction method based on DBSCAN clustering analysis
CN113807437A
Natural village boundary acquisition method and device, electronic equipment and storage medium
CN117351368A
Territory Assignment Optimization
US20220335361A1
