Method and apparatus for determining region where vehicle is located, and electronic device and vehicle

By constructing an administrative region set and optimizing the data structure, and combining it with the ray casting method for region matching, the problem of real-time determination of administrative regions under weak or no network conditions for vehicles was solved, achieving efficient determination of the vehicle's location.

WO2025261488A1PCT designated stage Publication Date: 2025-12-26CHINA FAW CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/102377
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-21
Filing Date
2025-06-20
Publication Date
2025-12-26

AI Technical Summary

Technical Problem

In situations where the vehicle has a weak or no network connection, existing technologies cannot determine the administrative region where the vehicle is located in a timely and efficient manner, resulting in insufficient resources on the end-side equipment to meet the calculation requirements at a frequency of 1 second.

Method used

By acquiring the current and historical location points of vehicles, a set of administrative regions is constructed. Using a list of adjacent administrative regions and a rectangular data structure, combined with the ray casting method, region matching is performed. The data structure design is optimized to reduce computational complexity and achieve efficient region determination.

Benefits of technology

In environments with weak or no network, it achieves efficient determination of the administrative region where the vehicle is located, reduces computational complexity, and meets the real-time determination requirement of 1 second frequency during vehicle operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025102377_26122025_PF_FP_ABST
    Figure CN2025102377_26122025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a method and apparatus for determining the region where a vehicle is located, and an electronic device and a vehicle. The method comprises: acquiring a first location point of a target vehicle at the current moment and a historical administrative region where the target vehicle is located at the previous moment (S100); acquiring neighboring administrative regions of the historical administrative region (S200); on the basis of the first location point and administrative region data of the historical administrative region and the neighboring administrative regions thereof, performing traversal-based region matching, and when a region matching result indicates that matching is successful, determining a corresponding administrative region to be a target administrative region where the target vehicle is located at the current moment, and acquiring a second location point of the target vehicle at the next moment (S500); and on the basis of the second location point and the target administrative region, continuously updating the region where the target vehicle is located (S600).
Need to check novelty before this filing date? Find Prior Art

Description

A method, device, electronic equipment, and vehicle for determining the location of a vehicle.

[0001] Cross-references to related applications

[0002] This application is based on and claims priority to Chinese Patent Application No. 202410809217.0, filed on June 21, 2024, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of data processing technology, and in particular to a method, device, electronic device, and vehicle for determining the location of a vehicle. Background Technology

[0004] In-vehicle navigation systems are essential for determining a vehicle's location. When the vehicle has a weak or no network connection, the massive computing resources of cloud servers cannot be utilized; instead, the hardware resources of the in-vehicle infotainment system (IVI) or other controllers on the device must be used for computation. The traditional method involves storing geographic location data for all prefecture-level administrative regions on the device, using the vehicle's location data to traverse all district and county-level administrative regions, and then using an algorithm to determine the positional relationship between a point and any polygon. Since the polygon data for district and county-level administrative regions is massive, a ray casting method is generally used for determination. The algorithm for determining whether a ray intersects a line segment has a complexity of O(log2). The complexity of the algorithm for determining the relationship between a parking space and an administrative region is proportional to the shape of the prefecture-level administrative region. In the worst case, determining which specific administrative region a parking space is located in requires determining all district and county-level administrative divisions, resulting in an algorithm complexity of O(x*y*log2). Since the shape points of all districts and counties (with 100m as the smallest unit) are close to the billion level, and since the vehicle needs to be calculated once every second during driving, the resources of the end-side equipment cannot meet the calculation conditions. Therefore, in the case of weak network or no network, it is generally impossible to determine the administrative division where the vehicle is located in a timely manner. Summary of the Invention

[0005] This application aims to at least partially address the limitations of related technologies. To this end, this application proposes a method, apparatus, electronic device, and vehicle for determining the location of a vehicle, capable of efficiently determining the vehicle's location.

[0006] On the one hand, embodiments of this application provide a method for determining the location of a vehicle, including:

[0007] Obtain the target vehicle's current location and the historical administrative region it was in at the previous moment; use the current location as the target location and the historical administrative region as the first region;

[0008] Obtain the adjacent administrative regions of the first region; organize the administrative regions based on the first region and its adjacent administrative regions to obtain a set of administrative regions;

[0009] Obtain one administrative region from the set of administrative regions as the second region;

[0010] Obtain administrative district data for the second region;

[0011] Based on the target location point and administrative region data, perform regional matching; if the regional matching result is successful, determine the second region as the target administrative region where the target vehicle is currently located; otherwise, obtain an administrative region that has not been matched from the administrative region set as the second region, and then return to the step of obtaining the administrative region data of the second region until the target administrative region where the target vehicle is currently located is determined.

[0012] Obtain the second location point of the target vehicle at the next moment; use the second location point as the target location point, use the target administrative region as the first region, and then return to execute the step of obtaining the adjacent administrative regions of the first region, continuously updating the region where the target vehicle is located.

[0013] In some embodiments, the administrative region data includes the bounding rectangle, the inscribed rectangle, and an array of shape points of the second region; region matching based on the target location point and the administrative region data includes the following steps:

[0014] Determine whether the target location point is inside the inscribed rectangle;

[0015] If the target location point is within the inscribed rectangle, the result of the region matching is considered a successful match.

[0016] If the target location point is not inside the inscribed rectangle, determine whether the target location point is inside the bounding rectangle.

[0017] When the target location point is within the bounding rectangle, based on the target location point and the shape point array, the ray method is used to determine whether the target location point is in the second region;

[0018] If the target location is within the second region, the result of the region matching is considered a successful match.

[0019] In some embodiments, the method further includes the following steps:

[0020] If the target location is not within the bounding rectangle, the result of the region matching is a failure.

[0021] In some embodiments, the method further includes the following steps:

[0022] If the target location is not within the second region, the result of the region matching is a failure.

[0023] In some embodiments, the shape point array includes multiple shape point coordinates. Based on the target location point and the shape point array, the method of determining whether the target location point is within the second region using ray casting includes the following steps:

[0024] Starting from the target location point, a target ray is constructed along a preset direction;

[0025] By sequentially traversing the coordinates of each shape point in the shape point array, the outline shape of the second region is constructed.

[0026] Determine the spatial relationship between the target ray and the contour shape to obtain the number of intersection points between the target ray and the contour shape;

[0027] If the number of intersection points is odd, the target location is determined to be in the second region; otherwise, the target location is determined to be outside the second region.

[0028] In some embodiments, the method further includes the following steps:

[0029] Once the spatial relationship determination is complete, the target ray in the preset memory is released.

[0030] The preset memory is used to buffer the constructed target rays, and the spatial relationship determination is performed by retrieving the target rays from the preset memory.

[0031] In some embodiments, the contour shape includes multiple line segments, which are constructed based on the coordinates of two adjacent shape points during sequential traversal; the spatial relationship between the target ray and the contour shape is determined to obtain the number of intersection points between the target ray and the contour shape, including the following steps:

[0032] Initialize the number of intersection points to 0, and obtain a line segment from the contour shape as the target line segment;

[0033] Determine the spatial relationship between the target ray and the target line segment. If the spatial relationship between the target ray and the target line segment is intersecting, increment the number of intersection points by 1.

[0034] Take a line segment from the contour shape that has not been judged in terms of spatial relationship as the target line segment, and then return to the step of judging the spatial relationship between the target ray and the target line segment, until the spatial relationship between all line segments in the contour shape and the target ray is judged, and obtain the number of intersection points between the target ray and the contour shape.

[0035] In some embodiments, obtaining administrative district data for the second region includes the following steps:

[0036] The administrative district data is retrieved from the preset administrative district data queue based on the administrative district data pointer of the second region.

[0037] On the other hand, embodiments of this application provide a device for determining the location of a vehicle, including:

[0038] The first module is used to obtain the target vehicle's current location and the historical administrative region it was in at the previous moment; the first location is used as the target location, and the historical administrative region is used as the first region;

[0039] The second module is used to obtain the adjacent administrative regions of the first region; and to organize the administrative regions into a set based on the first region and its adjacent administrative regions.

[0040] The third module is used to select an administrative region from the set of administrative regions as the second region;

[0041] The fourth module is used to obtain administrative district data for the second region;

[0042] The fifth module is used to perform regional matching based on the target location point and administrative region data. If the regional matching result is a successful match, the second region is determined to be the target administrative region where the target vehicle is currently located. Otherwise, an administrative region that has not been matched is obtained from the administrative region set as the second region, and then the fourth module is executed until the target administrative region where the target vehicle is currently located is determined.

[0043] The sixth module is used to obtain the second location point of the target vehicle at the next moment; the second location point is used as the target location point, the target administrative region is used as the first region, and then the second module is executed to continuously update the region where the target vehicle is located.

[0044] In some embodiments, the apparatus further includes:

[0045] The seventh module is used to determine the result of region matching as a failure when the target location point is not within the bounding rectangle.

[0046] In some embodiments, the apparatus further includes:

[0047] The eighth module is used to determine the result of region matching as a failure when the target location point is not within the second region.

[0048] In some embodiments, the apparatus further includes:

[0049] The ninth module is used to release the target ray in the preset memory after the spatial relationship determination is completed;

[0050] The preset memory is used to buffer the constructed target rays, and the spatial relationship determination is performed by retrieving the target rays from the preset memory.

[0051] On the other hand, embodiments of this application provide an electronic device, including: a processor and a memory; the memory is used to store a program; the processor executes the program to implement the method for determining the area where the vehicle is located.

[0052] On the other hand, embodiments of this application provide a computer storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the aforementioned method for determining the location of the vehicle.

[0053] On the other hand, embodiments of this application provide a vehicle, which includes the aforementioned vehicle location determination device or the aforementioned electronic device.

[0054] This embodiment of the application obtains the first location point of the target vehicle at the current moment and the historical administrative region where it was located at the previous moment; uses the first location point as the target location point and the historical administrative region as the first region; obtains the adjacent administrative regions of the first region; organizes the first region and its adjacent administrative regions to obtain a set of administrative regions; obtains an administrative region from the set of administrative regions as the second region; obtains the administrative region data of the second region; performs region matching based on the target location point and the administrative region data; if the region matching result is successful, the second region is determined to be the target administrative region where the target vehicle is located at the current moment; otherwise, an administrative region that has not been matched is obtained from the set of administrative regions as the second region, and then the process returns to the step of obtaining the administrative region data of the second region until the target administrative region where the target vehicle is located at the current moment is determined; obtains the second location point of the target vehicle at the next moment; uses the second location point as the target location point and the target administrative region as the first region, and then returns to the step of obtaining the adjacent administrative regions of the first region, continuously updating the region where the target vehicle is located. Based on the continuous nature of vehicle travel, this application's embodiments add a list of adjacent administrative regions to the administrative region data during the map compilation stage. By traversing and matching historical administrative regions and their adjacent administrative regions, efficient determination of the vehicle's location can be achieved. Attached Figure Description

[0055] The accompanying drawings are used to provide an understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0056] Figure 1 is a schematic diagram of an implementation environment for determining the location of a vehicle according to an embodiment of this application;

[0057] Figure 2 is a flowchart illustrating a method for determining the location of a vehicle according to an embodiment of this application;

[0058] Figure 3 is a schematic diagram illustrating an example of the data structure for administrative region data provided in an embodiment of this application;

[0059] Figure 4 is a schematic diagram of the expansion process of region matching provided in an embodiment of this application;

[0060] Figure 5 is a schematic diagram of the unfolding process of determining the positional relationship between the target location point and the second region using the ray method according to an embodiment of this application;

[0061] Figure 6 is a schematic diagram of the unfolding process for determining the spatial relationship between the target ray and the contour shape according to an embodiment of this application;

[0062] Figure 7 is a schematic diagram of the traditional process for determining the administrative region where a vehicle is located.

[0063] Figure 8 is a schematic diagram of the overall process principle of the method for determining the location of a vehicle provided in the embodiments of this application;

[0064] Figure 9 is a structural schematic diagram of a vehicle location determination device provided in an embodiment of this application;

[0065] Figure 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0067] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100," "second / S200," etc., in the specification, claims, and the aforementioned figures are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0068] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0069] It is understood that the method for determining the location of a vehicle provided in this application embodiment can be applied to any computer device with data processing and computing capabilities, and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, the terminal is a smartphone, tablet computer, laptop computer, or desktop computer, but it is not limited to these.

[0070] Figure 1 illustrates an implementation environment provided in an embodiment of the application. Referring to Figure 1, this implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.

[0071] Server 101 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0072] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.

[0073] Terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc. It can also be a vehicle-mounted terminal of the various device types described above, but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment does not impose any limitations.

[0074] Based on the implementation environment shown in Figure 1, this application provides a method for determining the location of a vehicle. The following description uses the application of this method in server 101 as an example. It is understood that the method for determining the location of a vehicle can also be applied in terminal 102.

[0075] Referring to Figure 2, which is a flowchart of a method for determining the location of a vehicle on a server according to an embodiment of this application, the executing entity of this method can be any of the aforementioned computer devices (including a server or a terminal). Referring to Figure 2, the method may include the following steps:

[0076] S100: Obtain the first location point of the target vehicle at the current moment and the historical administrative region where it was located at the previous moment; use the first location point as the target location point and the historical administrative region as the first region;

[0077] The solution in this application primarily addresses application scenarios where, due to weak or no network connectivity, the massive computing resources of cloud servers cannot be utilized, and computation must be performed using the hardware resources of the on-device in-vehicle infotainment controller (IVI) or other controllers. It should be noted that weak or no network connectivity typically occurs while driving (e.g., passing through tunnels or mountainous areas with poor signal). When the previous moment was the initial moment of vehicle movement (i.e., the moment the car started), there is usually no weak or no network connectivity, and the cloud server can quickly identify the vehicle's location at the time of startup. Furthermore, even if the vehicle was in a weak or no network connectivity situation at the initial moment of movement, the location can be determined by obtaining manual input. It should be understood that, when the previous moment was the moment the car started, this application does not limit the method for confirming the historical administrative region.

[0078] S200: Obtain the adjacent administrative regions of the first region; organize the administrative regions according to the first region and its adjacent administrative regions to obtain the set of administrative regions;

[0079] S300. Obtain one administrative region from the set of administrative regions as the second region;

[0080] S400, Obtain administrative district data for the second region;

[0081] It should be noted that in some embodiments, step S400 may include the following steps: obtaining administrative region data from a preset administrative region data queue based on the administrative region data pointer of the second region.

[0082] For example, in some specific implementations, due to the continuous nature of vehicle travel, vehicles generally travel across adjacent areas. Based on this characteristic, during the map compilation stage (map preprocessing), a list of adjacent administrative regions is added to the administrative region data. The list of adjacent administrative regions records the data index position, which can be directly pointed to during budgeting. Overall, this can reduce efficiency overhead by more than 1 / 2. The data structure is shown in Figure 3.

[0083] S500: Perform regional matching based on the target location point and administrative region data; if the regional matching result is a successful match, determine the second region as the target administrative region where the target vehicle is currently located; otherwise, obtain an administrative region that has not been matched from the administrative region set as the second region, and then return to the step of obtaining the administrative region data of the second region until the target administrative region where the target vehicle is currently located is determined.

[0084] It should be noted that the administrative region data includes the outer rectangle, inner rectangle, and shape point array of the second region; in some embodiments, as shown in Figure 4, region matching based on the target location point and the administrative region data may include the following steps: S510, determining whether the target location point is within the inner rectangle; S520, if the target location point is within the inner rectangle, determining that the region matching result is a successful match; S530, if the target location point is not within the inner rectangle, determining whether the target location point is within the outer rectangle; S540, if the target location point is within the outer rectangle, determining whether the target location point is within the second region using the ray casting method based on the target location point and the shape point array; S551, if the target location point is within the second region, determining that the region matching result is a successful match.

[0085] For example, in some specific implementations, starting from data structure design, the following data structure is added during the map compilation stage (map preprocessing): For each level of administrative region data, circumscribed rectangle data (the rectangle formed by the maximum and minimum points of all shape points in the x and y directions) and inscribed rectangle data (the largest rectangle that can fit within the polygon formed by all shape points). The circumscribed and inscribed rectangles in the administrative region data can be predefined and constructed based on the shape point data, and their construction principle can be as follows:

[0086] The circumscribed rectangle can be determined directly based on the maximum and minimum coordinates of all shape points in the horizontal and vertical directions. For example, if we iterate through the horizontal coordinates of all shape points and determine that the maximum value of the vertical coordinate is 5 and the minimum value is 2, and if we iterate through the vertical coordinates of all shape points and determine that the maximum value of the vertical coordinate is 4 and the minimum value is 1, then the circumscribed rectangle can be determined based on the four coordinate points (2,4), (2,1), (5,4) and (5,1).

[0087] The inscribed rectangle can be determined based on the idea of ​​expanding outwards from the center, as follows:

[0088] 1. First, determine the outline shape of the corresponding region based on the shape point data, and then use the idea of ​​image to search. With a black image as the background, fill the outline part with white to generate a binary image Q.

[0089] 2. Take the centroid of the outline polygon (outline shape) as the starting point.

[0090] 3. Starting from the centroid of the graphic, gradually expand outwards in all directions, searching for connected regions pixel by pixel, and finally determine the inscribed rectangle of the corresponding region.

[0091] In some embodiments, the method may further include the following steps: when the target location point is not within the bounding rectangle, the result of the region matching is determined to be a matching failure.

[0092] In some embodiments, the method may further include the following steps: when the target location point is not within the second region, the result of the region matching is determined to be a matching failure.

[0093] It should be noted that the shape point array includes multiple shape point coordinates. In some embodiments, as shown in Figure 5, based on the target location point and the shape point array, the ray method is used to determine whether the target location point is in the second region, including the following steps: S541, starting from the target location point, construct a target ray along a preset direction; S542, sequentially traverse each shape point coordinate in the shape point array to construct the outline shape of the second region; S543, determine the spatial relationship between the target ray and the outline shape to obtain the number of intersection points between the target ray and the outline shape; S544, if the number of intersection points is odd, determine that the target location point is in the second region; otherwise, determine that the target location point is not in the second region.

[0094] In some embodiments, the contour shape includes multiple line segments, which are constructed based on the coordinates of two adjacent shape points during sequential traversal. As shown in Figure 6, determining the spatial relationship between the target ray and the contour shape to obtain the number of intersection points between the target ray and the contour shape can include the following steps: S5431, Initialize the number of intersection points to 0, and obtain a line segment from the contour shape as the target line segment; S5432, Determine the spatial relationship between the target ray and the target line segment. If the spatial relationship between the target ray and the target line segment is intersecting, increment the number of intersection points by 1; S5433, Obtain a line segment from the contour shape that has not been determined in terms of spatial relationship as the target line segment, and then return to the step of determining the spatial relationship between the target ray and the target line segment until the spatial relationship between all line segments in the contour shape and the target ray is determined, thereby obtaining the number of intersection points between the target ray and the contour shape.

[0095] For example, in some specific embodiments, any closed curve in a plane can be intuitively considered to divide the plane into inner and outer parts, where the "inner" part is the so-called polygonal region (i.e., the second region or the region corresponding to the contour shape). Based on this understanding, for any straight line in a plane, the following conclusions can be drawn:

[0096] When a straight line crosses the boundary of a polygon, there are only two possibilities: it enters the polygon or it exits the polygon.

[0097] Without considering non-Euclidean space, a straight line cannot re-enter a polygon from the inside or re-exit it from the outside; that is, two consecutive crossings of the boundary must occur in pairs. A straight line can extend infinitely, while the area enclosed by a closed curve is finite. Therefore, the last crossing of the polygon boundary must be an exit from the polygon, reaching the outside.

[0098] If we draw a ray from a given point, we can also draw the following two conclusions: if the point is inside the polygon, the ray will always cross the boundary outside the polygon the first time it crosses the boundary.

[0099] If a point is outside a polygon, the first time a ray crosses the boundary, it will enter the polygon.

[0100] By synthesizing the above conclusions, we can summarize as follows:

[0101] When a ray crosses the polygon boundary an even number of times, all even-numbered crossings (including the last one) are exits, and all odd-numbered crossings (including the first one) are entries, thus indicating that the point is outside the polygon. When a ray crosses the polygon boundary an odd number of times, all odd-numbered crossings (including the first and last ones) are exits, thus indicating that the point is inside the polygon.

[0102] In some practical application scenarios, the following are some problems and solutions of the X-ray method in practical applications:

[0103] Special issues:

[0104] 1. The point is on the edge of the polygon; 2. The point coincides with a vertex of the polygon; 3. The ray passes through a vertex of the polygon; 4. The ray passes through exactly one edge of the polygon, which is a special case of the previous case, that is, the ray passes through two adjacent vertices of the polygon consecutively.

[0105] Corresponding solution:

[0106] 1. There are many ways to determine if a point lies on a line. A relatively simple and direct method is to calculate whether the slopes of the lines connecting the point to the two vertices of the polygon are equal, a concept learned in high school mathematics. 2. The case where a point coincides with a polygon vertex is even simpler; just compare the coordinates of the point. 3. The prerequisite for a ray to cross a line segment is that the two endpoints of the line segment are on opposite sides of the ray. Once this is understood, vertex crossings become straightforward. Thus, it's sufficient to define that any point crossed by the ray is considered to be on one side. 4. Once point 3 is solved, this point becomes straightforward. Based on the above assumption, two consecutive vertices passed by the ray are clearly on the side above the ray, so this case can be considered as no crossing. Since the solution to point 3 already covers this special case, no further special processing is needed.

[0107] In some embodiments, the method may further include the following steps: when the spatial relationship determination is completed, the target ray in the preset memory is released; wherein the preset memory is used to buffer the constructed target ray, and the spatial relationship determination is performed by obtaining the target ray from the preset memory.

[0108] S600: Obtain the second location point of the target vehicle at the next moment; use the second location point as the target location point, use the target administrative region as the first region, and then return to execute the step of obtaining the adjacent administrative regions of the first region, continuously updating the region where the target vehicle is located.

[0109] To explain in detail the principles of the technical solution of this application, the overall process of this application will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principles of this application and should not be regarded as a limitation of this application.

[0110] First, it should be noted that the polygon data of district and county administrative regions is massive. Generally, the ray casting method is used for determination. The algorithm for determining whether a ray intersects a line segment has a complexity of O(log2). The algorithm complexity for determining the relationship between a parking space and an administrative region is proportional to the shape points of the prefecture-level administrative region. In the worst case, determining which specific administrative region a parking space is located in requires determining all district and county administrative regions, thus the algorithm complexity is O(x*y*log2). Since the shape points of all district and county administrative regions (with 100m as the smallest unit) approach 1 billion, and since calculations are required every second during vehicle operation, the resources of the edge devices cannot meet the computational requirements. Therefore, in weak or no network conditions, it is generally impossible to determine the administrative region where a vehicle is located in a timely manner. The traditional process for determining the administrative region where a vehicle is located is shown in Figure 7.

[0111] In view of the problems existing in the prior art, the embodiments of this application make the following improvements:

[0112] Improved Algorithm 1:

[0113] Due to the continuous nature of vehicle travel, vehicles typically travel across adjacent areas. Based on this characteristic, during the map compilation stage (map preprocessing), a list of adjacent administrative regions is added to the administrative region data. The list of adjacent administrative regions records the data index position, which can be directly pointed to during budgeting. Overall, this can reduce efficiency overhead by more than 1 / 2. The data structure is shown in Figure 3.

[0114] Improved Algorithm 2:

[0115] The improved algorithm starts with data structure design, adding the following data structures during the map compilation stage (map preprocessing): For each administrative region, the data includes both bounding rectangle data (i.e., the largest rectangle of the administrative region in the flowchart, the rectangle formed by the largest and smallest points in the x and y directions of all shape points) and inscribed rectangle data (i.e., the smallest rectangle of the administrative region in the flowchart, the largest rectangle that can fit within the polygon formed by all shape points). As shown in Figure 8, the calculation method is improved as follows:

[0116] 1. Collect real-time updated vehicle locations;

[0117] 2. Based on the historical administrative region determined in the previous moment, determine its adjacent administrative regions; perform a cyclical traversal to determine the vehicle's location based on the historical administrative region and its adjacent administrative regions;

[0118] 3. Determine whether the vehicle's location is within the smallest rectangle of the administrative region (selected from historical administrative regions and their adjacent administrative regions for the determination). If it is, directly determine the administrative region where the vehicle's current location is located based on the current area for the determination; otherwise, proceed to step 4.

[0119] 4. Determine whether the vehicle's location is within the largest rectangle of the administrative region (selected from historical administrative regions and their adjacent administrative regions for the determination). If not, reselect the area for the determination from historical administrative regions and their adjacent administrative regions, and then return to step 3; otherwise, proceed to step 5.

[0120] 5. Construct a vehicle location ray based on the vehicle's location points (and buffer it in memory);

[0121] 6. Iteratively evaluate the shape points of the administrative region to determine the spatial relationship between the ray and the line segments formed by adjacent shape points (point n and point n+1);

[0122] 7. If the number of intersections between the ray and all line segments is odd, the vehicle location is determined to be within an administrative region. The administrative region where the current vehicle location is located is determined directly based on the current region participating in the determination. Otherwise, a new region is selected from the historical administrative regions and their adjacent administrative regions for the determination, and then the process returns to step 3 until the administrative region where the current vehicle location is located is determined.

[0123] 8. After determining the administrative region where the current vehicle is located, release the vehicle location point ray in memory; then continue to update the vehicle location and continuously update the determination of the administrative region where the vehicle is located.

[0124] On the other hand, as shown in Figure 9, this application embodiment provides a vehicle location determination device 900, which may include:

[0125] The first module 910 is used to obtain the first location point of the target vehicle at the current time and the historical administrative region where it was located at the previous time; the first location point is used as the target location point and the historical administrative region is used as the first region;

[0126] The second module 920 is used to obtain the adjacent administrative regions of the first region; and to organize the administrative regions into a set based on the first region and its adjacent administrative regions.

[0127] The third module 930 is used to obtain an administrative region from the set of administrative regions as the second region;

[0128] Module 4, 940, is used to obtain administrative district data for the second region;

[0129] The fifth module 950 is used to perform regional matching based on the target location point and administrative region data. If the regional matching result is a successful match, the second region is determined to be the target administrative region where the target vehicle is currently located. Otherwise, an administrative region that has not been matched is obtained from the administrative region set as the second region, and then the fourth module is executed until the target administrative region where the target vehicle is currently located is determined.

[0130] The sixth module 960 is used to obtain the second location point of the target vehicle at the next moment; the second location point is used as the target location point, the target administrative region is used as the first region, and then the second module is executed to continuously update the region where the target vehicle is located.

[0131] In some embodiments, the apparatus may further include:

[0132] The seventh module is used to determine the result of region matching as a failure when the target location point is not within the bounding rectangle.

[0133] In some embodiments, the apparatus may further include:

[0134] The eighth module is used to determine the result of region matching as a failure when the target location point is not within the second region.

[0135] In some embodiments, the apparatus may further include:

[0136] The ninth module is used to release the target ray in the preset memory after the spatial relationship determination is completed;

[0137] The preset memory is used to buffer the constructed target rays, and the spatial relationship determination is performed by retrieving the target rays from the preset memory.

[0138] The content of the method embodiments in this application is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0139] On the other hand, this application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method for determining the location of the vehicle. This electronic device can be any smart terminal, including a tablet computer or an in-vehicle computer.

[0140] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0141] As shown in Figure 10, Figure 10 illustrates the hardware structure of an electronic device according to another embodiment. The electronic device includes:

[0142] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0143] The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 using the network node population optimization method of the embodiments of this application.

[0144] Input / output interface 1003 is used to implement information input and output;

[0145] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0146] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);

[0147] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0148] The electronic device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0149] The content of the method embodiments in this application is applicable to the embodiments of this electronic device. The specific functions implemented by the embodiments of this electronic device are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0150] Another aspect of this application provides a computer-readable storage medium storing a program that is executed by a processor to implement the aforementioned method.

[0151] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0152] The content of the method embodiments in this application is applicable to the computer-readable storage medium embodiments. The specific functions implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0153] This application also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.

[0154] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0155] It should be noted that although several modules for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be divided and embodied by multiple modules or units.

[0156] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.

[0157] In some embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this application are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. These embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0158] Furthermore, although this application is described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding this application. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional technology for an engineer. Therefore, those skilled in the art can implement the application set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of this application, which is determined by the full scope of the appended claims and their equivalents.

[0159] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0160] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution means, apparatus, or device (such as a computer-based device, a processor-including device, or other means that can fetch and execute instructions from, or in conjunction with, an instruction execution means, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution means, apparatus, or device.

[0161] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0162] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0163] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0164] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

[0165] The above describes some embodiments of this application, but this application is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A method for determining the location of a vehicle, comprising the following steps: Obtain the target vehicle's current location and the historical administrative region it was in at the previous moment; use the first location as the target location and the historical administrative region as the first region; Obtain the adjacent administrative regions of the first region; organize the administrative regions into a set based on the first region and its adjacent administrative regions; One administrative region is selected from the set of administrative regions as the second region; Obtain the administrative district data for the second region; Based on the target location point and the administrative region data, perform regional matching; if the regional matching result is a successful match, determine the second region as the target administrative region where the target vehicle is currently located; otherwise, obtain an administrative region from the administrative region set that has not undergone regional matching as the second region, and then return to the step of obtaining the administrative region data of the second region until the target administrative region where the target vehicle is currently located is determined. Obtain the second position point of the target vehicle at the next moment; The second location point is used as the target location point, the target administrative region is used as the first region, and then the process returns to the step of obtaining the adjacent administrative regions of the first region, continuously updating the location of the target vehicle.

2. The method for determining the location of a vehicle according to claim 1, wherein, The administrative region data includes the bounding rectangle, inscribed rectangle, and shape point array of the second region; the region matching based on the target location point and the administrative region data includes the following steps: Determine whether the target location point is within the inscribed rectangle; When the target location point is within the inscribed rectangle, the result of the region matching is determined to be a successful match. If the target location point is not within the inscribed rectangle, determine whether the target location point is within the bounded rectangle; When the target location point is within the bounding rectangle, based on the target location point and the shape point array, the ray casting method is used to determine whether the target location point is within the second region; When the target location point is within the second region, the result of the region matching is determined to be a successful match.

3. The method for determining the location of a vehicle according to claim 2 further includes the following steps: If the target location point is not within the bounding rectangle, the result of the region matching is determined to be a matching failure.

4. The method for determining the location of a vehicle according to claim 2 further includes the following steps: If the target location is not within the second region, the result of the region matching is determined to be a matching failure.

5. The method for determining the location of a vehicle according to claim 2, wherein, The shape point array includes multiple shape point coordinates. The step of determining whether the target location point is within the second region using a ray casting method based on the target location point and the shape point array includes the following steps: Starting from the target location point, a target ray is constructed along a preset direction; By sequentially traversing the coordinates of each shape point in the shape point array, the outline shape of the second region is constructed. The spatial relationship between the target ray and the contour shape is determined to obtain the number of intersection points between the target ray and the contour shape; If the number of intersection points is odd, the target location point is determined to be within the second region; otherwise, the target location point is determined to be outside the second region.

6. The method for determining the location of a vehicle according to claim 5 further includes the following steps: Once the spatial relationship determination is completed, the target ray in the preset memory is released. The preset memory is used to buffer the constructed target ray, and the spatial relationship determination is performed by retrieving the target ray from the preset memory.

7. The method for determining the location of a vehicle according to claim 5, wherein, The contour shape comprises multiple line segments, which are constructed based on the coordinates of two adjacent shape points during the sequential traversal; the step of determining the spatial relationship between the target ray and the contour shape to obtain the number of intersection points between the target ray and the contour shape includes the following steps: Initialize the number of intersection points to 0, and obtain a line segment from the contour shape as the target line segment; Determine the spatial relationship between the target ray and the target line segment. If the spatial relationship between the target ray and the target line segment is intersecting, increment the number of intersection points by 1. The process begins by identifying a line segment from the contour shape that has not yet undergone spatial relationship determination as the target line segment. Then, the process returns to the step of determining the spatial relationship between the target ray and the target line segment, continuing until all line segments in the contour shape and the target ray have had their spatial relationships determined, thereby obtaining the number of intersection points between the target ray and the contour shape.

8. The method for determining the location of a vehicle according to claim 1, wherein, The process of obtaining the administrative region data of the second region includes the following steps: The administrative region data is obtained by indexing from the preset administrative region data queue based on the administrative region data pointer of the second region.

9. A device for determining the location of a vehicle, comprising: The first module is used to obtain the target vehicle's current location and the historical administrative region it was in at the previous moment. Take the first location point as the target location point and the historical administrative region as the first region; The second module is used to obtain the adjacent administrative regions of the first region; The administrative region set is obtained by organizing the first region and its adjacent administrative regions; The third module is used to obtain an administrative region from the set of administrative regions as the second region; The fourth module is used to obtain administrative district data for the second region; The fifth module is used to perform regional matching based on the target location point and the administrative region data; when the regional matching result is a successful match, the second region is determined to be the target administrative region where the target vehicle is currently located; otherwise, an administrative region that has not been matched is obtained from the administrative region set as the second region, and then the fourth module is executed until the target administrative region where the target vehicle is currently located is determined. The sixth module is used to obtain the second position point of the target vehicle at the next moment; The second location point is used as the target location point, the target administrative region is used as the first region, and then the second module is executed to continuously update the location of the target vehicle.

10. An electronic device, comprising a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 8.

11. A computer storage medium storing a processor-executable program, which, when executed by the processor, is used to implement the method as claimed in any one of claims 1 to 8.

12. A vehicle, comprising the vehicle location determination device as claimed in claim 9 or the electronic device as claimed in claim 10.

Citation Information

Patent Citations

  • Method for judging whether vehicle has cross-area behavior

    CN109544968A

  • Region positioning method and device, equipment and storage medium

    CN114238384A

  • Administrative division matching method and device, equipment and storage medium

    CN116797037A

  • Method and device for judging area where vehicle is located, electronic equipment and vehicle

    CN118708664A

  • Geographic locator of a vehicle using GPS and angles between pairs of adjacent boundary coordinate points

    US5550743A