Demarcation method, apparatus and device, and readable storage medium

Through the technology of displaying the initial control line on the mobile device and automatically adsorbing to the outline of the target area, it solves the problems of low efficiency and poor accuracy in traditional area segmentation and virtual wall setting, and achieves more efficient and accurate area division and virtual wall set up.

CN118550441APending Publication Date: 2024-08-27SUZHOU ECOVACS SOFTWARE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410659065.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Traditional area segmentation methods are inefficient and frequently error-prone. They cannot accurately complete area division and virtual wall settings in unfamiliar environments, resulting in difficulty in user operation and segmentation failure.

Method used

By displaying the initial control line on the target area and automatically adsorbing the endpoint of the transition control line to the outline at the end of the user's drag operation, the target control line is generated to ensure the accuracy of the division results and the success of the virtual wall setting.

Benefits of technology

It improves user operation efficiency and satisfaction, ensures the accuracy of area segmentation and virtual wall settings, and avoids operation failures due to non-existence of mapping points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550441A
    Figure CN118550441A
Patent Text Reader

Abstract

The embodiment of the invention provides a delimiting method, device and equipment and a readable storage medium, and after electronic equipment recognizes a selection operation of selecting a target area by a user, an initial control line is displayed on the target area. Afterwards, the electronic equipment responds to dragging operation of the user on at least one end point of the initial control line, and a transition control line is generated and displayed. After the dragging operation is finished, the electronic equipment automatically adsorbs the two end points of the transition control line to the outline of the target area to obtain adsorption points, a target control line is generated and displayed according to the adsorption points, and the target area is delimited according to the target control line. Through an endpoint adsorption mechanism, the endpoint of the transition control line is automatically adsorbed on the contour of the target area when the dragging operation is finished, so that the generation process of the target control line is optimized, the accuracy of a division result can be ensured while the operation efficiency and satisfaction degree of a user are improved, and the user experience is improved. The purpose of accurately segmenting the target area selected by the user or accurately setting the virtual wall is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular to a delineation method, apparatus, device and readable storage medium. Background Art

[0002] With the development of artificial intelligence (AI) technology, various self-mobile devices are increasingly entering people's lives, such as sweeping robots, logistics robots, lawn mowing robots, welcoming robots, etc.

[0003] When a mobile device first enters an unfamiliar environment, it creates an environmental map based on the Simultaneous Localization And Mapping (SLAM) technology, and then plans paths, avoids obstacles, and executes tasks based on the environmental map. The environmental map contains multiple areas, such as bedrooms, living rooms, and kitchens. Users can further define and personalize these areas by manipulating the area segmentation function in the application (APP) to make the environmental map reach an ideal state that meets personal needs.

[0004] However, traditional delineation methods are inefficient, frequently make mistakes, or even fail to complete region segmentation. Summary of the invention

[0005] The embodiments of the present application provide a delineation method, apparatus, device and readable storage medium, which automatically adsorb the endpoints of the transition control line onto the outline of the target area through a precise capture and feedback mechanism, thereby optimizing the generation process of the target control line, so as to achieve the purpose of improving user operation efficiency and satisfaction in the area segmentation or virtual wall setting scenario, while ensuring accurate area segmentation or virtual wall setting.

[0006] In a first aspect, an embodiment of the present application provides a delineation method, including:

[0007] In response to a user selecting a target area on an environment map, an initial control line is displayed on the target area, two endpoints of the initial control line are located on the outline of the target area, and the target area is divided into two sub-areas, the environment map is obtained by superimposing a layer on a base map, and the base map is a single-layer map;

[0008] In response to a user dragging operation on at least one end point of the initial control line, generating and displaying a transition control line, wherein the transition control line changes as the dragging operation proceeds so that a demarcation effect of the target area changes;

[0009] When the dragging operation ends, the two endpoints of the transition control line are adsorbed onto the outline of the target area to generate and display a target control line, and there are points in the basic map corresponding to the endpoints of the target control line;

[0010] The target area is delineated according to the target control line.

[0011] In a second aspect, an embodiment of the present application provides a delineation device, including:

[0012] An initial module, for displaying an initial control line on a target area on an environment map in response to a user's selection operation on the target area, wherein two endpoints of the initial control line are located on the contour of the target area and the target area is divided into two sub-areas, wherein the environment map is obtained by superimposing a layer on a base map, and the base map is a single-layer map;

[0013] a processing module, configured to generate and display a transition control line in response to a user dragging operation on at least one end point of the initial control line, wherein the transition control line changes as the dragging operation proceeds so as to change the demarcation effect of the target area;

[0014] An adsorption module, used for adsorbing two endpoints of the transition control line onto the outline of the target area when the dragging operation ends, so as to generate and display a target control line, wherein there are points in the basic map corresponding to the endpoints of the target control line;

[0015] A demarcation module is used to demarcate the target area according to the target control line.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the method described in the first aspect or various possible implementation methods of the first aspect.

[0017] In a fourth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed by a processor, they are used to implement the method described in the first aspect or various possible implementation methods of the first aspect.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product comprising a computing program, and when the computer program is executed by a processor, the method described in the first aspect or various possible implementation methods of the first aspect is implemented.

[0019] The delineation method, device, equipment and readable storage medium provided by the embodiment of the present application are provided on an electronic device to store an environmental map obtained by superimposing a layer on a basic map, and the basic map is a single-layer map. The environmental map is displayed on the interface of the electronic device. After the electronic device recognizes the selection operation of the user selecting the target area, the initial control line is displayed on the target area, and the two endpoints of the initial control line are located on the contour of the target area, and the target area is controlled into two sub-areas. Afterwards, the electronic device generates and displays a transition control line in response to the user's drag operation on at least one endpoint of the initial control line, and the transition control line changes as the drag operation proceeds so that the division effect of the target area changes. When the drag operation ends, the electronic device automatically adsorbs the two endpoints of the transition control line on the contour of the target area to obtain an adsorption point, generates and displays the target control line according to the adsorption point, and delineates the target area according to the target control line. Due to the traditional area segmentation or virtual wall setting based on the basic map, the user is facing the basic map, and the basic map is a rough, inaccurate and original map with poor display effect, while the present application scheme faces the user to superimpose multiple layers to obtain an environmental map, which is fine, has a good display effect and high accuracy. In addition, although there are currently solutions that face the environment map to the user and allow the user to draw control lines on the environment map, this solution requires the user to manually draw the initial control line and manually adjust the endpoints of the initial control line to the expected position. After drawing or manual adjustment, the control line appears to the user to have reached the expected position. However, since the self-mobile device needs to map the endpoints of the control line to the background basic map, it is easy for the mapping point to not exist in the basic map or there to be a large mapping deviation. This causes the self-mobile device to prompt the user that the segmentation has failed or that the segmentation is very different from the user's expectations, causing confusion to the user. In the present application solution, the initial control line is automatically displayed on the target area. No matter how the user operates the endpoints of the initial control line, after the drag operation is completed, the self-mobile device will automatically adsorb the endpoints of the transition control line to the outline of the target area. As long as adsorption is possible, there will be mapping points corresponding to the adsorption points in the basic map, so there will be no confusion for the user. Obviously, the present application scheme uses an endpoint adsorption mechanism to automatically adsorb the endpoints of the transition control line onto the outline of the target area at the end of the dragging operation, thereby optimizing the generation process of the target control line, improving user operation efficiency and satisfaction, while ensuring the accuracy of the division results, and achieving the purpose of accurately segmenting the target area selected by the user or accurately setting the virtual wall. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 creative work.

[0021] Figure 1 is a schematic diagram of a network architecture of a delineation method provided in an embodiment of the present application;

[0022] Figure 2 is a flow chart of the delineation method provided in an embodiment of the present application;

[0023] Figure 3 is a schematic diagram of an initial dividing line in the delineation method provided in an embodiment of the present application;

[0024] Figure 4 is another schematic diagram of the initial dividing line in the delineation method provided in an embodiment of the present application;

[0025] Figure 5 is a schematic diagram of a drag operation in the demarcation method provided in an embodiment of the present application;

[0026] Figure 6 It is a schematic diagram of confirming hot zones and canceling hot zones in the demarcation method provided in an embodiment of the present application;

[0027] Fig. 7A is a schematic diagram of a delineation method provided in an embodiment of the present application;

[0028] Figure 7B is another schematic diagram of the delineation method provided in an embodiment of the present application;

[0029] Figure 7C is another schematic diagram of the delineation method provided in the embodiment of the present application;

[0030] Fig. 8A is another schematic diagram of the delineation method provided in the embodiment of the present application;

[0031] Figure 8B is another schematic diagram of the delineation method provided in the embodiment of the present application;

[0032] Fig. 9 is another schematic diagram of the delineation method provided in the embodiment of the present application;

[0033] Fig.10 is another schematic diagram of the delineation method provided in the embodiment of the present application;

[0034] Fig.11A is another schematic diagram of the delineation method provided in the embodiment of the present application;

[0035] Fig. 11B is another schematic diagram of the delineation method provided in the embodiment of the present application;

[0036] Fig. 11C is another schematic diagram of the delineation method provided in the embodiment of the present application;

[0037] Fig.12 A schematic diagram of a delineation device provided in an embodiment of the present application;

[0038] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] Self-moving devices are devices that can realize unattended operation of various tasks. Sweeping robots are a common type of self-moving devices. As an important member of the smart home field, the obstacle avoidance and mobility capabilities of sweeping robots are the key to ensuring efficient cleaning path planning. The room segmentation function is crucial to the intelligent navigation system of sweeping robots. This function not only improves the user's controllability of the cleaning process, but also enhances the precise management and customized planning of the cleaning area.

[0040] The area segmentation function, also known as the room segmentation function, is a key technology in the intelligent navigation system of the sweeping robot. It aims to provide users with a higher level of control and personalized settings to achieve precise management of cleaning tasks. Based on the area segmentation function, users can carefully divide and adjust the cleaning area according to their personal needs. For example, the flexibility of area segmentation allows users to divide a single area multiple times to create multiple sub-areas and set specific cleaning modes for each area. This customized setting enables the sweeping robot to adapt to the home environment and the personalized needs of users more intelligently and flexibly.

[0041] After the robot vacuum cleaner completes the mapping of the indoor environment and automatically generates an environmental map, it can automatically identify and divide different room areas, such as bedrooms, living rooms, kitchens, etc. Users can further refine and personalize these areas by manipulating the area segmentation function in the APP, so that the environmental map reaches the ideal state that meets personal needs.

[0042] Usually, a sweeping robot walks along the border in an unfamiliar environment to create a basic map. The basic map only has regional attributes, that is, the unfamiliar environment contains several areas, and there is no concept of rooms, so there are no attributes such as rooms and doors. In addition, the basic map has sawtooth and is a rough map. Even if some simple decoration is performed on the basic map, the decorated basic map does not have a superimposed layer, and the decoration effect is limited.

[0043] Therefore, it is necessary to beautify and jagged the base map, and to superimpose the house type layer, color layer, obstacle layer, etc. on the original base map or the simply decorated base map from bottom to top to obtain the environmental map and present it to the user. That is, the environmental map presented to the user through the APP interface is essentially a map obtained by superimposing multiple layers on the base map. The environmental map on the APP interface is also called the map displayed on the front end, and the base map is also called the actual map or underlying data on the back end. It can be understood that the environmental map is obtained by adding multiple attributes to the base map. For example, based on the house type layer, attributes such as rooms, doors, and walls are added on the basis of the area. Compared with the basic map, the environmental map is more beautiful and more accurate.

[0044] There are two common regional segmentation technologies: Method 1, which is based on pure regional division; Method 2, which is based on the concept of room. Method 1 divides regions based on the basic map, and the basic map only has regional attributes, and does not have attributes such as rooms, walls, and doors. Although the operation is simple and the success rate is high, this method does not consider room attributes, and the basic map is not beautiful and needs to be optimized. With the expansion of functions and the increase of attributes, Method 1 also faces the problem of difficult regional division.

[0045] Method 2 sets multiple restrictions on the drawing of the dividing line to ensure the effective cleaning and path planning of the sweeping robot. However, this method may not be able to successfully segment the area in the following cases: a. The dividing line causes the area to be too small, affecting the cleaning efficiency of the sweeping robot; b. The dividing line crosses the doorway, interfering with the robot's navigation route; c. The dividing line crosses, affecting the continuity of the cleaning path and the edge cleaning function; d. The segmentation error causes the front-end display and the actual back-end map to be out of sync, so that users often face a deviation between cognition and actual operation results when manually segmenting the area. This deviation makes it difficult for users to understand how to operate correctly and frequently encounters operation failures. For example, the user wants to segment the living room and has placed the two ends of the dividing line at the edge of the living room, that is, from the APP interface, the two ends of the dividing line are located at the edge of the living room, but in the underlying data, the end points of the dividing line are not located at the edge of the living room, so the segmentation fails. At this time, it is difficult for the user to understand why the segmentation failed, because from the APP interface, the two end points of the dividing line are indeed located on the outline of the living room, but it prompts that the segmentation failed. Obviously, method 2 has poor flexibility and low efficiency due to too many restrictions.

[0046] Similarly, the setting of virtual walls also has the above problems. That is, when setting virtual walls based on pure areas, since the basic map does not take into account the attributes of rooms, doors, walls, doors, etc., although the operation is simple and the success rate is high. However, this method does not take into account the attributes of the room, and the basic map is not beautiful and needs to be optimized. With the expansion of functions and the increase of attributes, this method faces the problem of difficulty in setting virtual walls. If virtual walls are set based on the environment map, there is also a problem similar to the above-mentioned method 2 of dividing the area.

[0047] Based on this, the embodiments of the present application provide a delineation method, apparatus, device and readable storage medium, which automatically adsorb the endpoints of the transition control line onto the outline of the target area through a precise capture and feedback mechanism, thereby optimizing the generation process of the target control line, so as to achieve the purpose of improving user operation efficiency and satisfaction in the area segmentation or virtual wall setting scenario, while ensuring accurate area segmentation or virtual wall setting.

[0048] Figure 1 This is a schematic diagram of the network architecture of the demarcation method provided in the embodiment of the present application. Figure 1 , the network architecture includes a mobile device 11 and an electronic device 12, on which the application (APP) or applet of the mobile device 11 is installed. After the mobile device collects surrounding data to generate a basic map, the basic map is sent to the electronic device 12, and the electronic device 12 performs beautification processing, serration processing, etc. on the basic map, and superimposes the house type layer, color layer, obstacle layer, etc. on the basic map from bottom to top to obtain an environmental map and present it to the user. Alternatively, after the mobile device 11 superimposes the house type layer on the basic map to obtain an environmental map, the environmental map is sent to the electronic device 12. Alternatively, the mobile device sends the basic map to a cloud server, and the cloud server performs the aforementioned beautification processing on the basic map to obtain an environmental map, and sends it to the electronic device 12, Figure 1 The cloud server is not shown.

[0049] The demarcation method provided in the embodiment of the present application refers to demarcating a dividing line or a virtual wall on the target area. By demarcating the dividing line, the target area is divided into several sub-areas, which is convenient for setting different cleaning modes for different sub-areas later; demarcating the virtual wall means: setting a linear virtual wall in the target area to divide the target area into a restricted area and an executable area.

[0050] When the dividing line is drawn, the electronic device 12 displays the environment map to the user through the APP. When the user wants to divide the target area into regions, click to select the target area. After the electronic device recognizes the selection operation, the initial dividing line is displayed on the outline of the target area, and the initial dividing line divides the target area into two sub-areas. If the user is not satisfied with the segmentation effect of the initial dividing line, press at least one endpoint of the initial dividing line and move it. During the drag operation, the transition dividing line is displayed in real time on the interface, and the transition dividing line changes as the drag operation proceeds so that the segmentation effect of the target area changes. For example, the area size of each sub-area changes, such as the transition dividing line divides the target area into two sub-areas. As the direction of the transition dividing line changes, the areas of the two sub-areas increase and decrease; for example, the segmentation direction changes from vertical segmentation to oblique segmentation, etc. When the segmentation effect expected by the user is achieved, the user lifts his finger to stop the drag operation. Based on the endpoint adsorption function, the electronic device adsorbs the endpoint of the transition dividing line to the intersection of the transition dividing line and the outline of the target area, thereby generating and displaying the target dividing line, and then segmenting the target area according to the target dividing line. Based on the endpoint adsorption function, the efficiency of regional segmentation is significantly improved, effectively avoiding segmentation failures caused by user misoperation. In addition, by reducing the user's operation time and alleviating the irritability during use, the endpoint adsorption function brings users a more pleasant experience.

[0051] Similarly, in the process of demarcating the virtual wall, after the user selects the target area, the electronic device displays an initial virtual wall on the outline of the target area. The initial virtual wall divides the target area into two sub-areas, one is a restricted area that is prohibited from entering by mobile devices, and the other is an executable area. If the user is not satisfied with the initial virtual wall, press at least one endpoint of the initial virtual wall and move it. During the drag operation, the transition virtual wall is displayed in real time on the interface. The transition virtual wall changes as the drag operation proceeds so that the area, position, etc. of the restricted area change. When the user's desired effect is achieved, the user lifts his finger to stop the drag operation. Based on the endpoint adsorption function, the electronic device adsorbs the endpoint of the transition virtual wall to the intersection of the transition virtual wall and the outline of the target area, thereby generating and displaying the target virtual wall, and then obtaining the restricted area based on the target virtual wall. Based on the endpoint adsorption function, the efficiency of virtual wall setting is significantly improved, and the phenomenon of virtual wall setting failure caused by user misoperation is effectively avoided.

[0052] Figure 1In the embodiment, the self-mobile device is, for example, a sweeping robot, a lawn mowing robot, an air purification robot, an automatic spraying device, a nursing robot, a shopping guide robot, a shopping mall service robot, an automated guided vehicle (AVG), etc., which can realize unattended operation of various tasks. The electronic device 12 is, for example, a mobile phone, a tablet computer, etc., which is equipped with an APP or a small program of the self-mobile device 11.

[0053] It should be understood that Figure 1 The number of robot self-moving devices 11 and electronic devices 12 in the embodiment is only for illustration. In actual implementation, any number of self-moving devices 11 and electronic devices 12 can be deployed according to actual needs.

[0054] Figure 2 : is a flow chart of the demarcation method provided by an embodiment of the present application. The execution subject of this embodiment is an electronic device, and this embodiment includes:

[0055] 201. In response to a user selecting a target area on an environment map, display an initial control line on the target area.

[0056] The two endpoints of the initial control line are located on the contour of the target area, and the target area is divided into two sub-areas. The environment map is obtained by superimposing a layer on the base map, and the base map is a single-layer map. For example, the base map is a single-layer map initially created by the mobile device; for another example, the base map is a single-layer map that is simply modified by the mobile device on the map initially created but without superimposing a layer.

[0057] The demarcation method provided in the embodiment of the present application is applicable to scenarios such as area segmentation and virtual wall setting. For the area segmentation scenario, the selection operation is to select the target area from the area segmentation interface (or the target area can be selected first and then the area segmentation function button can be clicked to enter the area segmentation interface), the initial control line, the transition control line and the target control line are the initial segmentation line, the transition segmentation line and the target segmentation line respectively, and the target segmentation line is used to divide the target area into at least two sub-areas.

[0058] For the virtual wall setting scene, the selection operation is to select the target area from the virtual wall setting interface (or you can select the target area first and then click the virtual wall setting function button to enter the virtual wall setting interface). The initial control line, transition control line and target control line are the initial virtual wall, transition virtual wall and target virtual wall respectively. The target virtual wall is used to add a linear virtual wall to the target area to generate a restricted area and an executable area.

[0059] Unless otherwise specified below, the demarcation method provided in the embodiment of the present application is described in detail by taking demarcating a dividing line, that is, a region segmentation scenario, as an example.

[0060] Normally, the environment map is obtained by superimposing the floor plan layer, color layer, obstacle layer and other layers on the base map from bottom to top. The base map is a single-layer map. For example, the base map is a single-layer map initially created from a mobile device; for another example, the base map is a single-layer map obtained by simply decorating the initially created single-layer map from a mobile device. Compared with the base map without room attributes, the environment map contains multiple areas, such as bedrooms, living rooms, etc. The target area is any area in the environment map, and the area is an area that the user wants to divide into two sub-areas or an area where a linear virtual wall is set.

[0061] The user interface of the electronic device displays the above-mentioned environment map and the split button, the virtual wall setting button, etc. When the user wants to divide the target area into regions, after clicking the target area to select the target area, click the split button. In response to the user's selection operation of the split button, the electronic device enters the region segmentation interface to divide the target area into regions. Similarly, when the user wants to set a linear virtual wall for the target area, after clicking the target area to select the target area, the electronic device enters the virtual wall setting interface in response to the user's selection operation of the virtual wall setting button to set a linear virtual wall for the target area.

[0062] Although the above embodiment is described by taking the example that the user first selects the target area and then selects the function button. However, the embodiment of the present application does not limit the order of selecting the target area and the function button. In other optional implementations, when the user wants to perform region segmentation, he can also first click the segmentation button to enter the region segmentation interface, and then select the target area on the region segmentation interface. Similarly, when the user wants to set a virtual wall, he can also first click the virtual wall setting button to enter the virtual wall setting interface, and then select the target area on the virtual wall setting interface.

[0063] With this solution, the user can select the area first and then the function, or select the function first and then the area. This solution is highly flexible and can meet the habits of different users.

[0064] Taking area segmentation as an example, after the electronic device recognizes the user's selection operation, it displays an initial segmentation line on the target area interface. For example, please refer to Figure 3 , Figure 3 It is a schematic diagram of the initial dividing line in the delineation method provided in an embodiment of the present application.

[0065] Please refer to Figure 3After the user opens the APP and enters the area segmentation interface, the APP interface displays the environment map and prompts the user to "select the area to be segmented", where the environment map is shown in the thick black solid line rectangular box in the figure. The environment map includes bedroom A, bedroom B, living room, balcony, dining room, study, bathroom, kitchen and other areas. After the user selects the target area, the electronic device highlights the target area and displays an initial segmentation line on the target area. The two endpoints of the initial segmentation line are located on the outline of the target area and divide the target area into two sub-areas. At the same time, the user is prompted to "move the segmentation line for segmentation". The target area is, for example, a dining room.

[0066] Optionally, in an embodiment of the present application, after the electronic device recognizes the selection operation, in one way, the initial control line is randomly displayed at any position of the target area. In another way, the electronic device responds to the user's selection operation on the target area on the environment map and determines the position of the operation point of the selection operation in the target area. Thereafter, the electronic device displays the initial control line on the target area according to the position of the operation point in the target area.

[0067] For example, the operation point is the position where the user's finger clicks the target area. After the electronic device recognizes the operation point, it displays an initial control line on the target area based on the position of the operation point. Figure 3 , the initial segmentation line must pass through the operation point, that is, the electronic device considers the user's click position to be the position the user expects to segment.

[0068] With this solution, the initial control line must pass through the operation point to ensure that the initial control line is located at the position where the user expects to divide the area or set a virtual wall. This can improve the efficiency of area division or virtual wall setting by intelligently identifying the user's intention.

[0069] Optionally, in the above embodiment, after the electronic device recognizes the selection operation, in one way, an initial control line of any direction is displayed on the target area, such as a horizontal control line, a vertical control line, or an initial control line of any angle. In another way, when the target area is a rectangle, the initial control line is a control line parallel to the short side of the rectangle and passing through the operation point.

[0070] Continuing with the example of region segmentation, please refer to Figure 4 , Figure 4 This is another schematic diagram of the initial segmentation line in the demarcation method provided in the embodiment of the present application. Figure 4The environment map is shown in the thick black solid rectangular box in the figure, the target area is the balcony, and the operation point is shown in the gray filled circle in the figure. After the electronic device recognizes the operation point, it tries to generate a vertical initial segmentation line or a horizontal initial segmentation line. If the initial segmentation line in two directions can be generated, it is preferred to generate an initial segmentation line parallel to the short side, that is, perpendicular to the long side, and the initial segmentation line passes through the operation point.

[0071] With this solution, the electronic device displays the initial control line based on the long side, which is more in line with user habits and has a high success rate for area segmentation or virtual wall setting, thereby achieving intelligent recognition of user intentions and ensuring that the initial control line meets user expectations to the greatest extent possible.

[0072] 202. In response to a user dragging operation on at least one endpoint of the initial control line, generate and display a transition control line.

[0073] The transition control line changes as the dragging operation proceeds so that the segmentation effect of the target area changes.

[0074] When the division effect of the target area by the initial control line does not meet the user's expectations, the user presses at least one endpoint of the initial control line to perform a drag operation. For example, the user presses the first endpoint, and / or the second endpoint and performs a drag operation. During the drag operation, the electronic device generates and displays a transition control line based on the drag position point, etc. Obviously, as the drag operation proceeds, that is, as the user moves his finger on the touch screen, the electronic device controls the transition control line to change and changes the division effect of the target area in combination with the moving direction, etc. Among them, the transformation of the control line includes length transformation, angle transformation, etc. The change in the division effect refers to a change in the area of ​​the sub-area, etc.

[0075] Taking regional division as an example, Figure 5 is a schematic diagram of the dragging operation in the demarcation method provided in the embodiment of the present application. Figure 5 , the environment map is shown in the thick black solid rectangular box in the figure. The user drags the first endpoint 51, and the line between the second endpoint 52 and the drag position point 53 forms a transitional segmentation line. The intersection of the transitional segmentation line and the target area includes the second endpoint 52 and the intersection 54. As the drag operation proceeds, the position of the intersection 54 changes continuously, thereby changing the segmentation effect of the target area. For example, the two endpoints of the initial segmentation line are the first endpoint 51 and the second endpoint 52, respectively. The initial segmentation line divides the target area into two areas in the horizontal direction. During the drag operation, the transitional segmentation line obliquely divides the target area, and the final segmentation direction of the target area is the direction from the second endpoint 52 to the drag position point 53.

[0076] It should be noted that although Figure 5In addition to the second endpoint 52, there is only one intersection 54 between the transition dividing line and the target area. However, the embodiment of the present application is not limited to this. In other feasible implementations, in addition to the second endpoint 52, the number of intersections between the transition dividing line and the target area can be one or more, which is specifically related to the shape of the target area, the position of the transition dividing line in the target area, etc.

[0077] Additionally, optionally, during the drag operation, Figure 5 The initial dividing line is displayed in a third manner, as shown by the dotted line in the figure.

[0078] 203. When the dragging operation ends, two endpoints of the transition control line are adsorbed onto the outline of the target area to generate and display a target control line, and points corresponding to the endpoints of the target control line exist in the basic map.

[0079] In the embodiment of the present application, the environmental map is a map displayed on the front end, and the user can observe the outline of each area through the environmental map displayed on the front end. The points where the two endpoints of the transition control line are adsorbed on the outline of the target area are called adsorption points. For each adsorption point, there is a corresponding point in the base map. Therefore, adsorbing the endpoints of the transition control line to the outline of the target area means adsorbing the endpoints to the corresponding points in the underlying base map. In other words, as long as the adsorption point can be adsorbed to the outline of the target area, it means that the adsorption point can be automatically mapped to the underlying base map.

[0080] Therefore, based on the automatic adsorption of endpoints, the front-end display and the actual map of the back-end can be synchronized, so that users will not face the deviation between cognition and actual operation results when dividing areas or setting virtual walls. In addition, the endpoint adsorption function simplifies the user's operation process. There is no need to remember additional information. Area division can be easily completed by just following the interface prompts, which greatly reduces the operation cost and enhances the convenience of use.

[0081] 204. Delineate the target area according to the target control line.

[0082] When the user adjusts the transition control line to a suitable position so that the transition control line divides the target area as expected, the user lifts the finger to stop the dragging operation. At this time, the electronic device adsorbs the endpoints of the transition control line to the outline of the target area to generate and display the target control line according to the adsorption point.

[0083] Take regional division as an example, please refer to Figure 5, the electronic device adsorbs the drag position point 53 to the intersection 54, and generates a target dividing line according to the line between the second endpoint 52 and the intersection 54, that is, the intersection 54 and the second endpoint 52 are adsorption points. The confirmation hot zone √ and the cancellation hot zone × are displayed on both sides of the target dividing line respectively. When the user clicks the confirmation hot zone √, the electronic device divides the target area into restaurant ① and restaurant ② according to the target dividing line. Afterwards, the user sets different cleaning modes for restaurant ① and restaurant ②, and uses different cleaning modes to clean restaurant ① and restaurant ②. The cleaning mode is used to indicate the cleaning intensity, number of cleanings, etc.

[0084] The demarcation method provided in the embodiment of the present application is that the electronic device is set to store the environment map obtained by superimposing the layer of the basic map, and the basic map is a single-layer map initially created by the mobile device, or a single-layer map obtained by simply decorating the initially created single-layer map. The environment map is displayed on the interface of the electronic device. After the electronic device recognizes the selection operation of the user selecting the target area, the initial control line is displayed on the target area. The two endpoints of the initial control line are located on the outline of the target area, and the target area is controlled into two sub-areas. Afterwards, the electronic device generates and displays a transition control line in response to the user's dragging operation on at least one endpoint of the initial control line, and the transition control line changes as the dragging operation proceeds so that the division effect of the target area changes. When the dragging operation ends, the electronic device automatically adsorbs the two endpoints of the transition control line on the outline of the target area to obtain adsorption points, generates and displays the target control line according to the adsorption points, and demarcates the target area according to the target control line. Due to the traditional area segmentation or virtual wall setting based on the basic map, the user is facing the basic map, which is a rough, inaccurate original map with poor display effect. The present application scheme faces the user with an environmental map obtained by superimposing multiple layers, which is fine, has a good display effect and high accuracy. In addition, although there are currently schemes that face the environmental map to the user and allow the user to draw control lines on the environmental map, the scheme requires the user to manually draw the initial control line and manually adjust the endpoints of the initial control line to the expected position. After drawing or manual adjustment, the control line appears to the user to have reached the expected position. However, since the self-mobile device needs to map the endpoints of the control line to the basic map in the background, it is easy for the mapping point to not exist in the basic map. This causes the self-mobile device to prompt the user that the area segmentation failed or the virtual wall setting failed, causing confusion to the user. In the present application, the initial control line is automatically displayed on the target area. No matter how the user operates the endpoint of the initial control line, after the drag operation is completed, the mobile device will automatically adsorb the endpoint of the transition control line to the outline of the target area. As long as it can be adsorbed, there will be mapping points corresponding to the adsorption points in the basic map, which is equivalent to adsorbing the endpoints of the transition segmentation line to the mapping points, so there will be no confusion for the user. Obviously, the present application automatically adsorbs the endpoints of the transition control line to the outline of the target area at the end of the drag operation through the endpoint adsorption mechanism, thereby optimizing the generation process of the target control line, improving user operation efficiency and satisfaction, while ensuring the accuracy of the division results, and achieving the purpose of accurately segmenting the target area selected by the user or accurately setting the virtual wall.

[0085] In the above embodiment, after the electronic device generates and displays the target control line, in one manner, the electronic device divides the target area into two sub-areas according to the target control line without any trigger information.

[0086] In another embodiment, a confirmation hot zone √ and a cancellation hot zone × are displayed on both sides of the target control line. When the user clicks the confirmation hot zone √, the electronic device divides the target area into at least two sub-areas. Figure 3 , Figure 4 and Figure 5 In this display mode, the confirmation hot zone and the cancellation hot zone are located in the environment map and on both sides of the target control line. Figure 3 to Figure 5 A confirmation button, a cancel button, etc. are also displayed at the bottom of the middle screen, which can also achieve the purpose of confirming or canceling the division.

[0087] In another embodiment, the electronic device displays a confirmation hot zone and a cancellation hot zone outside the environment map. Afterwards, if the user clicks the confirmation hot zone, the electronic device responds to the user's click operation on the confirmation hot zone and divides the target area into two sub-areas according to the target control line. If the user clicks the cancellation hot zone, the electronic device responds to the user's click operation on the cancellation hot zone and switches the target area to a candidate area.

[0088] Taking region segmentation as an example, please refer to Figure 6 , Figure 6 Schematic diagram of confirming hot zones and canceling hot zones in the demarcation method provided in the embodiment of the present application. Figure 3 , Figure 4 and Figure 5 , Figure 6 In the example, the confirmation hot zone and the cancellation hot zone are not located inside the environment map and on both sides of the target dividing line, but are located outside the environment map, such as at the bottom of the screen.

[0089] By adopting this solution, the confirmation hot zone and the cancellation hot zone are placed outside the environment map and below the screen, thereby reducing the number of buttons near the target control line and achieving the purpose of reducing false touches.

[0090] Optionally, in the above embodiment, during the process of the user operating the first endpoint of the initial control line, first, the electronic device generates a substantial segment and an auxiliary segment of the transition control line according to the position of the drag position point relative to the target area and the number of intersections between the transition control line and the outline of the target area, wherein the substantial segment is used to indicate the delineation effect of the target area. Afterwards, the electronic device displays the substantial segment in a first manner and displays the auxiliary segment in a second manner.

[0091] In the embodiment of the present application, when the user only operates the first endpoint of the initial control line, the user presses the first endpoint and slides, and can drag the first endpoint to any position on the screen, such as inside the target area, outside the target area, inside the environment map, outside the environment map, etc. The number of intersections between the transition control line and the outline of the target area is different depending on the drag location. For example, the transition control line and the outline have two intersections, one of which is the second endpoint. For another example, the transition control line and the outline have at least 4 intersections, and the 4 intersections include the second endpoint.

[0092] In the embodiment of the present application, the transition control line includes a substantial segment and at least one auxiliary segment, wherein the substantial segment is used to indicate the control effect of the target area, while the auxiliary segment only has an auxiliary effect, the substantial segment is entirely located inside the target area, and each auxiliary segment is partially or entirely located outside the target area.

[0093] When the user presses the first endpoint and slides, that is, during the dragging operation, the electronic device generates the substantial segment and the auxiliary segment in real time according to the position of the dragging position point relative to the target area, the number of intersections of the transition control line and the outline of the target area, and displays the substantial segment in the first manner and the auxiliary segment in the second manner. The first manner and the second manner are different display modes. Taking the area division as an example, please refer to Figure 5 , the substantial segment is a solid line, and the auxiliary segment is a dotted line. Through the ingenious combination of solid and dotted lines, the accuracy and convenience of user operations are improved, and the intuitiveness and interactivity of the user interface are significantly enhanced.

[0094] By adopting this solution, the substantial segment and auxiliary segment of the transition control line are displayed in different ways. This visual prompt not only clearly shows the target area, but also effectively assists the user to accurately segment the target area, thereby enhancing the user's visual experience and providing intuitive operation feedback.

[0095] The user only operates one endpoint, that is, the user presses the first endpoint and drags it, and may drag the first endpoint inside or outside the target area; the transition control line may divide the target area into two sub-areas, at least three sub-areas, etc. The following describes various situations respectively.

[0096] Case 1: The first endpoint is dragged outside the target area, and the transition control line has two intersection points with the outline of the target area.

[0097] In this case, the electronic device generates the substantial segment according to the line between the two intersection points, and generates the auxiliary segment according to the line between the dragging position point and another intersection point of the two intersection points except the second endpoint.

[0098] Please refer to Figure 5In the first figure in FIG, the first endpoint is dragged outside the target area, and the line between the second endpoint 52 and the drag position point 53 forms a transition control line. The transition control line and the target area have two intersections, one of which is the second endpoint 52, and the other is the intersection 54. The electronic device generates a substantial segment according to the line between the second endpoint 52 and the intersection 54, generates an auxiliary segment according to the line between the intersection 54 and the drag position point 53, displays the substantial segment in a solid line manner, and displays the auxiliary segment in a dotted line manner.

[0099] With this solution, when the first endpoint is dragged outside the target area and the transition control line has two intersections with the outline of the target area, the electronic device generates the actual segment and the auxiliary segment based on the intersections and the dragging position points, with high speed and accuracy.

[0100] Optionally, in the above embodiment, when the dragging operation ends, the dragging position point is adsorbed to another intersection point of the two intersection points except the second endpoint to obtain an adsorption point, and a target control line is generated and displayed based on the second endpoint and the adsorption point.

[0101] Taking region segmentation as an example, please continue to refer to Figure 5 When the dragging operation ends, that is, when the user lifts his finger to stop dragging, the electronic device keeps the second endpoint 52 stationary and automatically adsorbs the dragging position point 53 to the intersection 54, thereby generating and displaying the target segmentation line, which is the actual segment of the transition segmentation line. The second endpoint 52 and the intersection 54 are adsorption points.

[0102] With this solution, the electronic device automatically adsorbs the dragged position point to the intersection of the transition control line and the contour to generate and display the target control line, thereby enhancing the user's visual experience and providing intuitive operation feedback. At the same time, based on automatic endpoint adsorption, the front-end display and the actual map on the back-end can be synchronized, avoiding the deviation between the user's cognition and the actual operation results.

[0103] Case 2: The first endpoint is dragged outside the target area, and the transition control line has at least 4 intersection points with the outline of the target area.

[0104] When the target area is an irregular area, a transition control line can easily divide the target area into at least three sub-areas. At the beginning, the transition control line and the target area have two intersection points, that is, the initial control line is located on the contour of the target area, and the two end points are the two intersection points. As the dragging operation proceeds, the transition control line and the contour of the target area have three intersection points. If the user continues to drag, the transition control line and the target area have four or even more intersection points.

[0105] Taking region segmentation as an example, Fig. 7A This is a schematic diagram of the demarcation method provided in the embodiment of the present application. Fig. 7A In this embodiment, the target area is an irregular area, and the first endpoint 71 and the second endpoint 72 of the initial dividing line are located on the outline of the target area. During the dragging process, the user presses the first endpoint 71 and moves, and finally reaches the drag position 73. At this time, the transition dividing line and the target area have four intersections, namely the second endpoint 72, the intersection 71′, the intersection 74 and the intersection 75. Among them, the intersection 71′ is the first endpoint 71. The electronic device determines at least one group of adjacent intersections from the four intersections, such as the intersection 71′ and the second endpoint 72; or, the intersection 74 and the intersection 75. Afterwards, the electronic device generates the substantial segment based on at least one group of adjacent intersections, and generates the auxiliary segment based on the remaining part of the transition dividing line except the substantial segment. For example, Fig. 7A In the figure, the electronic device generates a substantial segment of the transition dividing line according to the intersection points 74 and 75, and generates an auxiliary segment according to the connection lines between 72 and the intersection point 74, and between the intersection point 75 and the dragging position point 73.

[0106] Assuming that the user lifts his finger at drag position 73 to stop the drag operation, the second endpoint 72 of the transition dividing line is adsorbed to intersection 74, the drag position 73 is adsorbed to intersection 75, and the line between intersection 74 and intersection 75 generates the target dividing line.

[0107] By adopting this solution, the electronic device automatically generates the substantial segments and auxiliary segments of the transition control line to avoid the transition control line dividing the target area into three or more sub-areas. This solution has higher flexibility and adaptability and can effectively cope with various complex control scenarios.

[0108] Please refer to Fig. 7A , the two endpoints of the initial segmentation line are 71 and 72 respectively. If the user expects the target segmentation line to be Fig. 7A In the right figure, the line between the intersection points 74 and 75, the traditional method needs to adjust the two endpoints separately for many times to obtain the target segmentation line and achieve the expected effect. This fixed segmentation logic is inefficient. In the embodiment of the present application, it is not necessary to adjust both endpoints, but just press the first endpoint 71 and move it.

[0109] In one embodiment, when the transition control line has at least four intersection points with the outline of the target area, the at least one group of adjacent intersection points are two adjacent intersection points close to the dragging position point.

[0110] Taking regional division as an example, please refer to Fig. 7A, when the drag position point 73 is located between the intersection point 74 and the intersection point 75, at this time, the transition segmentation line has three intersection points with the contour of the target area, the substantial segment is the line between the second end point 72 and the intersection point 71', and the auxiliary segment is the line between the intersection point 71' and the drag position point 73. Once the drag position point 73 passes through the intersection point 75, so that the transition segmentation line has at least four intersection points with the contour of the target area, since the intersection point 74 and the intersection point 75 are adjacent and closer to the drag position point 73, the substantial segment is the line between the intersection point 74 and the intersection point 75.

[0111] With this solution, for irregular areas, once the transition control line has at least four intersections with the outline of the target area, the electronic device generates a substantial segment based on two adjacent intersections close to the dragging position, thereby intelligently identifying and adapting to the user's true intentions, thereby achieving the purpose of improving the efficiency of area segmentation or virtual wall setting.

[0112] In another mode, starting from when the transition control line and the outline of the target area have four intersection points, the substantial segment is determined to be a line segment with the second end point as the starting point and the intersection point closest to the second end point as the end point among the four intersection points. Afterwards, the electronic device determines whether the moving distance of the drag position point exceeds a preset distance; when the moving distance of the drag position point exceeds the preset distance, the substantial segment is determined to be two adjacent intersection points close to the drag position point.

[0113] Different from the above implementation, in this embodiment, when there are 4 intersection points between the transition control line and the outline of the target area, the electronic device will not immediately adjust the substantial segment to a line segment between two adjacent intersection points close to the drag position point, but will detect the moving distance of the drag position point in real time. When the moving distance exceeds the preset distance, the substantial segment is adjusted to a line segment between two adjacent intersection points close to the drag position point; when the moving distance is less than the preset distance, the substantial segment is kept unchanged as the initial substantial segment, and the initial substantial segment is a line segment with the second endpoint as the starting point and the intersection closest to the second endpoint as the end point among the 4 intersection points. Among them, the preset distance is, for example, half of the initial substantial segment, etc., which is not limited by the embodiments of the present application.

[0114] Taking regional division as an example, Figure 7B This is another schematic diagram of the demarcation method provided in the embodiment of the present application. Figure 7B , when there are 4 intersection points between the transition segmentation line and the outline of the target area, the substantial segment is the line between the second endpoint 72 and the intersection point 71′. The user continues to move the drag position point 73, and when the moving distance L1 is less than the preset distance, the electronic device continues to keep the substantial segment unchanged. The user continues to move the drag position point 73, and when the moving distance L2 is greater than or equal to the preset distance, the electronic device adjusts the substantial segment to the line between the intersection point 74 and the intersection point 75.

[0115] By adopting this solution, the electronic device adjusts the actual segment according to the moving distance of the dragging position point, thereby achieving the purpose of accurately and intelligently identifying the user's intention, and then accurately dividing the target area selected by the user.

[0116] In another embodiment, when the transition control line has at least 4 intersections with the outline of the target area, the at least one group of adjacent intersections includes a first group of adjacent intersections and a second group of adjacent intersections, the first group of adjacent intersections are two intersections close to the drag position and adjacent to each other, the second group of adjacent intersections are the second endpoint and the intersection closest to the second endpoint, the substantial segment includes a line between two intersections in the first group of adjacent intersections, and a line between two intersections in the second group of adjacent intersections, and the substantial segment divides the target area into at least 3 areas.

[0117] Taking regional division as an example, Figure 7C This is another schematic diagram of the demarcation method provided in the embodiment of the present application. Figure 7C , when there are 4 intersections between the transition dividing line and the outline of the target area, the first group of adjacent intersections is the second endpoint 72 and the intersection 71′, and the second group of adjacent intersections is the intersection 74 and the intersection 75. The electronic device generates a substantial segment based on the line between the second endpoint 72 and the intersection 71′, and the line between the intersection 74 and the intersection 75. At this time, there are two substantial segments. After the user stops the dragging operation, there are two target dividing lines on the interface, dividing the target area into area ①, area ②, and area ③.

[0118] By adopting this solution, the target area can be divided into at least three areas through one operation, and the operation method is simple and efficient.

[0119] Optionally, in the above embodiment, when the drag operation ends and a group of adjacent intersections are determined, a first intersection closest to the second endpoint and a second intersection closest to the drag position are determined from the group of adjacent intersections. Afterwards, the electronic device adsorbs the second endpoint to the first intersection, adsorbs the drag position to the second intersection, and generates and displays the target control line based on the connection line between the first intersection and the second intersection.

[0120] Taking regional division as an example, please continue to refer to Figure 7B , when the moving distance L1 is less than the preset distance, assuming that the user lifts his finger at the drag position point 73 to stop the dragging operation, the electronic device determines that the two adjacent intersection points are the second endpoint 72 and the intersection point 71′, then keeps the second endpoint 72 unchanged, and adsorbs the drag position point to the intersection point 71 to obtain the target segmentation line. At this time, the adsorption points are the second endpoint 72 and the intersection point 71′.

[0121] When the moving distance L2 is greater than the preset distance, assuming that the user lifts his finger at the drag position point 73 to stop the drag operation, the electronic device determines that two adjacent intersections close to the drag position point 73 are intersection points 74 and 75. Among them, intersection point 74 is close to the second end point 72, that is, intersection point 74 is the first intersection point, and intersection point 75 is close to the drag position point 73, that is, intersection point 75 is the second intersection point. Afterwards, the electronic device adsorbs the second end point 72 to the first intersection point, adsorbs the drag position point to the second intersection point, and generates a target segmentation line based on the connection line between intersection point 74 and intersection point 75.

[0122] With this solution, the electronic device automatically adsorbs the dragged position point to the intersection of the transition control line and the contour to generate and display the target control line, thereby enhancing the user's visual experience and providing intuitive operation feedback. At the same time, based on automatic endpoint adsorption, the front-end display and the actual map on the back-end can be synchronized, so that the user will not face the deviation between cognition and actual operation results.

[0123] Case 3: The first endpoint is dragged into the target area.

[0124] If the target area is a regular area, such as a rectangle or a square, if the first endpoint is dragged to the inside of the target area, the transition control line has no other intersections with the outline of the target area except the second endpoint. Alternatively, even if the target area is an irregular area, as long as the transition control line is completely inside the target area, the transition control line has no other intersections with the outline of the target area except the second endpoint. In this case, the electronic device extends the transition control line in the direction in which the second endpoint points to the drag position point, so that the transition control line has an intersection with the outline of the target area. When the dragging operation ends, the drag position point is adsorbed onto the intersection; the target control line is generated and displayed based on the line between the second endpoint and the intersection.

[0125] Continuing with the example of regional division, Fig. 8A This is another schematic diagram of the demarcation method provided in the embodiment of the present application. Fig. 8A , the first endpoint 81 and the second endpoint 82 of the initial dividing line are located on the contour of the target area, and the user presses the first endpoint 81 and moves, dragging the position point 83 inside the target area. The electronic device extends the transition dividing line along the direction of the second endpoint 82 pointing to the drag position point 83, so that the transition dividing line and the contour of the target area have an intersection 84. If the user lifts his finger to end the drag operation at this time, the electronic device will adsorb the drag position point 83 to the intersection 84, and generate and display the target dividing line based on the connection line between the second endpoint 82 and the intersection 84.

[0126] With this solution, when the transition control line is located inside the target, the bottom layer of the electronic device automatically adds an extension line to it to ensure that the extended transition control line has an intersection with the outline of the target area, thereby ensuring successful segmentation of the area while maintaining a high degree of freedom at the endpoints of the control line and not causing regional segmentation errors or virtual wall setting errors, thereby achieving the purpose of improving the accuracy of regional segmentation or virtual wall setting.

[0127] If the target area is an irregular area, after the first endpoint is dragged to the inside of the target area, if part of the transition control line is located outside the target area, then the transition control line and the outline of the target area have other intersections in addition to the second endpoint. At this time, the electronic device determines the adsorption point as the intersection point where the transition control line and the outline intersect for the first time in the direction of the drag position point pointed by the second endpoint. When the drag operation ends, the electronic device adsorbs the drag position point to the adsorption point, and generates and displays the target control line based on the connection line between the second endpoint and the adsorption point.

[0128] Figure 8B This is another schematic diagram of the demarcation method provided in the embodiment of the present application. Figure 8B , the first endpoint 81 and the second endpoint 82 of the initial dividing line are located on the outline of the target area, the user presses the first endpoint 81 and moves, and the drag position point 83 is located inside the target area. At this time, the transition dividing line has three intersections with the outline of the target area, such as the second endpoint 82, intersection 84 and intersection 85 in the figure. Among them, the line between intersection 85 and intersection 84 is located outside the target area. The electronic device determines that the adsorption point is intersection 85. If the user lifts his finger to end the dragging operation at this time, the electronic device adsorbs the drag position point 83 to intersection 85, and generates and displays the target dividing line based on the line between the second endpoint 82 and the adsorption point.

[0129] With this solution, when the transition segmentation line is located inside the target and has multiple intersections with the wheel base of the target area, the adsorption point is determined from the intersection and the dragged position point is automatically adsorbed to the adsorption point of the transition segmentation line and the contour to generate and display the target segmentation line, which is intuitive and fast.

[0130] Optionally, in the above embodiment, during the drag operation, the electronic device displays the initial control line in a third manner. When the drag operation ends, the display of the initial control line is canceled.

[0131] Please continue to refer to Figure 8B, while the user drags and moves the first endpoint 81, the electronic device continues to display the initial dividing line, as shown by the dotted line in the figure. The reason why the initial dividing line is displayed during the dragging process is to provide a reference for the user, so that no matter how the user performs the dragging operation later, the position of the initial dividing line can be quickly and directly determined. Once the user stops the dragging operation, the initial control line is no longer displayed.

[0132] By adopting this solution, the initial dividing line is continuously displayed for user reference during the dragging process, helping the user to quickly adjust the control line to the expected position, thereby improving the efficiency of area division or virtual wall setting.

[0133] Optionally, in the above embodiment, during the process of the user pressing the first endpoint and dragging, the electronic device determines whether the substantial segment of the transition control line meets the preset condition. When the substantial segment of the transition control line meets the preset condition, a prompt message is output, and the prompt message is used to prompt the user that if the substantial segment is used to divide the target area, the division fails. When the dragging operation ends, the electronic device bounces the dragging position point back to the target position point, and the target position point is located on the contour, is closest to the dragging position point, and can successfully divide the target area.

[0134] In order to enhance the user experience in the process of moving the first endpoint of the initial control line and prevent the division failure caused by misoperation or software limitation. In an embodiment of the present application, when the substantial segment of the transition control line cannot successfully divide the target area, at this time, if the user lifts the finger to end the drag operation, the electronic device automatically bounces the drag position point back to the target position point to ensure the continuity and accuracy of the user operation. Among them, the target position point is located on the contour, closest to the drag position point and can successfully divide the target area. The target position point is also called the nearest divisible position.

[0135] Continuing with the example of regional segmentation, Fig. 9 This is another schematic diagram of the demarcation method provided in the embodiment of the present application. Fig. 9, the transition dividing line and the outline of the target area have two intersections, namely the second endpoint 92 and the intersection 91. When the drag position point 93 is located outside the target area and moves in the direction from the second endpoint 92 to the intersection 91, the electronic device finds that the area of ​​the triangular sub-area is too small, for example, smaller than the minimum size of the self-moving device, the preset area or the minimum moving range of the self-moving device. If the line between the second endpoint 92 and the intersection 91 is used as the target dividing line to segment the target area, the segmentation will fail. Therefore, the electronic device outputs a planar prompt message to prompt the user that if the area is segmented at this time, the segmentation will fail due to the small area of ​​a sub-area. The planar prompt message is shown in the gray-filled triangle in the figure. Obviously, in an embodiment of the present application, by presenting the feasibility evaluation of the target segmentation line to the user in real time, the user's interaction process is optimized, so as to achieve the purpose of ensuring the accuracy of the operation and improving the segmentation efficiency.

[0136] In order to prevent segmentation failure, if the user lifts his finger to end the dragging operation when the electronic device outputs the prompt information, the electronic device adsorbs the dragging position point to the target position point 94, which is the position point on the contour of the target area that is closest to the dragging position point 93 and can successfully segment the target area. Afterwards, the electronic device generates and displays the target control line according to the connection line between the second endpoint 92 and the target position point 94.

[0137] Optionally, in addition to rebounding only the drag position point, the electronic device may also determine the target position point of the second endpoint 92 from the outline and rebound the second endpoint 92; or, rebound the second endpoint 92 and the drag position point 93 at the same time.

[0138] This solution automatically bounces the dragged position point back to the target position point, preventing users from encountering inoperable points during area segmentation or virtual wall setting, thereby ensuring that the endpoint of the target control line is always within the valid area. This significantly improves the reliability and interactive friendliness of area segmentation or virtual wall setting, and effectively reduces operation interruptions or errors caused by improper endpoint position of the target control line.

[0139] Optionally, the preset conditions in the above embodiment include but are not limited to the following conditions: there is a sub-region with an area smaller than a preset area between the two sub-regions obtained by dividing the target region by the substantial segment, the substantial segment intersects with the historical control line, and the substantial segment intersects with an indivisible object.

[0140] In the preset conditions, there is a sub-region with an area smaller than the preset area in the two sub-regions obtained by dividing the target region by the substantial segment of the transition control line. Fig. 9 The description is not repeated here.

[0141] The intersection of the actual segment and the historical control line means: taking area segmentation as an example, after each area segmentation, the target area is divided into two sub-areas by the target control line 1. If one of the sub-areas is further segmented, the sub-area becomes the new target area. When the new target area is segmented, the new target segmentation line 2 cannot intersect with the target segmentation line 1. If the target segmentation line 1 intersects with the target segmentation line 2 during the dragging operation, the electronic device displays a prompt message on the APP interface "Unable to cross the previous segmentation line, please split again". Furthermore, if the user lifts his finger to end the dragging operation, the electronic device determines the target position point based on the dragging position point, and bounces the dragging position point back to the target position point.

[0142] The intersection of a substantial segment and an indivisible object means that, taking regional segmentation as an example, the endpoint of the substantial end of the transition segmentation line is located on an indivisible object, such as a door or other object. In the embodiment of the present application, a layer is superimposed on the base map to obtain an environment map, and the superimposed layer includes a floor plan layer. Based on the floor plan layer, indivisible objects such as doors appear in the environment map. Figure 3 to Figure 9 Indivisible objects such as going out are not indicated.

[0143] Fig.10 This is another schematic diagram of the demarcation method provided in the embodiment of the present application. Fig.10 , the endpoints of the substantial segment include endpoint 101 and endpoint 102, and endpoint 102 is located on door 100. If the user ends the dragging operation, the electronic device adsorbs the dragging position point to endpoint 103, thereby avoiding segmentation failure due to the intersection of the target segmentation line and the indivisible door. The dragging position point can be endpoint 102, or it can be located on the extension line from endpoint 101 to endpoint 102. Endpoint 103 is located at the edge of the door.

[0144] With this solution, when the user successfully draws the control line and ends the dragging operation, if the actual segment of the transition control line meets any preset conditions, the dragging position point will automatically bounce back to the target position point, avoiding the confusion caused by successfully adjusting the control line to the expected position but failing to divide the area or set the virtual wall. This improves the efficiency of area division or virtual wall setting while achieving the purpose of improving user satisfaction, significantly improves the reliability and user-friendliness of the operation, and effectively reduces operation interruptions or errors caused by improper control point positions.

[0145] In the above embodiments, the endpoints of the initial control line are used as an example for explanation. However, in the embodiments of the present application, in addition to the endpoints of the initial control line, any other position of the initial control line except the two endpoints can also be operated. When the user presses any other position of the initial control line except the two endpoints to perform a first sliding operation, the electronic device responds to the user's first sliding operation and translates the initial control line as a whole along the first sliding direction of the first sliding operation, and the first sliding direction is perpendicular to the initial control line. When the user presses any other position of the initial control line except the two endpoints to perform a second sliding operation, the electronic device responds to the user's second sliding operation and adjusts the initial control line into a curve to control the target area with a curve, and the second sliding direction of the second sliding operation is different from the first sliding direction.

[0146] Taking region segmentation as an example, Fig.11A This is another schematic diagram of the demarcation method provided in the embodiment of the present application. Fig.11A , the endpoints 111 and 112 of the initial dividing line are located on the contour of the target area. The user presses any position point 113 of the initial dividing line and performs a sliding operation. After the arbitrary position point 113 moves 2 millimeters (mm), the electronic device detects that the vertical displacement is greater than the horizontal displacement. The electronic device determines that the current sliding operation is the first sliding operation, so the initial dividing line is translated as a whole. The first sliding direction of the first sliding operation is shown by the arrow in the figure.

[0147] Fig. 11B This is another schematic diagram of the demarcation method provided in the embodiment of the present application. Fig. 11B The user presses any position point 113 of the initial dividing line and performs a sliding operation. After the arbitrary position point 113 moves 2 millimeters (mm), the electronic device detects that the vertical displacement is less than or equal to the horizontal displacement. The electronic device determines that the current sliding operation is a second sliding operation, and adjusts the initial dividing line to a curve, thereby dividing the target area into a curve.

[0148] In practice, when encountering "blank areas" such as furniture and obstructions, the curve segmentation function can be used to segment the blank areas from the environment map. The curve segmentation function integrates the translation and bending operations of the segmentation line, and can adapt to complex area segmentation requirements.

[0149] This solution introduces curve division function and operation mode to provide richer and more personalized operation options for regional division, with high simplicity and freedom, thus enhancing the convenience and accuracy of user operation and ensuring high user satisfaction.

[0150] Optionally, in the above embodiment, the two endpoints of the initial control line can also be operated simultaneously. When the user operates the first endpoint and the second endpoint of the initial segmentation line, the electronic device generates a substantial segment and an auxiliary segment of the transition control line according to the positions of the first drag position point and the second drag position point relative to the target area and the number of intersections between the transition control line and the outline of the target area. The first drag position point is the drag position corresponding to the first endpoint, and the second drag position point is the drag position corresponding to the second endpoint.

[0151] Taking region segmentation as an example, Fig. 11C This is another schematic diagram of the demarcation method provided in the embodiment of the present application. Fig. 11C , the endpoints 111 and 112 of the initial segmentation line are located on the contour of the target area. The user presses the endpoints 111 and 112 simultaneously to rotate, extend, shorten, etc. the initial segmentation line. For example, the user drags the endpoint 111 to the first drag position point 114, and drags the endpoint 112 to the second drag position point 115. At this time, the intersection points of the transition segmentation line and the contour of the target area are the intersection points 116 and 117. The substantial segment is such as the line between the intersection points 116 and 117. The auxiliary segment is such as the line between the first drag position point 114 and the intersection point 116, and the line between the second drag position point 115 and the intersection point 117.

[0152] Please refer to Fig. 11C ,During the dragging operation, the initial segmentation line is displayed on the ,environmental map in a third way, as shown by the dotted line in the figure, for the user’s ,reference.

[0153] By adopting this solution, by operating the two end points of the initial control line at the same time, the user does not need to adjust each end point in turn, thereby achieving the purpose of improving the efficiency of area segmentation or virtual wall setting.

[0154] In the above embodiments, the region segmentation function based on endpoint adsorption and dynamic change of substantial segments is described in detail. However, the embodiments of the present application are not limited thereto. The interactive logic of the dividing line is also applicable to the virtual wall setting, and the above endpoint adsorption function and the dynamic change of substantial segments can also be applied to the setting of the virtual wall. For example, in the virtual wall setting interface, after the user selects the target area, an initial virtual wall appears on the target area, and the two ends of the initial virtual wall are located on the outline of the target area, and the target area is divided into two sub-areas, and the two endpoints of the linear virtual wall are tightly attached to the wall to form a clear boundary. When the user presses the first endpoint of the virtual wall and performs a drag operation, the electronic device generates a transition virtual wall according to the line between the second endpoint of the virtual wall and the drag position point, and the transition virtual wall also has substantial segments and auxiliary segments. If the user lifts his finger to end the drag operation, the electronic device automatically adsorbs the endpoints of the transition virtual wall according to the intersection of the transition virtual wall and the outline of the target area to generate and display the target virtual wall. The specific description can be referred to in the description of the above embodiments, which will not be repeated here.

[0155] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0156] Fig.12 Schematic diagram of a delineation device provided in an embodiment of the present application. The delineation device 1200 comprises: an initial module 121 , a processing module 122 , an adsorption module 123 and a delineation module 124 .

[0157] The initial module 121 is used for displaying an initial control line on the target area in response to the user's selection operation on the target area on the environment map, wherein two endpoints of the initial control line are located on the outline of the target area and the target area is divided into two sub-areas, wherein the environment map is obtained by superimposing a layer on a basic map, and the basic map is a single-layer map;

[0158] The processing module 122 is used to generate and display a transition control line in response to a user dragging operation on at least one end point of the initial control line, wherein the transition control line changes as the dragging operation proceeds so that the demarcation effect of the target area changes;

[0159] An adsorption module 123, used for adsorbing two endpoints of the transition control line onto the outline of the target area when the dragging operation ends, so as to generate and display a target control line, wherein there are points in the basic map corresponding to the endpoints of the target control line;

[0160] The demarcation module 124 is used to demarcate the target area according to the target control line.

[0161] In a feasible implementation, the processing module 122 is used to generate a substantial segment and an auxiliary segment of the transition control line according to the position of the drag position point relative to the target area and the number of intersection points between the transition control line and the outline of the target area when the user operates the first end point of the initial control line; the substantial segment is used to indicate the demarcation effect of the target area; and the substantial segment is displayed in a first manner, and the auxiliary segment is displayed in a second manner.

[0162] In a feasible implementation, the processing module 122 is used to generate the substantial segment according to the line between the two intersection points when the first endpoint is dragged outside the target area and the transition control line has two intersection points with the outline of the target area, and to generate the auxiliary segment according to the line between the dragging position point and another intersection point of the two intersection points except the second endpoint.

[0163] In a feasible implementation, the adsorption module 123 is used to adsorb the drag position point to another intersection of the two intersections except the second endpoint to obtain an adsorption point when the drag operation ends, and generate and display a target control line based on the second endpoint and the adsorption point.

[0164] In a feasible implementation, the processing module 122 is used to determine at least one group of adjacent intersections from the four intersections when the first endpoint is dragged outside the target area and the transition control line has at least four intersections with the outline of the target area; generate the substantial segment based on the connecting lines between the at least one group of adjacent intersections, and generate the auxiliary segment based on the remaining part of the transition control line except the substantial segment, and a group of adjacent intersections includes two intersections.

[0165] In a feasible implementation, when the transition control line has at least 4 intersection points with the outline of the target area, the at least one group of adjacent intersection points are two intersection points that are close to the dragging position point and adjacent to each other.

[0166] In a feasible implementation, the processing module 122 is used to determine that the actual segment is a line segment among the four intersections with the second endpoint as the starting point and the intersection closest to the second endpoint as the end point, starting from when the transition control line has four intersections with the outline of the target area; determine whether the moving distance of the drag position point exceeds a preset distance; when the moving distance of the drag position point exceeds the preset distance, determine that the actual segment is two intersections close to and adjacent to the drag position point.

[0167] In a feasible implementation, the adsorption module 123 is used to determine, when the drag operation is completed and a group of adjacent intersections are determined, a first intersection closest to the second endpoint and a second intersection closest to the drag position from a group of adjacent intersections; adsorb the second endpoint to the first intersection, and adsorb the drag position to the second intersection; and generate and display the target control line based on the connecting line between the first intersection and the second intersection.

[0168] In a feasible implementation, when the transition control line has at least 4 intersections with the outline of the target area, the at least one group of adjacent intersections includes a first group of adjacent intersections and a second group of adjacent intersections, the first group of adjacent intersections are two intersections close to the drag position and adjacent to each other, the second group of adjacent intersections are the second endpoint and the intersection closest to the second endpoint, the substantial segment includes a line between two intersections in the first group of adjacent intersections, and a line between two intersections in the second group of adjacent intersections, and the substantial segment divides the target area into at least 3 areas.

[0169] In a feasible implementation, the processing module 122 is further configured to, when the first endpoint is dragged to the inside of the target area and the transition control line has no point intersecting with the contour except the second endpoint, extend the transition control line in a direction from the second endpoint to the dragging position point, so that the transition control line has an intersection with the contour of the target area;

[0170] The adsorption module 123 is used to adsorb the drag position point to the intersection point to obtain the adsorption point when the drag operation ends, and generate and display the target control line according to the connection line between the second endpoint and the adsorption point.

[0171] In a feasible implementation, the processing module 122 is further configured to determine that the adsorption point is a point where the transition control line first intersects the contour in the direction in which the second endpoint points to the dragging position point, when the first endpoint is dragged into the target area and the transition control line has an intersection with the contour other than the second endpoint;

[0172] The adsorption module 123 is used to adsorb the drag position point to the adsorption point when the drag operation ends; and to generate and display the target control line according to the connection line between the second end point and the adsorption point.

[0173] In a feasible implementation, the processing module 122 is also used to determine whether the actual segment of the transition control line meets the preset conditions during the dragging process; when the actual segment of the transition control line meets the preset conditions, a prompt message is output, and the prompt message is used to prompt the user that if the actual segment is used to divide the target area, the division will fail; when the dragging operation ends, the drag position point is bounced back to the target position point, and the target position point is located on the contour, closest to the drag position point and can successfully divide the target area.

[0174] In a feasible implementation, the preset conditions include: there is a sub-region whose area is smaller than a preset area in two sub-regions obtained by dividing the target region by the substantial segment, the substantial segment intersects with a historical control line, and the substantial segment intersects with an indivisible object.

[0175] In a feasible implementation, the processing module 122 is also used to respond to a first sliding operation of the user on any position of the initial control line except the two endpoints, translate the initial control line as a whole along a first sliding direction of the first sliding operation, and the first sliding direction is perpendicular to the initial control line; respond to a second sliding operation of the user on any position of the initial control line except the two endpoints, adjust the initial control line into a curve to divide the target area with a curve, and the second sliding direction of the second sliding operation is different from the first sliding direction.

[0176] In a feasible implementation, the initial module 121 is used to respond to the user's selection operation on the target area on the environment map, determine the position of the operation point of the selection operation in the target area; and display the initial control line on the target area according to the position of the operation point in the target area.

[0177] In a feasible implementation, when the target area is a rectangle, the initial control line is a control line parallel to a short side of the rectangle and passing through the operation point.

[0178] In a feasible implementation, the demarcation module 124 is used to display a confirmation hot zone and a cancellation hot zone outside the environment map; in response to a user's click operation on the confirmation hot zone, the target area is divided into two sub-areas according to the target control line; or, in response to a user's click operation on the cancellation hot zone, the target area is switched to a candidate area.

[0179] In a feasible implementation, the processing module 122 is used to generate the actual segment and auxiliary segment of the transition control line according to the positions of the first drag position point and the second drag position point relative to the target area and the number of intersections between the transition control line and the contour of the target area when the user operates the first endpoint and the second endpoint of the initial dividing line.

[0180] In a feasible implementation, when the target area is delineated by dividing the target area into at least two sub-areas, the initial control line, the transition control line and the target control line are respectively an initial dividing line, a transition dividing line and a target dividing line, and the target dividing line is used to divide the target area into at least two sub-areas; when the target area is delineated by setting a virtual wall within the target area, the initial control line, the transition control line and the target control line are respectively an initial virtual wall, a transition virtual wall and a target virtual wall, and the target virtual wall is used to divide the target area into a restricted area and an executable area.

[0181] In a feasible implementation, the processing module 122 is used to respond to the user's selection operation of the target area on the environment map in the initial module 121, and enter the area segmentation interface in response to the user's selection operation of the split button on the user interface before the initial control line is displayed on the target area; or to enter the virtual wall setting interface in response to the user's selection operation of the virtual wall setting button on the user interface.

[0182] In a feasible implementation, the processing module 122 is further configured to display the initial control line in a third manner during the dragging operation; and cancel the display of the initial control line when the dragging operation ends.

[0183] The demarcation device provided in the embodiment of the present application can execute the actions of the electronic device in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0184] Fig.13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.13 As shown, the electronic device 1300 includes:

[0185] Processor 131 and memory 132;

[0186] The memory 132 stores computer instructions;

[0187] The processor 131 executes the computer instructions stored in the memory 132, so that the processor 131 executes the demarcation method implemented by the electronic device as described above.

[0188] The specific implementation process of the processor 131 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0189] Optionally, the electronic device 1300 further includes a communication component 133 , wherein the processor 131 , the memory 132 and the communication component 133 may be connected via a bus 134 .

[0190] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed by a processor, they are used to implement the demarcation method implemented by the electronic device as above.

[0191] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the demarcation method implemented by the above electronic device.

[0192] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0193] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method of demarcation, It is characterized in that include: In response to a user selecting a target area on an environment map, an initial control line is displayed on the target area, two endpoints of the initial control line are located on the outline of the target area, and the target area is divided into two sub-areas, the environment map is obtained by superimposing a layer on a base map, and the base map is a single-layer map; In response to a user dragging operation on at least one end point of the initial control line, generating and displaying a transition control line, wherein the transition control line changes as the dragging operation proceeds so that a demarcation effect of the target area changes; When the dragging operation ends, the two endpoints of the transition control line are adsorbed onto the outline of the target area to generate and display a target control line, and there are points in the basic map corresponding to the endpoints of the target control line; The target area is delineated according to the target control line.

2. The method according to claim 1, It is characterized in that The step of generating and displaying a transition control line in response to a user dragging operation on at least one endpoint of the initial control line comprises: When the user operates the first end point of the initial control line, a substantial segment and an auxiliary segment of the transition control line are generated according to the position of the drag position point relative to the target area and the number of intersections between the transition control line and the outline of the target area, wherein the substantial segment is used to indicate the delineation effect of the target area; The substantial segment is displayed in a first manner, and the auxiliary segment is displayed in a second manner.

3. The method according to claim 2, It is characterized in that The generating of the substantial segment and the auxiliary segment of the transition control line according to the position of the dragging position point relative to the target area and the number of intersections between the transition control line and the outline of the target area comprises: When the first endpoint is dragged outside the target area and the transition control line has two intersections with the outline of the target area, the substantial segment is generated based on the line between the two intersections, and the auxiliary segment is generated based on the line between the drag position point and another intersection of the two intersections except the second endpoint.

4. The method according to claim 3, It is characterized in that When the dragging operation ends, the two endpoints of the transition control line are adsorbed onto the outline of the target area to generate and display the target control line, including: When the dragging operation ends, the dragging position point is adsorbed to another intersection point of the two intersection points except the second end point to obtain an adsorption point, and a target control line is generated and displayed according to the second end point and the adsorption point.

5. The method according to claim 2, It is characterized in that When the user operates the first end point of the initial control line, generating the substantial segment and the auxiliary segment of the transition control line according to the position of the drag position point relative to the target area and the number of intersections between the transition control line and the outline of the target area, including: When the first endpoint is dragged outside the target area and the transition control line has at least four intersections with the outline of the target area, determining at least one group of adjacent intersections from the four intersections; The substantial segment is generated according to the connection line between the at least one group of adjacent intersection points, and the auxiliary segment is generated according to the remaining part of the transition control line except the substantial segment, wherein a group of adjacent intersection points includes two intersection points.

6. The method according to claim 5, It is characterized in that When the transition control line has at least 4 intersection points with the outline of the target area, the at least one group of adjacent intersection points is two adjacent intersection points close to the dragging position point.

7. The method according to claim 5, It is characterized in that The generating the substantial segment according to the connecting line between the at least two adjacent intersection points comprises: Starting from when the transition control line and the contour of the target area have four intersection points, determining the substantial segment as a line segment with the second endpoint as a starting point and the intersection point closest to the second endpoint as an end point among the four intersection points; Determine whether the moving distance of the dragging position point exceeds a preset distance; When the moving distance of the dragging position point exceeds the preset distance, the substantial segment is determined to be two adjacent intersection points close to the dragging position point.

8. The method according to any one of claims 5 to 7, It is characterized in that When the dragging operation ends, the two endpoints of the transition control line are adsorbed onto the outline of the target area to generate and display the target control line, including: When the dragging operation ends and a group of adjacent intersections is determined, a first intersection closest to the second endpoint and a second intersection closest to the dragging position are determined from the group of adjacent intersections; Adsorbing the second endpoint to the first intersection, and adsorbing the dragging position point to the second intersection; The target control line is generated and displayed according to a connection line between the first intersection point and the second intersection point.

9. The method according to claim 5, It is characterized in that When the transition control line has at least 4 intersections with the outline of the target area, the at least one group of adjacent intersections includes a first group of adjacent intersections and a second group of adjacent intersections, the first group of adjacent intersections are two intersections close to the drag position and adjacent to each other, the second group of adjacent intersections are the second endpoint and the intersection closest to the second endpoint, the substantial segment includes a line between two intersections in the first group of adjacent intersections, and a line between two intersections in the second group of adjacent intersections, and the substantial segment divides the target area into at least 3 areas.

10. The method according to claim 1, It is characterized in that When the dragging operation ends, the two endpoints of the transition control line are adsorbed onto the outline of the target area to generate and display the target control line, including: When the first endpoint is dragged to the inside of the target area and the transition control line has no point intersecting with the outline except the second endpoint, extending the transition control line in the direction from the second endpoint to the dragging position point so that the transition control line has an intersection with the outline of the target area; When the dragging operation ends, adsorbing the dragging position point onto the intersection point to obtain an adsorption point; The target control line is generated and displayed according to a connection line between the second endpoint and the adsorption point.

11. The method according to claim 1, It is characterized in that When the dragging operation ends, the two endpoints of the transition control line are adsorbed onto the outline of the target area to generate and display the target control line, including: When the first endpoint is dragged to the inside of the target area, and the transition control line has an intersection with the contour except the second endpoint, the adsorption point is determined to be the point where the transition control line first intersects with the contour in the direction in which the second endpoint points to the drag position point; When the dragging operation ends, adsorbing the dragging position point to the adsorption point; The target control line is generated and displayed according to a connection line between the second end point and the adsorption point.

12. The method according to any one of claims 2 to 8, It is characterized in that Also includes: During the dragging process, determining whether a substantial segment of the transition control line meets a preset condition; When the substantial segment of the transition control line meets a preset condition, a prompt message is output, wherein the prompt message is used to prompt the user that the division fails if the substantial segment is used to divide the target area; When the dragging operation ends, the dragging position point is bounced back to a target position point, which is located on the contour, closest to the dragging position point, and can successfully divide the target area.

13. The method according to claim 12, It is characterized in that The preset conditions include: there is a sub-region whose area is smaller than a preset area in two sub-regions obtained by dividing the target region by the substantial segment, the substantial segment intersects with a historical control line, and the substantial segment intersects with an indivisible object.

14. The method according to any one of claims 1 to 8, 10 or 11, It is characterized in that Also includes: In response to a first sliding operation of a user on any position of the initial control line except two end points, the initial control line is translated as a whole along a first sliding direction of the first sliding operation, where the first sliding direction is perpendicular to the initial control line; In response to a second sliding operation of the user on any position of the initial control line except the two end points, the initial control line is adjusted to a curve to divide the target area with a curve, and a second sliding direction of the second sliding operation is different from the first sliding direction.

15. The method according to any one of claims 1 to 8, 10 or 11, It is characterized in that In response to the user selecting the target area on the environment map, displaying the initial control line on the target area includes: In response to a user's selection operation on a target area on the environment map, determining a position of an operation point of the selection operation in the target area; An initial control line is displayed on the target area according to the position of the operating point in the target area.

16. The method according to claim 15, It is characterized in that When the target area is a rectangle, the initial control line is a control line parallel to the short side of the rectangle and passing through the operation point.

17. The method according to any one of claims 1 to 8, 10 or 11, It is characterized in that Also includes: Displaying the confirmation hot zone and the cancellation hot zone outside the environment map; In response to a user's click operation on the confirmation hot zone, the target area is divided into two sub-areas according to the target control line; or, in response to a user's click operation on the cancellation hot zone, the target area is switched to a candidate area.

18. The method according to claim 1, It is characterized in that The step of generating and displaying a transition control line in response to a user dragging operation on at least one endpoint of the initial control line comprises: When the user operates the first endpoint and the second endpoint of the initial dividing line, the actual segment and the auxiliary segment of the transition control line are generated according to the positions of the first drag position point and the second drag position point relative to the target area and the number of intersections between the transition control line and the outline of the target area.

19. The method according to any one of claims 1 to 8, 10 or 11, It is characterized in that When demarcating the target area is to divide the target area into at least two sub-areas, the initial control line, the transition control line and the target control line are respectively an initial dividing line, a transition dividing line and a target dividing line, and the target dividing line is used to divide the target area into at least two sub-areas; When the target area is demarcated by setting a virtual wall in the target area, the initial control line, the transition control line and the target control line are respectively an initial virtual wall, a transition virtual wall and a target virtual wall, and the target virtual wall is used to divide the target area into a restricted area and an executable area.

20. The method according to any one of claims 1 to 8, 10 or 11, It is characterized in that In response to the user's selection operation on the target area on the environment map, before displaying the initial control line on the target area, the method further includes: In response to the user selecting a split button on the user interface, the region split interface is entered; or, in response to the user selecting a virtual wall setting button on the user interface, the virtual wall setting interface is entered.

21. The method according to any one of claims 1 to 8, 10 or 11, It is characterized in that Also includes: During the drag operation, the initial control line is displayed in a third manner; When the dragging operation ends, the display of the initial control line is cancelled.

22. A region segmentation device, It is characterized in that include: An initial module, for displaying an initial control line on a target area on an environment map in response to a user's selection operation on the target area, wherein two endpoints of the initial control line are located on the contour of the target area and the target area is divided into two sub-areas, wherein the environment map is obtained by superimposing a layer on a base map, and the base map is a single-layer map; a processing module, configured to generate and display a transition control line in response to a user dragging operation on at least one end point of the initial control line, wherein the transition control line changes as the dragging operation proceeds so as to change the demarcation effect of the target area; An adsorption module, used for adsorbing two endpoints of the transition control line onto the outline of the target area when the dragging operation ends, so as to generate and display a target control line, wherein there are points in the basic map corresponding to the endpoints of the target control line; A demarcation module is used to demarcate the target area according to the target control line.

23. An electronic device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the electronic device implements the method according to any one of claims 1 to 21.

24. A non-volatile computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 21 is implemented.