Map boundary editing method and apparatus, and computer device and storage medium

By obtaining the map closed boundary and movement trajectory information, and determining the replacement line segment to edit the map closed boundary, the problems of low editing efficiency and poor accuracy in the prior art are solved, and efficient and accurate boundary editing is achieved.

WO2024239199A1PCT designated stage expired Publication Date: 2024-11-28SHENZHEN MAMMOTION INNOVATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/095521
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-05-22
Publication Date
2024-11-28

Smart Images

  • Figure CN2023095521_28112024_PF_FP_ABST
    Figure CN2023095521_28112024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present application are a map boundary editing method and apparatus, and a computer device and a storage medium. The editing method comprises: acquiring the current map information, wherein the map information comprises a closed boundary of a map; in response to a first instruction, entering an editing state of the closed boundary; acquiring movement trajectory information, wherein the movement trajectory information comprises a movement path; according to the positional relationship between the closed boundary and the movement path, determining a first line segment and a second line segment, which are composed of the closed boundary, and a third line segment, the two ends of which are connected to the first line segment and the second line segment; determining a replacement line segment between the first line segment and the second line segment; and replacing the replacement line segment with the third line segment, so as to edit the closed boundary. By using the embodiments of the present application, a local line segment in a closed boundary of a map can be edited, such that the editing efficiency and accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Map boundary editing method, device, computer equipment and storage medium Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer equipment, and storage medium for editing map boundaries. Background Art

[0002] With the improvement of people's living standards and the advancement of technology, outdoor robots (such as search and rescue robots, harvesting robots, and exploration robots) are becoming increasingly important in today's society. They are required in a growing number of fields and positions. Within a pre-defined operating area on a map, outdoor robots rely on positioning information obtained by one or more positioning devices, such as the global positioning system (GPS), lidar, cameras, and ultrasound, to record their movement and perform operations.

[0003] The work area may need to be expanded or reduced, requiring the closed boundary of the work area to be re-edited. When the perimeter of the closed boundary or the area of ​​the work area is small, the need can be met by deleting the original boundary and re-circling the new boundary. However, when the perimeter of the closed boundary or the area of ​​the work area is large, re-circling the new boundary is time-consuming and labor-intensive, and there may also be problems such as the shape of the outline of the local boundary that you want to modify not meeting the expectations, and the outline of the local boundary that you do not want to modify being modified into an unexpected shape. Therefore, how to improve the efficiency and accuracy of the editing method of the closed boundary of the map has become an urgent problem to be solved.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide a map boundary editing method, apparatus, device, and storage medium, which can edit local line segments in the closed boundary of a map, thereby improving editing efficiency and accuracy.

[0006] In a first aspect, an embodiment of the present application provides a method for editing a map boundary, comprising:

[0007] Acquire current map information, the map information including a closed boundary of the map; enter an editing state of the closed boundary in response to a first instruction; acquire movement trajectory information, the movement trajectory information including a movement path; determine, based on a positional relationship between the closed boundary and the movement path, a first line segment and a second line segment constituting the closed boundary, as well as a third line segment connected to both ends of the first line segment and the second line segment; determine a replacement line segment between the first line segment and the second line segment; and replace the replacement line segment with the third line segment to edit the closed boundary.

[0008] In a second aspect, an embodiment of the present application provides a map boundary editing device, comprising a unit for executing each step in the above-mentioned first aspect.

[0009] In a third aspect, an embodiment of the present application provides a computer device comprising a memory and a processor connected to the memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the editing method provided in the first aspect of the embodiment of the present application.

[0010] In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having a computer program stored therein, the computer program being adapted to be loaded and executed by a processor so as to cause a computer device having the processor to perform the editing method provided in the first aspect of the embodiments of the present application.

[0011] In a fifth aspect, embodiments of the present application provide a computer program product comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the editing method provided in the first aspect.

[0012] It can be seen that in the embodiment of the present application, in response to the first instruction, the closed boundary of the current map is put into an editing state. Then, the movement trajectory information is obtained, and based on the positional relationship between the closed boundary and the movement path in the movement trajectory information, the first line segment and the second line segment constituting the closed boundary, as well as the third line segment connected to both ends of the first line segment and the second line segment are determined. Then, a replacement line segment between the first line segment and the second line segment is determined, and the replacement line segment is replaced with the third line segment to edit the closed boundary. In other words, the line segments between the first line segment and the second line segment, excluding the replacement line segment, are combined with the third line segment to form a new closed boundary, thereby editing the local line segments in the closed boundary of the map, which can improve editing efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0014] FIG1 is a schematic diagram of a network architecture provided in an embodiment of the present application;

[0015] FIG2 is a flow chart of a method for editing a map boundary according to an embodiment of the present application;

[0016] FIG3A is a schematic diagram of a scenario of a method for editing a map boundary provided in an embodiment of the present application;

[0017] 3B to 3D are schematic diagrams of scenarios of another method for editing map boundaries provided in an embodiment of the present application;

[0018] FIG3E is a schematic diagram of a projection point provided in an embodiment of the present application;

[0019] FIG4 is a schematic structural diagram of a map boundary editing device provided in an embodiment of the present application;

[0020] FIG5 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. 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 limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices. The term "plurality" may refer to two or more, which will not be repeated later.

[0022] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0023] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0024] Please refer to Figure 1, which is a schematic diagram of a network architecture provided in an embodiment of the present application. As shown in Figure 1, the network architecture may include a server 10d and a user terminal cluster. The user terminal cluster may include one or more user terminals, and the number of user terminals is not limited. As shown in Figure 1, the user terminal cluster may specifically include user terminal 10a, user terminal 10b, and user terminal 10c.

[0025] Among them, server 10d can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0026] In an embodiment of the present application, the user terminal may include a mobile phone as shown in the user terminal 10a in Figure 1, or may include a tablet computer, a wearable electronic device with wireless communication capabilities (such as a smart watch, a smart bracelet, etc.). Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with an IOS system, an Android system, a Microsoft system, or other operating systems. The above-mentioned portable electronic device may also be other portable electronic devices, such as a laptop computer. It should be understood that in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer as shown in the user terminal 10c in Figure 1.

[0027] The user terminal may also include an outdoor robot, such as a search and rescue robot, a harvesting robot, an exploration robot, etc., which is not limited here. For example, the user terminal 10b in FIG1 is a harvesting robot.

[0028] As shown in Figure 1 , user terminals 10a, 10b, and 10c can each establish a network connection with a server 10d, allowing each user terminal to exchange data with server 10d via the network connection. For example, user A can send a work instruction to server 10d via user terminal 10a, which controls user terminal 10b to perform the work. User B can also send a movement instruction to server 10d via user terminal 10a, which controls user terminal 10b to move along the path indicated by the movement instruction.

[0029] User terminals 10a, 10b, and 10c may be interconnected to exchange data. For example, user A may send a work instruction to user terminal 10b via user terminal 10a to control user terminal 10b to perform a work operation; user B may send a movement instruction to user terminal 10b via user terminal 10a to control user terminal 10b to move along the path indicated by the movement instruction.

[0030] In an embodiment of the present application, the operation area and the closed boundaries and operation paths corresponding to the operation area can be uploaded to the server for storage, or stored in a blockchain. The blockchain referred to in the embodiment of the present application is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. The blockchain is essentially a decentralized database, which is a string of data blocks generated by cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer. In this way, by distributing data through the blockchain, while ensuring data security, information sharing between different platforms can be achieved.

[0031] The embodiments of the present application provide a map boundary editing method, apparatus, device, and storage medium, which can edit local line segments in the closed boundary of a map, thereby improving editing efficiency and accuracy.

[0032] The following is a detailed description of the map boundary editing method provided in an embodiment of the present application. Please refer to Figure 2, which is a flow chart of a map boundary editing method provided in an embodiment of the present application. The editing method can be executed by a computer device, which can be a server (for example, server 10d in the embodiment corresponding to Figure 1), or a user terminal (for example, any user terminal in the user terminal cluster shown in Figure 1), or a computer program (including program code), etc. As shown in Figure 2, the editing method includes the following steps S201 to S206, wherein:

[0033] S201: Acquire current map information, where the map information includes a closed boundary of the map.

[0034] In an embodiment of the present application, the current map information may be the map information of the map displayed on the user terminal, or may include the map information of the map targeted in the submitted edit request or other request, etc., without limitation herein. The map information may include the closed boundary of the map, or may include the first point set with positioning information, etc. The closed boundary may be obtained by connecting the first point set and used to indicate the scope of the operating area corresponding to the map, so that the outdoor robot can operate within the operating area.

[0035] Positioning information can include physical location and orientation information, and can be acquired by the outdoor robot through one or more positioning devices such as GPS, lidar, camera, and ultrasound. The acquisition method can be based on real-time kinematic (RTK) technology. Positioning information can be acquired during the movement of the outdoor robot, or from data (such as images) collected by the outdoor robot during movement, or by a user carrying a positioning device in the outdoor robot or a separate positioning device and performing mobile acquisition.

[0036] The number of points in the first point set can be greater than two, and this is not limited here. The distances between these points can be equal or unequal. In other words, when an outdoor robot or positioning device obtains positioning information of points in the first point set, the time interval between moving from one point to another can be equal or unequal.

[0037] Optionally, after obtaining the first point set, the editing method may further include: connecting the points in the first point set to obtain a reference boundary; and smoothing the reference boundary to obtain a closed boundary of the map. This helps improve the accuracy and aesthetics of the closed boundary and avoids jagged boundaries on the display interface.

[0038] S202: In response to the first instruction, enter a closed boundary editing state.

[0039] In an embodiment of the present application, the first instruction is used to instruct the user to enter a closed boundary editing state, thereby enabling the user to edit the closed boundary displayed on the user terminal, or to automatically edit the original closed boundary as the outdoor robot or positioning device moves or is moved. Optionally, after receiving the first instruction, the outdoor robot or positioning device is further controlled to move, or the user is notified to cause the outdoor robot or positioning device to move, to obtain a new closed boundary or a local line segment within the closed boundary.

[0040] S203: Acquire movement trajectory information, where the movement trajectory information includes a movement path.

[0041] In the embodiments of the present application, the movement trajectory information may include a movement path obtained when an outdoor robot or positioning device, etc., moves or is moved, or a second point set with positioning information. The movement path can be obtained by connecting the second point set. The positioning information can be referred to above, and the second point set can be referred to the description of the first point set, which will not be repeated here.

[0042] The following example uses the second point set including n+2 points. Please refer to Figure 3A, which is a scene diagram of a map boundary editing method provided by an embodiment of the present application. As shown in Figure 3A, n can be greater than or equal to 2. In fact, n can also be 0 or 1. The points in the second point set may include point A, point B, and point B(t1), point B(t2), point B(tn-1), and point B(tn) corresponding to times t1, t2, tn-1, and tn, respectively. The distances between these points or the time intervals of movement can be equal, for example, the time interval for moving from the position corresponding to point A to the position corresponding to point B(t1) is 2s, and the time interval for moving from the position corresponding to point B(t1) to the position corresponding to B(t2) is 2s, etc. The distances between these points or the time intervals of movement may be different, for example, the time interval for moving from the position corresponding to point A to the position corresponding to point B(t1) is 2s, and the time interval for moving from the position corresponding to point B(t1) to the position corresponding to point B(t2) is 5s.

[0043] Movement trajectory information can be information obtained by an outdoor robot or positioning device after receiving a user's movement instruction. The movement instruction can be used to trigger movement. Optionally, the movement instruction can include a starting reference position. The starting reference position can be understood as a starting position pre-specified by the user, so that movement can be based on the starting reference position. The starting reference position can be edited by the user on the map display interface. For example, the user clicks a location on the closed boundary of the map and sets it as the starting reference position.

[0044] Taking into account the actual working area and the movement of the mobile equipment, the starting reference position and the actual movement starting position can be the same or different. Optionally, the distance between the starting reference position and the actual movement starting position is less than a threshold A. Threshold A can be a fixed value, such as a value between 5 and 50 centimeters. Alternatively, threshold A can be a dynamically changing value, such as a value determined based on the area of ​​the ground. This can prevent the actual movement starting position from being significantly different from the preset starting reference position.

[0045] Optionally, the movement instruction may include an endpoint reference location. This endpoint reference location can be understood as a user-specified endpoint location, so that movement can be stopped based on the endpoint reference location. The endpoint reference location can be edited by the user on the map display interface. For example, the user clicks a location on the closed boundary of the map and sets it as the endpoint reference location.

[0046] Taking into account the actual conditions of the work area and the movement of the mobile equipment, the reference endpoint position and the actual movement endpoint position may be the same or different. The distance between the reference endpoint position and the actual movement endpoint position may be less than a threshold value B, such as threshold value A or another threshold value. Threshold value B can be described with reference to threshold value A and will not be further described here.

[0047] Optionally, the movement instruction may include a movement reference path. The movement reference path can be understood as a movement path specified by the user, so that movement can be performed based on the movement reference path. The movement reference path can be edited by the user on the display interface of the map. For example, the user can use the curve tool in the drawing tool to connect the starting reference position and the end reference position. For another example, the user first clicks on a position on the closed boundary of the map, and starts sliding or dragging the cursor until the operation stops. The position where the operation is started can be used as the starting reference position. If there is no continuous sliding or dragging of the cursor position within a preset time (such as 1 second) after the stop operation, the position where the operation is stopped can be used as the end reference position, and the sliding or dragging path can be used as the movement reference path.

[0048] Taking into account the actual working area and the movement of the mobile device, the reference movement path and the actual movement path may be the same or different. Optionally, the editing method may further include smoothing the reference movement path. This can prevent uneven movement path segments caused by user hand tremors, improve the accuracy and aesthetics of the edited boundary, and avoid jagged boundaries on the display interface.

[0049] S204 : Determine, based on the positional relationship between the closed boundary and the moving path, a first line segment and a second line segment formed by the closed boundary, and a third line segment connected to both ends of the first line segment and the second line segment.

[0050] In an embodiment of the present application, the endpoint positions of the first line segment, the second line segment, and the third line segment are the same, and the first line segment and the second line segment are line segments on the closed boundary, while the third line segment is a line segment outside the closed boundary. The first line segment and the second line segment can be understood as the partial boundary to be replaced on the closed boundary, and the third line segment is the target boundary, which is used to replace the replacement line segment between the first line segment and the second line segment. The third line segment can be a line segment in the working area of ​​the map that does not overlap with the closed boundary, so that the map boundary can be edited to reduce the area of ​​the working area and modify the outline and perimeter of the working area. The third line segment can also be a line segment outside the working area, so that the map boundary can be edited to increase the area of ​​the working area and modify the outline and perimeter of the working area.

[0051] For example, please refer to Figures 3A to 3D, and Figures 3B to 3D are scene diagrams of another method for editing the map boundary provided in an embodiment of the present application. The starting position may be the position corresponding to point A, and the end position may be the position corresponding to point B. As shown in Figures 3A to 3D, the outdoor robot or positioning device may move from the starting position to the end position according to the path of the third line segment L3. The closed boundary of the map is divided into two segments, the first line segment L1 and the second line segment L2, by the starting position and the end position, and the third line segment L3 is a line segment outside the closed boundary, and the two endpoints of the first line segment L1, the second line segment L2 and the third line segment L3 are all point A and point B.

[0052] In some feasible examples, step S204 may include the following steps: determining at least two target points in the first point set and determining at least two reference points in the second point set based on the positional relationship between the closed boundary and the moving path; dividing the closed boundary into a first line segment and a second line segment based on the at least two target points; processing the moving path into a valid line segment based on the at least two reference points; and obtaining a third line segment connected to both ends of the first line segment and the second line segment based on the at least two target points and the valid line segment.

[0053] Among them, the target point and the reference point can be the points that overlap between the first point set and the second point set, or the target point is the projection point of the reference point on the closed boundary. The reference point at the projection point refers to the point closest to the reference point among the multiple line segments of the closed boundary, so that the distance between the target point and the reference point is small. For example, please refer to Figure 3E, which is a schematic diagram of a projection point provided in an embodiment of the present application. As shown in Figure 3E, the closed boundary can be divided into 6 line segments, namely 0-1, 1-2, 2-3, 3-4, 4-5, and 5-6, according to the serial number points. If the shortest distance between point P and the 6 line segments is calculated, it can be seen that the distance between point P and point P0 between line segment 1-2 is the smallest, then point P0 can be used as the projection point of point P on the closed boundary.

[0054] The target points and reference points may be points within a predetermined area. For example, the distance between each target point in the first point set and at least one reference point in the second point set is less than a first threshold. The first threshold can be described with reference to the aforementioned threshold A and is not further described here.

[0055] It can be understood that if the reference point is a point that overlaps between the first point set and the second point set, then the reference point is located on a closed boundary and can be used as the endpoint of the line segment to be replaced, thereby determining the first line segment, the second line segment, and the third line segment. Taking into account the actual situation of the working area and the movement of the mobile device, there may not be overlapping points in the first point set and the second point set. Points with a small distance (such as a distance less than a first threshold) in the first point set and the second point set are used as target points and reference points, respectively, to determine the first line segment, the second line segment, and the third line segment, which can improve the efficiency and accuracy of editing.

[0056] It should be noted that the target point and the reference point can be determined simultaneously based on the positional relationship between the closed boundary and the movement path, or the reference point can be determined first and then the target point. For example, the target point can be determined by using the target point as the projection point of the reference point on the closed boundary. Alternatively, the target point can be determined first and then the reference point.

[0057] The following introduces a method for individually determining a target point. In some feasible examples, the editing method may further include: in response to a second instruction, zooming in and displaying an area corresponding to a closed boundary; and receiving indication information, where the indication information is used to determine at least two target points.

[0058] The second instruction is used to instruct the zooming in of the area corresponding to the closed boundary. Specifically, it can be the area corresponding to the cursor position in the map display interface, or it can be a closed boundary, or it can be an area where the difference in distance between the points in the first point set and the second point set is less than a preset threshold, etc., without limitation. Optionally, the second instruction includes a specified area, so that the map of the specified area can be zoomed in.

[0059] It will be appreciated that after zooming in and displaying the area corresponding to the closed boundary, it is easier for the user to select a target point, thereby improving the accuracy of editing the boundary. If instruction information is received, the target point can be determined based on the instruction information, which can improve the efficiency of determining the target point. Optionally, a reference point can also be determined based on the instruction information or other instruction information.

[0060] In an embodiment of the present application, if the number of target points is equal to two, the closed boundary can be divided into two line segments based on the two target points, namely, a first line segment and a second line segment. If the number of target points is greater than two, two endpoints can be first determined, and then the closed boundary can be divided into two line segments based on these two endpoints, namely, a first line segment and a second line segment. These two endpoints can be determined based on the positioning information of the target points of the at least two target points, such as the two endpoints that are relatively farthest apart.

[0061] Valid line segments can be smoothed based on the positioning information of reference points. This can smooth out uneven line segments along the moving path, improving the accuracy and aesthetics of the editing boundary and avoiding jagged edges on the display interface. Reference points can also be processed before processing valid line segments to improve efficiency and effectiveness.

[0062] Optionally, the editing method may also include: if there is a closed contour in the moving path, determining the area and / or perimeter of the closed contour; if the area is less than the second threshold, or the perimeter is less than the third threshold, deleting the point corresponding to the closed contour in the moving path; or if the area is greater than the fourth threshold, or greater than the fifth threshold, returning to execute step S203.

[0063] The second threshold is less than the fourth threshold, and the third threshold is less than the fifth threshold. It is understood that during the movement process, if a closed contour with a small area or short perimeter appears, it may indicate a closed contour caused by an erroneous operation. The points corresponding to this closed contour can be ignored and deleted, thereby improving the effectiveness of the second point set. If a closed contour with a large area or long perimeter appears, it indicates that there may have been a deviation in the movement, and the movement needs to be repeated to obtain a satisfactory movement path, which can further improve the effectiveness of the second point set.

[0064] In this embodiment of the present application, the third line segment is connected to both ends of the first and second line segments, so that the third line segment can be determined based on the first and second line segments within the movement path. As previously mentioned, valid line segments of the movement path can be determined based on at least two reference points, and the first and second line segments are derived based on at least two target points. Determining the third line segment based on the at least two target points and the valid line segment can improve the effectiveness and accuracy of processing the third line segment.

[0065] S205: Determine a replacement line segment between the first line segment and the second line segment.

[0066] This application does not limit the method for determining the replacement line segment. Two methods are described below:

[0067] Method 1: Responding to the third instruction to obtain a replacement line segment between the first line segment and the second line segment.

[0068] Method 2: Determine a replacement line segment between the first line segment and the second line segment based on the relative positional relationship between the first line segment and the third line segment, and the relative positional relationship between the second line segment and the third line segment; or determine a replacement line segment between the first line segment and the second line segment based on the area of ​​the closed contour formed by the first line segment and the third line segment, and / or the area of ​​the closed contour formed by the second line segment and the third line segment; or determine a replacement line segment between the first line segment and the second line segment based on the perimeter of the closed contour formed by the first line segment and the third line segment, and / or the perimeter of the closed contour formed by the second line segment and the third line segment.

[0069] Method 1 can be understood as a user-selected option, while Method 2 can be understood as a option selected according to a preset algorithm. Before executing these two methods, a closed contour formed by the first and third line segments, and / or a closed contour formed by the second and third line segments, can be displayed. Displaying these closed contours facilitates the user's selection of a replacement line segment between the first and second line segments to generate the third instruction.

[0070] The relative position relationship can be understood as a relative distance, and a line segment that is closer or farther from the third line segment can be used as a replacement line segment. The replacement line segment can also be a line segment with a smaller or larger area of ​​the closed contour, or a line segment with a smaller or larger perimeter of the closed contour, etc.

[0071] The following example uses a relatively close distance and a small area. Method 2 can be described with reference to the scenarios shown in Figures 3A and 3D, respectively. The work area after editing the closed boundary can be shown as the gray portion in the figure. As shown in Figures 3A, 3C, and 3D, the relative distance between the first line segment L1 and the third line segment L3 is closer than the relative distance between the second line segment L2 and the third line segment L3. The first line segment L1 is more likely to be replaced, so the first line segment L1 can be determined as the replacement line segment. In addition, the area of ​​the closed contour formed by the first line segment L1 and the third line segment L3 is smaller than the area of ​​the closed contour formed by the second line segment L2 and the third line segment L3. It can be considered a non-target work area, so the first line segment is determined as the replacement line segment. As shown in Figure 3B, the relative distance between the second line segment L2 and the third line segment L3 is closer to the relative distance between the first line segment L1 and the third line segment L3, and the area of ​​the closed contour formed by the second line segment L2 and the third line segment L3 is smaller than the area of ​​the closed contour formed by the first line segment L1 and the third line segment L3, so the second line segment L2 can be determined as the replacement line segment.

[0072] It should be understood that the above method for determining a replacement line segment is merely an example. In practice, other methods can also be used to determine a replacement line segment. For example, if it is determined that the operating area corresponding to the closed contour formed by the first and third line segments contains a non-operating area or a restricted area, and the operating areas corresponding to the closed contour formed by the second and third line segments are both operating areas or have no restricted areas, then the first line segment can be determined as the replacement line segment. When determining a replacement line segment, the actual area or perimeter of the closed contour can be estimated instead of calculated.

[0073] Optionally, the editing method may further include: checking the closed contour formed by the first line segment L1 and the third line segment L3, and checking the closed contour formed by the second line segment L2 and the third line segment L3. The checking may include checking for single-connected closed contours or multi-connected closed contours. Line segments that are found to be unqualified may be used as replacement line segments, thereby improving editing accuracy.

[0074] S206: Replace the replacement line segment with a third line segment to edit the closed boundary.

[0075] In the method shown in Figure 2, in response to a first instruction, the closed boundary of the current map is put into an editing state. Movement trajectory information is then obtained, and based on the positional relationship between the closed boundary and the movement path in the movement trajectory information, the first and second line segments comprising the closed boundary, as well as a third line segment connecting the first and second line segments at both ends, are determined. A replacement line segment between the first and second line segments is then determined, and the replacement line segment is replaced with the third line segment to edit the closed boundary. In other words, the line segments between the first and second line segments, excluding the replacement line segment, are combined with the third line segment to form a new closed boundary, thereby editing the local line segments within the closed boundary of the map, which can improve editing efficiency and accuracy.

[0076] The above describes in detail the method of the embodiment of the present application, and the following provides an apparatus of the embodiment of the present application.

[0077] Please refer to Figure 4, which is a schematic diagram of the structure of a map boundary editing device provided in an embodiment of the present application. As shown in Figure 4, the map boundary editing device 400 includes a first acquisition unit 401, a first response unit 402, a second acquisition unit 403, a first determination unit 404, a second determination unit 405, and a replacement unit 406, wherein:

[0078] The first acquisition unit 401 is used to acquire current map information, where the map information includes a closed boundary of the map;

[0079] The first responding unit 402 is used to enter the editing state of the closed boundary in response to the first instruction;

[0080] The second acquiring unit 403 is configured to acquire movement trajectory information, where the movement trajectory information includes a movement path;

[0081] The first determining unit 404 is configured to determine, based on the positional relationship between the closed boundary and the moving path, a first line segment and a second line segment formed by the closed boundary, and a third line segment connected to both ends of the first line segment and the second line segment;

[0082] The second determining unit 405 is configured to determine a replacement line segment between the first line segment and the second line segment;

[0083] The replacing unit 406 is configured to replace the replacement line segment with the third line segment to edit the closed boundary.

[0084] In some feasible examples, the closed boundary is obtained by connecting and processing a first point set with positioning information, and the moving path is obtained by connecting and processing a second point set with positioning information; the first determination unit 404 is specifically used to determine at least two target points in the first point set and at least two reference points in the second point set based on the positional relationship between the closed boundary and the moving path; based on the at least two target points, the closed boundary is divided into a first line segment and a second line segment; based on the at least two reference points, the moving path is processed into a valid line segment; based on the at least two target points and the valid line segment, a third line segment connected to both ends of the first line segment and the second line segment is obtained.

[0085] In some feasible examples, the distance between each target point in the first point set and at least one reference point in the second point set is less than a first threshold.

[0086] In some feasible examples, the editing device 400 further includes a second responding unit 407 and a receiving unit 408. The second responding unit 407 is configured to, in response to the second instruction, zoom in and display the area corresponding to the closed boundary; and the receiving unit 408 is configured to receive instruction information, wherein the instruction information is used to determine the at least two target points.

[0087] In some feasible examples, the editing device 400 further includes a deleting unit 409 and a calling unit 410. The deleting unit 409 is configured to delete points corresponding to a closed contour in the moving path if a closed contour exists in the moving path and the area of ​​the closed contour is less than a second threshold and / or the perimeter of the closed contour is less than a third threshold; and the calling unit 410 is configured to call the second acquiring unit 403 if a closed contour exists in the moving path and the area of ​​the closed contour is greater than a fourth threshold and / or the perimeter of the closed contour is greater than a fifth threshold.

[0088] In some feasible examples, the second determining unit 405 is specifically configured to respond to a third instruction to obtain a replacement line segment between the first line segment and the second line segment.

[0089] In some feasible examples, the second determination unit 405 is specifically used to determine the replacement line segment between the first line segment and the second line segment based on the relative position relationship between the first line segment and the third line segment, and the relative position relationship between the second line segment and the third line segment; or determine the replacement line segment between the first line segment and the second line segment based on the area of ​​the closed contour formed by the first line segment and the third line segment, and the area of ​​the closed contour formed by the second line segment and the third line segment; or determine the replacement line segment between the first line segment and the second line segment based on the perimeter of the closed contour formed by the first line segment and the third line segment, and the perimeter of the closed contour formed by the second line segment and the third line segment.

[0090] For the implementation of the above-mentioned units, reference may be made to the relevant description of the method embodiment shown in FIG2 , which will not be elaborated here.

[0091] Please refer to Figure 5, which is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 500 includes a processor 501, a communication interface 502 and a memory 503. The processor 501, the communication interface 502 and the memory 503 can be connected to each other via a bus 505, or can be connected in other ways. The related functions implemented by the first acquisition unit 401, the first response unit 402, the second acquisition unit 403, the first determination unit 404, the second determination unit 405, the replacement unit 406, the second response unit 407, the deletion unit 409 and the calling unit 410 shown in Figure 4 can be implemented by one or more processors 501. The related functions implemented by the receiving unit 408 can be implemented by one or more communication interfaces 502.

[0092] The processor 501 includes one or more processors, such as one or more central processing units (CPUs). If the processor 501 is a central processing unit (CPU), the CPU may be a single-core CPU or a multi-core CPU. In the embodiment of the present application, the processor 501 is used to control the computer device 500 to implement the embodiment shown in FIG2 .

[0093] The communication interface 502 is used to implement communication with other devices. For example, if the computer device 500 is a user terminal, the communication interface 502 can implement communication between the user terminal and devices such as a server; if the computer device 500 is a server, the communication interface 502 can implement communication between the server and devices such as a user terminal.

[0094] Memory 503 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM), and is used to store relevant instructions and data. In the embodiment of the present application, memory 503 stores computer program 504, and processor 501 is used to call computer program 504. Computer program 504 includes instructions for executing each step of the embodiment shown in Figure 2.

[0095] The embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the aforementioned map boundary editing device, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the description of the map boundary editing method in the embodiment corresponding to Figure 2 above, so it will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the program instructions can be deployed on a computing device for execution, or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected by a communication network. Multiple computing devices distributed at multiple locations and interconnected by a communication network can constitute a blockchain system.

[0096] In addition, it should be noted that the embodiment of the present application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, so that the computer device performs the description of the map boundary editing method in the embodiment corresponding to Figure 2 above, and therefore, it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0097] It should be noted that for the aforementioned various method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0098] It is understandable that in the specific implementation of this application, data of users, enterprises, institutions and other objects may be involved. When the above embodiments of this application are applied to specific products or technologies, it is necessary to obtain the permission or consent of users, enterprises, institutions and other objects, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0099] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0100] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0101] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0102] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for editing a map boundary, characterized in that: include: Acquire current map information, wherein the map information includes a closed boundary of the map; In response to the first instruction, entering an editing state of the closed boundary; Acquiring movement trajectory information, wherein the movement trajectory information includes a movement path; Determine, according to the positional relationship between the closed boundary and the moving path, a first line segment and a second line segment formed by the closed boundary, and a third line segment connected to both ends of the first line segment and the second line segment; determining a replacement line segment between the first line segment and the second line segment; The replacement line segment is replaced with the third line segment to edit the closed boundary.

2. The editing method according to claim 1, characterized in that: The closed boundary is obtained by connecting a first point set with positioning information, and the moving path is obtained by connecting a second point set with positioning information; The step of determining the first line segment and the second line segment formed by the closed boundary, and the third line segment connected to both ends of the first line segment and the second line segment according to the positional relationship between the closed boundary and the moving path comprises: Determine at least two target points in the first point set and at least two reference points in the second point set according to a positional relationship between the closed boundary and the moving path; According to the at least two target points, the closed boundary is segmented into a first line segment and a second line segment; Processing the moving path into a valid line segment according to the at least two reference points; A third line segment connected to both ends of the first line segment and the second line segment is obtained according to the at least two target points and the valid line segment.

3. The editing method according to claim 2, characterized in that: The distance between each target point in the first point set and at least one reference point in the second point set is less than a first threshold.

4. The editing method according to claim 2, characterized in that: The editing method further comprises: In response to the second instruction, enlarging and displaying the area corresponding to the closed boundary; Indication information is received, where the indication information is used to determine the at least two target points.

5. The editing method according to any one of claims 1 to 4, characterized in that: The editing method further comprises: If a closed contour exists in the moving path, and the area of ​​the closed contour is smaller than a second threshold and / or the perimeter of the closed contour is smaller than a third threshold, then deleting the point corresponding to the closed contour in the moving path; or If there is a closed contour in the moving path, and the area of ​​the closed contour is greater than the fourth threshold and / or the perimeter of the closed contour is greater than the fifth threshold, the process returns to the step of obtaining the moving track information.

6. The editing method according to any one of claims 1 to 4, characterized in that: The determining a replacement line segment between the first line segment and the second line segment comprises: In response to a third instruction, a replacement line segment between the first line segment and the second line segment is obtained.

7. The editing method according to any one of claims 1 to 4, characterized in that: The determining a replacement line segment between the first line segment and the second line segment comprises: Determine a replacement line segment between the first line segment and the second line segment according to the relative position relationship between the first line segment and the third line segment, and the relative position relationship between the second line segment and the third line segment; or determining a replacement line segment between the first line segment and the second line segment according to the area of ​​the closed contour formed by the first line segment and the third line segment and the area of ​​the closed contour formed by the second line segment and the third line segment; or A replacement line segment between the first line segment and the second line segment is determined according to the perimeter of the closed contour formed by the first line segment and the third line segment and the perimeter of the closed contour formed by the second line segment and the third line segment.

8. A map boundary editing device, characterized in that: include: A first acquisition unit, configured to acquire current map information, wherein the map information includes a closed boundary of the map; A first response unit, configured to enter an editing state of the closed boundary in response to a first instruction; A second acquiring unit, configured to acquire movement trajectory information, wherein the movement trajectory information includes a movement path; A first determining unit, configured to determine, according to a positional relationship between the closed boundary and the moving path, a first line segment and a second line segment formed by the closed boundary, and a third line segment connected to both ends of the first line segment and the second line segment; a second determining unit, configured to determine a replacement line segment between the first line segment and the second line segment; A replacement unit is used to replace the replacement line segment with the third line segment to edit the closed boundary.

9. The editing device according to claim 8, characterized in that The closed boundary is obtained by connecting a first point set with positioning information, and the moving path is obtained by connecting a second point set with positioning information; The first determining unit is specifically configured to determine at least two target points in the first point set and at least two reference points in the second point set according to a positional relationship between the closed boundary and the moving path; and to segment the closed boundary into a first line segment and a second line segment according to the at least two target points; According to the at least two reference points, the moving path is processed into a valid line segment; according to the at least two target points and the valid line segment, a third line segment connected to both ends of the first line segment and the second line segment is obtained.

10. The editing device according to claim 9, characterized in that The distance between each target point in the first point set and at least one reference point in the second point set is less than a first threshold.

11. The editing device according to claim 9, characterized in that The editing device further comprises a second responding unit and a receiving unit, wherein: The second response unit is used for enlarging and displaying the area corresponding to the closed boundary in response to the second instruction; The receiving unit is used to receive indication information, and the indication information is used to determine the at least two target points.

12. The editing device according to any one of claims 8 to 11, characterized in that: The editing device further comprises a deleting unit and a calling unit, wherein: The deletion unit is used to delete the closed contour if there is a closed contour in the moving path and the surface of the closed contour If the product is less than a second threshold value and / or the perimeter of the closed contour is less than a third threshold value, deleting the point corresponding to the closed contour in the moving path; The calling unit is configured to call the second acquiring unit if a closed contour exists in the moving path and an area of ​​the closed contour is greater than a fourth threshold and / or a perimeter of the closed contour is greater than a fifth threshold.

13. The editing device according to any one of claims 8 to 11, characterized in that: The second determining unit is specifically configured to obtain a replacement line segment between the first line segment and the second line segment in response to a third instruction; or The second determining unit is specifically configured to determine a replacement line segment between the first line segment and the second line segment according to a relative position relationship between the first line segment and the third line segment, and a relative position relationship between the second line segment and the third line segment; or The second determination unit is specifically used to determine a replacement line segment between the first line segment and the second line segment based on the area of ​​the closed contour formed by the first line segment and the third line segment, and the area of ​​the closed contour formed by the second line segment and the third line segment; or to determine a replacement line segment between the first line segment and the second line segment based on the perimeter of the closed contour formed by the first line segment and the third line segment, and the perimeter of the closed contour formed by the second line segment and the third line segment.

14. A computer device, characterized in that: including memory and processor; The memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the editing method according to any one of claims 1 to 7.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the editing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Automatic working system and method for establish map for working region thereof

    CN107239074A

  • Graphic editing device

    JP1997073550A