Region boundary generation method and device, storage medium, electronic equipment and program product
By acquiring the fusion of distribution trajectory and map data, and using boundary generation model processing, the problems of high cost and poor accuracy of interest boundary recognition are solved, efficient and accurate regional boundary generation is achieved, and manual dependence and cost are reduced.
Patent Information
- Application Number
- CN202411124818.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-22
AI Technical Summary
In the prior art, the identification of interest boundaries is high and inefficient, and the accuracy is poor when automatically identifying the location and boundaries of buildings through satellite reading.
By obtaining the delivery trajectory and delivery information within the preset time period, generating a trajectory map and fusing it with the map data, the boundary generation model is used to process the fused data to generate regional boundaries, improving the accuracy of the boundaries and automated processing capabilities.
It reduces the cost of boundary generation, improves the accuracy and automated processing of boundaries, reduces dependence on manuals, enhances the multi-source nature of information, and reduces the accuracy impact caused by a single data source.
Smart Images

Figure CN119003675A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, storage medium, electronic device and program product for generating a region boundary. Background Art
[0002] In urban planning, logistics distribution and geographic information systems, accurately identifying and dividing the boundaries of Area of Interset (AOI) is of great significance for improving service efficiency and resource association.
[0003] In the process of implementing the present invention, it is found that there are at least the following technical problems in the prior art: At present, the boundary of the interest surface can generally be realized by the following two methods: one is to manually collect the community boundary on the spot to draw the boundary of the interest surface where the community is located in the geographic information system, which has the problems of high cost and low efficiency. The second is to automatically identify the location and boundary of the building through satellite reading to generate the boundary of the interest surface, but the single data source of satellite map leads to poor boundary recognition accuracy. Summary of the invention
[0004] The present invention provides a method, device, storage medium, electronic equipment and program product for generating a region boundary, which can improve the accuracy of the region boundary and reduce the cost of drawing the region boundary.
[0005] According to one aspect of the present invention, a method for generating a region boundary is provided, comprising:
[0006] Obtaining a delivery track and delivery information within a preset time period, wherein the delivery information includes location information and time information;
[0007] Determine the area to be processed based on the location information in the delivery information, and segment the delivery trajectory based on the time information in the delivery information to obtain a trajectory map corresponding to the area to be processed;
[0008] Acquire map data, and perform image fusion on the trajectory map of the area to be processed and the map data to obtain fused data;
[0009] The fused data is processed based on a boundary generation model to obtain a region boundary corresponding to the region to be processed.
[0010] Optionally, the location information in the delivery information includes delivery location information and / or original address information of the delivery object;
[0011] The determining of the area to be processed based on the location information in the delivery information includes: performing entity word recognition on the delivery location information and / or the original address information of the delivery object based on an entity recognition model to obtain entity location information; and determining the area to be processed in the entity location information.
[0012] Optionally, the delivery track includes a timestamp and location point data corresponding to each timestamp; the time information in the delivery information includes a successful delivery timestamp; there is at least one delivery track within a preset time period, and any delivery track corresponds to at least one delivery information;
[0013] The method of segmenting the delivery trajectory based on the time information in the delivery information to obtain a trajectory map corresponding to the area to be processed includes: matching the area information of the area to be processed with the delivery information, and determining the start timestamp and the end timestamp corresponding to each delivery trajectory in the area to be processed based on the successful delivery timestamp in the matched delivery information; segmenting each delivery trajectory based on the start timestamp and the end timestamp corresponding to each delivery trajectory in the area to be processed to obtain at least one trajectory segment corresponding to the area to be processed; and generating a trajectory map of the area to be processed based on the at least one trajectory segment.
[0014] Optionally, generating the trajectory map of the area to be processed based on the at least one trajectory segment includes: determining an initial image formed by the at least one trajectory segment of the area to be processed, and gridding the initial image; determining pixel values in the grid based on the number of trajectory segments in each grid in the initial image, and obtaining the trajectory map of the area to be processed based on the pixel values of each network in the initial image.
[0015] Optionally, the fused data includes four-channel data, and the four-channel data includes three-channel color data in the map data and pixel values in the trajectory map.
[0016] Optionally, before performing image fusion on the trajectory map of the area to be processed and the map data, the method further includes: performing alignment processing on the trajectory map of the area to be processed and the map data.
[0017] Optionally, the training method of the boundary generation model includes:
[0018] Create a generator and a discriminator, train the generator and the discriminator, and use the trained generator as the boundary generation model, wherein the training of the generator and the discriminator includes: obtaining the delivery trajectory and delivery information within a sample time period, generating a trajectory map of at least one sample area based on the delivery trajectory and delivery information within the sample time period, and fusing the trajectory map of the at least one sample area with the map data to obtain fused data of the at least one sample area; inputting the fused data of the sample area into the generator to obtain the predicted boundary of the sample area; judging the predicted boundary and the actual boundary of the sample area based on the discriminator to obtain a judgment result, generating a loss function based on the judgment result, and adjusting the model parameters of the generator and the discriminator based on the loss function.
[0019] According to another aspect of the present invention, there is provided a region boundary generating device, comprising:
[0020] An information acquisition module, used to acquire a delivery track and delivery information within a preset time period, wherein the delivery information includes location information and time information;
[0021] A trajectory map generating module, used to determine the area to be processed based on the location information in the delivery information, and to segment the delivery trajectory based on the time information in the delivery information to obtain a trajectory map corresponding to the area to be processed;
[0022] A fusion module is used to obtain map data, and perform image fusion on the trajectory map of the area to be processed and the map data to obtain fused data;
[0023] The boundary generation module is used to process the fused data based on the boundary generation model to obtain the region boundary corresponding to the region to be processed.
[0024] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0025] at least one processor; and
[0026] a memory communicatively connected to the at least one processor; wherein,
[0027] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the region boundary generation method described in any embodiment of the present invention.
[0028] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for generating a region boundary according to any embodiment of the present invention when executed.
[0029] According to another aspect of the present invention, a computer program product is provided, characterized in that the computer program product comprises a computer program, and when the computer program is executed by a processor, the method for generating a region boundary described in any embodiment of the present invention is implemented.
[0030] The technical solution of the embodiment of the present invention identifies the area to be processed through the delivery information within a preset time period, generates a trajectory map of the area to be processed through the delivery information and the delivery trajectory, and fuses the trajectory map of the area to be processed with the map data of the area to be processed to obtain financial data. Through the fusion of the trajectory map and the map data, the multi-source of information is improved, and the impact of incomplete information caused by the amount of information caused by a single data source on the accuracy of the boundary is reduced. The fused data is analyzed and processed through the boundary generation model to obtain the regional boundary of the area to be processed, and automatic processing is realized, which reduces the dependence on manual labor, improves the automation of boundary generation, and reduces the cost of boundary generation.
[0031] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0033] Figure 1 is a flow chart of a method for generating a region boundary provided by an embodiment of the present invention;
[0034] Figure 2 is a schematic diagram of a process of generating fused data provided by an embodiment of the present invention;
[0035] Figure 3 is a schematic diagram of a training process of a boundary generation model provided by an embodiment of the present invention;
[0036] Figure 4 is a structural schematic diagram of a region boundary generating device provided by an embodiment of the present invention;
[0037] Figure 5It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0040] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. As an optional but non-limiting implementation method, in response to receiving an active request from the user, the method of sending a prompt message to the user can be, for example, a pop-up window, and the prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device. It is understandable that the above-mentioned notification and user authorization acquisition process are only illustrative and do not constitute a limitation on the implementation method of the present disclosure. Other methods that meet relevant laws and regulations can also be applied to the implementation method of the present disclosure.
[0041] Figure 1This is a flow chart of a method for generating regional boundaries provided by an embodiment of the present invention. This embodiment can be applied to periodically updating regional boundaries, and the regional boundaries are obtained by processing after fusion of satellite map data and information generated by delivery personnel during the delivery process. The method can be executed by a regional boundary generating device, which can be implemented in the form of hardware and / or software. The regional boundary generating device can be configured in a mobile terminal such as a mobile phone, a tablet computer, a computer, or an electronic device such as a server. Figure 1 As shown, the method includes:
[0042] S110: Obtain a delivery track and delivery information within a preset time period, wherein the delivery information includes location information and time information.
[0043] S120: Determine a to-be-processed area based on the location information in the delivery information, and segment the delivery trajectory based on the time information in the delivery information to obtain a trajectory map corresponding to the to-be-processed area.
[0044] S130, acquiring map data, and performing image fusion on the trajectory map of the area to be processed and the map data to obtain fused data.
[0045] S140: Process the fused data based on a boundary generation model to obtain a region boundary corresponding to the region to be processed.
[0046] In this embodiment, the preset time period may be a historical time period before the current moment, for example, one month or three months before the current moment. Optionally, a scheduled task for updating the regional boundary is set, and the time interval of the scheduled task may be one month, half a month, or one week. When the start condition of the scheduled task is met, the delivery track and delivery information within the preset time period are obtained to execute the scheduled task for updating the regional boundary. It can be understood that the delivery track and delivery information are obtained and stored in advance after authorization by the delivery personnel. The delivery personnel carry a mobile terminal, which may be a mobile phone, a tablet computer, or a handheld device. The mobile terminal has a positioning function and a track generation function, and can perform real-time positioning during the delivery of items by the delivery personnel, and generate a delivery track based on the real-time positioning information. The location point data corresponding to each time stamp of the delivery track is the positioning information determined by the positioning module of the mobile terminal, and the location point data may be longitude and latitude data. The mobile terminal uploads the delivery track regularly or in real time, and stores the delivery track according to the time information for subsequent calls.
[0047] The delivery information is the information generated by the delivery personnel during the delivery process of the goods, and may include time information and location information, for example. Among them, the time information may be the time information of the completion of the delivery operation, such as the delivery timestamp, and the location information may be the delivery location information of the delivery object (i.e., the goods), for example, the location information in the delivery information includes the delivery location information and / or the original address information of the delivery object; exemplarily, when the mobile terminal detects that the delivery personnel sets a delivery operation for a certain delivery object, the current moment is recorded as the delivery timestamp of the delivery object, and the current location information is recorded as the delivery location information. The delivery location information here may be determined based on at least one positioning module, and at least one positioning module may include an indoor positioning module and an outdoor positioning module. Different positioning modules may be used to determine the delivery location information according to the indoor and outdoor status of the delivery personnel, so as to improve the accuracy of the delivery location information. Among them, the indoor and outdoor status may be obtained based on the analysis of multi-source sensor data, for example, the multi-source sensor data is analyzed and processed by a machine learning model to obtain the indoor and outdoor status of the delivery personnel. The multi-source sensor data may be the relevant parameters of each positioning module collected by multiple sensors, for example, including but not limited to parameters such as positioning accuracy and signal-to-noise ratio.
[0048] Relevant information about the delivery object, such as the order number, the original address information of the delivery object, the recipient information of the delivery object, etc., can be displayed on the display device (e.g., display screen) of the mobile terminal. The display device of the mobile terminal may also include a delivery control. When the delivery personnel completes the delivery of the delivery object, the delivery operation is completed by triggering the delivery control, and the delivery timestamp, delivery location information, and / or the original address information of the delivery object are recorded, wherein the original address information of the delivery object may be the address information in the order information, i.e., the receiving address information of the delivery object. The mobile terminal uploads and stores the delivery information generated during the delivery process in a scheduled or real-time manner for subsequent calls. It can be understood that the delivery information is generated in the real-time generation process of the delivery track, and the delivery track and the delivery information are stored in association for the convenience of the joint call of the delivery track and the delivery information.
[0049] The area in this embodiment can be understood as a community, a park, or an independent building, wherein the independent building may include but is not limited to an office building, etc. It is understandable that the delivery personnel can deliver items in at least one area, for example, the delivery track of the delivery personnel is from the first area to the second area, and then to the third area, etc. In the process of delivering items in each area, delivery information is formed through the delivery operation, and at least one area to be processed is determined based on the location information in the delivery information.
[0050] Among them, the location information in the delivery information includes the delivery location information and / or the original address information of the delivery object. The delivery location information and the original address information are text information, for example, it can be Building xx, xx Community, xx District, etc. By analyzing and processing the delivery location information and / or the original address information of the delivery object, the area to be processed where the delivery location is located is obtained. In some embodiments, when the delivery location information and the original address information corresponding to a certain order are the same, the delivery location information and the original address information can be deduplicated to reduce the amount of processed data. When the delivery location information and the original address information are different, and the error distance is greater than a preset threshold, the delivery operation is verified. If the delivery operation is a valid operation, it indicates that the delivery address of the item has changed, and the delivery location information is used as the location information in the delivery information; if the delivery operation is a false delivery operation, the delivery information is cancelled.
[0051] In some embodiments, the area information in the delivery location information and / or the original address information may be identified to determine the area to be processed. Exemplarily, a first keyword is set, and the first keyword may include but is not limited to "community", "office building", "park", etc., and the first keyword is matched in the delivery location information and / or the original address information to determine the area information corresponding to the first keyword, such as xx community, xx park, etc., and the area to be processed is determined based on the area information.
[0052] In some embodiments, the area information in the delivery location information and / or the original address information may be identified by a machine learning model to determine the area to be processed. Optionally, the delivery location information or the original address information is input into the machine learning model to obtain the area information in the delivery location information or the original address information. The machine learning model is obtained by training the sample address information and the area label information, for example, a neural network model.
[0053] Optionally, determining the area to be processed based on the location information in the delivery information includes: performing entity word recognition on the delivery location information and / or the original address information of the delivery object based on an entity recognition model to obtain entity location information; determining the area to be processed in the entity location information. The entity recognition model may be a BERT model, which is obtained by training sample address information and entity labels. Inputting the delivery location information or the original address information into the entity recognition model to obtain at least one entity location information in the delivery location information or the original address information. Exemplarily, the original address information may be Building XX, XX District, XX Community, XX City, and the entity location information recognized by the entity recognition model may include "XX City", "XX District", "XX Community" and "XX Building". Determining the area to be processed in multiple entity location information may include, for example, setting a second keyword, and the second keyword may be a keyword in other entity location information other than the regional information, for example, the keyword includes but is not limited to "province", "city", "county", "district", "building", etc., by matching the entity location information at the recognition location with the second keyword, removing the keyword that successfully matches the second keyword, and using the entity location information that does not match the second keyword as the regional information to determine the area to be processed. In some embodiments, a region information table may be obtained, which may include pre-marked region information. The entity location information at the identified location is matched in the region information table respectively, and the successfully matched entity location information is used as the region information to determine the region to be processed.
[0054] The same area to be processed corresponding to multiple delivery information is merged and processed, for example, the delivery information corresponding to the same area to be processed is added to the same data set. It can be understood that the determination of whether the areas to be processed are the same can be: based on the location information in each delivery information, an area to be processed can be determined, and whether the physical location information of the areas to be processed corresponding to any two delivery information is the same, and whether the upper-level physical location information of the physical location information corresponding to the areas to be processed corresponding to any two delivery information is the same. If they are the same, it is determined that the areas to be processed corresponding to the above two delivery information are the same area to be processed. If the physical location information of the areas to be processed corresponding to any two delivery information is not the same, or the upper-level physical location information of the physical location information corresponding to the areas to be processed corresponding to any two delivery information is not the same, it is determined that the areas to be processed corresponding to the above two delivery information are not the same area to be processed. For example, taking Building xx, xx Community, xx District, xx City as an example, the upper-level physical location information of xx Community includes xx City and xx District.
[0055] At least one area to be processed can be determined by the location information in the delivery information, and each delivery track can pass through at least one area to be processed. For example, a delivery track can pass through area 1, area 2, area 3, etc. In the delivery process corresponding to the delivery track, at least one delivery information can be generated in each area to be processed, that is, each area to be processed can complete one successful delivery, and each successful delivery operation can generate one delivery information.
[0056] The delivery trajectory includes the location point data corresponding to each of the timestamps; the time information in the delivery information includes the delivery timestamp. There is at least one delivery trajectory within the preset time period, and any of the delivery trajectories corresponds to at least one of the delivery information. The multiple delivery trajectories within the preset time period are segmented and processed respectively according to the time information in the delivery information to obtain at least one trajectory segment corresponding to each area to be processed. Based on the at least one trajectory segment of each area to be processed, a trajectory map of the area to be processed can be generated, and the trajectory map of the area to be processed can represent the route of the delivery personnel in the delivery process in the area to be processed within the preset time period.
[0057] Optionally, the delivery trajectory is segmented based on the time information in the delivery information to obtain a trajectory map corresponding to the area to be processed, including: matching the area information of the area to be processed with the delivery information, and determining the start timestamp and end timestamp corresponding to each delivery trajectory in the area to be processed based on the successful delivery timestamp in the matched delivery information; segmenting each delivery trajectory based on the start timestamp and end timestamp corresponding to each delivery trajectory in the area to be processed to obtain at least one trajectory segment corresponding to the area to be processed; and generating a trajectory map of the area to be processed based on the at least one trajectory segment.
[0058] The area information of the area to be processed is matched with the location information in the multiple delivery information, and the delivery information corresponding to each area to be processed is determined. Based on the correspondence between the delivery track and the delivery information, the time information in at least one delivery information corresponding to the delivery track is determined, and the time information in at least one delivery information is used to determine the start timestamp and end timestamp corresponding to the delivery track in the area to be processed. The start timestamp can be understood as the timestamp when the delivery personnel enter the area to be processed in the delivery track, and the end timestamp can be understood as the timestamp when the delivery personnel leave the area to be processed in the delivery track.
[0059] Exemplarily, the minimum time information in the time information of at least one delivery information corresponding to the delivery track may be used as the starting timestamp, and the maximum time information in the time information of at least one delivery information corresponding to the delivery track may be used as the ending timestamp. Exemplarily, the area 1 to be processed corresponds to n delivery information and m delivery tracks, and each delivery track corresponds to at least one delivery information. For delivery track i, the starting timestamp and ending timestamp corresponding to delivery track i in area 1 to be processed are determined based on at least one delivery information corresponding to delivery track i. For example, delivery track i corresponds to two delivery information, for example, the time information in the first delivery information is 10:00, and the time information in the second delivery information is 10:14. Accordingly, the minimum time information 10:00 may be used as the starting timestamp corresponding to delivery track i in area 1 to be processed, and the maximum time information 10:14 may be used as the ending timestamp corresponding to delivery track i in area 1 to be processed.
[0060] It can be understood that the time information in the delivery information is a successful delivery timestamp, the time when the delivery personnel enters the area to be processed is earlier than the time information in the first delivery information, and the time when the delivery personnel leaves the area to be processed is later than the time information in the last delivery information. In order to improve the accuracy of the delivery track segmentation, optionally, the minimum time information in the time information of at least one delivery information corresponding to the delivery track is determined, and the difference between the minimum time information and the preset time length is determined as the starting timestamp, and the maximum time information in the time information of at least one delivery information corresponding to the delivery track is determined, and the sum of the maximum time information and the preset time length is used as the ending timestamp. For example, the delivery track i corresponds to two delivery information, for example, the time information in the first delivery information is 10:00, and the time information in the second delivery information is 10:14. Taking the preset time length of 5 minutes as an example, the starting timestamp corresponding to the delivery track i in the area to be processed 1 can be 9:55, and the ending timestamp corresponding to the delivery track i in the area to be processed 1 can be 10:19. For example, delivery track i corresponds to a delivery information, and the time information in the delivery information is 10:00. Accordingly, the start timestamp corresponding to delivery track i in the area to be processed 1 can be 9:55, and the end timestamp corresponding to delivery track i in the area to be processed 1 can be 10:05.
[0061] Based on the start timestamp and end timestamp of the delivery trajectory in the area to be processed, the delivery trajectory can be divided and processed to obtain the trajectory segment in the delivery trajectory that is located in the area to be processed. Specifically, the first position point corresponding to the initial timestamp and the second position point corresponding to the end timestamp in the delivery trajectory can be determined, and the first position point is used as the start point of the trajectory segment, and the second position point is used as the end point of the trajectory segment. Correspondingly, the trajectory portion between the first position point and the second position point is used as the trajectory segment in the delivery trajectory that is located in the area to be processed.
[0062] The multiple delivery trajectories in the preset time period are divided into trajectory segments, and each area to be processed corresponds to at least one trajectory segment. A trajectory map of the area to be processed is generated based on the trajectory segments corresponding to the area to be processed. Optionally, a blank map is created, and at least one trajectory segment corresponding to the area to be processed is drawn on the blank map in proportion to generate a trajectory map of the area to be processed. The size of the blank map can be a preset fixed size, or can be determined according to the size of the area to be processed in the map data.
[0063] Optionally, generating a trajectory map of the area to be processed based on the at least one trajectory segment includes: determining an initial image formed by the at least one trajectory segment of the area to be processed, and gridding the initial image; determining the pixel value in the grid based on the number of trajectory segments in each grid in the initial image, and obtaining the trajectory map of the area to be processed based on the pixel value of each network in the initial image. The initial image may be an image with at least one trajectory segment corresponding to the area to be processed drawn, and the background color in the initial image may be white and the trajectory color may be black; or the background color in the initial image may be black and the trajectory color may be white, which is not limited here. The size of the initial image may be 256*256, and the size of the initial image may be determined according to requirements.
[0064] By gridding the initial image, a plurality of grids in the initial image are obtained, and accordingly, each track segment in the initial image passes through a plurality of grids. The number of track segments in each grid in the initial image is counted respectively, wherein the number of track segments in the grid is the number of track segments passing through the grid. The pixel value in each grid is determined based on the number of track segments in each grid in the initial image, and each grid may include at least one pixel point, and the pixel value in each grid includes the pixel value of at least one pixel point in the grid. Exemplarily, for any grid, if the number of track segments in the grid is greater than or equal to a preset threshold, the pixel value of the grid is set to a first value, and if the number of track segments in the grid is less than the preset threshold, the pixel value of the grid is set to a second value, and the first value is different from the second value, for example, the first value may be 1, and the second value may be 0. Optionally, the preset threshold may be determined according to the number of delivery tracks corresponding to the area to be processed within a preset time period. For example, the preset threshold may be 1 / 2 of the number of delivery tracks or 1 / 3 of the number of delivery tracks, etc. Optionally, the preset threshold may also be 1.
[0065] By determining the pixel value of each grid in the initial image, a corresponding trajectory map is formed. The map data of the area to be processed is obtained, and the map data of the processing area and the trajectory map of the area to be processed are fused to obtain the fused data of the area to be processed. For example, see Figure 2, Figure 2 It is a schematic diagram of a process of generating fused data provided by an embodiment of the present invention.
[0066] The map data of the area to be processed is queried from the geographic information system, for example, the area information of the area to be processed is input into the geographic information system to obtain the map data of the area to be processed. The size of the map data of the area to be processed may be consistent with the size of the trajectory map of the area to be processed, for example, the map data may be scaled. The map data may be satellite map data. Before the trajectory map of the area to be processed and the map data are image-fused, the trajectory map of the area to be processed and the map data are aligned to ensure the accuracy of data fusion.
[0067] The map data includes three-channel color data, such as RGB data, and the trajectory image includes one channel data, namely, pixel values. The fusion processing of the map data and the trajectory image can be understood as channel data fusion, and the three-channel color data in the map data and the pixel values in the trajectory image are fused to obtain four-channel data, namely, fused data. The fused data includes four-channel data, and the four-channel data includes the three-channel color data in the map data and the pixel values in the trajectory image. Specifically, the fused data includes a plurality of pixel point data, and each pixel point data can be expressed as (Ri, Gi, Bi, Mi), wherein Ri, Gi and Bi are the three-channel color data corresponding to the pixel point i, respectively, and Mi is the pixel value corresponding to the pixel point i, namely, 0 or 1.
[0068] The fused data of the area to be processed is input into the boundary generation model, and the boundary generation model outputs the area boundary corresponding to the area to be processed. The area boundary corresponding to the processing area is drawn in the geographic information system to facilitate the subsequent query and application of the area boundary corresponding to the processing area. Among them, the boundary generation model can be a pre-trained neural network model, which has the ability to generate boundaries by analyzing and processing the fused data.
[0069] The technical solution of this embodiment identifies the area to be processed through the delivery information within a preset time period, and generates a trajectory map of the area to be processed through the delivery information and the delivery trajectory, and fuses the trajectory map of the area to be processed with the map data of the area to be processed to obtain financial data. Through the fusion of the trajectory map and the map data, the multi-source of information is improved, and the impact of incomplete information caused by the amount of information caused by a single data source on the accuracy of the boundary is reduced. The fused data is analyzed and processed through the boundary generation model to obtain the regional boundary of the area to be processed, and automatic processing is realized, which reduces the dependence on manual labor, improves the automation of boundary generation, and reduces the cost of boundary generation.
[0070] On the basis of the above embodiment, the boundary generation model is pre-trained. Optionally, the boundary generation model is trained based on the generative adversarial idea. The training method of the boundary generation model includes: creating a generator and a discriminator, training the generator and the discriminator, and using the trained generator as the boundary generation model, wherein the training of the generator and the discriminator includes: obtaining the delivery trajectory and delivery information within a sample time period, generating a trajectory map of at least one sample area based on the delivery trajectory and delivery information within the sample time period, and fusing the trajectory map of the at least one sample area with the map data to obtain fused data of the at least one sample area; inputting the fused data of the sample area into the generator to obtain the predicted boundary of the sample area; judging the predicted boundary and the actual boundary of the sample area based on the discriminator to obtain a judgment result, generating a loss function based on the judgment result, and adjusting the model parameters of the generator and the discriminator based on the loss function.
[0071] For example, see Figure 3 , Figure 3 It is a schematic diagram of a training process of a boundary generation model provided by an embodiment of the present invention. Figure 3 The multi-source data in includes delivery information, delivery trajectory and map data. The generation process of the fused data of the sample area is not repeated here. The fused data of the sample area is used as the input data of the generator to obtain the predicted boundary of the sample area generated by the generator, and the actual boundary of the sample area is obtained. The actual boundary can be obtained by manual calibration. The actual boundary of the sample area and the predicted boundary of the sample area are input to the discriminator, and the discriminator determines the actual boundary of the sample area and the predicted boundary of the sample area to obtain the determination result. A loss function is generated based on the determination result, and the type of loss function is not limited here. The model parameters of the generator and the discriminator are updated based on the loss function. For example, the model parameters of the generator and the discriminator can be updated alternately, such as setting the generator in a parameter updateable state and the discriminator in a parameter non-updateable state, and adjusting the model parameters of the generator based on the loss function. Set the discriminator in a parameter updateable state and the generator in a parameter non-updateable state, and adjust the model parameters of the discriminator based on the loss function. During the entire training process, the generator and the discriminator are alternately set to a parameter updateable state to achieve alternating updates of the model parameters of the generator and the discriminator.
[0072] The above training process is iterated until the training end condition is met, and the trained generator and discriminator are obtained, and the trained generator is determined as the boundary generation model.
[0073] Figure 4 Schematic diagram of a region boundary generation device provided by an embodiment of the present invention. Figure 4As shown, the device comprises:
[0074] An information acquisition module 410 is used to acquire a delivery track and delivery information within a preset time period, wherein the delivery information includes location information and time information;
[0075] A trajectory map generating module 420 is used to determine a to-be-processed area based on the location information in the delivery information, and to segment the delivery trajectory based on the time information in the delivery information to obtain a trajectory map corresponding to the to-be-processed area;
[0076] A fusion module 430 is used to obtain map data, and perform image fusion on the trajectory map of the area to be processed and the map data to obtain fused data;
[0077] The boundary generation module 440 is used to process the fused data based on the boundary generation model to obtain the region boundary corresponding to the region to be processed.
[0078] The technical solution of this embodiment identifies the area to be processed through the delivery information within a preset time period, and generates a trajectory map of the area to be processed through the delivery information and the delivery trajectory, and fuses the trajectory map of the area to be processed with the map data of the area to be processed to obtain financial data. Through the fusion of the trajectory map and the map data, the multi-source of information is improved, and the impact of incomplete information caused by the amount of information caused by a single data source on the accuracy of the boundary is reduced. The fused data is analyzed and processed through the boundary generation model to obtain the regional boundary of the area to be processed, and automatic processing is realized, which reduces the dependence on manual labor, improves the automation of boundary generation, and reduces the cost of boundary generation.
[0079] Based on the above embodiment, optionally, the location information in the delivery information includes delivery location information and / or original address information of the delivery object;
[0080] The trajectory map generation module 420 is used to: determine the area to be processed based on the location information in the delivery information, including: performing entity word recognition on the delivery location information and / or the original address information of the delivery object based on the entity recognition model to obtain entity location information; determine the area to be processed in the entity location information.
[0081] Optionally, the delivery track includes a timestamp and location point data corresponding to each timestamp; the time information in the delivery information includes a successful delivery timestamp; there is at least one delivery track within a preset time period, and any delivery track corresponds to at least one delivery information;
[0082] The trajectory map generation module 420 is also used to: match the area information of the area to be processed with the delivery information, and determine the starting timestamp and the ending timestamp corresponding to each delivery trajectory in the area to be processed based on the successful delivery timestamp in the successfully matched delivery information; split each delivery trajectory based on the starting timestamp and the ending timestamp corresponding to each delivery trajectory in the area to be processed to obtain at least one trajectory segment corresponding to the area to be processed; and generate a trajectory map of the area to be processed based on the at least one trajectory segment.
[0083] The trajectory map generation module 420 is also used to: determine the initial image formed by the at least one trajectory segment of the area to be processed, and grid the initial image; determine the pixel value in the grid based on the number of trajectory segments in each grid in the initial image, and obtain the trajectory map of the area to be processed based on the pixel value of each network in the initial image.
[0084] On the basis of the above embodiment, optionally, the fused data includes four-channel data, and the four-channel data includes three-channel color data in the map data and pixel values in the trajectory map.
[0085] Optionally, the fusion module 430 is further used to: before performing image fusion on the trajectory map of the area to be processed and the map data, align the trajectory map of the area to be processed and the map data.
[0086] On the basis of the above embodiment, optionally, the device also includes a model training module, which is used to create a generator and a discriminator, train the generator and the discriminator, and use the trained generator as the boundary generation model, wherein the training of the generator and the discriminator includes: obtaining the delivery trajectory and delivery information within a sample time period, generating a trajectory map of at least one sample area based on the delivery trajectory and delivery information within the sample time period, and fusing the trajectory map of the at least one sample area with the map data to obtain fused data of the at least one sample area; inputting the fused data of the sample area into the generator to obtain the predicted boundary of the sample area; judging the predicted boundary and the actual boundary of the sample area based on the discriminator to obtain a judgment result, generating a loss function based on the judgment result, and adjusting the model parameters of the generator and the discriminator based on the loss function.
[0087] The region boundary generation device provided in the embodiment of the present invention can execute the region boundary generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0088] Figure 51 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0089] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0090] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0091] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for generating a region boundary.
[0092] In some embodiments, the region boundary generation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the region boundary generation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the region boundary generation method in any other appropriate manner (e.g., by means of firmware).
[0093] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0094] The computer program for implementing the region boundary generation method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0095] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a processor to execute a method for generating a regional boundary, the method comprising: obtaining a delivery trajectory and delivery information within a preset time period, the delivery information comprising location information and time information; determining a to-be-processed area based on the location information in the delivery information, and segmenting the delivery trajectory based on the time information in the delivery information to obtain a trajectory map corresponding to the to-be-processed area; obtaining map data, and performing image fusion on the trajectory map of the to-be-processed area and the map data to obtain fused data; and processing the fused data based on a boundary generation model to obtain a regional boundary corresponding to the to-be-processed area.
[0096] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer 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 foregoing.
[0097] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0098] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0099] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0100] An embodiment of the present invention further provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the method for generating a region boundary according to any embodiment of the present invention is implemented.
[0101] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0102] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0103] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for generating a region boundary, characterized in that: include: Obtaining a delivery track and delivery information within a preset time period, wherein the delivery information includes location information and time information; Determine the area to be processed based on the location information in the delivery information, and segment the delivery trajectory based on the time information in the delivery information to obtain a trajectory map corresponding to the area to be processed; Acquire map data, and perform image fusion on the trajectory map of the area to be processed and the map data to obtain fused data; The fused data is processed based on a boundary generation model to obtain a region boundary corresponding to the region to be processed.
2. The method according to claim 1, characterized in that: The location information in the delivery information includes the delivery location information and / or the original address information of the delivery object; The determining of the area to be processed based on the location information in the delivery information includes: Based on the entity recognition model, entity word recognition is performed on the delivery location information and / or the original address information of the delivery object to obtain entity location information; An area to be processed is determined in the entity position information.
3. The method according to claim 1, characterized in that The delivery track includes a timestamp and location point data corresponding to each timestamp; the time information in the delivery information includes a delivery timestamp; There is at least one delivery track within a preset time period, and any of the delivery tracks corresponds to at least one delivery information; The segmenting process of the delivery track based on the time information in the delivery information to obtain a track map corresponding to the area to be processed includes: Matching the area information of the area to be processed with the delivery information, and determining the start timestamp and the end timestamp corresponding to each delivery track in the area to be processed based on the successful delivery timestamp in the matched delivery information; Based on the start timestamp and the end timestamp corresponding to each delivery trajectory in the area to be processed, each delivery trajectory is segmented to obtain at least one trajectory segment corresponding to the area to be processed; A trajectory map of the area to be processed is generated based on the at least one trajectory segment.
4. The method according to claim 3, characterized in that The generating the trajectory map of the area to be processed based on the at least one trajectory segment comprises: Determine an initial image formed by the at least one trajectory segment of the area to be processed, and perform gridding processing on the initial image; The pixel values in the grid are determined based on the number of trajectory segments in each grid in the initial image, and the trajectory map of the area to be processed is obtained based on the pixel values of each grid in the initial image.
5. The method according to claim 4, characterized in that The fused data includes four-channel data, and the four-channel data includes three-channel color data in the map data and pixel values in the trajectory map.
6. The method according to any one of claims 1 to 5, characterized in that: Before image fusion of the trajectory map of the area to be processed and the map data, the method further includes: The trajectory map of the area to be processed and the map data are aligned.
7. The method according to claim 1, characterized in that The training method of the boundary generation model includes: A generator and a discriminator are created, the generator and the discriminator are trained, and the trained generator is used as the boundary generation model, wherein the generator and the discriminator are trained, including: Acquire the delivery track and delivery information within the sample time period, generate a track map of at least one sample area based on the delivery track and delivery information within the sample time period, and fuse the track map of at least one sample area with the map data to obtain fused data of the at least one sample area; Inputting the fused data of the sample area into the generator to obtain the predicted boundary of the sample area; The predicted boundary and the actual boundary of the sample area are judged based on the discriminator to obtain a judgment result, a loss function is generated based on the judgment result, and model parameters of the generator and the discriminator are adjusted based on the loss function.
8. A region boundary generating device, characterized in that: include: An information acquisition module, used to acquire a delivery track and delivery information within a preset time period, wherein the delivery information includes location information and time information; A trajectory map generating module, used to determine the area to be processed based on the location information in the delivery information, and to segment the delivery trajectory based on the time information in the delivery information to obtain a trajectory map corresponding to the area to be processed; A fusion module is used to obtain map data, and perform image fusion on the trajectory map of the area to be processed and the map data to obtain fused data; The boundary generation module is used to process the fused data based on the boundary generation model to obtain the region boundary corresponding to the region to be processed.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the region boundary generation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the region boundary generation method according to any one of claims 1 to 7 when executed.
11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method for generating a region boundary according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Distribution information visualization method and device
CN110363453A
Urban core area determination method, apparatus and device, and storage medium
CN115511343A
Method and device for determining region of interest
CN117132187A
Road cover pressing judgment method and device, computer equipment and readable storage medium
CN117689685A
Map updating method, electronic device, storage medium and computer program product
CN117948960A
Cited By
Method and device for determining forbidden area
CN121256438A
