A patrol grid division method, device, terminal equipment and storage medium
By obtaining inspection area information and generating an initial division line set, screening alternative division lines and initial grid division plans, calculating the fairness of the inspection, realizing automatic grid division, solving the problem of long manual division and low efficiency, and improving improve the efficiency and quality of inspection area division.
Patent Information
- Application Number
- CN202311848443.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2043-12-28
AI Technical Summary
In the existing technology, manually dividing the grid of the inspection area is time-consuming and inefficient, resulting in low inspection efficiency.
By obtaining the inspection area information, an initial division line set is generated, and based on the road information and patrol element map information, alternative division lines and initial grid division plans are screened, the fairness of the inspection is calculated, and the final grid division plan is determined, using machine Automatically generate a data set of dividing lines for dividing areas for meshing.
It realizes automated grid division, improves the efficiency and quality of inspection area division, and solves the problem of long time-consuming and low efficiency of manual division.
Smart Images

Figure CN117787908B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of land resource management, and in particular to a grid division method, device, terminal equipment and storage medium. Background Art
[0002] Since my country fully implemented the river chief system in December 2016, it has achieved remarkable results in the main tasks of protecting water resources, preventing water pollution, improving water environment, and restoring water ecology. As a result, a variety of grassroots inspection systems such as the forest chief system and the field chief system that imitated the river chief system have also emerged.
[0003] At present, various inspection systems such as the river chief system, forest chief system and field chief system are all implemented at the local level under the "river chief (forest chief, field chief)" plan, and the inspection units under the grassroots inspection areas still use the manual grid division method to divide the inspection areas. Due to the variety and large number of inspection elements, manual division is time-consuming and inefficient. Summary of the invention
[0004] The present invention provides a patrol grid division method, device, terminal equipment and storage medium to solve the technical problem that different manual divisions of patrol areas are time-consuming and inefficient.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a patrol grid division method, comprising: obtaining patrol area information; wherein the patrol area information includes: patrol area area, a number of road information and a number of patrol element pattern information;
[0006] Generate a first initial dividing line set according to all road information; wherein the first initial dividing line set includes a number of road center lines used for patrol grid division;
[0007] Divide the inspection area according to each of the first initial dividing lines to obtain two grids corresponding to each first initial dividing line; calculate the number difference of other first initial dividing lines in the two grids corresponding to each first initial dividing line; select a number of first candidate dividing lines from the first initial dividing line set according to the number difference of all the first initial dividing lines to generate a first candidate dividing line set;
[0008] For each first candidate dividing line, generating a first grid dividing initial scheme corresponding to each first candidate dividing line;
[0009] For each first grid division initial scheme, judging whether there is a first grid division initial scheme that satisfies the first screening condition according to the relationship between the number of inspection element patches of each grid in the first grid division initial scheme; if there is a first grid division initial scheme that satisfies the first screening condition, screening out several first grid division initial schemes that satisfy the screening condition as first grid division alternative schemes;
[0010] For each first grid division alternative scheme, the inspection fairness of each first grid division alternative scheme is calculated based on the inspection element patch area within each grid in the first grid division alternative scheme, the preset inspection element weights and the path relationship between the inspection element patches, and the final grid division scheme is determined based on the inspection fairness of all first grid division alternative schemes.
[0011] As a preferred solution, the screening condition for the first candidate dividing line is:
[0012]
[0013] ρ r =|c 1r -c 2r |
[0014] In the formula, R n represents the first candidate dividing line set; R represents the first initial dividing line set; r represents a first initial dividing line; c 1r represents the number of other first initial division lines in the first grid obtained by division by r; c 2r represents the number of other first initial division lines in the second grid obtained by division by r; ρ r represents the difference in the number of other first initial division lines in the two grids obtained by division by r; rank(ρ r ) means that r is in all the first dividing lines according to ρ r The sequence number after ascending sorting; n is the first preset value.
[0015] As a preferred solution, the first initial grid division solution corresponding to the first candidate division line is generated in the following manner:
[0016] According to the current first candidate partition line, an iterative partitioning operation is performed until the mesh areas of all meshes formed after the partitioning are smaller than a preset area, thereby generating a first mesh partitioning initial scheme corresponding to the current first candidate partitioning;
[0017] The iterative partitioning operation comprises:
[0018] Obtaining the grids to be divided and the division reference lines corresponding to each grid to be divided; wherein the grids to be divided initially are the inspection areas; and the division reference lines initially are the current first candidate division lines;
[0019] For each grid to be divided, the grid to be divided is divided according to the corresponding division reference line to obtain a newly formed grid; when it is determined that there are grids with an area larger than a preset area in the newly formed grids, the grids with an area larger than the preset area are all used as grids to be divided in the next iterative division operation, and for a grid to be divided in the next iterative division operation, any first candidate division line in the grid is used as the division reference line of the grid.
[0020] As a preferred solution, for each grid to be divided, dividing the grid to be divided according to the corresponding division reference line to obtain a newly formed grid includes:
[0021] For each grid to be divided, the grid to be divided is divided according to the division reference line corresponding to the grid to be divided, to obtain two initial grids;
[0022] Extract the inspection element spots that intersect the straight line where the dividing baseline is located;
[0023] For each inspection element pattern patch that intersects the straight line where the dividing reference line is located, the area of the inspection element pattern patch in the two initial grids is calculated to obtain a first area and a second area respectively;
[0024] Calculating a ratio between the first area and the second area, and when the ratio exceeds a second preset value, dividing all of the inspection element patches into one of the initial grids;
[0025] The two grids obtained after the inspection element map is divided are used as the newly formed grids.
[0026] As a preferred solution, the first screening condition is:
[0027]
[0028]
[0029]
[0030] Where M represents the first grid partitioning alternative solution set; m r Represents the first initial grid partitioning scheme corresponding to the first candidate partitioning line r; Net r represents the grid set obtained by dividing according to the first grid division initial scheme corresponding to the first candidate dividing line r; t r and k r Each represents a grid; Represents the grid t r The number of types of inspection elements within; Represents the grid k r The number of types of inspection elements in the system; σ is the third preset value; n represents the total number of types of inspection elements; W j represents the inspection difficulty weight of the jth inspection element; Represents the grid t r The area of the kth inspection element within; Represents the grid k r The area of the jth inspection element within.
[0031] As a preferred solution, the final grid division scheme is determined according to the inspection fairness of all first grid division alternative schemes, including:
[0032] The first grid division alternative scheme with the highest inspection fairness among all the first grid division alternative schemes is selected as the final grid division scheme;
[0033] The calculation formula for the fairness of the inspection is:
[0034] F=α×F feature +β×F path
[0035]
[0036]
[0037] Where, F represents the inspection fairness value; F feature Indicates the fairness value of the inspection factor; F path Indicates the fairness value of the inspection path; F feature is the weight of the preset fairness value of the inspection factor; F path is the weight of the preset fairness value of the inspection path; Represents the grid t r Internal inspection path cost;
[0038] The patrol path cost of the grid is obtained by converting all patrol element patches in the grid into patrol element points and then connecting them into broken lines to obtain the patrol path, and is calculated using mathematical elevation model data.
[0039] As a preferred solution, the inspection grid division method further includes:
[0040] In the case that there is no first grid division initial scheme that meets the first screening condition, generating a second initial division line set according to the inspection element pattern information; wherein the second initial division line set includes a plurality of inspection element pattern boundaries for inspection grid division;
[0041] Divide the inspection area according to each of the second initial dividing lines to obtain two division grids corresponding to each second initial dividing line; calculate the number difference of other second initial dividing lines in the two division grids; select a number of second candidate dividing lines from the second initial dividing line set according to the number difference of all the second initial dividing lines to generate a second candidate dividing line set;
[0042] For each second candidate dividing line, after dividing the inspection area once according to the second candidate dividing line, the inspection area is further divided according to the inspection area information to obtain a second grid division initial scheme corresponding to each second candidate dividing line;
[0043] For each second grid division initial scheme, judging whether there is a second grid division initial scheme that meets the first screening condition according to the relationship between the number of inspection element patches between each grid in the second grid division initial scheme; if there is a second grid division initial scheme that meets the first screening condition, screening out several second grid division initial schemes that meet the screening condition as second grid division alternative schemes;
[0044] For each second grid division alternative scheme, the inspection fairness of each second grid division alternative scheme is calculated based on the inspection element patch area within each grid in the second grid division alternative scheme, the preset inspection element weights and the path relationship between the inspection element patches, and the final grid division scheme is determined based on the inspection fairness of all second grid division alternative schemes.
[0045] Based on the above embodiment, another embodiment of the present invention provides a patrol grid division device, characterized in that it includes: a data acquisition module, a solution generation module and a solution selection module;
[0046] The data acquisition module is used to acquire patrol area information; wherein the patrol area information includes: patrol area area, a number of road information and a number of patrol element pattern information;
[0047] The scheme generation module is used to generate a first initial dividing line set according to all road information; wherein the first initial dividing line set includes a plurality of road center lines for patrol grid division; the patrol area is divided according to each of the first initial dividing lines to obtain two grids corresponding to each first initial dividing line; the number difference of other first initial dividing lines in the two grids corresponding to each first initial dividing line is calculated; according to the number difference of all first initial dividing lines, a plurality of first candidate dividing lines are selected from the first initial dividing line set to generate a first candidate dividing line set; for each first candidate dividing line, an initial scheme for first grid division corresponding to each first candidate dividing line is generated;
[0048] The scheme selection module is used to determine whether there is a first grid division initial scheme that meets the first screening condition for each first grid division initial scheme based on the relationship between the number of inspection element patches between each grid in the first grid division initial scheme; if there is a first grid division initial scheme that meets the first screening condition, screen out several first grid division initial schemes that meet the screening condition as first grid division alternative schemes; for each first grid division alternative scheme, calculate the inspection fairness of each first grid division alternative scheme based on the inspection element patch area in each grid in the first grid division alternative scheme, the preset inspection element weight and the path relationship between the inspection element patches, and determine the final grid division scheme based on the inspection fairness of all first grid division alternative schemes.
[0049] Based on the above embodiments, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the patrol grid division method described in the above invention embodiment is implemented.
[0050] Based on the above embodiments, another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the patrol grid division method described in the above invention embodiment.
[0051] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0052] The present invention obtains patrol area information; wherein, the patrol area information includes: patrol area area, a number of road information and a number of patrol element pattern information; based on all road information, a first initial dividing line set is generated; wherein, the first initial dividing line set includes a number of road center lines for patrol grid division; the patrol area is divided according to each of the first initial dividing lines to obtain two grids corresponding to each first initial dividing line; the difference in the number of other first initial dividing lines within the two grids corresponding to each first initial dividing line is calculated; according to the difference in the number of all first initial dividing lines, a number of first candidate dividing lines are selected from the first initial dividing line set to generate a first candidate dividing line set; for each first candidate dividing line, an initial plan for first grid division corresponding to each first candidate dividing line is generated ; For each first grid division initial scheme, determine whether there is a first grid division initial scheme that meets the first screening condition according to the relationship between the number of inspection element patches between each grid in the first grid division initial scheme; in the case that there is a first grid division initial scheme that meets the first screening condition, select several first grid division initial schemes that meet the screening condition as first grid division alternative schemes; for each first grid division alternative scheme, calculate the inspection fairness of each first grid division alternative scheme according to the inspection element patch area in each grid in the first grid division alternative scheme, the preset inspection element weight and the path relationship between the inspection element patches, and determine the final grid division scheme according to the inspection fairness of all first grid division alternative schemes. The present invention provides a scheme for machine grid division by selecting roads and inspection elements to automatically generate a division line data set for dividing areas, and uses the division line data set for grid division, thereby solving the technical problem of time-consuming and inefficient manual division. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of a method for dividing patrol grids provided by an embodiment of the present invention;
[0054] Figure 2 It is a structural schematic diagram of a patrol grid division device provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0057] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features.
[0058] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0059] In the description of the embodiments of the present application, the term "several" refers to more than two (including two).
[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] Embodiment 1
[0062] Please refer to Figure 1 , is a flow chart of a patrol grid division method provided by an embodiment of the present invention, comprising:
[0063] S1. Obtain patrol area information; wherein the patrol area information includes: patrol area area, some road information and some patrol element map information.
[0064] In this embodiment, information of the inspection area that needs to be divided into inspection grids is obtained, including the area of the inspection area, information of all roads in the inspection area, and information of all inspection element patches in the inspection area.
[0065] It should be noted that the inspection elements mainly refer to landform elements such as rivers, lakes, forests, and cultivated land. The inspection element patch information includes: inspection element type, inspection element patch boundary information, and inspection element patch area. The road information includes: road centerline information.
[0066] S2. Generate a first initial dividing line set based on all road information; wherein the first initial dividing line set includes a number of road center lines used for patrol grid division.
[0067] In this embodiment, according to the road information acquired in S1, the road center lines of all roads are extracted, and the road center lines of all roads are used as the first initial dividing line set. The dividing lines are used to divide the inspection area.
[0068] S3. Divide the inspection area according to each of the first initial dividing lines to obtain two grids corresponding to each first initial dividing line; calculate the difference in the number of other first initial dividing lines in the two grids corresponding to each first initial dividing line; and select a number of first candidate dividing lines from the first initial dividing line set according to the difference in the number of all first initial dividing lines to generate a first candidate dividing line set.
[0069] In this embodiment, a first initial dividing line is denoted as r, and for each first initial dividing line, that is, First, the inspection area is divided once according to the first initial dividing line. Specifically, the extension line tool is used to extend r to intersect the entire inspection area, and then the entire inspection area is divided into two halves using r; two grids A obtained by dividing the first initial dividing line are obtained. 1r and A 2r , calculate A 1r The number of initial dividing lines other than the current first initial dividing line c 1r and A 2r The number of initial dividing lines other than the current first initial dividing line c 2r The difference in number ρ r According to ρ r Select several candidate partition lines from R to generate the first candidate partition line set R n .
[0070] The purpose of step S3 is to optimize the division lines before division and eliminate some unsuitable initial division lines, which helps to improve the efficiency of grid division in the inspection area and also helps to improve the quality of the final grid division solution.
[0071] In a preferred embodiment, the screening condition of the first candidate dividing line is:
[0072]
[0073] ρ r =|c 1r -c 2r |
[0074] In the formula, R n represents the first candidate dividing line set; R represents the first initial dividing line set; r represents a first initial dividing line; c 1r represents the number of other first initial division lines in the first grid obtained by division by r; c 2r represents the number of other first initial division lines in the second grid obtained by division by r; ρ r represents the difference in the number of other first initial division lines in the two grids obtained by division by r; rank(ρ r ) means r in all first dividing lines according to ρ r The sequence number after ascending sorting; n is the first preset value.
[0075] In this embodiment, the calculated ρ r Sort in ascending order to get each ρ r The serial number; according to ρ r , select n first initial dividing lines whose numbers are less than or equal to the first preset value n from R as first candidate dividing lines, and generate a first candidate dividing line set R n
[0076] S4. For each first candidate dividing line, generate a first grid dividing initial solution corresponding to each first candidate dividing line.
[0077] In this embodiment, for each first candidate partitioning line, a corresponding first network partitioning initial solution is generated.
[0078] In a preferred embodiment, the first initial grid division scheme corresponding to the first candidate division line is generated in the following manner:
[0079] According to the current first candidate partition line, an iterative partitioning operation is performed until the mesh areas of all meshes formed after the partitioning are smaller than a preset area, thereby generating a first mesh partitioning initial scheme corresponding to the current first candidate partitioning;
[0080] The iterative partitioning operation comprises:
[0081] Obtaining the grids to be divided and the division reference lines corresponding to each grid to be divided; wherein the grids to be divided initially are the inspection areas; and the division reference lines initially are the current first candidate division lines;
[0082] For each grid to be divided, the grid to be divided is divided according to the corresponding division reference line to obtain a newly formed grid; when it is determined that there are grids with an area larger than a preset area in the newly formed grids, the grids with an area larger than the preset area are all used as grids to be divided in the next iterative division operation, and for a grid to be divided in the next iterative division operation, any first candidate division line in the grid is used as the division reference line of the grid.
[0083] In this embodiment, an iterative partitioning operation is performed for each first candidate partitioning line; one iterative partitioning operation can generate a first mesh partitioning initial solution;
[0084] In each iterative operation, firstly, a number of current networks to be divided and a number of current division baselines are obtained, and each grid to be divided corresponds to a division baseline; then, the corresponding grid to be divided is divided according to each of the division baselines, until all the division baselines complete the division of the corresponding grid to be divided, and all newly formed grids after the division are obtained; the grids with an area larger than the preset area in all the newly formed grids are used as the grids to be divided in the next iterative division operation, and any first candidate division line in each grid to be divided is used as the division baseline of the grid to be divided; if there is no grid with an area larger than the preset area in all the newly formed networks, then the iterative division operation is terminated, and the first grid division initial plan corresponding to the current first candidate division is generated.
[0085] It should be noted that before dividing the patrol grid, the grid division scale of the patrol area, that is, the preset area, needs to be set according to the objective conditions of the patrol area, such as the total area, topography, ratio of grassroots personnel and economic conditions.
[0086] In a preferred embodiment, for each grid to be divided, dividing the grid to be divided according to the corresponding division reference line to obtain a newly formed grid includes:
[0087] For each grid to be divided, the grid to be divided is divided according to the division reference line corresponding to the grid to be divided, to obtain two initial grids;
[0088] Extract the inspection element spots that intersect the straight line where the dividing baseline is located;
[0089] For each inspection element pattern patch that intersects the straight line where the dividing reference line is located, the area of the inspection element pattern patch in the two initial grids is calculated to obtain a first area and a second area respectively;
[0090] Calculating a ratio between the first area and the second area, and when the ratio exceeds a second preset value, dividing all of the inspection element patches into one of the initial grids;
[0091] The two grids obtained after the inspection element map is divided are used as the newly formed grids.
[0092] In this embodiment, it is assumed that for a certain grid Z to be divided, according to the division baseline corresponding to Z, Z is grid-divided to obtain two initial networks Z1 and Z2; a number of inspection element spots intersecting with the straight line carried by the division baseline are screened out to obtain a set of inspection element spots T; for a certain inspection element spot intersecting with the straight line where the division baseline is located, the inspection element spot is recorded as t, The two parts of t divided by the straight line where the dividing baseline is located are t1 and t2, where t1 is in the initial grid Z1 and t2 is in the initial grid Z2; calculate the area of t1 and get the first area Calculate the area of t2 and get the second area Calculate S t1 and S t1 ratio a; when a exceeds a second preset value τ (τ>1), all the inspection element spots t are divided into the initial network Z1; the two grids Z1' and Z2' obtained after the inspection element spots are divided are used as the newly formed grids.
[0093] It should be noted that the purpose of this embodiment is to avoid segmenting the inspection element spots on the straight line where the division baseline is located when the division baseline is used to divide the grid to be divided. By dividing the segmented inspection element spots into one grid as a whole according to the above rules, the integrity of the inspection element spots is ensured.
[0094] S5. For each first grid division initial plan, determine whether there is a first grid division initial plan that meets the first screening condition based on the relationship between the number of inspection element patches between each grid in the first grid division initial plan; if there is a first grid division initial plan that meets the first screening condition, select several first grid division initial plans that meet the screening condition as first grid division alternative plans.
[0095] It should be noted that the purpose of step S5 is to ensure that the distribution quantity relationship of the inspection element spots between the divided grids should meet certain conditions. Commonly, for the fairness of the inspectors of different grids, the difficulty of each grid in the actual inspection process is counted, and the difficulty relationship between different grids is limited to ensure the quality of the inspection grid division results.
[0096] In a preferred embodiment, the first screening condition is:
[0097]
[0098]
[0099]
[0100] Where M represents the first grid partitioning alternative solution set; m r Represents the first initial grid partitioning scheme corresponding to the first candidate partitioning line r; Net r represents the grid set obtained by dividing according to the first grid division initial scheme corresponding to the first candidate dividing line r; t r and k r Each represents a grid; Represents the grid t r The number of types of inspection elements within; Represents the grid k r The number of types of inspection elements in the system; σ is the third preset value; n represents the total number of types of inspection elements; W j represents the inspection difficulty weight of the jth inspection element; Represents the grid t r The area of the jth inspection element within; Represents the grid k r The area of the jth inspection element within.
[0101] S6. For each first grid division alternative scheme, calculate the inspection fairness of each first grid division alternative scheme based on the inspection element patch area in each grid in the first grid division alternative scheme, the preset inspection element weight and the path relationship between the inspection element patches, and determine the final grid division scheme based on the inspection fairness of all first grid division alternative schemes.
[0102] It should be noted that the purpose of step S6 is to comprehensively compare all the alternative mesh division schemes and select the best scheme as the final mesh division scheme according to certain conditions.
[0103] In a preferred embodiment, determining the final grid division scheme according to the inspection fairness of all first grid division alternative schemes includes:
[0104] The first grid division alternative scheme with the highest inspection fairness among all the first grid division alternative schemes is selected as the final grid division scheme;
[0105] The calculation formula for the fairness of the inspection is:
[0106] F=α×F feature+β×F path
[0107]
[0108]
[0109] Where, F represents the inspection fairness value; F feature Indicates the fairness value of the inspection factor; F path Indicates the fairness value of the inspection path; F feature is the weight of the preset fairness value of the inspection factor; F path is the weight of the preset fairness value of the inspection path; Represents the grid t r Internal inspection path cost;
[0110] The patrol path cost of the grid is obtained by converting all patrol element patches in the grid into patrol element points and then connecting them into broken lines to obtain the patrol path, and is calculated using mathematical elevation model data.
[0111] Embodiment 2
[0112] Please refer to Figure 2 , is a schematic diagram of the structure of a patrol grid division device provided by an embodiment of the present invention, the device comprising: a data acquisition module, a scheme generation module and a scheme selection module;
[0113] The data acquisition module is used to acquire patrol area information; wherein the patrol area information includes: patrol area area, a number of road information and a number of patrol element pattern information;
[0114] The scheme generation module is used to generate a first initial dividing line set according to all road information; wherein the first initial dividing line set includes a plurality of road center lines for patrol grid division; the patrol area is divided according to each of the first initial dividing lines to obtain two grids corresponding to each first initial dividing line; the number difference of other first initial dividing lines in the two grids corresponding to each first initial dividing line is calculated; according to the number difference of all first initial dividing lines, a plurality of first candidate dividing lines are selected from the first initial dividing line set to generate a first candidate dividing line set; for each first candidate dividing line, an initial scheme for first grid division corresponding to each first candidate dividing line is generated;
[0115] The scheme selection module is used to determine whether there is a first grid division initial scheme that meets the first screening condition for each first grid division initial scheme based on the relationship between the number of inspection element patches between each grid in the first grid division initial scheme; if there is a first grid division initial scheme that meets the first screening condition, screen out several first grid division initial schemes that meet the screening condition as first grid division alternative schemes; for each first grid division alternative scheme, calculate the inspection fairness of each first grid division alternative scheme based on the inspection element patch area in each grid in the first grid division alternative scheme, the preset inspection element weight and the path relationship between the inspection element patches, and determine the final grid division scheme based on the inspection fairness of all first grid division alternative schemes.
[0116] Embodiment 3
[0117] Accordingly, an embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the patrol grid division method described in the above-mentioned embodiment of the invention is implemented.
[0118] Embodiment 4
[0119] Accordingly, an embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the patrol grid division method described in the above-mentioned embodiment of the invention.
[0120] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A patrol grid division method, characterized in that: include: Obtaining patrol area information; wherein the patrol area information includes: patrol area area, a number of road information and a number of patrol element spot information; Generate a first initial dividing line set according to all road information; wherein the first initial dividing line set includes a number of road center lines used for patrol grid division; Divide the inspection area according to each of the first initial dividing lines to obtain two grids corresponding to each first initial dividing line; calculate the number difference of other first initial dividing lines in the two grids corresponding to each first initial dividing line; select a number of first candidate dividing lines from the first initial dividing line set according to the number difference of all the first initial dividing lines to generate a first candidate dividing line set; For each first candidate dividing line, generating a first grid dividing initial scheme corresponding to each first candidate dividing line; For each first grid division initial scheme, judging whether there is a first grid division initial scheme that satisfies the first screening condition according to the relationship between the number of inspection element patches of each grid in the first grid division initial scheme; if there is a first grid division initial scheme that satisfies the first screening condition, screening out several first grid division initial schemes that satisfy the screening condition as first grid division alternative schemes; For each first grid division alternative scheme, the inspection fairness of each first grid division alternative scheme is calculated according to the inspection element patch area in each grid in the first grid division alternative scheme, the preset inspection element weight and the path relationship between the inspection element patches, and the final grid division scheme is determined according to the inspection fairness of all the first grid division alternative schemes; The screening condition for the first candidate dividing line is: r r =|c 1r -c 2r | In the formula, R n represents the first candidate dividing line set; R represents the first initial dividing line set; r represents a first initial dividing line; c 1r represents the number of other first initial division lines in the first grid obtained by division by r; c 2r represents the number of other first initial division lines in the second grid obtained by division by r; ρ r represents the difference in the number of other first initial division lines in the two grids obtained by division by r; rank(ρ r ) means that r is in all the first dividing lines according to ρ r The serial number after ascending sorting; n is the first preset value; The first initial grid partitioning scheme corresponding to the first candidate partitioning line is generated in the following manner: According to the current first candidate partition line, an iterative partitioning operation is performed until the mesh areas of all meshes formed after the partitioning are smaller than a preset area, thereby generating a first mesh partitioning initial scheme corresponding to the current first candidate partitioning; The iterative partitioning operation comprises: Obtaining the grids to be divided and the division reference lines corresponding to each grid to be divided; wherein the grids to be divided initially are the inspection areas; and the division reference lines initially are the current first candidate division lines; For each grid to be divided, the grid to be divided is divided according to the corresponding division reference line to obtain a newly formed grid; when it is determined that there is a grid with an area larger than a preset area in the newly formed grid, the grids with an area larger than the preset area are all used as grids to be divided in the next iterative division operation, and for a grid to be divided in the next iterative division operation, any first candidate division line in the grid is used as the division reference line of the grid; The first screening condition is: Where M represents the first grid partitioning alternative solution set; m r Represents the first initial grid partitioning scheme corresponding to the first candidate partitioning line r; Net r represents the grid set obtained by dividing according to the first grid division initial scheme corresponding to the first candidate dividing line r; t r and k r Each represents a grid; C tr Represents the grid t r The number of types of inspection elements within; Represents the grid k r The number of types of inspection elements in the system; σ is the third preset value; n represents the total number of types of inspection elements; W j represents the inspection difficulty weight of the jth inspection element; Represents the grid t r The area of the jth inspection element within; Represents the grid k r The area of the jth inspection element within; The final grid division scheme is determined according to the inspection fairness of all first grid division alternative schemes, including: The first grid division alternative scheme with the highest inspection fairness among all the first grid division alternative schemes is selected as the final grid division scheme; The calculation formula for the fairness of the inspection is: F=α×F feature +β×F path Where, F represents the inspection fairness value; F feature Indicates the fairness value of the inspection factor; F path represents the fairness value of the inspection path; α is the weight of the preset fairness value of the inspection element; β is the weight of the preset fairness value of the inspection path; Represents the grid t r Internal inspection path cost.
2. The inspection grid division method according to claim 1, characterized in that: For each grid to be divided, dividing the grid to be divided according to the corresponding division reference line to obtain a newly formed grid includes: For each grid to be divided, the grid to be divided is divided according to the division reference line corresponding to the grid to be divided, to obtain two initial grids; Extract the inspection element spots that intersect the straight line where the dividing baseline is located; For each inspection element pattern patch that intersects the straight line where the dividing reference line is located, the area of the inspection element pattern patch in the two initial grids is calculated to obtain a first area and a second area respectively; Calculating a ratio between the first area and the second area, and when the ratio exceeds a second preset value, dividing all of the inspection element patches into one of the initial grids; The two grids obtained after the inspection element map is divided are used as the newly formed grids.
3. The inspection grid division method according to claim 1, characterized in that: The patrol path cost of the grid is obtained by converting all patrol element spots in the grid into patrol element points and then connecting them into broken lines to obtain the patrol path, and is calculated using mathematical elevation model data.
4. The inspection grid division method according to claim 1, characterized in that: Also includes: In the case that there is no first grid division initial scheme that meets the first screening condition, generating a second initial division line set according to the inspection element pattern information; wherein the second initial division line set includes a plurality of inspection element pattern boundaries for inspection grid division; Divide the inspection area according to each of the second initial dividing lines to obtain two division grids corresponding to each second initial dividing line; calculate the number difference of other second initial dividing lines in the two division grids; select a number of second candidate dividing lines from the second initial dividing line set according to the number difference of all the second initial dividing lines to generate a second candidate dividing line set; For each second candidate dividing line, after dividing the inspection area once according to the second candidate dividing line, the inspection area is further divided according to the inspection area information to obtain a second grid division initial scheme corresponding to each second candidate dividing line; For each second grid division initial scheme, judging whether there is a second grid division initial scheme that meets the first screening condition according to the relationship between the number of inspection element patches between each grid in the second grid division initial scheme; if there is a second grid division initial scheme that meets the first screening condition, screening out several second grid division initial schemes that meet the screening condition as second grid division alternative schemes; For each second grid division alternative scheme, the inspection fairness of each second grid division alternative scheme is calculated based on the inspection element patch area within each grid in the second grid division alternative scheme, the preset inspection element weights and the path relationship between the inspection element patches, and the final grid division scheme is determined based on the inspection fairness of all second grid division alternative schemes.
5. A patrol grid division device, characterized in that: include: Data acquisition module, solution generation module and solution selection module; The data acquisition module is used to acquire patrol area information; wherein the patrol area information includes: patrol area area, a number of road information and a number of patrol element pattern information; The scheme generation module is used to generate a first initial dividing line set according to all road information; wherein the first initial dividing line set includes a plurality of road center lines for patrol grid division; the patrol area is divided according to each of the first initial dividing lines to obtain two grids corresponding to each first initial dividing line; the number difference of other first initial dividing lines in the two grids corresponding to each first initial dividing line is calculated; according to the number difference of all first initial dividing lines, a plurality of first candidate dividing lines are selected from the first initial dividing line set to generate a first candidate dividing line set; for each first candidate dividing line, an initial scheme for first grid division corresponding to each first candidate dividing line is generated; The scheme selection module is used to determine whether there is a first grid division initial scheme that meets the first screening condition for each first grid division initial scheme according to the relationship between the number of inspection element patches between each grid in the first grid division initial scheme; if there is a first grid division initial scheme that meets the first screening condition, screen out several first grid division initial schemes that meet the screening condition as first grid division alternative schemes; for each first grid division alternative scheme, calculate the inspection fairness of each first grid division alternative scheme according to the inspection element patch area in each grid in the first grid division alternative scheme, the preset inspection element weight and the path relationship between the inspection element patches, and determine the final grid division scheme according to the inspection fairness of all first grid division alternative schemes; The screening condition for the first candidate dividing line is: r r =|c 1r -c 2r | In the formula, R n represents the first candidate dividing line set; R represents the first initial dividing line set; r represents a first initial dividing line; c 1r represents the number of other first initial division lines in the first grid obtained by division by r; c 2r represents the number of other first initial division lines in the second grid obtained by division by r; ρ r represents the difference in the number of other first initial division lines in the two grids obtained by division by r; rank(ρ r ) means that r is in all the first dividing lines according to ρ r The serial number after ascending sorting; n1 is the first preset value; The first initial grid partitioning scheme corresponding to the first candidate partitioning line is generated in the following manner: According to the current first candidate partition line, an iterative partitioning operation is performed until the mesh areas of all meshes formed after the partitioning are smaller than a preset area, thereby generating a first mesh partitioning initial scheme corresponding to the current first candidate partitioning; The iterative partitioning operation comprises: Obtaining the grids to be divided and the division reference lines corresponding to each grid to be divided; wherein the grids to be divided initially are the inspection areas; and the division reference lines initially are the current first candidate division lines; For each grid to be divided, the grid to be divided is divided according to the corresponding division reference line to obtain a newly formed grid; when it is determined that there is a grid with an area larger than a preset area in the newly formed grid, the grids with an area larger than the preset area are all used as grids to be divided in the next iterative division operation, and for a grid to be divided in the next iterative division operation, any first candidate division line in the grid is used as the division reference line of the grid; The first screening condition is: Where M represents the first grid partitioning alternative solution set; m r Represents the first initial grid partitioning scheme corresponding to the first candidate partitioning line r; Net r represents the grid set obtained by dividing according to the first grid division initial scheme corresponding to the first candidate dividing line r; t r and k r Each represents a grid; Represents the grid t r The number of types of inspection elements within; Represents the grid k r The number of types of inspection elements in the system; σ is the third preset value; n represents the total number of types of inspection elements; W j represents the inspection difficulty weight of the jth inspection element; Represents the grid t r The area of the jth inspection element within; Represents the grid k r The area of the jth inspection element within; The final grid division scheme is determined according to the inspection fairness of all first grid division alternative schemes, including: The first grid division alternative scheme with the highest inspection fairness among all the first grid division alternative schemes is selected as the final grid division scheme; The calculation formula for the fairness of the inspection is: F=α×F feature +β×F path Where, F represents the inspection fairness value; F feature Indicates the fairness value of the inspection factor; F path Indicates the fairness value of the inspection path; F feature is the weight of the preset fairness value of the inspection factor; F path is the weight of the preset fairness value of the inspection path; Represents the grid t r Internal inspection path cost.
6. A terminal device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the patrol grid division method according to any one of claims 1 to 4 when executing the computer program.
7. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the patrol grid division method according to any one of claims 1 to 4.
