CN-122018736-A - Region dividing method and device, nonvolatile storage medium and electronic equipment
Abstract
The application discloses a region dividing method and device, a nonvolatile storage medium and electronic equipment. The method comprises the steps of determining dynamic proportion data of each target object in a target object set and initial candidate points corresponding to the target objects in a target area, determining initial sub-areas corresponding to the initial candidate points according to distances from the points in the target area to the initial candidate points, iteratively determining the target candidate points according to centroids in the initial sub-areas, updating sub-areas corresponding to the target candidate points in the target area after determining the target candidate points each time, and determining the sub-areas meeting preset iteration termination conditions as target sub-areas. The application solves the technical problem of inconvenient user interaction caused by the fact that the display areas of all target objects cannot be accurately divided according to the priorities of the target objects in the related art.
Inventors
- LI FANGJUN
- LIU GUANGBIN
- CHEN BIFENG
- LUO YEFEI
Assignees
- 湖南快乐阳光互动娱乐传媒有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260127
Claims (11)
- 1. A method of region division, comprising: Determining dynamic proportion data of each target object in a target object set and corresponding initial candidate points of the target objects in a target area, wherein the dynamic proportion is used for indicating business load information or business capacity information of the target objects; Determining an initial sub-region corresponding to the initial candidate point according to the distance from the point in the target region to the initial candidate point; Determining a target candidate point according to centroid iteration in the initial sub-region, and updating a sub-region corresponding to the target candidate point in the target region after determining the target candidate point each time until a preset iteration termination condition is met, wherein the preset iteration termination condition comprises that a deviation value between the area of the sub-region and a preset area is smaller than a first preset threshold value, the target candidate point corresponds to the dynamic proportion data one by one, and the preset area is an area determined according to the dynamic proportion data corresponding to the target candidate point and the area of the target region; And determining the subarea meeting the preset iteration termination condition as a target subarea.
- 2. The region-dividing method of claim 1, wherein iteratively determining target candidate points from centroids in the initial sub-region comprises: in the first round of iteration, determining the centroid of the initial sub-region as the target candidate point of the first round of iteration; In a non-first round of iteration, determining a first moving distance of the iteration of the round according to a deviation value between the area of the sub-area and the preset area, which is determined in the previous round of iteration of the round, and determining a mass center in the sub-area in the previous round of iteration, wherein the length of the first moving distance is inversely related to the magnitude of the deviation value; In the present iteration, the centroid determined in the previous iteration is taken as the target candidate point.
- 3. The area dividing method according to claim 1, wherein the method further comprises: Before the preset iteration termination condition is met, determining noise points in a first area to be processed, wherein the noise points are points with a distance between the noise points and the boundary of the area to be processed being not greater than a preset distance, and the first area to be processed comprises the initial subarea and the subarea; deleting noise points in the initial sub-region to obtain an effective region corresponding to the first region to be processed; And determining the mass center of the effective area as the mass center of the area to be processed.
- 4. The area dividing method according to claim 1, wherein the method further comprises: Before the preset iteration termination condition is met, determining a discrete area of a second area to be processed, wherein the discrete area is an area with the area not larger than a second preset threshold value, and the neighborhood connectivity detection result is an area without a connected area, and the second area to be processed comprises the initial subarea and the subarea; Determining a weight level of a second to-be-processed area in the target area and a weight level of the discrete area, wherein the height of the weight level of the second to-be-processed area is positively correlated with the size of the weight radius of the second to-be-processed area, and the weight level of the discrete area is the same as the weight level of the second to-be-processed area corresponding to the discrete area; and fusing the discrete area and a target second to-be-processed area, wherein the target second to-be-processed area is a second to-be-processed area which is adjacent to the discrete area and has the same weight level.
- 5. The area dividing method according to claim 1, wherein the method further comprises: Before the preset iteration termination condition is met, determining a third to-be-processed area, wherein the third to-be-processed area comprises an initial subarea and a subarea with the aspect ratio of the minimum circumscribed rectangle not smaller than a preset ratio; and determining the mass center of the third to-be-processed area, and adjusting the third to-be-processed area according to the mass center and the minimum circumscribing rectangle until the aspect ratio of the minimum circumscribing rectangle of the third to-be-processed area is larger than the preset ratio.
- 6. The area dividing method according to claim 1, wherein after determining that the sub-area satisfying the preset iteration termination condition is a target sub-area, the method further comprises: determining the fluctuation range between a first real-time proportion data set and a second real-time proportion data set, wherein the first real-time proportion data set is a real-time proportion data set before fluctuation, and the second real-time proportion data set is a real-time proportion data set after fluctuation; And under the condition that the fluctuation range is larger than the preset range, updating the mass center and the weight of the target subarea corresponding to the first real-time proportion data set in a linear difference value updating mode according to the first real-time proportion data set and the second real-time proportion data set.
- 7. The method of claim 1, wherein the predetermined iteration termination condition further comprises that a moving distance of the first centroid position relative to the second centroid position is smaller than a predetermined moving distance, a proportion of subareas having discrete areas is smaller than a first predetermined proportion, a proportion of subareas having a long corridor shape is smaller than a second predetermined proportion, the discrete areas are areas not larger than a second predetermined threshold, and the neighborhood connectivity detection result is areas without connected areas, and the subareas having the long corridor shape include subareas having an aspect ratio of minimum circumscribing rectangles not smaller than a predetermined ratio.
- 8. An area dividing apparatus, comprising: The first processing module is used for determining dynamic proportion data of each target object in a target object set and initial candidate points corresponding to the target objects in a target area, wherein the dynamic proportion is used for indicating the display priority of the target objects; the second processing module is used for determining an initial sub-region corresponding to the initial candidate point according to the distance from the point in the target region to the initial candidate point; The third processing module is used for iteratively determining target candidate points according to centroids in the initial sub-regions, updating sub-regions corresponding to the target candidate points in the target regions after determining the target candidate points each time until a preset iteration termination condition is met, wherein the preset iteration termination condition comprises that a deviation value between the area of the sub-regions and a preset area is smaller than a first preset threshold value, the target candidate points are in one-to-one correspondence with the dynamic proportion data, and the preset area is an area determined according to the dynamic proportion data corresponding to the target candidate points and the area of the target region; And a fourth processing module, configured to determine the sub-region that satisfies the preset iteration termination condition as a target sub-region.
- 9. A nonvolatile storage medium, wherein a program is stored in the nonvolatile storage medium, and wherein the program, when executed, controls a device in which the nonvolatile storage medium is located to execute the area division method according to any one of claims 1 to 7.
- 10. An electronic device comprising a memory and a processor for executing a program stored in the memory, wherein the program is executed to perform the region dividing method of any one of claims 1 to 7.
- 11. A computer program product comprising a computer program which, when executed by a processor, implements the region dividing method according to any one of claims 1 to 7.
Description
Region dividing method and device, nonvolatile storage medium and electronic equipment Technical Field The present application relates to the field of data visualization, and in particular, to a region dividing method and apparatus, a nonvolatile storage medium, and an electronic device. Background In the related art, when the display areas corresponding to the target objects are determined, the subareas occupied by the target objects in the display areas cannot be accurately divided according to the priorities of the target objects, so that the display priorities of the subareas and the target objects are not matched, and user interaction is inconvenient. In view of the above problems, no effective solution has been proposed at present. Disclosure of Invention The embodiment of the application provides a region dividing method and device, a nonvolatile storage medium and electronic equipment, which at least solve the technical problem of inconvenient user interaction caused by the fact that the display regions of target objects cannot be accurately divided according to the priorities of the target objects in the related technology. According to one aspect of the embodiment of the application, a region dividing method is provided, which comprises the steps of determining dynamic proportion data of each target object in a target object set and corresponding initial candidate points of the target objects in a target region, wherein the dynamic proportion is used for indicating service load information or service capacity information of the target objects, determining initial subareas corresponding to the initial candidate points according to the distance from the points in the target region to the initial candidate points, determining target candidate points according to centroid iteration in the initial subareas, and updating the subareas corresponding to the target candidate points in the target region after each time of determining the target candidate points until a preset iteration termination condition is met, wherein the preset iteration termination condition comprises that deviation values between areas of the subareas and preset areas are smaller than a first preset threshold value, the target candidate points and the dynamic proportion data are in one-to-one correspondence, the preset areas are areas determined according to the dynamic proportion data corresponding to the target candidate points and the areas of the target regions, and the subareas meeting a preset iteration termination condition are determined as the target subareas. Optionally, determining the target candidate point according to the centroid iteration in the initial sub-region comprises moving the initial candidate point to a centroid direction by a preset distance in a first round of iteration to obtain the target candidate point of the first round of iteration, determining a first moving distance of the first round of iteration according to a deviation value between the area of the sub-region determined in the previous round of iteration and the preset area of the first round of iteration and determining the centroid in the sub-region in the previous round of iteration, wherein the length of the first moving distance is inversely related to the magnitude of the deviation value, and moving the target candidate point determined in the previous round of iteration by the first moving distance to the centroid direction determined in the previous round of iteration in the first round of iteration to obtain the target candidate point of the first round of iteration. Optionally, before the preset iteration termination condition is met, determining noise points in a first area to be processed, wherein the noise points are points with a distance between the noise points and the boundary of the area to be processed being not greater than a preset distance, the first area to be processed comprises an initial sub-area and a sub-area, deleting the noise points in the initial sub-area to obtain an effective area corresponding to the first area to be processed, and determining the mass center of the effective area as the mass center of the area to be processed. Optionally, before the preset iteration termination condition is met, determining a discrete area of a second to-be-processed area, wherein the discrete area is an area with the area not larger than a second preset threshold value, the neighborhood connectivity detection result is an area without a connected area, the second to-be-processed area comprises an initial sub-area and a sub-area, determining the weight level of the second to-be-processed area in a target area, and determining the weight level of the discrete area, wherein the height of the weight level of the second to-be-processed area is positively correlated with the weight radius of the second to-be-processed area, the weight level of the discrete area is identical to the weight level of the second to-be-processed area cor