Method and device for extracting the smallest distribution unit in logistics
By performing pixel value processing and edge completion on the road network infographic, the minimum logistics distribution unit is automatically extracted, which solves the problem of time-consuming and labor-intensive manual processing in the prior art, and realizes efficient and accurate extraction of the minimum logistics distribution unit.
Patent Information
- Application Number
- CN202210005788.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-04
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-01-04
AI Technical Summary
In the prior art, the extraction of the smallest distribution unit of logistics relies on manual processing, resulting in time-consuming and labor-intensive and low accuracy and reliability.
By performing pixel value processing on the road network infographic, candidate pixel dot maps are extracted, edge extraction and missing edge completion are performed, the complete road network outline map is obtained, and skeleton extraction and pixel completion are performed, and the logistics minimum distribution unit is automatically extracted.
It realizes efficient and accurate extraction of the minimum logistics distribution unit without manual processing, saves manpower and improves extraction efficiency and accuracy.
Smart Images

Figure CN114359315B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for extracting a minimum logistics distribution unit. Background Art
[0002] Currently, during the final delivery phase of the logistics distribution process, the delivery area of each delivery area is divided into a minimum delivery area, which serves as the minimum logistics delivery unit. Currently, this minimum logistics delivery unit is often extracted manually by dividing the delivery area of the delivery area based on a road network information map. A road network is a road network, and a road network information map includes relevant information about the road network.
[0003] In the process of implementing the present invention, the inventors discovered that the prior art has at least the following problems:
[0004] Currently, the minimum logistics delivery unit is determined manually, which is time-consuming and labor-intensive, and has low accuracy and reliability. Summary of the Invention
[0005] In view of this, an embodiment of the present invention provides a method and device for extracting the minimum logistics distribution unit, which can automatically extract the minimum logistics distribution unit according to the road network information map without manual processing, thereby saving manpower, and has high extraction efficiency. The extracted minimum logistics distribution unit is more accurate and reliable.
[0006] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a method for extracting a minimum logistics distribution unit is provided, comprising: performing pixel value processing on a road network information map to obtain a candidate pixel point map corresponding to roads in a road network area; performing edge extraction processing on candidate pixel points in the candidate pixel point map to obtain an outer contour map of the candidate pixel points; performing missing edge completion processing on the outer contour map to obtain a complete road network contour map; processing the pixel points corresponding to roads in the complete road network contour map to obtain a road network skeleton map; performing pixel completion processing on the road network skeleton map, and extracting a closed area connected by pixel points corresponding to roads from the road network skeleton map after pixel completion processing as the minimum logistics distribution unit, wherein the minimum logistics distribution unit is the minimum distribution range included in a distribution site.
[0007] Optionally, the road network information map is obtained by: obtaining a set of tile images containing road network information, wherein the tile images in the tile image set are images obtained by segmenting a map image of a preset distribution area; and splicing the tile images in coordinate order to obtain a road network information map.
[0008] Optionally, pixel value processing is performed on the road network information map to obtain a candidate pixel point map corresponding to the roads in the road network area, including: binarization processing of the pixel values of the road network information map to obtain a candidate pixel point map corresponding to the roads in the road network area, the candidate pixel point map includes a first pixel point set corresponding to the roads and a second pixel point set corresponding to the non-roads, and the first pixel point set is the candidate pixel point.
[0009] Optionally, performing edge extraction processing on the candidate pixel points in the candidate pixel point map includes: performing edge extraction processing on the candidate pixel points in the candidate pixel point map by using a Canny operator.
[0010] Optionally, performing missing edge completion processing on the outer contour image includes: performing morphological dilation processing on the outer contour image to complete the missing edge completion processing on the outer contour image.
[0011] Optionally, the pixel points corresponding to the roads in the complete road network outline map are processed to obtain a road network skeleton map, including: processing the pixel points corresponding to the roads in the complete road network outline map into pixel points of specified pixel width through a skeleton extraction algorithm to obtain a road network skeleton map.
[0012] Optionally, pixel completion processing is performed on the road network skeleton map, including: for each pixel point corresponding to the road in the road network skeleton map, obtaining eight neighborhood pixel points corresponding to the pixel point, and performing pixel completion processing based on the pixel values of the eight neighborhood pixel points.
[0013] According to another aspect of an embodiment of the present invention, a device for extracting a logistics minimum delivery unit is provided, comprising: a pixel value processing module for performing pixel value processing on a road network information map to obtain a candidate pixel point map corresponding to roads in a road network area; an edge extraction module for performing edge extraction processing on candidate pixel points in the candidate pixel point map to obtain an outer contour map of the candidate pixel points; an edge completion module for performing missing edge completion processing on the outer contour map to obtain a complete road network contour map; a skeleton extraction module for processing pixel points corresponding to roads in the complete road network contour map to obtain a road network skeleton map; a pixel completion module for performing pixel completion processing on the road network skeleton map, and extracting a closed area connected by pixel points corresponding to roads from the road network skeleton map after pixel completion processing as the logistics minimum delivery unit, wherein the logistics minimum delivery unit is the minimum delivery range included in a delivery site.
[0014] According to another aspect of an embodiment of the present invention, an electronic device for extracting a minimum logistics delivery unit is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for extracting a minimum logistics delivery unit provided by an embodiment of the present invention.
[0015] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for extracting the minimum logistics delivery unit provided in an embodiment of the present invention is implemented.
[0016] An embodiment of the above invention has the following advantages or beneficial effects: a candidate pixel point map corresponding to roads in a road network area is obtained by performing pixel value processing on a road network information map; edge extraction processing is performed on candidate pixel points in the candidate pixel point map to obtain an outer contour map of the candidate pixel points; missing edge completion processing is performed on the outer contour map to obtain a complete road network contour map; pixel points corresponding to roads in the complete road network contour map are processed to obtain a road network skeleton map; pixel completion processing is performed on the road network skeleton map, and a closed area connected by pixel points corresponding to roads is extracted from the pixel-completed road network skeleton map as a technical solution for extracting the minimum logistics distribution unit, which realizes the process of obtaining a candidate pixel point map by performing pixel value processing on a road network information map, performing edge extraction and missing edge completion processing on the candidate pixel points to obtain a complete road network contour map, and then performing skeleton extraction and pixel completion to extract the minimum logistics distribution unit from the road network information map. Edge extraction allows missing road networks to be completed without requiring excessive iterations when completing missing edges. Skeleton graph extraction allows road curves to be refined to a specified pixel width, facilitating the conversion of pixel points into spatial coordinates to extract the minimum logistics delivery unit. The technical solution of the present invention allows the automatic extraction of the minimum logistics delivery unit from a road network information graph, eliminating the need for manual processing and thus saving manpower. The extraction is highly efficient, and the extracted minimum logistics delivery unit is more accurate and reliable.
[0017] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.
[0019] Figure 1 1. It is a schematic diagram of the main steps of the method for extracting the minimum logistics delivery unit according to an embodiment of the present invention;
[0020] Figure 2This is a schematic diagram of a process for generating a road network information graph according to an embodiment of the present invention;
[0021] Figure 3 is a candidate pixel map according to an embodiment of the present invention;
[0022] Figure 4 is an outer contour map of candidate pixels according to an embodiment of the present invention;
[0023] Figure 5 is a complete road network outline map of an embodiment of the present invention;
[0024] Figure 6 is a road network skeleton diagram according to an embodiment of the present invention;
[0025] Figure 7 2 is a schematic diagram of a pixel completion effect according to an embodiment of the present invention;
[0026] Figure 8 Schematic diagram of eight neighborhoods of pixel point P1 according to an embodiment of the present invention;
[0027] Figure 9 This is a schematic diagram of the main modules of a device for extracting the minimum logistics distribution unit according to an embodiment of the present invention;
[0028] Figure 10 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
[0029] Figure 11 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0031] In order to solve the technical problems existing in the prior art, the present invention provides a method and device for extracting the minimum logistics distribution unit, which can process the road network information map and automatically extract the minimum logistics distribution unit without manual processing, thereby saving manpower and having high extraction efficiency. The extracted minimum logistics distribution unit is more accurate and reliable.
[0032] Figure 1 FIG. 1 is a schematic diagram of the main steps of the method for extracting the minimum logistics distribution unit according to an embodiment of the present invention. Figure 1As shown, the method for extracting the minimum logistics delivery unit according to the embodiment of the present invention mainly includes the following steps S101 to S105.
[0033] Step S101: Pixel values of the road network information map are processed to obtain a candidate pixel map corresponding to roads in the road network area. The road network information map includes information related to the road network, such as road location coordinates, shape, and adjacent neighborhoods and schools. In embodiments of the present invention, publicly available images containing road network information can be obtained online and accurately extracted from them for use in extracting the minimum logistics distribution unit.
[0034] According to one embodiment of the present invention, a road network information map can be obtained by: obtaining a set of tile images containing road network information, wherein the tile images in the tile image set are images obtained by slicing a map image of a preset distribution area; and splicing the tile images in a coordinate order to obtain a road network information map. A tile refers to a map within a certain range that is cut into a number of rows and columns of square grid images according to a certain size and format, according to a zoom level or scale. The sliced square grid images are figuratively called tiles. A road network information map can be obtained by obtaining tile images and splicing them in a coordinate order. The distribution area is, for example, a pre-set area to be divided into a minimum distribution range, such as the geographical area corresponding to a distribution station. In a specific implementation, the distribution area can be a city or a district in a city, etc., and the present invention does not limit this. When segmenting the map image of the preset delivery area, it can be segmented into several rows and columns of square raster images according to the set zoom level or scale. For example, if the ratio of the set tile image to the delivery area image is 1:100, the delivery area image can be segmented into 100 tile images according to this ratio.
[0035] Figure 2 FIG. 1 is a schematic diagram of a process for generating a road network information graph according to an embodiment of the present invention. Figure 2 The figure shows the process of stitching four tile images in the order of coordinates to obtain a complete road network information map. The horizontal coordinates of the two tile images stitched together are the same and the vertical coordinates are continuous; the vertical coordinates of the two tile images stitched together are the same and the horizontal coordinates are continuous.
[0036] According to another embodiment of the present invention, in step S101, pixel value processing is performed on the road network information map to obtain a candidate pixel point map corresponding to the roads in the road network area, which can specifically include: binarization processing of the pixel values of the road network information map is performed to obtain a candidate pixel point map corresponding to the roads in the road network area, the candidate pixel point map includes a first pixel point set corresponding to the roads and a second pixel point set corresponding to the non-roads, and the first pixel point set is the candidate pixel point. Figure 3 is a candidate pixel point map of an embodiment of the present invention. Specifically, in this embodiment, the pixel points corresponding to the roads in the RGB image of the road network information map are extracted, for example Figure 2 The pixel values in the image are (255, 255, 255), that is, white pixels. These pixels are used as candidate pixels corresponding to the roads in the road network area, and these candidate pixels are assigned a value of 1. All pixels with other values are assigned a value of 0 as background information, and the following can be obtained: Figure 3 The candidate pixel map shown in Figure 3 In the figure, the white part represents the candidate pixel points corresponding to the road in the road network area, and the black part is the background information of the non-road.
[0037] Because the original road network information map contains a lot of text or icons, the pixels corresponding to these locations may be missing, broken, or have internal defects on wider roads. Using these original pixels directly without processing will affect the subsequent algorithm's determination of the minimum logistics distribution unit. Therefore, these areas need to be supplemented. Specifically, this can be done through the following steps S102 and S103.
[0038] Step S102: edge extraction processing is performed on the candidate pixel points in the candidate pixel point map to obtain the outer contour map of the candidate pixel points. In an embodiment of the present invention, edge extraction processing is performed on the candidate pixel points in the candidate pixel point map by using the Canny operator. The Canny operator is an edge detection operator that can extract the edge contour of an object. Such processing has no effect on the originally intact straight line or curve area, but only makes the inside of it hollow, which can be subsequently filled through the morphological expansion processing of step S103; for those disconnected areas, smaller fragments can be expanded outward to make the distance between these fragments closer, and the disconnected areas can be filled using morphological expansion processing. Figure 4 1 is an outer contour diagram of a candidate pixel point according to an embodiment of the present invention, which shows an outer contour diagram obtained after edge extraction processing is performed on the candidate pixel point using the Canny operator.
[0039] Step S103: Missing edges are completed on the outer contour image to obtain a complete road network contour image. In an embodiment of the present invention, missing edges are completed by performing morphological dilation on the outer contour image. After Canny operator processing, the spacing between pixels on the same road is smaller. Wider roads have smaller defects, and morphological dilation can be used to complete these missing edges, resulting in a more complete road network contour image.
[0040] Figure 5 This is a complete road network outline map of an embodiment of the present invention, which shows the complete road network outline map obtained after dilation processing. The missing parts in the map are all completed by the algorithm, and the positions are accurate, without redundant route connections. In this embodiment of the present invention, a common 3*3 filter (a pixel block with a length of 3 pixels and a width of 3 pixels, all with a value of 1) can be used to scan the original image from left to right and from top to bottom. Then, for each pixel point with a value of 1 in the image to be processed, it is aligned with the origin of the template kernel. Then, for the points with a value of 1 in the template kernel, the corresponding pixels in the image are updated to 1 to perform morphological dilation processing.
[0041] Step S104: Process the pixel points corresponding to the roads in the complete road network outline map to obtain a road network skeleton map. In the embodiment of the present invention, since the pixel values corresponding to the roads are relatively large after the outer contour map is expanded in step S103, which is not conducive to the subsequent conversion of spatial coordinates when determining the minimum logistics delivery unit, it is necessary to perform skeleton extraction on the pixel points corresponding to the roads in the complete road network outline map after the expansion process, so as to refine the pixel points corresponding to all roads into a road network skeleton map with a width of only one pixel. Figure 6 is a road network skeleton diagram of an embodiment of the present invention, such as Figure 6 As shown, there are no missing or broken parts in the road network skeleton diagram.
[0042] According to one embodiment of the present invention, a skeleton extraction algorithm is used to process the pixels corresponding to the roads in the complete road network outline map into pixels of a specified pixel width, thereby obtaining a road network skeleton map. Here, the specified pixel width is, for example, 1 pixel width, which facilitates the determination of the spatial coordinates of the minimum logistics delivery unit.
[0043] Step S105: Perform pixel completion processing on the road network skeleton diagram, and extract the closed area connected by the pixel points corresponding to the roads from the road network skeleton diagram after pixel completion processing as the minimum logistics distribution unit. The minimum logistics distribution unit is the minimum distribution range included in the distribution site. In the extracted road network skeleton diagram, there may be missing intersection pixels, outliers in straight line pixels, and deviations in intersection pixels. These pixels need to be completed and moved, otherwise it will affect the calculation of subsequent algorithms. The present invention uses a method based on the eight neighborhoods of pixels to handle these situations. For each pixel corresponding to the road in the road network skeleton diagram, the eight neighborhood pixels corresponding to the pixel are obtained, and pixel completion processing is performed based on the pixel values of the eight neighborhood pixels.
[0044] Figure 7 FIG. 1 is a schematic diagram of the pixel completion effect of an embodiment of the present invention. Figure 7 As shown, the left column shows the cases of missing pixels, and the right column shows the effects after the corresponding pixels are completed. Figure 7 The left side of the first row (a) shows the situation where the intersection pixels are missing, and the corresponding processing effect is shown on the right side of the first row (b); the left side of the second row (c) shows the situation where outliers appear in the straight line pixels, and the corresponding processing effect is shown on the right side of the second row (d); the left side of the third row (e) and the left side of the fourth row (g) show the situation where the intersection pixels deviate, and the corresponding processing effects are shown on the right side of the third row (f) and the right side of the fourth row (h).
[0045] Figure 8 FIG. 8 is a schematic diagram of eight neighborhoods of a pixel point P1 according to an embodiment of the present invention. Figure 8 As shown in FIG, the eight-neighborhood of pixel point P1 refers to the area corresponding to the eight pixels adjacent to pixel point P1. In the embodiment of the present invention, for each pixel point with a pixel value of 1 in the road network skeleton diagram, the eight-neighborhood situation corresponding to the pixel point is checked, and different processing is performed according to different eight-neighborhood situations, mainly including the following situations:
[0046] 1. When the pixel values of pixels P1, P3, and P9 are 1 and the pixel values of other pixels are 0, P1=0 and P2=1. P1=0 indicates that the pixel value of pixel P1 is 0, and the following are similar.
[0047] 2. When the pixel values of pixels P1, P3, and P5 are 1 and the pixel values of other pixels are 0, P1 = 0 and P4 = 1;
[0048] 3. When the pixel values of pixels P1, P5, and P7 are 1 and the pixel values of other pixels are 0, P1 = 0 and P6 = 1;
[0049] 4. When the pixel values of pixels P1, P7, and P9 are 1 and the pixel values of other pixels are 0, P1 = 0 and P8 = 1;
[0050] 5. When the pixel values of pixels P1, P3, P5, and P9 are 1 and the pixel values of other pixels are 0, P1 = 0, P2 = 1, and P4 = 1;
[0051] 6. When the pixel values of pixels P1, P3, P5, and P7 are 1 and the pixel values of other pixels are 0, P1 = 0, P4 = 1, and P6 = 1;
[0052] 7. When the pixel values of pixels P1, P5, P7, and P9 are 1 and the pixel values of other pixels are 0, P1 = 0, P6 = 1, and P8 = 1;
[0053] 8. When the pixel values of pixels P1, P3, P7, and P9 are 1 and the pixel values of other pixels are 0, P1 = 0, P2 = 1, and P8 = 1;
[0054] 9. When the pixel values of pixels P1, P2, P3, P7, and P9 are 1 and the pixel values of other pixels are 0, P1 = 0 and P8 = 1;
[0055] 10. When the pixel values of pixels P1, P2, P3, P5, and P9 are 1 and the pixel values of other pixels are 0, P1 = 0 and P4 = 1;
[0056] 11. When the pixel values of pixels P1, P3, P4, P5, and P9 are 1 and the pixel values of other pixels are 0, P1 = 0 and P2 = 1;
[0057] 12. When the pixel values of pixels P1, P3, P4, P5, and P7 are 1 and the pixel values of other pixels are 0, P1 = 0 and P6 = 1;
[0058] 13. When the pixel values of pixels P1, P3, P5, P6, and P7 are 1 and the pixel values of other pixels are 0, P1 = 0 and P4 = 1;
[0059] 14. When the pixel values of pixels P1, P5, P6, P7, and P9 are 1 and the pixel values of other pixels are 0, P1 = 0 and P8 = 1;
[0060] 15. When the pixel values of pixels P1, P3, P7, P8, and P9 are 1 and the pixel values of other pixels are 0, P1 = 0 and P2 = 1;
[0061] 16. When the pixel values of pixels P1, P5, P7, P8, and P9 are 1 and the pixel values of other pixels are 0, P1 = 0 and P6 = 1;
[0062] 17. When the pixel values of pixels P2, P4, and P8 are 1 and the pixel values of other pixels are 0, P1 = 1 and P2 = 0;
[0063] 18. When the pixel values of pixels P2, P4, and P6 are 1 and the pixel values of other pixels are 0, P1 = 1 and P4 = 0;
[0064] 19. When the pixel values of pixels P4, P6, and P8 are 1 and the pixel values of other pixels are 0, P1 = 1 and P6 = 0;
[0065] 20. When the pixel values of pixels P2, P6, and P8 are 1 and the pixel values of other pixels are 0, P1=1 and P8=0.
[0066] After pixel completion is complete, a closed area formed by connecting the pixels corresponding to the roads is extracted from the pixel-completed road network skeleton image as the minimum logistics delivery unit. Generally, the areas enclosed by the road network contain buildings (such as residential areas, schools, and office buildings). These areas can be divided into delivery ranges for different delivery stations based on their corresponding real-world latitude and longitude coordinates. For a delivery station, each closed area enclosed by the road network constitutes a minimum logistics delivery unit, and multiple minimum logistics delivery units constitute the delivery range of a delivery station.
[0067] According to the technical solution of the present invention, by performing pixel value processing on the road network information map to obtain a candidate pixel point map, then performing edge extraction and missing edge completion processing on the candidate pixel points to obtain a complete road network contour map, and then performing skeleton extraction and pixel completion, it is possible to extract the minimum logistics distribution unit from the road network information map. By edge extraction, the missing road network can be completed without requiring too many iterations when completing missing edges; by extracting the skeleton map, the curve corresponding to the road can be refined to a specified pixel width, which is conducive to converting pixel points into spatial coordinates to extract the minimum logistics distribution unit. Through the technical solution of the present invention, the minimum logistics distribution unit can be automatically extracted based on the road network information map without the need for manual processing, thereby saving manpower, and the extraction efficiency is high, and the extracted minimum logistics distribution unit is more accurate and reliable.
[0068] Figure 9 FIG. 1 is a schematic diagram of the main modules of the device for extracting the minimum logistics distribution unit according to an embodiment of the present invention. Figure 9 As shown, the device 900 for extracting the minimum logistics delivery unit according to an embodiment of the present invention mainly includes a pixel value processing module 901 , an edge extraction module 902 , an edge completion module 903 , a skeleton extraction module 904 and a pixel completion module 905 .
[0069] The pixel value processing module 901 is used to perform pixel value processing on the road network information map to obtain a candidate pixel point map corresponding to the roads in the road network area;
[0070] An edge extraction module 902 is configured to perform edge extraction processing on candidate pixels in the candidate pixel map to obtain an outer contour map of the candidate pixels;
[0071] The edge completion module 903 is used to complete the missing edges of the outer contour map to obtain a complete road network contour map;
[0072] A skeleton extraction module 904 is used to process the pixel points corresponding to the roads in the complete road network outline map to obtain a road network skeleton map;
[0073] The pixel completion module 905 is used to perform pixel completion processing on the road network skeleton map, and extract the closed area connected by the pixel points corresponding to the roads from the road network skeleton map after pixel completion as the logistics minimum distribution unit. The logistics minimum distribution unit is the minimum distribution range included in the distribution site.
[0074] According to one embodiment of the present invention, the road network information graph is obtained by:
[0075] Acquire a tile image set containing road network information, wherein the tile images in the tile image set are images obtained by segmenting a map image of a preset delivery area;
[0076] The tile images are spliced in coordinate order to obtain a road network information map.
[0077] According to another embodiment of the present invention, the pixel value processing module 901 may also be used to:
[0078] The road network information map is subjected to a binarization process on pixel values to obtain a candidate pixel point map corresponding to roads in the road network area, wherein the candidate pixel point map includes a first pixel point set corresponding to roads and a second pixel point set corresponding to non-roads, and the first pixel point set is a candidate pixel point.
[0079] According to yet another embodiment of the present invention, the edge extraction module 902 may also be configured to:
[0080] The Canny operator is used to perform edge extraction processing on the candidate pixel points in the candidate pixel point map.
[0081] According to yet another embodiment of the present invention, the edge completion module 903 may also be used to:
[0082] A missing edge completion process is performed on the outer contour image by performing a morphological dilation process on the outer contour image.
[0083] According to yet another embodiment of the present invention, the skeleton extraction module 904 may also be used to:
[0084] The pixel points corresponding to the roads in the complete road network outline map are processed into pixel points of a specified pixel width by a skeleton extraction algorithm to obtain a road network skeleton map.
[0085] According to yet another embodiment of the present invention, the pixel completion module 905 may also be used to:
[0086] For each pixel point corresponding to the road in the road network skeleton diagram, eight neighborhood pixel points corresponding to the pixel point are obtained, and pixel completion processing is performed according to the pixel values of the eight neighborhood pixel points.
[0087] According to the technical solution of an embodiment of the present invention, a road network information graph is processed for pixel values to obtain a candidate pixel point graph corresponding to roads in a road network area; edge extraction is performed on the candidate pixels in the candidate pixel point graph to obtain an outer contour graph of the candidate pixels; missing edge completion is performed on the outer contour graph to obtain a complete road network contour graph; the pixels corresponding to the roads in the complete road network contour graph are processed to obtain a road network skeleton graph; pixel completion is performed on the road network skeleton graph, and a closed area formed by connecting the pixels corresponding to the roads is extracted from the pixel-completed road network skeleton graph as a minimum logistics delivery unit. This technical solution realizes that by processing the road network information graph for pixel values to obtain a candidate pixel point graph, then performing edge extraction and missing edge completion on the candidate pixels to obtain a complete road network contour graph, and then performing skeleton extraction and pixel completion, the minimum logistics delivery unit can be extracted from the road network information graph. Edge extraction allows missing road networks to be completed without requiring an excessive number of iterations when performing missing edge completion; and by extracting the skeleton graph, the curves corresponding to the roads can be refined to a specified pixel width, facilitating the conversion of pixels into spatial coordinates to extract the minimum logistics delivery unit. Through the technical solution of the present invention, the minimum logistics distribution unit can be automatically extracted according to the road network information map without manual processing, thereby saving manpower, and the extraction efficiency is high, and the extracted minimum logistics distribution unit is more accurate and reliable.
[0088] Figure 10 An exemplary system architecture 1000 is shown to which the method for extracting the minimum logistics delivery unit or the device for extracting the minimum logistics delivery unit according to an embodiment of the present invention can be applied.
[0089] like Figure 10As shown, system architecture 1000 may include terminal devices 1001, 1002, and 1003, a network 1004, and a server 1005. Network 1004 is used to provide a medium for communication links between terminal devices 1001, 1002, and 1003 and server 1005. Network 1004 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0090] Users can use terminal devices 1001, 1002, and 1003 to interact with server 1005 via network 1004 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 1001, 1002, and 1003, such as logistics and distribution applications, map applications, image processing applications, etc. (only as examples).
[0091] The terminal devices 1001 , 1002 , and 1003 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0092] Server 1005 may be a server that provides various services, such as a background management server (for example only) that supports requests for extracting the minimum logistics delivery unit sent by users using terminal devices 1001, 1002, and 1003. The background management server may perform pixel value processing on the received data such as the road network information map to obtain a candidate pixel point map corresponding to the roads in the road network area; perform edge extraction processing on the candidate pixels in the candidate pixel point map to obtain an outer contour map of the candidate pixels; perform missing edge completion processing on the outer contour map to obtain a complete road network contour map; process the pixels corresponding to the roads in the complete road network contour map to obtain a road network skeleton map; perform pixel completion processing on the road network skeleton map, and extract a closed area connected by the pixel points corresponding to the roads from the road network skeleton map after pixel completion as the minimum logistics delivery unit, and feed back the processing results (for example, the extracted minimum logistics delivery unit - for example only) to the terminal device.
[0093] It should be noted that the method for extracting the minimum logistics delivery unit provided in the embodiment of the present invention is generally executed by the server 1005 , and accordingly, the device for extracting the minimum logistics delivery unit is generally set in the server 1005 .
[0094] It should be understood that Figure 10 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0095] Reference below Figure 11, which shows a structural diagram of a computer system 1100 of a terminal device or server suitable for implementing an embodiment of the present invention. Figure 11 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0096] like Figure 11 As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage unit 1108 into a random access memory (RAM) 1103. Various programs and data required for the operation of the system 1100 are also stored in the RAM 1103. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0097] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, and the like; an output section 1107 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 1108 including a hard disk; and a communication section 1109 including a network interface card such as a LAN card or a modem. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. Removable media 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1110 as needed, so that computer programs read therefrom can be installed into the storage section 1108 as needed.
[0098] In particular, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1109, and / or installed from a removable medium 1111. When the computer program is executed by the central processing unit (CPU) 1101, the above-mentioned functions defined in the system of the present invention are performed.
[0099] It should be noted that the computer-readable medium described in the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0101] The units or modules involved in the embodiments of the present invention may be implemented in software or in hardware. The units or modules described may also be provided in a processor. For example, they may be described as: a processor including a pixel value processing module, an edge extraction module, an edge completion module, a skeleton extraction module, and a pixel completion module. The names of these units or modules do not, in certain cases, constitute limitations on the units or modules themselves. For example, the pixel value processing module may also be described as a "module for performing pixel value processing on a road network information map to obtain a candidate pixel point map corresponding to roads in a road network area."
[0102] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes: performing pixel value processing on the road network information map to obtain a candidate pixel point map corresponding to the roads in the road network area; performing edge extraction processing on the candidate pixel points in the candidate pixel point map to obtain an outer contour map of the candidate pixel points; performing missing edge completion processing on the outer contour map to obtain a complete road network contour map; processing the pixel points corresponding to the roads in the complete road network contour map to obtain a road network skeleton map; performing pixel completion processing on the road network skeleton map, and extracting a closed area connected by the pixel points corresponding to the roads from the road network skeleton map after pixel completion processing as a logistics minimum distribution unit, and the logistics minimum distribution unit is the minimum distribution range included in the distribution site.
[0103] According to the technical solution of an embodiment of the present invention, a road network information graph is processed for pixel values to obtain a candidate pixel point graph corresponding to roads in a road network area; edge extraction is performed on the candidate pixels in the candidate pixel point graph to obtain an outer contour graph of the candidate pixels; missing edge completion is performed on the outer contour graph to obtain a complete road network contour graph; the pixels corresponding to the roads in the complete road network contour graph are processed to obtain a road network skeleton graph; pixel completion is performed on the road network skeleton graph, and a closed area formed by connecting the pixels corresponding to the roads is extracted from the pixel-completed road network skeleton graph as a minimum logistics delivery unit. This technical solution realizes that by processing the road network information graph for pixel values to obtain a candidate pixel point graph, then performing edge extraction and missing edge completion on the candidate pixels to obtain a complete road network contour graph, and then performing skeleton extraction and pixel completion, the minimum logistics delivery unit can be extracted from the road network information graph. Edge extraction allows missing road networks to be completed without requiring an excessive number of iterations when performing missing edge completion; and by extracting the skeleton graph, the curves corresponding to the roads can be refined to a specified pixel width, facilitating the conversion of pixels into spatial coordinates to extract the minimum logistics delivery unit. Through the technical solution of the present invention, the minimum logistics distribution unit can be automatically extracted according to the road network information map without manual processing, thereby saving manpower, and the extraction efficiency is high, and the extracted minimum logistics distribution unit is more accurate and reliable.
[0104] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for extracting the minimum logistics distribution unit, characterized in that: include: Processing the pixel values of the road network information map to obtain a candidate pixel point map corresponding to the roads in the road network area; Performing edge extraction processing on the candidate pixel points in the candidate pixel point map to obtain an outer contour map of the candidate pixel points; Performing morphological dilation processing on the outer contour map to complete missing edges of the outer contour map, so as to obtain a complete road network contour map; Processing the pixel points corresponding to the roads in the complete road network outline map into pixel points of a specified pixel width using a skeleton extraction algorithm to obtain a road network skeleton map; The road network skeleton map is pixel-completed, and a closed area formed by connecting pixel points corresponding to roads is extracted from the road network skeleton map after pixel completion as the minimum logistics distribution unit. The minimum logistics distribution unit is the minimum distribution range included in the distribution site.
2. The method according to claim 1, characterized in that The road network information graph is obtained by the following method: Acquire a tile image set containing road network information, wherein the tile images in the tile image set are images obtained by segmenting a map image of a preset delivery area; The tile images are spliced in coordinate order to obtain the road network information map.
3. The method according to claim 1, characterized in that The pixel values of the road network information map are processed to obtain the candidate pixel point map corresponding to the roads in the road network area, including: The road network information map is subjected to a binarization process on pixel values to obtain the candidate pixel point map corresponding to the roads in the road network area, wherein the candidate pixel point map includes a first pixel point set corresponding to the roads and a second pixel point set corresponding to the non-roads, and the first pixel point set is the candidate pixel point.
4. The method according to claim 1, wherein Performing edge extraction processing on the candidate pixel points in the candidate pixel point map includes: The Canny operator is used to perform edge extraction processing on the candidate pixel points in the candidate pixel point map.
5. The method according to claim 1, wherein Performing pixel completion processing on the road network skeleton graph includes: For each pixel point corresponding to the road in the road network skeleton diagram, eight neighborhood pixel points corresponding to the pixel point are obtained, and pixel completion processing is performed according to the pixel values of the eight neighborhood pixel points.
6. A device for extracting the smallest distribution unit of logistics, characterized in that: include: A pixel value processing module is used to process the pixel values of the road network information map to obtain a candidate pixel point map corresponding to the roads in the road network area; An edge extraction module is used to perform edge extraction processing on the candidate pixel points in the candidate pixel point map to obtain an outer contour map of the candidate pixel points; an edge completion module, configured to complete missing edges of the outer contour map by performing morphological dilation processing on the outer contour map, so as to obtain a complete road network contour map; A skeleton extraction module is used to process the pixel points corresponding to the roads in the complete road network outline map into pixel points of a specified pixel width using a skeleton extraction algorithm to obtain a road network skeleton map; The pixel completion module is used to perform pixel completion processing on the road network skeleton map, and extract the closed area connected by the pixel points corresponding to the roads from the road network skeleton map after pixel completion processing as the logistics minimum distribution unit. The logistics minimum distribution unit is the minimum distribution range included in the distribution site.
7. An electronic device for extracting the smallest distribution unit of logistics, 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 method according to any one of claims 1 to 5.
8. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Distribution line planning method and device, electronic equipment and storage medium
CN110837993A
Automatic road boundary contour extraction method
CN112183554A