Method, device, electronic device and storage medium for confirming associated grid set
Through the circular screening method, the calculation complexity and accuracy of grid set relationship screening in the existing technology is solved, and fast and accurate grid relationship screening is realized, which is suitable for intelligent management of scenarios such as the Internet of Vehicles.
Patent Information
- Application Number
- CN202210238461.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-03-11
AI Technical Summary
The prior art is difficult to quickly and accurately extract grid sets with geographical correlations from a large number of grids. Exhaust algorithms are complex and time-consuming to calculate, while clustering algorithms have defects in accuracy and computing power consumption.
Through circular filtering, the starting grid is selected and the alternative grid set is filtered based on it until the associated grid set meets the preset conditions is obtained, and the grid set with geographic association is merged.
It realizes the rapid and accurate screening of grid sets with geographical correlations, reduces the computational complexity and computing power consumption, and is suitable for intelligent management in scenarios such as the Internet of Vehicles.
Smart Images

Figure CN114610825B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to the fields of the Internet of Things, the Internet of Vehicles, and big data, and more particularly to a method, device, electronic device, and storage medium for confirming an associated grid set. Background Art
[0002] The concept of grid is widely used in various fields. A grid set is a collection of grids with certain common characteristics. Grid sets can be used to count grids of a certain type, which is convenient for subsequent batch operations, such as feature definition, operation application, and result display. Therefore, it is widely used. How to automatically and quickly extract grids with geographical correlation from a large number of grids to form a grid set is an urgent problem to be solved in this field. Summary of the invention
[0003] The present disclosure provides a method, device, electronic device and storage medium for confirming an associated grid set.
[0004] According to one aspect of the present disclosure, a method for confirming an associated grid set is provided, comprising:
[0005] Gridding the map to obtain a candidate grid set;
[0006] Selecting a starting grid from the candidate grid set;
[0007] Based on the starting grid, a screening operation is performed on the candidate grid set to determine whether there is a geographical association relationship to obtain an associated grid;
[0008] When the associated grid does not meet the preset condition, the associated grid is used as the current grid, and the screening operation of whether there is a geographical association relationship is repeated until the associated grid obtained meets the preset condition;
[0009] The associated grids obtained from each screening operation are merged with the starting grid to obtain an associated grid set of the candidate grid set.
[0010] According to another aspect of the present disclosure, there is provided a confirmation device for an associated grid set, comprising:
[0011] A partitioning module is used to grid the map to obtain a candidate grid set;
[0012] A selection module is used to select a starting grid from the candidate grid set;
[0013] A first screening module is used to screen the candidate grid set based on the starting grid to see if there is a geographical association relationship to obtain an associated grid;
[0014] The second screening module is used to use the associated grid as the current grid and repeatedly perform a screening operation on whether there is a geographical association relationship when the associated grid does not meet the preset condition, until the associated grid obtained meets the preset condition;
[0015] The first obtaining module is used to merge the associated grids obtained from each screening operation with the starting grid to obtain an associated grid set of the candidate grid set.
[0016] According to another aspect of the present disclosure, a method for determining a target area based on an associated grid set is provided, comprising:
[0017] Obtain the associated grid set according to any of the above methods;
[0018] The associated grid set is determined as a target area in the map to identify that the grids in the target area have a geographical association relationship.
[0019] According to another aspect of the present disclosure, there is provided a device for determining a target area based on an associated grid set, comprising:
[0020] A third obtaining module, configured to obtain the associated grid set according to any one of the above devices;
[0021] The determination module is used to determine the associated grid set as a target area in the map to identify that the grids in the target area have a geographical association relationship.
[0022] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0023] at least one processor; and
[0024] a memory communicatively connected to the at least one processor; wherein,
[0025] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method in any embodiment of the present disclosure.
[0026] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to enable a computer to execute the method in any embodiment of the present disclosure.
[0027] According to another aspect of the present disclosure, a computer program product is provided, including a computer program / instruction, wherein the computer program / instruction implements the method in any embodiment of the present disclosure when executed by a processor.
[0028] The technology disclosed in the present invention obtains grids that are directly or indirectly adjacent to the starting grid through a cyclic screening method, and generates a set of associated grids. In this way, geographically associated grids can be quickly and accurately determined from a large number of candidate grids, thereby obtaining associated areas with common attributes. The screening speed is fast, the accuracy is high, and the process is not complicated and does not take up too much computing power.
[0029] The technology disclosed in the present invention obtains the target area of the map through a confirmation method of an associated grid set. The target area is a collection of grids that have common characteristics and are physically associated. After obtaining the target area, traffic guidance or management can be carried out according to the grid characteristics, which facilitates the subsequent intelligent management of pedestrians or vehicles involved in the target area.
[0030] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0032] Figure 1 is a flow chart of a method for confirming an associated grid set according to an embodiment of the present disclosure;
[0033] Figure 2 is a flow chart of a method for confirming an associated grid set according to another embodiment of the present disclosure;
[0034] Figure 3 is a flowchart of a confirmation process of an associated grid set according to an embodiment of the present disclosure;
[0035] Figure 4 is a flowchart of a confirmation process of an associated grid set according to another embodiment of the present disclosure;
[0036] Figure 5 is a flow chart of a method for determining a target area based on an associated grid set according to an embodiment of the present disclosure;
[0037] Figure 6 is a schematic diagram of a confirmation device for an associated grid set according to an embodiment of the present disclosure;
[0038] Figure 7 is a schematic diagram of a device for determining a target area based on an associated grid set according to an embodiment of the present disclosure;
[0039] Figure 8 The present invention is a block diagram of an electronic device for implementing the method for confirming an associated grid set according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0040] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0041] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The term "at least one" in this article means any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. The terms "first" and "second" in this article refer to multiple similar technical terms and distinguish them. They do not mean to limit the order or to limit them to only two. For example, the first feature and the second feature refer to two types / two features. The first feature can be one or more, and the second feature can also be one or more.
[0042] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0043] In real-world scenarios, maps are usually divided into multiple grids. After the map is divided into multiple grids, the grids can be classified according to the relevant information or attribute information of the grids to obtain some grids belonging to the same category. After classification, it is often necessary to determine whether the grids of the same category are directly connected, or whether the grids of the same category can be merged into an area. That is, after obtaining some of the grids (also called valid grids), how to determine whether these grids have a geographical association relationship, the commonly used methods are exhaustive algorithms (enumeration methods) and clustering algorithms (K-means). It should be supplemented that in the present disclosure, two grids are directly adjacent (or called adjacent), which means that the two grids have common points. The geographical association of multiple grids refers to the existence of common points between two grids in multiple grids, which means that the map grids are geographically connected on the map. The so-called associated grid set means that the grids in the grid set have a direct or indirect connection relationship.
[0044] The basic idea of the exhaustive method is to list all possible situations and determine which ones meet the requirements of the problem one by one, so as to obtain all the answers to the problem. It uses the characteristics of fast computing speed and high precision of computers to check all possible situations to solve the problem without missing any, and find the answer that meets the requirements.
[0045] Solving problems using exhaustive algorithms can usually be analyzed from two aspects.
[0046] (1) Situations involved in the problem: What situations are involved in the problem? Can the number of situations be determined? Describe them. When using exhaustive enumeration, the finite number of situations involved in the problem must be listed one by one, without repetition or omission. Repeated enumeration directly leads to additional solutions, affecting the accuracy of the solution; while omissions in the enumeration may lead to omissions in the solution to the problem.
[0047] (2) Conditions that the answer needs to meet: What conditions must the analyzed situations meet to become the answer to the question?
[0048] For the specific problem of "how to determine whether valid grids are associated", the exhaustive algorithm needs to find out the directly adjacent grids, and then determine whether the grids meet the conditions (that is, whether they are valid) in turn. If they do, then check whether the directly adjacent grids of the directly adjacent grids meet the conditions, and repeat the cycle until there are no valid adjacent grids.
[0049] In an example, assuming that grid 2 is used as the starting grid, its associated valid grids are searched, and all associated valid grids are grouped into grid groups. This is usually performed in the following steps:
[0050] Step 1: Get the directly adjacent grid of 2 and generate the directly adjacent grid matrix of 2:
[0051]
[0052] Step 2: Starting from grid 8, generate the matrix of directly adjacent grids of grid 8:
[0053]
[0054] Step 3: Determine whether there is a valid directly adjacent grid to grid No. 8. If so, continue to generate it; if not, stop generating grids and stop searching.
[0055] Step 4: Go back to step 1 and move to grid No. 9 in turn, and repeat the cycle.
[0056] Step 5: Until no new valid adjacent grids are generated, all directly adjacent grids are aggregated to obtain the final set of grids with geographical association.
[0057] The biggest disadvantage of using the exhaustive search method is that the amount of calculation is relatively large and the search efficiency is not high. If the exhaustive search range is too large, it will take a lot of time, that is, the time cost is unbearable.
[0058] If a clustering algorithm is used, the K-means algorithm is generally used. The idea of the K-means algorithm is usually: the input is a sample set (or point set), and the samples are clustered through the algorithm, and samples with similar characteristics are clustered into one category. During the clustering process, the center point closest to all center points will be calculated for each point, and then the point will be classified into the cluster represented by the center point. After one iteration, the center point is recalculated for each cluster, and then the center point closest to itself is re-searched for each point. This cycle is repeated until the clusters between the previous and next iterations do not change.
[0059] The basic steps of the K-means algorithm are as follows:
[0060] Step 1: Select the number of categories k to be clustered (such as k = 3 categories in the above example) and select k center points.
[0061] Step 2: For each sample point, find the center point closest to it (find the organization). The points closest to the same center point are a class, thus completing a clustering.
[0062] Step 3: Determine whether the categories of the sample points before and after clustering are the same. If they are the same, the algorithm terminates, otherwise proceed to step 4.
[0063] Step 4: For each sample point in each category, calculate the center point of these sample points, treat them as the new center point of the category, and continue with step 2.
[0064] Based on the above introduction, we can know that an important assumption of K-Means is that the similarity between data can be measured using Euclidean distance. If Euclidean distance cannot be used, the data must be converted to a method that can be measured using Euclidean distance. Therefore, constructing this scenario for grid groups can actually be understood as forming a cluster of relatively close grid groups.
[0065] In an example, the specific process of the K-Means algorithm is as follows:
[0066] Step 1: Randomly select k samples from the data set D as the initial k centroid vectors: {μ 1 ,μ 2 ,...,μ k}
[0067] Step 2: For n = 1, 2, ..., N
[0068] A) Initialize the cluster partition C as
[0069] B) For i=1,2...m, calculate the sample x i and each centroid vector μ j(j=1,2,...k) Distance: d ij =||x i -μ j ||22, change x i The smallest one is marked as d ij The corresponding category λ i At this time, update Cλ i =Cλ i ∪{x i}
[0070] C) For j = 1, 2, ..., k, for C j Recalculate the new centroid μ for all sample points in j =1|C j |∑x∈Cj x
[0071] D) If all k centroid vectors have not changed, go to step 3.
[0072] Step 3: Output cluster partition C = {C 1 ,C 2 ,...C k}
[0073] The input of K-Means is the sample set D = {x 1 ,x 2 ,...x m}, cluster tree k of clustering, maximum number of iterations N.
[0074] The K-Means output is the cluster partition C = {C 1 ,C 2 ,...C k}.
[0075] For the business scenario of confirming the associated grid set, there are two obvious defects in the K-Means algorithm flow:
[0076] First, in step B), the distance between the calculated sample and each centroid vector is generated. If all the k centroid vectors do not change, a cluster is generated. However, the distance here is an average value. In layman's terms, points that are close to the centroid are gathered together as much as possible to form a grid group. In fact, this can only make the effective grids in the grid group as close as possible, but it cannot fully guarantee the strictness of the requirement that "effective grids are associated".
[0077] Secondly, in step A), the number of cluster divisions depends on the manually input k value, so the grid groups calculated in this way are not necessarily consistent with the number of objectively existing grid groups.
[0078] In addition, the K-Means algorithm consumes relatively more CPU resources and requires relatively more computing power.
[0079] In summary, although the exhaustive algorithm is readable and easy to understand, its computational complexity is relatively high and it is very time-consuming; the K-Means clustering algorithm will have the problem of "inaccuracy" and requires high computing power.
[0080] Based on the prior art, the present invention provides a new method for confirming an associated grid set. Figure 1 FIG. 1 is a flow chart of a method for confirming an associated grid set according to an embodiment of the present disclosure, which specifically includes:
[0081] S101: gridding the map to obtain a candidate grid set;
[0082] In one example, the gridding method can divide the map into grids of equal size according to longitude and latitude, or into grids of unequal size according to map parameters; the shape of the grid is not specifically limited. After gridding, candidate grids to be determined for geographic relevance are screened to form a candidate grid set. The screening method is not specifically limited, and can be to screen out grids with common attributes to form a candidate grid set, or to screen out grids that have reported preset events to form a candidate grid set.
[0083] S102: Selecting a starting grid from the candidate grid set;
[0084] In one example, the candidate grid set is a valid grid set that has been preliminarily screened, and any grid whose geographical association is to be confirmed is selected from the valid grid set as the starting grid.
[0085] In one example, the grid mainly refers to the map grid, and the candidate grid set includes the grids that have reported preset events. Specifically, the preset events can be flexibly defined according to the actual situation. For example, when counting which areas are high-incidence areas, the preset event can be defined as "at least one traffic accident has been reported within 24 hours", and the map grids that meet the preset event are collected to form a candidate grid set; or, when counting which areas have bad road conditions, the preset event can also be defined as "at least ten road bumps have been reported within a week", and the map grids that meet the preset event are collected to form a candidate grid set. In short, the preset event can be some event that meets the preset reporting frequency, preset reporting time or preset event type. The grid set that has reported the preset event can better grasp its inherent characteristics after screening and processing, which is particularly suitable for implicit information mining of traffic big data.
[0086] S103: Based on the starting grid, a screening operation is performed on the candidate grid set to determine whether there is a geographical association relationship, so as to obtain an associated grid;
[0087] In one example, after obtaining the starting grid, a grid set directly adjacent to the starting grid is obtained by table lookup or other methods, and then it is determined whether the directly adjacent grid set has an intersection with the candidate grid set. If so, the intersection grid is extracted as the associated grid for this screening operation.
[0088] S104: If the associated grid does not meet the preset condition, use the associated grid as the current grid and repeat the screening operation of whether there is a geographical association relationship until the associated grid obtained meets the preset condition;
[0089] In one example, it is determined whether the associated grid meets the preset conditions. If not, the associated grid obtained in the previous screening operation is used as the current grid, and the screening operation is repeated based on the current grid. Specifically, assuming that the associated grid obtained last time is No. 2, it is first determined whether the associated grid meets the preset conditions. If not, all directly adjacent grid sets of No. 2 grid are found, and then it is determined whether the directly adjacent grid set and the alternative grid set have an intersection. The intersection is used as a new associated grid, and then it is determined whether the new associated grid meets the preset conditions. If not, the next round of geographical association relationship screening operation is performed until the latest associated grid set obtained meets the preset conditions.
[0090] In one example, the preset condition is that there are no grids with geographical associations. In other words, if the associated grid set obtained after the geographical association screening operation is an empty set, it meets the preset condition. At this time, the loop is exited. Setting the preset condition to "there are no grids with geographical associations" means that in the process of constantly repeating the "screening operation of whether there is a geographical association", if there is no intersection between the directly adjacent grids of the current grid and the grids whose geographical associations are to be confirmed in the alternative grids, or the intersection is an empty set, it is considered that the associated grids have been confirmed and the loop is exited. Through the above operations, a round of associated grid screening can be completed quickly and accurately to ensure that the screening process will not be repeated.
[0091] In one example, the associated grid is used as the current grid, and the screening operation of whether there is a geographical association relationship is repeatedly performed until the associated grid obtained meets the preset condition. Specifically, the step may include: using the associated grid obtained last time as the current grid, obtaining adjacent grids of the current grid, obtaining grids in the candidate grid set except the starting grid and the associated grids obtained each time as unconfirmed grids, obtaining the intersection of the unconfirmed grid and the adjacent grid, and using the intersection as the associated grid obtained by the current screening operation until the associated grid obtained by the current screening operation meets the preset condition. Combined with the actual case, assume that the associated grid obtained in the previous step is the grid with sequence number 2, find the direct adjacent grids of grid 2, and assume that the direct adjacent grids include [8,9,10,1,2,3,-6,-5,-4]; then, select the grids other than the starting grid and the associated grids obtained each time from the candidate grids as unconfirmed grids. Assume that the initial candidate grids are [1,2,3,5,8,10], the starting grid is
[10] , and only one screening has been performed before this time. The grids that have been confirmed to be associated with
[10] include [2,3], then the unconfirmed grid is [1,5,8]. Take the intersection of the unconfirmed grid and the current adjacent grid, that is, take the intersection of the current adjacent grid [8,9,10,1,2,3,-6,-5,-4] and the unconfirmed grid [1,5,8], and get the associated network [8]. The associated network is not an empty set, so we need to find the direct adjacent network of [8] and perform the next screening operation until the associated grid is an empty set. Using the above scheme, we can quickly and comprehensively screen the geographical association relationship of the unit grids and obtain the target associated grid group.
[0092] S105: merging the associated grids obtained from each screening operation with the starting grid to obtain an associated grid set of the candidate grid set.
[0093] In one example, the starting grid and the associated grids obtained each time are merged to obtain a set of all grids having a geographical association relationship.
[0094] By adopting the above scheme, grids with direct or indirect adjacent relationships can be quickly obtained through cyclic screening to generate associated grid groups. Compared with the exhaustive algorithm and clustering algorithm commonly used in the prior art, this scheme is fast and highly accurate. Applying this scheme in actual scenarios can quickly extract grids with geographical associations from a large number of candidate grids. Especially for related products of the Internet of Vehicles, the use of this scheme can enrich the functional implementation methods of related products, improve the use value of the product, and meet business needs while ensuring accurate and stable calculations.
[0095] Figure 2 FIG. 1 is a flow chart of a method for confirming an associated grid set according to another embodiment of the present disclosure, which specifically includes:
[0096] S201: gridding the map to obtain a candidate grid set;
[0097] S202: Selecting a starting grid from the candidate grid set;
[0098] S203: Based on the starting grid, a screening operation is performed on the candidate grid set to determine whether there is a geographical association relationship, so as to obtain an associated grid;
[0099] S204: When the associated grid meets a preset condition, the starting grid is used as an associated grid set of the candidate grid set.
[0100] S205: If the associated grid does not meet the preset condition, use the associated grid as the current grid and repeat the screening operation of whether there is a geographical association relationship until the associated grid obtained meets the preset condition;
[0101] S206: merging the associated grids obtained from each screening operation with the starting grid to obtain an associated grid set of the candidate grid set.
[0102] The above steps S201-S203, S205, S206 are the same as S101-S105, and will not be described in detail here. It should be emphasized that the above step S204 needs to be after step S203, but there is no necessary order between step S205 or S206.
[0103] In one example, if the associated grids obtained by the screening operation based on the starting grid meet the preset conditions, that is, if the empty set is obtained in the first screening operation, the starting grid is directly used as the associated grid set of the candidate grid set. For example, for the candidate grid set [1,2,3,5,8,10], [5] is selected as the starting grid, and the directly adjacent grids of [5] include [6,9,11], and the intersection with the candidate grids is an empty set, then [5] is used as an associated grid set of the candidate grid set [1,2,3,5,8,10]. With the above solution, if there is an independent grid in the candidate grid set, it is also stored as a special associated grid set. When the next round of screening is performed, the processed grid is not selected as the new starting grid, thereby avoiding repeated operations.
[0104] In one example, selecting a starting grid from a set of candidate grids specifically includes:
[0105] Determine whether the associated grid set of the candidate grid set has been obtained; if not, select any grid from the candidate grid set as the starting grid; if it has been obtained, select any grid from the candidate grid set that does not belong to the associated grid set as the starting grid. This example solution is mainly used in the case where the associated grids have been confirmed from the candidate grids, and it is necessary to exclude the confirmed associated grids, and then select any grid from the remaining grids whose geographical associations are to be confirmed as the starting grid to start a new round of associated grid screening. For example, for the candidate grid set [1,2,3,5,8,10], if it has been confirmed that [5] does not have a geographical association with any grid in the candidate grid set, that is, [5] itself is a confirmed associated grid set, then when selecting a new starting grid, select any grid from [1,2,3,8,10] as the new starting grid to start a new round of screening. Of course, if the candidate grid set has not been confirmed before whether it has an associated grid set, then any grid from it can be selected as the starting grid.
[0106] In one case, there may be multiple associated grid sets in the candidate grid set. For example, for [8, 9, 10, 1, 2, 3, -6, -5, -4], [8, 9], [10, 1, 2, 3], [-4] and [-6, -5] may all be associated grids. Then, in the process of multiple rounds of screening, on the premise that [8, 9], [10, 1, 2, 3] and [-4] are associated grids, any one of the remaining "-6, -5" is selected as the starting grid. This ensures that repeated associated grid screening will not be performed, thereby improving the efficiency of associated grid screening.
[0107] Application examples:
[0108] like Figure 3 As shown, the processing flow of the first embodiment of the present disclosure includes the following contents:
[0109] Step 1: Randomly select a grid, for example, 10, from the candidate grid set ② (also called the valid grid set), and use grid 10 as the starting grid.
[0110] Step 2: Move grid No. 10 in ② into the confirmed associated grid set (also called grid group) on the left.
[0111] Step 3: Obtain the adjacent grid ① (also called the directly adjacent grid) of grid No. 10 through calculation.
[0112] Step 4: Calculate the intersection ③ of ① and ②, ③ is the association network obtained by the first screening operation.
[0113] Step 5: Determine whether ③ is an empty set. The answer is no, so continue to filter. Move the elements of the intersection ③ into the confirmed associated grid set on the left. At this time, the confirmed associated grid set is [10,2,3]
[0114] Step 5: Obtain the adjacent grids ④ and ⑤ of 2 and 3 respectively through calculation.
[0115] Step 6: Remove the confirmed associated grid set ③ from the candidate grid set ② to obtain ⑥ unconfirmed grids.
[0116] Step 8: Calculate the intersection of ④, ⑤ and ⑥ to obtain the associated grid ⑦ for this screening.
[0117] Step 9: Determine whether ⑦ is an empty set. The answer is no, so continue to filter. Move the elements of the intersection ⑦ to the confirmed associated grid set on the left. At this time, the confirmed associated grid set is [10,2,3,1,8]
[0118] Step 10: Obtain the adjacent grids ⑧ and ⑨ of ⑦ through calculation.
[0119] Step 11: Subtract the just confirmed grid ⑦ from the unconfirmed grid ⑥ to obtain the unconfirmed grid ⑩.
[0120] Step 12: Calculate the intersection of ⑧, ⑨ and ⑩, and the result is an empty set [null].
[0121] Step 13: The intersection is empty, so the current round of calculation is terminated. At this time, the confirmed associated grid set [10, 2, 3, 1, 8] is the calculated associated grid set.
[0122] Step 14: For candidate grid set ②, determine whether the determined associated grid set is equal to the candidate grid set. If not, it means there are still unconfirmed grids. Select any grid from the unconfirmed grids as the new starting grid. That is, extract 5 as the new starting grid and enter the screening process again, see step 1.
[0123] Step 15: Through multiple recursive calculations of screening, the grid set on the right with unconfirmed geographical associations is finally made empty, and all calculations are terminated.
[0124] Step 16: The final result is a set of associated grids greater than or equal to 0.
[0125] In summary, if Figure 4 As shown, this solution is to screen the geographical association relationships in a loop, and finally obtain the confirmed associated grid set on the left after the grid set with unconfirmed geographical association relationships in the rightmost dashed box is confirmed by the adjacent grid set in the middle dashed box.
[0126] In practical applications, after obtaining the associated grid set, the associated target area can be generated, such as Figure 5 The present invention provides a method for determining a target area based on an associated grid set, which specifically includes:
[0127] S501: Obtain the associated grid set according to any of the above methods;
[0128] S502: Determine the associated grid set as a target area in the map to identify that the grids in the target area have a geographical association relationship.
[0129] In one example, after obtaining the associated grid set, the corresponding geographical location in the associated grid set is determined as the target area in the map, that is, by confirming the geographical association relationship of multiple grids, the areas corresponding to the grids with geographical association relationship are merged into the target area. Through the above scheme, the target area with preset commonality can be obtained quickly and accurately, and the data foundation is prepared for the management of the Internet of Vehicles. In one example, after the above step S502, it also includes: in the case of detecting that a vehicle enters the target area, sending notification information to the vehicle, and the notification information corresponds to the event reported in the target area. Specifically, after obtaining the target area, if a vehicle enters the target area, a notification information can be sent to the vehicle, and the notification information is obtained according to a commonality of the target area. For example, the corresponding notification information can be obtained according to the preset event reported before the target area. Specifically, if the candidate grids constituting the target area all have the event of "reporting road bumps", then the corresponding notification information "Please pay attention to road bumps" is obtained and sent to the vehicle entering the area. Through the above scheme, based on the road surface, driving and other information, the "associated grid set confirmation method" can be used to find grids with common attributes and merge them into an associated grid set, and then the corresponding target area can be obtained. After obtaining the target area, the vehicles entering the target area can be controlled according to the attributes to achieve the effect of intelligent control.
[0130] like Figure 6 As shown, in an embodiment of the present disclosure, a confirmation device 600 for an associated grid set is provided, the device comprising:
[0131] A division module 601 is used to grid the map to obtain a candidate grid set;
[0132] A selection module 602 is used to select a starting grid from a set of candidate grids;
[0133] A first screening module 603 is used to screen the candidate grid set based on the starting grid to see if there is a geographical association relationship to obtain an associated grid;
[0134] The second screening module 604 is used to, if the associated grid does not meet the preset condition, use the associated grid as the current grid and repeatedly perform the screening operation of whether there is a geographical association relationship until the associated grid meets the preset condition;
[0135] The first obtaining module 605 is used to merge the associated grids obtained from each screening operation with the starting grid to obtain an associated grid set of the candidate grid set.
[0136] In one example, after the first screening module 603, a second obtaining module 606 is further included, which is used to use the starting grid as the associated grid set of the candidate grid set when the associated grid meets the preset condition.
[0137] In one example, the selection module 602 is used to: determine whether an associated grid set of the candidate grid set has been obtained;
[0138] If the grid is not obtained, any grid is selected from the candidate grid set as the starting grid;
[0139] If it has been obtained, any grid that does not belong to the associated grid set is selected from the candidate grid set as the starting grid.
[0140] In one example, the second screening module 604 is used to:
[0141] The associated grid obtained last time is taken as the current grid, the adjacent grids of the current grid are obtained, the grids in the candidate grid set except the starting grid and the associated grids obtained each time are obtained as unconfirmed grids, the intersection of the unconfirmed grid and the adjacent grids is obtained, and the intersection is taken as the associated grid obtained by the current screening operation, until the associated grid obtained by the current screening operation meets the preset condition.
[0142] In one example, in any of the above devices, the preset condition is that there is no grid with a geographical association relationship.
[0143] In one example, in any of the above devices, the candidate grid set includes grids that have reported preset events.
[0144] like Figure 7 As shown, in an embodiment of the present disclosure, a device 700 for determining a target area based on an associated grid set is provided, the device comprising:
[0145] A third obtaining module 701 is used in the apparatus disclosed in any one of the above items to obtain the associated grid set;
[0146] The determination module 702 is used to determine the associated grid set as a target area in the map to identify that the grids in the target area have a geographical association relationship.
[0147] In one example, the apparatus 700 for determining a target area based on an associated grid set further includes:
[0148] The notification sending module is used to send notification information to the vehicle when it is detected that a vehicle enters the target area, and the notification information corresponds to the event reported by the target area.
[0149] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0150] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0151] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0152] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0153] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0154] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the confirmation method of the associated grid set. For example, in some embodiments, the confirmation method of the associated grid set may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the confirmation method of the associated grid set described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the confirmation method of the associated grid set in any other appropriate manner (e.g., by means of firmware).
[0155] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0156] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0157] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0158] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0159] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0160] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0161] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0162] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for confirming an associated grid set, comprising: Gridding the map to obtain a candidate grid set; Selecting a starting grid from the candidate grid set; Based on the starting grid, the candidate grid set is screened to see whether there is a geographical association relationship to obtain an associated grid; In the case that the associated grid does not meet the preset condition, the associated grid is used as the current grid, and the screening operation of whether there is a geographical association relationship is repeated until the associated grid obtained meets the preset condition; The associated grids obtained from each screening operation are merged with the starting grid to obtain an associated grid set of the candidate grid set.
2. The method according to claim 1, after the candidate grid set is screened based on the starting grid to determine whether there is a geographical association relationship to obtain the associated grid, further comprising: When the associated grid meets the preset condition, the starting grid is used as an associated grid set of the candidate grid set.
3. The method according to claim 1 or 2, wherein: The selecting a starting grid from the candidate grid set comprises: Determine whether the associated grid set of the candidate grid set has been obtained; If the grid is not obtained, any grid is selected from the candidate grid set as the starting grid; If the grid is already obtained, any grid that does not belong to the associated grid set is selected from the candidate grid set as the starting grid.
4. The method according to claim 1 or 2, wherein: The step of taking the associated grid as the current grid and repeatedly performing the screening operation to determine whether there is a geographical association relationship until the associated grid obtained meets the preset condition includes: The associated grid obtained last time is used as the current grid, the adjacent grids of the current grid are obtained, the grids in the candidate grid set except the starting grid and the associated grids obtained each time are obtained as unconfirmed grids, the intersection of the unconfirmed grid and the adjacent grids is obtained, and the intersection is used as the associated grid obtained by the current screening operation, until the associated grid obtained by the current screening operation meets the preset condition.
5. The method according to claim 1, wherein: The preset condition is that there is no grid with a geographical association relationship.
6. The method according to claim 1, wherein: The gridding of the map to obtain a candidate grid set includes: The map is gridded and grids in which preset events have been reported are selected to obtain a candidate grid set.
7. A method for determining a target area based on an associated grid set, comprising: Obtaining the associated grid set according to the method described in any one of claims 1 to 6; The associated grid set is determined as a target area in the map to identify that the grids in the target area have a geographical association relationship.
8. The method according to claim 7, further comprising: When a vehicle is detected to enter the target area, notification information is sent to the vehicle, where the notification information corresponds to an event reported by the target area.
9. A confirmation device for an associated grid set, comprising: A partitioning module is used to grid the map to obtain a candidate grid set; A selection module, used for selecting a starting grid from the candidate grid set; A first screening module, configured to screen the candidate grid set based on the starting grid to see whether there is a geographical association relationship to obtain an associated grid; A second screening module is used to, if the associated grid does not meet the preset condition, use the associated grid as the current grid and repeatedly perform a screening operation on whether there is a geographical association relationship until the associated grid obtained meets the preset condition; The first obtaining module is used to merge the associated grids obtained from each screening operation with the starting grid to obtain an associated grid set of the candidate grid set.
10. The device according to claim 9, further comprising after the first screening module: The second obtaining module is configured to use the starting grid as an associated grid set of the candidate grid set when the associated grid meets the preset condition.
11. The device according to claim 9 or 10, wherein: The selection module is used to: Determine whether the associated grid set of the candidate grid set has been obtained; If the grid is not obtained, any grid is selected from the candidate grid set as the starting grid; If the grid is already obtained, any grid that does not belong to the associated grid set is selected from the candidate grid set as the starting grid.
12. The device according to claim 9 or 10, wherein: The second screening module is used for: The associated grid obtained last time is used as the current grid, the adjacent grids of the current grid are obtained, the grids in the candidate grid set except the starting grid and the associated grids obtained each time are obtained as unconfirmed grids, the intersection of the unconfirmed grid and the adjacent grids is obtained, and the intersection is used as the associated grid obtained by the current screening operation, until the associated grid obtained by the current screening operation meets the preset condition.
13. The device according to claim 9, wherein: The preset condition is that there is no grid with a geographical association relationship.
14. The device according to claim 9, wherein: The division module is used to grid the map and select the grids that have reported the preset events to obtain a candidate grid set.
15. A device for determining a target area based on an associated grid set, comprising: A third obtaining module, configured to obtain the associated grid set according to the apparatus of any one of claims 9 to 14; The determination module is used to determine the associated grid set as a target area in the map to identify that the grids in the target area have a geographical association relationship.
16. The apparatus according to claim 15, further comprising: The notification sending module is used to send notification information to the vehicle when it is detected that a vehicle enters the target area, and the notification information corresponds to the event reported by the target area.
17. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.
19. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
