A method, device, electronic device and storage medium for obtaining source location information

Through the comprehensive analysis of geohash grid technology and vehicle and mobile terminal information, the distribution information of people traveling to designated geographical areas is accurately obtained, which solves the problem that vehicles in the prior art may not necessarily park at the destination, resulting in inaccurate information acquisition, and improves the accuracy of OD travel analysis.

CN119557494BActive Publication Date: 2025-04-18ZHEJIANG YUNTONG SHUDA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510105298.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-04-18
Estimated Expiration
2045-01-23

AI Technical Summary

Technical Problem

During the OD travel analysis process, how to accurately obtain the population distribution information heading to a designated geographical area and the population distribution information leaving the area, especially when the vehicle does not necessarily stop at the destination, but is in a nearby parking lot.

Method used

By using geohash grid technology, grid areas covering the target geographical area and the target backbone road are drawn, information about vehicles and mobile terminals whose staying time is greater than the preset staying time in these areas within the set period is obtained, and source location information is determined based on the number of vehicles and mobile terminals.

Benefits of technology

It realizes that the source location information is obtained as accurately as possible under the comprehensive consideration of the number of vehicles and mobile terminals, and improves the reliability of the traceability results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557494B_ABST
    Figure CN119557494B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing, and in particular to a method, device, electronic device and storage medium for acquiring source location information, comprising: acquiring a target trunk road corresponding to a target geographic area; drawing a first grid area using a first geohash grid; drawing a second grid area using a second geohash grid; acquiring first information and second information; acquiring first source location information and second source location information; if the first number is greater than or equal to the second number, or if the first number is less than the second number but the difference between the two is less than a set value, using the first source location information as the target source location information corresponding to the set time period; if the first number is less than the second number and the difference between the two is greater than a set value, updating the first grid area based on the second source location information, and determining the target source location information based on the updated first grid area. The present invention can acquire source location information as accurately as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method, device, electronic device and storage medium for acquiring source location information. Background Art

[0002] In some application scenarios, such as some business data analysis processes, such as OD (O stands for ORIGIN, indicating the departure point of the trip, D stands for DESTINATION, indicating the destination of the trip) travel analysis process, the distribution information of the crowd going to the specified geographical area and the distribution information of the crowd leaving the specified area are generally obtained based on vehicle data, so as to provide some reference information for traffic optimization. Therefore, accurate acquisition of vehicle data is crucial to ensure the accuracy of OD travel analysis. However, the vehicle may not be parked exactly at the destination, but may be in a nearby parking lot, etc. Therefore, how to accurately obtain the vehicle data going to the destination is a topic worth studying. Summary of the invention

[0003] In view of the above technical problems, the technical solution adopted by the present invention is:

[0004] According to a first aspect of the present invention, a method for obtaining source location information is provided, wherein the source location information is fixed starting location information or last stop location information, and the method comprises the following steps:

[0005] The trunk road closest to the target geographical area is obtained as the target trunk road.

[0006] A first geohash grid is used to draw a first grid area covering the target geographic area and a road portion of the target trunk road corresponding to the target geographic area.

[0007] A second grid area covering the target geographic area is drawn using a second geohash grid; the size of the second geohash grid is smaller than the size of the first geohash grid.

[0008] The vehicle information whose staying time in the first grid area within a set time period is greater than the preset staying time is obtained as the first information, and the mobile terminal information whose staying time in the second grid area within a set time period is greater than the preset staying time is obtained as the second information.

[0009] The source location information of the vehicle corresponding to the first information is obtained as the first source location information, and the source location information of the mobile terminal corresponding to the second information is obtained as the second source location information.

[0010] If the first number is greater than or equal to the second number, or if the first number is less than the second number but the difference between the first number and the second number is less than a set value, the first source location information is used as the target source location information corresponding to the set time period; wherein the first number is the number of vehicles obtained based on the first information, and the second number is the number of mobile terminals obtained based on the second information.

[0011] If the first number is less than the second number, and the difference between the second number and the first number is greater than a set value, the first grid area is updated based on the second source location information, and the target source location information corresponding to the set time period is determined based on the updated first grid area.

[0012] Optionally, the first geohash grid is determined based on a distance between the target geographic area and the target trunk road.

[0013] Optionally, the first geohash grid is determined based on the following steps:

[0014] Obtain the difference between the side length corresponding to any grid in the preset geohash grid set and the reference distance. If the absolute value of the difference between the side length corresponding to any grid and the reference distance is less than the set difference threshold, use the grid as the first geohash grid, wherein the reference distance is the distance between the target geographic area and the target trunk road.

[0015] Optionally, the updating of the first grid area based on the second source location information, and determining the target source location information corresponding to the set time period based on the updated first grid area, specifically includes the following steps:

[0016] S10: Determine the number of mobile terminals corresponding to all roads outside the current first grid area based on the second source location information.

[0017] S11, based on the number of mobile terminals corresponding to all roads located outside the current first grid area, obtaining a candidate expanded road ID set E, where E includes m candidate expanded road IDs arranged in order, and the number of mobile terminals corresponding to the first candidate expanded road ID of any two adjacent candidate expanded road IDs is greater than the number of mobile terminals corresponding to the second candidate expanded road ID.

[0018] S12, obtaining a grid area in the current first grid area that intersects with the road corresponding to the first candidate expanded road ID in E as the current grid area to be expanded.

[0019] S13, expanding the current grid area to be expanded by a first geohash grid along the direction corresponding to the road corresponding to the first candidate expanded road ID in E, to obtain an updated first grid area as the current first grid area.

[0020] S14, obtain the vehicle information of the vehicle whose stay time in the current first grid area within the set time period is greater than the preset stay time, as the current third information, and obtain the source position information corresponding to the vehicle based on the current third information, as the current third source position information; S15, if the current third number is greater than or equal to the second number, or if the current third number is less than the second number but the difference between the current third number and the second number is less than the set value, use the current third source position information as the target source position information corresponding to the set time period, if the current third number is less than the second number, and the difference between the second number and the current third number is greater than the set value, execute S10; the current third number is the number of vehicles obtained based on the current third information.

[0021] Optionally, the first grid area is obtained by the following steps:

[0022] A bounding box of a combined area formed by a target geographical area and a road portion of the target trunk road corresponding to the target geographical area is obtained as a target bounding box.

[0023] Draw the first geohash grid with the center of the bounding box of the target geographic area as the starting point as the initial grid;

[0024] If the intersection of any to-be-extended edge of any grid to be extended and the area corresponding to the target bounding box belongs to the area corresponding to the target bounding box, extend a grid on the extended edge, and use the grid after the extension of the current grid to be extended as the current grid to be extended, and repeat this step; if the intersection of any to-be-extended edge of any grid to be extended and the area corresponding to the target bounding box does not belong to the area corresponding to the target bounding box, use the area formed by all the grids currently obtained as the first grid area, wherein the to-be-extended edge refers to the edge of the four edges of the grid that is not connected to other grids; the initial value of the current grid to be extended is the initial grid.

[0025] Optionally, the first geohash grid is a 7-bit geohash grid, and the second geohash grid is a 9-bit geohash grid.

[0026] Optionally, the method further includes the following steps:

[0027] The source location information corresponding to the set time period is visually displayed.

[0028] In a second aspect of the present invention, a device for acquiring source location information is provided, wherein the source location information is fixed starting location information or last stop location information, and the device comprises:

[0029] The first acquisition module is used to acquire the trunk road closest to the target geographical area as the target trunk road.

[0030] The first drawing module is used to draw a first grid area covering the target geographical area and a road portion of the target trunk road corresponding to the target geographical area using a first geohash grid.

[0031] The second drawing module is used to draw a second grid area covering the target geographical area using a second geohash grid; the size of the second geohash grid is smaller than the size of the first geohash grid.

[0032] The second acquisition module is used to obtain, as first information, information about vehicles whose stay time in the first grid area is greater than a preset stay time within a set time period, and to obtain, as second information, information about mobile terminals whose stay time in the second grid area is greater than a preset stay time within a set time period.

[0033] The third acquisition module is used to obtain the source location information of the vehicle corresponding to the first information as the first source location information, and to obtain the source location information of the mobile terminal corresponding to the second information as the second source location information.

[0034] A target source location information determination module is used to use the first source location information as the target source location information corresponding to the set time period when it is determined that the first number is greater than or equal to the second number, or when it is determined that the first number is less than the second number but the difference between the first number and the second number is less than a set value, and to update the first grid area based on the second source location information when it is determined that the first number is less than the second number and the difference between the second number and the first number is greater than a set value, and to determine the target source location information corresponding to the set time period based on the updated first grid area, wherein the first number is the number of vehicles obtained based on the first information, and the second number is the number of mobile terminals obtained based on the second information.

[0035] According to a third aspect of the present invention, there is provided an electronic device comprising a processor and a memory; the processor is used to execute the steps of the method described in the first aspect of the present invention by calling a program or instruction stored in the memory.

[0036] According to a fourth aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing a program or instructions, wherein the program or instructions enable a computer to execute the steps of the method described in the first aspect of the present invention.

[0037] The present invention has at least the following beneficial effects:

[0038] The method for acquiring source location information provided by an embodiment of the present invention firstly draws a first grid area covering a target geographical area and a road portion corresponding to the target geographical area in a target trunk road using a first geohash grid, then draws a second grid area covering the target geographical area using a second geohash grid, then obtains information of vehicles whose stay time in the first grid area is greater than a preset stay time within a set time period as first information, obtains information of mobile terminals whose stay time in the second grid area is greater than a preset stay time within a set time period as second information, obtains source location information of vehicles corresponding to the first information as first source location information, and obtains source location information of mobile terminals corresponding to the second information as second source location information, finally, if the first number is greater than or equal to the second number, or if the first number is less than the second number but the difference between the first number and the second number is less than a set value, uses the first source location information as the target source location information corresponding to the set time period, and if the first number is less than the second number and the difference between the second number and the first number is greater than a set value, updates the first grid area based on the second source location information, and determines the target source location information corresponding to the set time period based on the updated first grid area. Since the present invention comprehensively considers the number of vehicles and mobile terminals to determine the source location information, the source location information can be obtained as accurately as possible, so that the tracing result has high reliability.

[0039] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 A flow chart of a method for obtaining source location information provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of the area to be covered on the trunk road in an embodiment of the present invention;

[0043] Figure 3 This is a structural block diagram of a source location information acquisition device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0046] It should be noted that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0047] The embodiment of the present invention provides a method for obtaining source location information. Figure 1 As shown, the method may include the following steps:

[0048] The trunk road closest to the target geographical area is obtained as the target trunk road.

[0049] A first geohash grid is used to draw a first grid area covering the target geographic area and a road portion of the target trunk road corresponding to the target geographic area.

[0050] A second grid area covering the target geographic area is drawn using a second geohash grid; the size of the second geohash grid is smaller than the size of the first geohash grid.

[0051] The vehicle information whose staying time in the first grid area within a set time period is greater than the preset staying time is obtained as the first information, and the mobile terminal information whose staying time in the second grid area within a set time period is greater than the preset staying time is obtained as the second information.

[0052] The source location information of the vehicle corresponding to the first information is obtained as the first source location information, and the source location information of the mobile terminal corresponding to the second information is obtained as the second source location information.

[0053] If the first number is greater than or equal to the second number, or if the first number is less than the second number but the difference between the first number and the second number is less than a set value, the first source location information is used as the target source location information corresponding to the set time period; wherein the first number is the number of vehicles obtained based on the first information, and the second number is the number of mobile terminals obtained based on the second information.

[0054] If the first number is less than the second number, and the difference between the second number and the first number is greater than a set value, the first grid area is updated based on the second source location information, and the target source location information corresponding to the set time period is determined based on the updated first grid area.

[0055] The method for acquiring source location information provided by an embodiment of the present invention firstly draws a first grid area covering a target geographical area and a road portion corresponding to the target geographical area in a target trunk road using a first geohash grid, then draws a second grid area covering the target geographical area using a second geohash grid, then obtains information of vehicles whose stay time in the first grid area is greater than a preset stay time within a set time period as first information, obtains information of mobile terminals whose stay time in the second grid area is greater than a preset stay time within a set time period as second information, obtains source location information of vehicles corresponding to the first information as first source location information, and obtains source location information of mobile terminals corresponding to the second information as second source location information, finally, if the first number is greater than or equal to the second number, or if the first number is less than the second number but the difference between the first number and the second number is less than a set value, uses the first source location information as the target source location information corresponding to the set time period, and if the first number is less than the second number and the difference between the second number and the first number is greater than a set value, updates the first grid area based on the second source location information, and determines the target source location information corresponding to the set time period based on the updated first grid area. Since the present invention comprehensively considers the number of vehicles and mobile terminals to determine the source location information, the source location information can be obtained as accurately as possible, so that the tracing result has high reliability.

[0056] Further, in the embodiment of the present invention, the target geographical area may be an area specified by the user, or a geographical area where a crowd of people gather regularly. In an exemplary embodiment, for example, the target geographical area may be a school, a hospital, or the like.

[0057] In an embodiment of the present invention, the target trunk road may be the trunk road closest to the entrance and exit of the target geographical area. In the case where there are multiple entrances and exits in the target geographical area, the trunk road closest to each entrance and exit may be obtained first, and then the nearest trunk road among all the nearest trunk roads may be used as the target trunk road.

[0058] In the embodiment of the present invention, the distance between the target geographical area and the target trunk road may be a vertical distance between the two.

[0059] It is known to those skilled in the art that any method for obtaining the distance between the target geographical area and the trunk road falls within the protection scope of the present invention.

[0060] Further, in an embodiment of the present invention, the first geohash grid is determined based on the distance between the target geographical area and the target trunk road.

[0061] Further, the first geohash grid may be determined based on the following steps:

[0062] Obtain the difference between the side length corresponding to any grid in the preset geohash grid set and the reference distance. If the absolute value of the difference between the side length corresponding to any grid and the reference distance is less than the set difference threshold, use the grid as the first geohash grid, wherein the reference distance is the distance between the target geographic area and the target trunk road.

[0063] In an embodiment of the present invention, both the first geohash grid and the second geohash grid are square grids. The difference threshold may be set based on actual needs, for example, it may be one D of the side length of the geohash grid to be compared. In an exemplary embodiment, D may be 20. In a specific embodiment, the first geohash grid may be a 7-bit geohash grid. In an embodiment of the present invention, determining the first geohash grid based on the distance between the target geographic area and the target trunk road can make the divided area more accurate.

[0064] In the embodiment of the present invention, the road portion of the target trunk road corresponding to the target geographical area may be a road section located at both ends of the target trunk road and between two closest signal-controlled intersections, such as Figure 2As shown, the section of the target trunk road that needs to be covered is the section between the first signal-controlled intersection L1 and the second signal-controlled intersection L2. The first signal-controlled intersection and the second signal-controlled intersection are respectively located at the two ends of the target trunk road, and there is no signal-controlled intersection between the first signal-controlled intersection and the second signal-controlled intersection.

[0065] The bounding box of the target geographical area may be an enclosing area that encloses the outline of the target geographical area. It is known to those skilled in the art that any method of obtaining the bounding box of the target geographical area falls within the protection scope of the present invention.

[0066] It is known to those skilled in the art that any method for drawing the first grid area falls within the scope of protection of the present invention. For example, in an exemplary embodiment, the center of the first grid area is the center of the bounding box of the target geographic area, that is, the first geohash grid is drawn with the center of the bounding box of the target geographic area as the starting point, and then extended to obtain the first grid area. Specifically, the first grid area can be obtained by the following steps:

[0067] S1, obtaining a bounding box of a combined area formed by a target geographical area and a road portion of the target trunk road corresponding to the target geographical area as a target bounding box.

[0068] S2, drawing a first geohash grid with the center of the bounding box of the target geographic area as the starting point as the initial grid.

[0069] S3, if the intersection of any to-be-extended edge of any grid to be extended and the area corresponding to the target bounding box belongs to the area corresponding to the target bounding box, it means that there is an uncovered area in the target bounding box, then extend a grid on the extended edge, and use the grid after the extension of the current grid to be extended as the current grid to be extended, and execute S3; if the intersection of any to-be-extended edge of any grid to be extended and the area corresponding to the target bounding box does not belong to the area corresponding to the target bounding box, that is, the intersection is outside the target bounding box, it means that all areas in the target bounding box are covered, and use the area formed by all the grids currently obtained as the first grid area. Among them, the to-be-extended edge refers to the edge of the four edges of the grid that is not connected to other grids.

[0070] Those skilled in the art know that the initial value of the current grid to be extended is the initial grid. In another embodiment of the present invention, the center of the first grid area may be the center of the bounding box of the combined area formed by the target geographical area and the road portion of the target trunk road corresponding to the target geographical area, that is, the center of the target bounding box.

[0071] Furthermore, in an exemplary embodiment of the present invention, the second geohash grid may be a 9-digit geohash grid. The second grid area is drawn using a smaller second geohash grid, so that mobile terminals in the target geographic area can be acquired as accurately as possible.

[0072] Those skilled in the art will appreciate that any method of using the second geohash grid to draw a second grid area covering the target geographic area falls within the protection scope of the present invention.

[0073] Furthermore, in the embodiment of the present invention, the duration of the set time period may be a duration specified by the user, such as one day or one month.

[0074] In an embodiment of the present invention, the preset stay time can be set based on actual needs. In an exemplary embodiment, the preset stay time can be 15 minutes.

[0075] In the embodiment of the present invention, the vehicle information may include the vehicle ID, the user ID corresponding to the vehicle, etc. The information of the mobile terminal may include the ID of the mobile terminal and the corresponding user ID, etc. It is known to those skilled in the art that the vehicle information may be determined based on the reported GPS information, etc., and the mobile terminal information may be determined based on the collected wifi information, the shared location information, etc.

[0076] Further, in an embodiment of the present invention, the source location information of the vehicle can be obtained based on the trajectory information of the vehicle, and the source location information of the mobile terminal can be obtained based on the trajectory information of the mobile terminal. The source location information can be set based on actual needs. In an embodiment of the present invention, the source location information can be fixed starting point location information or last stop location information, wherein the fixed starting point location information is location information for a long stay, such as a residence. The fixed starting point position of the vehicle or mobile terminal can be obtained based on the trajectory information collected within a set historical time period, for example, the location where the vehicle or mobile terminal has stayed the most times within the set historical time period. The last stop location of the vehicle or mobile terminal may be a stop location before the target geographical area where the vehicle or mobile terminal stayed for a time period greater than a preset stop time period.

[0077] Further, in the embodiment of the present invention, the set value may be set based on actual needs, for example, may be set to a fixed value, or may be one twentieth of the first number, etc.

[0078] Furthermore, in an embodiment of the present invention, if the first number is smaller than the second number, and the difference between the second number and the first number is greater than a set value, it means that the first grid area may not be divided accurately enough, and there are users who have not parked in the first grid area but have entered the target geographic area. Therefore, the first grid area needs to be updated.

[0079] Further, in an embodiment of the present invention, the updating of the first grid area based on the second source location information, and determining the target source location information corresponding to the set time period based on the updated first grid area may specifically include the following steps:

[0080] S10: Determine the number of mobile terminals corresponding to all roads outside the current first grid area based on the second source location information.

[0081] In the embodiment of the present invention, the number of mobile terminals entering the target geographical area from each road can be known according to the trajectory information of the mobile terminals.

[0082] In the embodiment of the present invention, the initial value of the current first grid area is the first grid area that has not been expanded.

[0083] S11, based on the number of mobile terminals corresponding to all roads outside the current first grid area, obtain a candidate expanded road ID set E, where E includes m candidate expanded road IDs arranged in order, and the number of mobile terminals corresponding to the first candidate expanded road ID of any two adjacent candidate expanded road IDs is greater than the number of mobile terminals corresponding to the second candidate expanded road ID, that is, the road IDs corresponding to all roads outside the current first grid area are sorted in descending order according to the number of corresponding mobile terminals, to obtain E. m≥1.

[0084] In the embodiment of the present invention, the road ID may be a road name or a code of a road name.

[0085] S12, obtaining a grid area in the current first grid area that intersects with the road corresponding to the first candidate expanded road ID in E as the current grid area to be expanded.

[0086] In the embodiment of the present invention, the road corresponding to each road can be obtained based on the corresponding map.

[0087] S13, expanding the current grid area to be expanded by a first geohash grid along the direction corresponding to the road corresponding to the first candidate expanded road ID in E, to obtain an updated first grid area as the current first grid area.

[0088] In the embodiment of the present invention, the direction corresponding to the road corresponding to the first candidate expanded road ID in E may be one of the four directions of east, south, west, and north. For example, if the road corresponding to the first candidate expanded road ID in E is located on the east side of the target geographical area, then a first grid area is added to the current grid area to be expanded along the east side.

[0089] S14, obtaining vehicle information whose stay time in the current first grid area during a set time period is greater than the preset stay time as the current third information, and obtaining source position information corresponding to the vehicle based on the current third information as the current third source position information.

[0090] S15, if the current third number is greater than or equal to the second number, or if the current third number is less than the second number but the difference between the current third number and the second number is less than the set value, use the current third source position information as the target source position information corresponding to the set time period; if the current third number is less than the second number, and the difference between the second number and the current third number is greater than the set value, execute S10; the current third number is the number of vehicles obtained based on the current third information.

[0091] In the embodiment of the present invention, if the current third number is greater than or equal to the second number, or if the current third number is less than the second number but the difference between the current third number and the second number is less than the set value, it means that the number of vehicles in the current first grid area is basically accurate, and the current third source location information can be used as the target source location information corresponding to the set time period. If the current third number is less than the second number, and the difference between the second number and the current third number is greater than the set value, it means that the number of vehicles in the current first grid area may not be accurate, and there may be vehicle information that has not been counted, and the current first grid area needs to be updated continuously.

[0092] Furthermore, the method for obtaining source location information provided by the embodiment of the present invention further includes the following steps:

[0093] The source location information corresponding to the set time period is visually displayed.

[0094] Those skilled in the art will appreciate that any method for visually displaying the source location information corresponding to the set time period falls within the protection scope of the present invention. For example, the corresponding source location information may be displayed on a map with a set mark.

[0095] The source location information acquisition method provided in an embodiment of the present invention can acquire the source location information, i.e., the origin information, of a user traveling to a target geographic area based on vehicle information and mobile terminal information. Since the vehicle information and mobile terminal information are used, the obtained source information can be made more accurate.

[0096] Based on the same inventive concept, an embodiment of the present invention provides a source location information acquisition device, such as Figure 3 As shown, the device comprises:

[0097] The first acquisition module 1 is used to obtain the trunk road closest to the target geographical area as the target trunk road.

[0098] The first drawing module 2 is used to draw a first grid area covering the target geographical area and a road portion of the target trunk road corresponding to the target geographical area using a first geohash grid.

[0099] The second drawing module 3 is used to draw a second grid area covering the target geographical area using a second geohash grid; the size of the second geohash grid is smaller than the size of the first geohash grid.

[0100] The second acquisition module 4 is used to obtain, as first information, information about vehicles whose stay time in the first grid area is greater than a preset stay time within a set time period, and to obtain, as second information, information about mobile terminals whose stay time in the second grid area is greater than a preset stay time within a set time period.

[0101] The third acquisition module 5 is used to acquire the source location information of the vehicle corresponding to the first information as the first source location information, and to acquire the source location information of the mobile terminal corresponding to the second information as the second source location information.

[0102] The target source location information determination module 6 is used to use the first source location information as the target source location information corresponding to the set time period when it is determined that the first number is greater than or equal to the second number, or when it is determined that the first number is less than the second number but the difference between the first number and the second number is less than a set value, and to update the first grid area based on the second source location information when it is determined that the first number is less than the second number and the difference between the second number and the first number is greater than a set value, and to determine the target source location information corresponding to the set time period based on the updated first grid area, wherein the first number is the number of vehicles obtained based on the first information, and the second number is the number of mobile terminals obtained based on the second information.

[0103] Further, in the embodiment of the present invention, the target geographical area may be an area specified by the user, or a geographical area where a crowd of people gather regularly. In an exemplary embodiment, for example, the target geographical area may be a school, a hospital, or the like.

[0104] In an embodiment of the present invention, the target trunk road may be the trunk road closest to the entrance and exit of the target geographical area. In the case where there are multiple entrances and exits in the target geographical area, the trunk road closest to each entrance and exit may be obtained first, and then the nearest trunk road among all the nearest trunk roads may be used as the target trunk road.

[0105] In the embodiment of the present invention, the distance between the target geographical area and the target trunk road may be a vertical distance between the two.

[0106] It is known to those skilled in the art that any method for obtaining the distance between the target geographical area and the trunk road falls within the protection scope of the present invention.

[0107] Further, in an embodiment of the present invention, the first geohash grid is determined based on the distance between the target geographical area and the target trunk road.

[0108] Furthermore, the first drawing module 2 is specifically used for:

[0109] Obtain the difference between the side length corresponding to any grid in the preset geohash grid set and the reference distance. If the absolute value of the difference between the side length corresponding to any grid and the reference distance is less than the set difference threshold, use the grid as the first geohash grid, where the reference distance is the distance between the target geographical area and the target trunk road. In an embodiment of the present invention, the set difference threshold can be set based on actual needs, for example, it can be one D of the side length of the geohash grid to be compared. In an illustrative embodiment, D can be 20. In a specific embodiment, the first geohash grid can be a 7-bit geohash grid.

[0110] In the embodiment of the present invention, the first geohash grid is determined based on the distance between the target geographical area and the target trunk road, so that the divided area can be more accurate.

[0111] In the embodiment of the present invention, the road portion of the target trunk road corresponding to the target geographical area may be a road section located at both ends of the target trunk road and between two closest signal-controlled intersections, such as Figure 2 As shown, the section of the target trunk road that needs to be covered is the section between the first signal-controlled intersection L1 and the second signal-controlled intersection L2. The first signal-controlled intersection and the second signal-controlled intersection are respectively located at the two ends of the target trunk road, and there is no signal-controlled intersection between the first signal-controlled intersection and the second signal-controlled intersection.

[0112] The bounding box of the target geographical area may be an enclosing area that encloses the outline of the target geographical area. It is known to those skilled in the art that any method of obtaining the bounding box of the target geographical area falls within the protection scope of the present invention.

[0113] It is known to those skilled in the art that any method for drawing the first grid area falls within the scope of protection of the present invention. For example, in an exemplary embodiment, the center of the first grid area is the center of the bounding box of the target geographic area, that is, the first geohash grid is drawn with the center of the bounding box of the target geographic area as the starting point, and then extended to obtain the first grid area. Specifically, the first grid area can be obtained by the following steps:

[0114] S1, obtaining a bounding box of a combined area formed by a target geographical area and a road portion of the target trunk road corresponding to the target geographical area as a target bounding box;

[0115] S2, drawing a first geohash grid with the center of the bounding box of the target geographic area as the starting point as the initial grid;

[0116] S3, if the intersection of any to-be-extended edge of any grid to be extended and the area corresponding to the target bounding box belongs to the area corresponding to the target bounding box, it means that there is an uncovered area in the target bounding box, then extend a grid on the extended edge, and use the grid after the extension of the current grid to be extended as the current grid to be extended, and execute S3; if the intersection of any to-be-extended edge of any grid to be extended and the area corresponding to the target bounding box does not belong to the area corresponding to the target bounding box, that is, the intersection is outside the target bounding box, it means that all areas in the target bounding box are covered, and use the area formed by all the grids currently obtained as the first grid area. Among them, the to-be-extended edge refers to the edge of the four edges of the grid that is not connected to other grids.

[0117] Those skilled in the art know that the initial value of the grid to be extended is the initial grid.

[0118] In another embodiment of the present invention, the center of the first grid area may be the center of a bounding box of a combined area formed by the target geographical area and a road portion of the target trunk road corresponding to the target geographical area.

[0119] Furthermore, in an exemplary embodiment of the present invention, the second geohash grid may be a 9-digit geohash grid. The second grid area is drawn using a smaller second geohash grid, so that mobile terminals in the target geographic area can be acquired as accurately as possible.

[0120] Those skilled in the art will appreciate that any method of using the second geohash grid to draw a second grid area covering the target geographic area falls within the protection scope of the present invention.

[0121] Furthermore, in the embodiment of the present invention, the duration of the set time period may be a duration specified by the user, such as one day or one month.

[0122] In an embodiment of the present invention, the preset stay time can be set based on actual needs. In an exemplary embodiment, the preset stay time can be 15 minutes.

[0123] In the embodiment of the present invention, the vehicle information may include the vehicle ID, the user ID corresponding to the vehicle, etc. The information of the mobile terminal may include the ID of the mobile terminal and the corresponding user ID, etc. It is known to those skilled in the art that the vehicle information may be determined based on the reported GPS information, etc., and the mobile terminal information may be determined based on the collected wifi information, the shared location information, etc.

[0124] Further, in an embodiment of the present invention, the source location information of the vehicle can be obtained based on the trajectory information of the vehicle, and the source location information of the mobile terminal can be obtained based on the trajectory information of the mobile terminal. The source location information can be set based on actual needs. In an embodiment of the present invention, the source location information can be fixed starting point location information or last stop location information, wherein the fixed starting point location information is location information for a long stay, such as a residence. The fixed starting point position of the vehicle or mobile terminal can be obtained based on the trajectory information collected within a set historical time period, for example, the location where the vehicle or mobile terminal has stayed the most times within the set historical time period. The last stop location of the vehicle or mobile terminal may be a stop location before the target geographical area where the vehicle or mobile terminal stayed for a time period greater than a preset stop time period.

[0125] Further, in the embodiment of the present invention, the set value may be set based on actual needs, for example, may be set to a fixed value, or may be one twentieth of the first number, etc.

[0126] Furthermore, in an embodiment of the present invention, if the first number is smaller than the second number, and the difference between the second number and the first number is greater than a set value, it means that the first grid area may not be divided accurately enough, and there are users who have not parked in the first grid area but have entered the target geographic area. Therefore, the first grid area needs to be updated.

[0127] Further, in an embodiment of the present invention, the updating of the first grid area based on the second source location information, and determining the target source location information corresponding to the set time period based on the updated first grid area may specifically include the following steps:

[0128] S10: Determine the number of mobile terminals corresponding to all roads outside the current first grid area based on the second source location information.

[0129] In the embodiment of the present invention, the number of mobile terminals entering the target geographical area from each road can be known according to the trajectory information of the mobile terminals.

[0130] In the embodiment of the present invention, the initial value of the current first grid area is the first grid area that has not been expanded.

[0131] S11, based on the number of mobile terminals corresponding to all roads outside the current first grid area, obtain a candidate expanded road ID set E, where E includes m candidate expanded road IDs arranged in order, and the number of mobile terminals corresponding to the first candidate expanded road ID of two adjacent candidate expanded road IDs is greater than the number of mobile terminals corresponding to the second candidate expanded road ID, that is, the road IDs corresponding to all roads outside the current first grid area are sorted in descending order according to the number of corresponding mobile terminals, to obtain E. m≥1.

[0132] In the embodiment of the present invention, the road ID may be a road name or a code of a road name.

[0133] S12, obtaining a grid area in the current first grid area that intersects with the road corresponding to the first candidate expanded road ID in E as the current grid area to be expanded.

[0134] In the embodiment of the present invention, the road area corresponding to each road can be obtained based on the corresponding map.

[0135] S13, expanding the current grid area to be expanded by a first geohash grid along the direction corresponding to the road corresponding to the first candidate expanded road ID in E, to obtain an updated first grid area as the current first grid area.

[0136] In the embodiment of the present invention, the direction corresponding to the road corresponding to the first candidate expanded road ID in E may be one of the four directions of east, south, west, and north. For example, if the road corresponding to the first candidate expanded road ID in E is located on the east side of the target geographical area, then a first grid area is added to the current grid area to be expanded along the east side.

[0137] S14, obtaining vehicle information whose stay time in the current first grid area during a set time period is greater than the preset stay time as the current third information, and obtaining source position information corresponding to the vehicle based on the current third information as the current third source position information.

[0138] S15, if the current third number is greater than or equal to the second number, or if the current third number is less than the second number but the difference between the current third number and the second number is less than the set value, use the current third source position information as the target source position information corresponding to the set time period; if the current third number is less than the second number, and the difference between the second number and the current third number is greater than the set value, execute S10; the current third number is the number of vehicles obtained based on the current third information.

[0139] In the embodiment of the present invention, if the current third number is greater than or equal to the second number, or if the current third number is less than the second number but the difference between the current third number and the second number is less than the set value, it means that the number of vehicles in the current first grid area is basically accurate, and the current third source location information can be used as the target source location information corresponding to the set time period. If the current third number is less than the second number, and the difference between the second number and the current third number is greater than the set value, it means that the number of vehicles in the current first grid area may not be accurate, and there may be vehicle information that has not been counted, and the current first grid area needs to be updated continuously.

[0140] Furthermore, the method for obtaining source location information provided by the embodiment of the present invention further includes the following steps:

[0141] The source location information corresponding to the set time period is visually displayed.

[0142] Those skilled in the art will appreciate that any method for visually displaying the source location information corresponding to the set time period falls within the protection scope of the present invention. For example, the corresponding source location information may be displayed on a map with a set mark.

[0143] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method described in the embodiment of the present invention.

[0144] The embodiment of the present invention further provides a non-transitory computer-readable storage medium storing computer-executable instructions, wherein the computer instructions are used to execute the method described in the embodiment of the present invention.

[0145] 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 described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.

[0146] The above specific implementations do not constitute a limitation on the protection scope of the present invention. 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 invention should be included in the protection scope of the present invention.

Claims

1. A method for obtaining source location information, characterized in that: The source location information is fixed starting location information or last stop location information, and the method comprises the following steps: Obtain the trunk road closest to the target geographical area as the target trunk road; Drawing a first grid area covering the target geographic area and a road portion of the target trunk road corresponding to the target geographic area using a first geohash grid; Using a second geohash grid to draw a second grid area covering the target geographic area; the size of the second geohash grid is smaller than the size of the first geohash grid; the first geohash grid and the second geohash grid are both square grids; Acquire information of vehicles whose stay time in the first grid area is longer than a preset stay time within a set time period as first information, and acquire information of mobile terminals whose stay time in the second grid area is longer than a preset stay time within a set time period as second information; Acquire source location information of the vehicle corresponding to the first information as first source location information, and acquire source location information of the mobile terminal corresponding to the second information as second source location information; If the first number is greater than or equal to the second number, or if the first number is less than the second number but the difference between the first number and the second number is less than a set value, the first source location information is used as the target source location information corresponding to the set time period; wherein the first number is the number of vehicles obtained based on the first information, and the second number is the number of mobile terminals obtained based on the second information; If the first number is less than the second number, and the difference between the second number and the first number is greater than a set value, updating the first grid area based on the second source location information, and determining the target source location information corresponding to the set time period based on the updated first grid area; wherein the first geohash grid is determined based on the distance between the target geographic area and the target trunk road; The first geohash grid is determined based on the following steps: Obtain the difference between the side length corresponding to any grid in the preset geohash grid set and the reference distance. If the absolute value of the difference between the side length corresponding to any grid and the reference distance is less than the set difference threshold, use the grid as the first geohash grid, wherein the reference distance is the distance between the target geographic area and the target trunk road.

2. The method according to claim 1, characterized in that: The updating of the first grid area based on the second source location information, and determining the target source location information corresponding to the set time period based on the updated first grid area, specifically includes the following steps: S10, determining the number of mobile terminals corresponding to all roads outside the current first grid area based on the second source location information; S11, based on the number of mobile terminals corresponding to all roads outside the current first grid area, obtaining a candidate expanded road ID set E, where E includes m candidate expanded road IDs arranged in order, and the number of mobile terminals corresponding to the first candidate expanded road ID of any two adjacent candidate expanded road IDs is greater than the number of mobile terminals corresponding to the second candidate expanded road ID; S12, obtaining a grid area in the current first grid area that intersects with the road corresponding to the first candidate expanded road ID in E as the current grid area to be expanded; S13, expanding the current grid area to be expanded by a first geohash grid along the direction corresponding to the road corresponding to the first candidate expanded road ID in E, to obtain an updated first grid area as the current first grid area; S14, obtaining information about a vehicle whose stay time in the current first grid area is greater than a preset stay time within a set time period as current third information, and obtaining source position information corresponding to the vehicle based on the current third information as current third source position information; S15, if the current third number is greater than or equal to the second number, or if the current third number is less than the second number but the difference between the current third number and the second number is less than the set value, use the current third source position information as the target source position information corresponding to the set time period; if the current third number is less than the second number, and the difference between the second number and the current third number is greater than the set value, execute S10; the current third number is the number of vehicles obtained based on the current third information.

3. The method according to claim 1, characterized in that The first grid area is obtained by the following steps: Acquire a bounding box of a combined area formed by a target geographical area and a road portion of the target trunk road corresponding to the target geographical area as a target bounding box; Draw the first geohash grid with the center of the bounding box of the target geographic area as the starting point as the initial grid; If the intersection of any to-be-extended edge of any grid in the current grid to be extended and the area corresponding to the target bounding box belongs to the area corresponding to the target bounding box, then extend a grid on the extended edge, and use the grid after the extension of the current grid to be extended as the current grid to be extended, and repeat this step; If the intersection of any to-be-extended edge of any grid among the grids to be extended and the area corresponding to the target bounding box does not belong to the area corresponding to the target bounding box, the area formed by all the currently obtained grids is used as the first grid area, wherein the to-be-extended edge refers to an edge among the four edges of the grid that is not connected to other grids; The initial value of the grid to be extended is the initial grid.

4. The method according to claim 1, characterized in that The first geohash grid is a 7-bit geohash grid, and the second geohash grid is a 9-bit geohash grid.

5. The method according to claim 1, characterized in that The following steps are also included: The source location information corresponding to the set time period is visually displayed.

6. A source location information acquisition device, characterized in that: The source location information is fixed starting location information or last stop location information, and the device includes: A first acquisition module is used to acquire the trunk road closest to the target geographical area as the target trunk road; A first drawing module, configured to draw a first grid area covering the target geographical area and a road portion of the target trunk road corresponding to the target geographical area using a first geohash grid; A second drawing module is used to draw a second grid area covering the target geographical area using a second geohash grid; the size of the second geohash grid is smaller than the size of the first geohash grid; A second acquisition module is used to acquire, as first information, information about vehicles that have stayed in the first grid area for a time period longer than a preset stay time within a set time period, and to acquire, as second information, information about mobile terminals that have stayed in the second grid area for a time period longer than a preset stay time within a set time period; a third acquisition module, configured to acquire source location information of a vehicle corresponding to the first information as first source location information, and to acquire source location information of a mobile terminal corresponding to the second information as second source location information; a target source location information determination module, configured to, when it is determined that the first number is greater than or equal to the second number, or when it is determined that the first number is less than the second number but the difference between the first number and the second number is less than a set value, use the first source location information as the target source location information corresponding to the set time period, and when it is determined that the first number is less than the second number and the difference between the second number and the first number is greater than a set value, update the first grid area based on the second source location information, and determine the target source location information corresponding to the set time period based on the updated first grid area, wherein the first number is the number of vehicles obtained based on the first information, and the second number is the number of mobile terminals obtained based on the second information; wherein the first geohash grid is determined based on the distance between the target geographic area and the target trunk road; The first geohash grid is determined based on the following steps: Obtain the difference between the side length corresponding to any grid in the preset geohash grid set and the reference distance. If the absolute value of the difference between the side length corresponding to any grid and the reference distance is less than the set difference threshold, use the grid as the first geohash grid, wherein the reference distance is the distance between the target geographic area and the target trunk road.

7. An electronic device, characterized in that: including a processor and a memory; The processor is used to execute the steps of the method according to any one of claims 1 to 5 by calling the program or instruction stored in the memory.

8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store a program or instruction, and the program or instruction enables a computer to execute the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Information processing method and device, terminal and readable storage medium

    CN110796278A

  • Destination prediction method and device and vehicle

    CN115083147A