A method, device, medium and equipment for calculating commercial vehicle transportation routes
By clustering and regional path construction of the parking locations of commercial vehicles, and calculating the transportation routes with the retention time, the problem of frequent changes in the transportation routes for commercial vehicles is solved, and accurate transportation route data support is provided.
Patent Information
- Application Number
- CN202411095222.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-12
AI Technical Summary
In the transportation industry, commercial vehicles cannot accurately obtain transportation route information due to frequent changes in transportation routes, which cannot meet the needs of the logistics and transportation industry.
By obtaining multiple parking positions of commercial vehicles, clustering to obtain the cluster center point, determining the regional information of the cluster center point, constructing a continuous region path based on time continuity and spatial continuity, and calculating the transportation route based on the retention time.
It realizes accurate calculation of commercial vehicle transportation routes, provides accurate basic data support for commercial vehicles, and meets the needs of the logistics and transportation industry.
Smart Images

Figure CN118627715B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of commercial vehicle data mining, and in particular to a method, device, medium and equipment for calculating a commercial vehicle transportation route. Background Art
[0002] Due to the high transportation efficiency of commercial vehicles, there is a great demand for commercial vehicle services in the transportation industry, but commercial vehicles have different transportation responsibilities in different transportation industries. In actual business development, the transportation industry and cargo types of commercial vehicles receive more attention in order to provide accurate and effective value-added services to drivers or commercial vehicles.
[0003] When the transportation industry of commercial vehicles is fixed, commercial vehicles can deliver goods along the same driving route every time. However, when the transportation industry of commercial vehicles changes, for example, some commercial vehicles do not have a fixed delivery source, resulting in commercial vehicles delivering goods along different driving routes every time. When the driving routes of commercial vehicles are different, it is impossible to accurately obtain the transportation route information of commercial vehicles, which cannot meet the needs of the logistics and transportation industry. Therefore, a method that can accurately calculate the transportation route of commercial vehicles is needed. Summary of the invention
[0004] In order to solve the above technical problems, the present application is proposed. The embodiments of the present application provide a method, device, medium and equipment for calculating a commercial vehicle transportation route.
[0005] According to one aspect of the present application, a method for calculating a commercial vehicle transportation route is provided, comprising: acquiring multiple parking locations of a target commercial vehicle; clustering the multiple parking locations to obtain multiple cluster center points of the target commercial vehicle; determining regional information corresponding to the multiple cluster center points; wherein the regional information includes the provincial and municipal locations of the cluster center points and the length of time the target commercial vehicle stays at the corresponding provincial and municipal locations, and each provincial and municipal location corresponds to one cluster center point; based on time continuity and spatial continuity, the provincial and municipal locations of the multiple cluster center points are connected in series to construct a continuous regional path of the target commercial vehicle; and based on the continuous regional path and the length of time the target commercial vehicle stays at the corresponding provincial and municipal locations, the transportation route of the target commercial vehicle is calculated.
[0006] In one embodiment, the calculation of the transportation route of the target commercial vehicle based on the continuous regional path and the length of time the target commercial vehicle stays at the corresponding provincial and municipal location includes: calculating a first deviation angle between adjacent line segments based on the continuous regional path; wherein the line segment is a line connecting adjacent cluster center points on the continuous regional path; calculating a second deviation angle between each line segment and an initial line segment based on the continuous regional path; wherein the initial line segment is a line connecting an initial cluster center point and adjacent cluster center points on the continuous regional path; calculating the transportation route of the target commercial vehicle based on the first deviation angle, the second deviation angle and the length of time the target commercial vehicle stays at the corresponding provincial and municipal location.
[0007] In one embodiment, the calculation of the transportation route of the target commercial vehicle based on the first deflection angle, the second deflection angle and the retention time of the target commercial vehicle at the corresponding province or city includes: if the first deflection angle between the current line segment and the preceding line segment of the current line segment is less than a preset first angle threshold, the second deflection angle between the current line segment and the initial line segment is less than a preset second angle threshold and the retention time of the target commercial vehicle at the corresponding province or city is less than a preset time threshold, then determining that the current line segment is a segment of the transportation route of the target commercial vehicle; wherein the first angle threshold is less than the second angle threshold.
[0008] In one embodiment, after calculating the transportation route of the target commercial vehicle based on the continuous regional path and the length of time the target commercial vehicle stays in the corresponding province or city, the method for calculating the commercial vehicle transportation route further includes: eliminating incomplete routes in the transportation route based on a query time range.
[0009] In one embodiment, the eliminating incomplete routes in the transportation route based on the query time range includes: if a first time difference between the starting time of the transportation route within the query time range and the starting time of the query time is less than a first preset time, or a second time difference between the ending time of the transportation route within the query time range and the ending time of the query time is less than a second preset time, then determining that the transportation route is an incomplete route and eliminating the transportation route.
[0010] In one embodiment, clustering the multiple parking positions to obtain multiple cluster center points of the target commercial vehicle includes: randomly selecting a target parking position from the unclustered parking positions, and obtaining a first parking position to be allocated whose distance from the target parking position in the unclustered parking positions is less than a preset distance threshold; if the number of the first parking positions to be allocated is greater than a preset number threshold, allocating the target parking position and the first parking positions to be allocated into a new cluster; respectively obtaining a second parking position to be allocated whose distance from the first parking position to be allocated in the unclustered parking positions is less than the distance threshold; allocating the second parking position to be allocated to the new cluster; selecting the new cluster containing the most parking positions in the same province or city as the target cluster; calculating the center point of the target cluster to obtain the cluster center point of the target commercial vehicle.
[0011] In one embodiment, determining the area information corresponding to the multiple cluster center points includes: calculating the number of intersections between the ray endpoints with the cluster center point and the boundary polygons of the provincial and municipal areas; and determining the provincial and municipal locations of the cluster center points based on the number of intersections.
[0012] According to another aspect of the present application, a device for calculating a commercial vehicle transportation route is provided, comprising: a parking position acquisition module for acquiring multiple parking positions of a target commercial vehicle; a parking position clustering module for clustering the multiple parking positions to obtain multiple cluster center points of the target commercial vehicle; an area information determination module for determining area information corresponding to the multiple cluster center points; wherein the area information includes the provincial and municipal positions of the cluster center points and the length of time the target commercial vehicle stays at the corresponding provincial and municipal positions, and each provincial and municipal position corresponds to one cluster center point; an area path construction module for serially connecting the provincial and municipal positions of the multiple cluster center points to construct a continuous area path of the target commercial vehicle based on time continuity and spatial continuity; and a transportation route calculation module for calculating the transportation route of the target commercial vehicle based on the continuous area path and the length of time the target commercial vehicle stays at the corresponding provincial and municipal positions.
[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute any of the above-mentioned methods for calculating a commercial vehicle transport route.
[0014] According to another aspect of the present application, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; and the processor is used to execute any of the above-mentioned methods for calculating a commercial vehicle transport route.
[0015] The present application provides a method, device, medium and equipment for calculating a commercial vehicle transportation route, which obtains multiple parking positions of a target commercial vehicle; clusters the multiple parking positions to obtain multiple cluster center points of the target commercial vehicle; determines the regional information corresponding to the multiple cluster center points; wherein the regional information includes the provincial and municipal positions of the cluster center points and the retention time of the target commercial vehicle at the corresponding provincial and municipal positions; based on time continuity and spatial continuity, the provincial and municipal positions of the multiple cluster center points are connected in series to construct a continuous regional path of the target commercial vehicle; according to the continuous regional path and the retention time of the target commercial vehicle at the corresponding provincial and municipal positions, the transportation route of the target commercial vehicle is calculated; that is, by obtaining the parking positions of the target commercial vehicle and clustering the parking positions to obtain the cluster center points, determining the regional information according to the cluster center points, connecting the cluster center points in series to construct the regional path and calculating the transportation route in combination with the retention time of the target commercial vehicle, so as to accurately calculate the transportation route of the target commercial vehicle for a single transportation task, and provide accurate basic data support for subsequent value-added services of commercial vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0017] Figure 1 It is a flowchart of a method for calculating a commercial vehicle transportation route provided by an exemplary embodiment of the present application.
[0018] Figure 2 It is a schematic diagram of the structure of a device for calculating a commercial vehicle transport route provided by an exemplary embodiment of the present application.
[0019] Figure 3 It is a structural diagram of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0020] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0021] Figure 1 FIG. 1 is a flow chart of a method for calculating a commercial vehicle transport route provided by an exemplary embodiment of the present application. Figure 1 As shown, the calculation method of the commercial vehicle transportation route includes the following steps:
[0022] Step 110: Acquire multiple parking locations of the target commercial vehicle.
[0023] This application determines the transportation path of the target commercial vehicle by obtaining multiple parking positions of the target commercial vehicle during transportation. Specifically, this application obtains the operation information of the target commercial vehicle through the Internet of Vehicles big data, including vehicle VIN, collection time, longitude, latitude, cumulative mileage and other information. Since there is a slight offset in the longitude and latitude data in the reported Internet of Vehicles data when the target commercial vehicle is parked, this application regards the data of the target commercial vehicle exceeding a certain time range (for example, 9 minutes) and the moving distance less than a certain length range (for example, 30 meters) as a parking position.
[0024] Step 120: Cluster multiple parking locations to obtain multiple cluster center points of the target commercial vehicle.
[0025] After obtaining multiple parking positions of the target commercial vehicle, the present application performs clustering calculations on the multiple parking positions to allocate multiple similar parking positions to a cluster group, thereby reducing the amount of calculations. Specifically, the present application uses the DBSCAN clustering algorithm to perform clustering calculations on the parking positions, and after obtaining the cluster groups, saves the longitude and latitude of the center point of each cluster group and the number of parking positions in the cluster group.
[0026] Step 130: Determine the region information corresponding to the multiple cluster center points.
[0027] Among them, the regional information includes the provincial and municipal location of the cluster center point and the retention time of the target commercial vehicle in the corresponding provincial and municipal location, and each provincial and municipal location corresponds to a cluster center point. After clustering, this application determines the regional information of the cluster center point according to the location information of the cluster center point of each cluster group, including the provincial and municipal location of the cluster center point and the retention time of the target commercial vehicle in the corresponding provincial and municipal location. Specifically, in this application, each provincial and municipal location only retains one cluster and the corresponding cluster center point as representatives, and the retention time of the target commercial vehicle in the provincial and municipal location is equal to the time of the target commercial vehicle in the last parking position in the province and city minus the time of the first parking position in the province and city.
[0028] Step 140: Based on temporal continuity and spatial continuity, the provincial and municipal locations of multiple cluster center points are connected in series to construct a continuous regional path for the target commercial vehicle.
[0029] After determining the regional information corresponding to all cluster center points of the target commercial vehicle, this application connects the provincial and municipal locations of multiple cluster center points in series based on time continuity and spatial continuity to construct a continuous regional path for the target commercial vehicle (i.e., a path formed by connecting multiple cluster center points). Specifically, this application combines and analyzes parking locations in the same province and city under continuous time to construct a province and city dictionary for the target commercial vehicle, which includes the time of entering the first parking location in the province and city, the time of leaving the last parking location in the province and city, the accumulated mileage from the first parking location to the last parking location, the maximum number of parking locations contained in the cluster corresponding to the parking location in the province and city, and the longitude and latitude of the corresponding cluster center point.
[0030] Step 150: Calculate the transportation route of the target commercial vehicle based on the continuous regional path and the retention time of the target commercial vehicle in the corresponding province or city.
[0031] Since the target commercial vehicle will start the next transport task at the end point of the task after completing a transport task, after obtaining the continuous regional path, the application combines the target commercial vehicle's retention time in the corresponding province and city to determine whether the continuous regional path is the transport route corresponding to the same transport task, thereby breaking down the target commercial vehicle's transport task into transport routes corresponding to a single transport task, so as to facilitate the subsequent analysis of the commercial vehicle's transport route and avoid mutual interference between transport routes corresponding to multiple transport tasks and affect the subsequent analysis.
[0032] The present application provides a method for calculating a commercial vehicle transportation route, which comprises acquiring multiple parking positions of a target commercial vehicle; clustering the multiple parking positions to obtain multiple cluster center points of the target commercial vehicle; determining the regional information corresponding to the multiple cluster center points; wherein the regional information includes the provincial and municipal positions of the cluster center points and the retention time of the target commercial vehicle at the corresponding provincial and municipal positions; based on time continuity and space continuity, connecting the provincial and municipal positions of the multiple cluster center points in series to construct a continuous regional path of the target commercial vehicle; and calculating the transportation route of the target commercial vehicle according to the continuous regional path and the retention time of the target commercial vehicle at the corresponding provincial and municipal positions; that is, acquiring the parking positions of the target commercial vehicle and clustering the parking positions to obtain the cluster center points, determining the regional information according to the cluster center points, connecting the cluster center points in series to construct the regional path and calculating the transportation route in combination with the retention time of the target commercial vehicle, so as to accurately calculate the transportation route of the target commercial vehicle for a single transportation task, thereby providing accurate basic data support for subsequent value-added services of commercial vehicles.
[0033] In one embodiment, the specific implementation method of the above step 150 may be: according to the continuous area path, calculating the first deviation angle between adjacent line segments; wherein the line segment is a line connecting adjacent cluster center points on the continuous area path; according to the continuous area path, calculating the second deviation angle between each line segment and the initial line segment; wherein the initial line segment is a line connecting the initial cluster center point and its adjacent cluster center points on the continuous area path; according to the first deviation angle, the second deviation angle and the length of time the target commercial vehicle stays at the corresponding province or city, calculating the transportation route of the target commercial vehicle.
[0034] Specifically, if the first deviation angle between the current line segment and the preceding line segment of the current line segment is less than the preset first angle threshold, the second deviation angle between the current line segment and the initial line segment is less than the preset second angle threshold, and the target commercial vehicle's retention time at the corresponding province or city is less than the preset time threshold, then the current line segment is determined to be a section of the transportation route of the target commercial vehicle; wherein the first angle threshold is less than the second angle threshold.
[0035] This application determines the starting point and end point of the transportation route through two conditions: one is the deviation angle between the current line segment where the current cluster center point is located and the previous line segment and the initial line segment; the second is to determine the length of time the target commercial vehicle stays at the provincial and municipal locations. Specifically, if the first deviation angle between the current line segment and the previous line segment is less than the first angle threshold (for example, ±100°), and the second deviation angle between the current line segment and the initial line segment is less than the second angle threshold (for example, ±130°), it means that the target commercial vehicle's driving direction in the current line segment is roughly consistent with the previous driving direction (taking into account the curvature of the driving road). If the first deviation angle between the current line segment and the previous line segment is greater than or equal to the first angle threshold, or the second deviation angle between the current line segment and the initial line segment is greater than or equal to the second angle threshold, it means that the target commercial vehicle's driving direction in the current line segment is inconsistent with the previous driving direction. At this time, it can be determined that the target commercial vehicle has started a new transportation task at the endpoint of the current line segment. If the target commercial vehicle stays in a province or city for a period greater than or equal to a preset time threshold (for example, more than 24 hours), it means that the cluster center point corresponding to the province or city is the end point of the previous transportation task or the starting point of the next transportation task of the target commercial vehicle.
[0036] In one embodiment, after step 150, the method for calculating the commercial vehicle transportation route may further include: eliminating incomplete routes in the transportation route based on the query time range.
[0037] Specifically, if a first time difference between the starting time of the transportation route within the query time range and the start time of the query time is less than a first preset time, or a second time difference between the end time of the transportation route within the query time range and the end time of the query time is less than a second preset time, the transportation route is determined to be an incomplete route and the transportation route is eliminated.
[0038] Since the vehicle data of the target commercial vehicle for a period of time (such as a month, a quarter, etc.) is usually queried, the first and last pieces of the vehicle data may be incomplete routes. This application determines whether the first route and the last route are complete routes by comparing the relationship between the starting time of the first route and the end time of the last route with the query time range. Specifically, if the first time difference between the starting time of the first route and the start time of the query time is less than the first preset time (such as 24 hours), it is considered that the first route is not a complete route and the route should be eliminated; similarly, if the second time difference between the end time of the last route and the end time of the query time is less than the second preset time (such as 24 hours), it is considered that the last route is not a complete route and the route should be eliminated.
[0039] In one embodiment, the specific implementation method of the above step 120 may be: randomly select a target parking position from the unclustered parking positions, and obtain a first parking position to be allocated whose distance from the target parking position in the unclustered parking positions is less than a preset distance threshold; if the number of the first parking positions to be allocated is greater than the preset number threshold, the target parking position and the first parking position to be allocated are allocated as a new cluster; respectively obtain a second parking position to be allocated whose distance from the first parking position to be allocated in the unclustered parking positions is less than the distance threshold; allocate the second parking position to be allocated to the new cluster; select the new cluster containing the most parking positions in the same province or city as the target cluster; calculate the center point of the target cluster to obtain the cluster center point of the target commercial vehicle.
[0040] Specifically, the present application adopts 550 meters as the preset distance threshold. In order to ensure that no single parking position is removed as a noise point in the clustering result, the present application sets the quantity threshold to 1. The present application selects any parking position from the parking positions that are not clustered as the target parking position, searches for parking positions (first parking positions to be allocated) that are not clustered within the distance threshold of the target parking position, and if the number of the searched first parking positions to be allocated is greater than or equal to 1, a new cluster is assigned to the target parking position and the corresponding first parking position to be allocated, and the first parking position to be allocated is used as the new target parking position to search for parking positions (second parking positions to be allocated) that are not clustered within the distance threshold. If there is a second parking position to be allocated, the second parking position to be allocated is added to the new cluster until there is no first parking position to be allocated and the second parking position to be allocated, thereby obtaining a new cluster. After the clustering is completed, the new cluster containing the most parking positions in the same province or city is selected as the target cluster; the center point of the target cluster is calculated to obtain the cluster center point of the new cluster. Then, another parking position that has not been clustered is selected as a new target parking position, and the above process is repeated until all parking positions of the target commercial vehicle are clustered.
[0041] In one embodiment, the specific implementation method of the above step 130 can be: calculate the number of intersections between the ray endpoints with the cluster center point and the boundary polygons of the provincial and municipal areas; and determine the provincial and municipal location of the target commercial vehicle based on the number of intersections.
[0042] The ray method is an algorithm used to determine whether the endpoint of a ray is inside a polygon. The basic idea is to launch a ray from the point to be judged, and determine the number of intersections between the ray and each side of the polygon to determine the positional relationship of the point. The present application launches a ray with the cluster center point as the ray endpoint, and calculates the number of intersections between the ray and the provincial and municipal boundary polygon. Specifically, first select the direction of the ray, such as the horizontal direction or other arbitrary direction, and then traverse each side of the provincial and municipal boundary polygon to determine whether the ray intersects with the corresponding side and record the number of intersections. Finally, determine whether the cluster center point is located inside the provincial and municipal boundary polygon based on the parity of the number of intersections (i.e., the number of intersections). An odd number of intersections indicates that the cluster center point is located inside the provincial and municipal boundary polygon, otherwise it is not located inside the provincial and municipal boundary polygon.
[0043] Figure 2 FIG. 1 is a schematic diagram of a structure of a device for calculating a commercial vehicle transport route provided by an exemplary embodiment of the present application. Figure 2As shown, the calculation device 20 for the commercial vehicle transportation route includes: a parking position acquisition module 21, which is used to obtain multiple parking positions of the target commercial vehicle; a parking position clustering module 22, which is used to cluster the multiple parking positions to obtain multiple cluster center points of the target commercial vehicle; an area information determination module 23, which is used to determine the area information corresponding to the multiple cluster center points; wherein the area information includes the provincial and municipal positions where the cluster center points are located and the retention time of the target commercial vehicle at the corresponding provincial and municipal positions, and each provincial and municipal position corresponds to a cluster center point; a regional path construction module 24, which is used to construct a continuous regional path of the target commercial vehicle by connecting the provincial and municipal positions where the multiple cluster center points are located in series based on time continuity and space continuity; a transportation route calculation module 25, which is used to calculate the transportation route of the target commercial vehicle according to the continuous regional path and the retention time of the target commercial vehicle at the corresponding provincial and municipal positions.
[0044] The present application provides a calculation device for a commercial vehicle transportation route, which obtains multiple parking locations of a target commercial vehicle through a parking location acquisition module 21; a parking location clustering module 22 clusters the multiple parking locations to obtain multiple cluster center points of the target commercial vehicle; a regional information determination module 23 determines the regional information corresponding to the multiple cluster center points; wherein the regional information includes the provincial and municipal locations where the cluster center points are located and the retention time of the target commercial vehicle at the corresponding provincial and municipal locations, and each provincial and municipal location corresponds to a cluster center point; a regional path construction module 24 clusters the provinces where the multiple cluster center points are located based on time continuity and spatial continuity. The city locations are connected in series to construct a continuous regional path for the target commercial vehicle; the transportation route calculation module 25 calculates the transportation route of the target commercial vehicle according to the continuous regional path and the length of time the target commercial vehicle stays in the corresponding province and city locations; that is, by obtaining the parking position of the target commercial vehicle and clustering the parking positions to obtain the cluster center point, determining its regional information according to the cluster center point, connecting the cluster center points in series to construct a regional path and calculating the transportation route in combination with the length of time the target commercial vehicle stays, so as to accurately calculate the transportation route for the target commercial vehicle to perform a single transportation task, providing accurate basic data support for subsequent value-added services of commercial vehicles.
[0045] In one embodiment, the above-mentioned transportation route calculation module 25 can be further configured as follows: according to the continuous area path, calculate the first deviation angle between adjacent line segments; wherein the line segment is the line connecting adjacent cluster center points on the continuous area path; according to the continuous area path, calculate the second deviation angle between each line segment and the initial line segment; wherein the initial line segment is the line connecting the initial cluster center point and its adjacent cluster center points on the continuous area path; according to the first deviation angle, the second deviation angle and the length of time the target commercial vehicle stays in the corresponding province or city, calculate the transportation route of the target commercial vehicle.
[0046] In one embodiment, the above-mentioned transportation route calculation module 25 can be further configured as follows: if the first deviation angle between the current line segment and the previous line segment of the current line segment is less than the preset first angle threshold, the second deviation angle between the current line segment and the initial line segment is less than the preset second angle threshold, and the target commercial vehicle's retention time at the corresponding province or city is less than the preset time threshold, then the current line segment is determined to be a section of the transportation route of the target commercial vehicle; wherein the first angle threshold is less than the second angle threshold.
[0047] In one embodiment, the computing device 20 for calculating the commercial vehicle transport route may be further configured to: remove incomplete routes from the transport route based on the query time range.
[0048] Specifically, if a first time difference between the starting time of the transportation route within the query time range and the start time of the query time is less than a first preset time, or a second time difference between the end time of the transportation route within the query time range and the end time of the query time is less than a second preset time, the transportation route is determined to be an incomplete route and the transportation route is eliminated.
[0049] In one embodiment, the parking position clustering module 22 can be further configured as follows: randomly select a target parking position from the unclustered parking positions, and obtain a first parking position to be allocated whose distance from the unclustered parking positions to the target parking position is less than a preset distance threshold; if the number of the first parking positions to be allocated is greater than the preset number threshold, the target parking position and the first parking position to be allocated are allocated as a new cluster; respectively obtain a second parking position to be allocated whose distance from the unclustered parking positions to the first parking position to be allocated is less than the distance threshold; allocate the second parking position to be allocated to the new cluster; select the new cluster containing the most parking positions in the same province or city as the target cluster; calculate the center point of the target cluster to obtain the cluster center point of the target commercial vehicle.
[0050] In one embodiment, the above-mentioned area information determination module 23 can be further configured to: calculate the number of intersections between the ray endpoints with the cluster center point and the boundary polygons of the province and city area; and determine the province and city location of the target commercial vehicle based on the number of intersections.
[0051] Below, reference Figure 3 The electronic device according to the embodiment of the present application is described. The electronic device may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signal from them.
[0052] Figure 3 A block diagram of an electronic device according to an embodiment of the present application is illustrated.
[0053] like Figure 3 As shown, the electronic device 10 includes one or more processors 11 and a memory 12 .
[0054] The processor 11 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
[0055] The memory 12 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may run the program instructions to implement the methods of the various embodiments of the present application described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0056] In one example, the electronic device 10 may further include: an input device 13 and an output device 14 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0057] When the electronic device is a stand-alone device, the input device 13 may be a communication network connector, which is used to receive the collected input signals from the first device and the second device.
[0058] In addition, the input device 13 may also include, for example, a keyboard, a mouse, and the like.
[0059] The output device 14 can output various information to the outside, including the determined distance information, direction information, etc. The output device 14 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0060] Of course, to simplify, Figure 3 Only some of the components related to the present application in the electronic device 10 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 10 may also include any other appropriate components.
[0061] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
[0062] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0063] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the method according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0064] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0065] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0066] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0067] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
[0068] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0069] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for calculating a commercial vehicle transport route, characterized in that: include: Obtain multiple parking locations of the target commercial vehicle; Clustering the multiple parking locations to obtain multiple cluster center points of the target commercial vehicle; Determine the regional information corresponding to the multiple cluster center points; wherein the regional information includes the provincial and municipal locations of the cluster center points and the retention time of the target commercial vehicle in the corresponding provincial and municipal locations, and each provincial and municipal location corresponds to one cluster center point; Based on time continuity and space continuity, the provincial and municipal locations where the multiple cluster center points are located are connected in series to construct a continuous regional path for the target commercial vehicle; Calculate the transportation route of the target commercial vehicle according to the continuous regional path and the retention time of the target commercial vehicle in the corresponding province or city; The calculating of the transportation route of the target commercial vehicle according to the continuous regional path and the retention time of the target commercial vehicle in the corresponding province or city includes: According to the continuous area path, calculating the first deflection angle between adjacent line segments; wherein the line segment is a line connecting the adjacent cluster center points on the continuous area path; According to the continuous area path, calculating the second deflection angle between each of the line segments and the initial line segment; wherein the initial line segment is a line connecting an initial cluster center point and its adjacent cluster center points on the continuous area path; If the first deflection angle between the current line segment and the preceding line segment of the current line segment is less than the preset first angle threshold, the second deflection angle between the current line segment and the initial line segment is less than the preset second angle threshold, and the retention time of the target commercial vehicle at the corresponding province or city is less than the preset time threshold, then the current line segment is determined to be a section of the transportation route of the target commercial vehicle; wherein the first angle threshold is less than the second angle threshold; If the first deflection angle between the current line segment and the previous line segment is greater than or equal to the first angle threshold, or the second deflection angle between the current line segment and the initial line segment is greater than or equal to the second angle threshold, or the retention time of the target commercial vehicle at the corresponding province or city is greater than or equal to the retention time threshold, the cluster center point corresponding to the province or city is determined as the end point of the previous transport task of the target commercial vehicle or the starting point of the next transport task; The clustering of the plurality of parking positions to obtain a plurality of cluster center points of the target commercial vehicle includes: Selecting a target parking position from the non-clustered parking positions, and acquiring a first parking position to be allocated, the distance between the non-clustered parking positions and the target parking position being less than a preset distance threshold; If the number of the first parking positions to be allocated is greater than or equal to 1, allocating the target parking position and the first parking positions to be allocated into a new cluster; respectively acquiring second parking positions to be allocated from the non-clustered parking positions, the distance between which and the first parking position to be allocated is less than the distance threshold; Allocating the second parking location to be allocated to the new cluster; Selecting the new cluster containing the most parking locations in the same province or city as the target cluster; Calculating the center point of the target cluster to obtain the cluster center point of the target commercial vehicle; The determining of the area information corresponding to the plurality of cluster center points includes: Calculate the number of intersections between the ray endpoints and the boundary polygons of the province or city area with the cluster center point as the endpoint; If the number of intersections is an odd number, the cluster center point is located inside the boundary polygon of the province or city, otherwise it is not located inside the boundary polygon of the province or city; After calculating the transportation route of the target commercial vehicle according to the continuous regional path and the retention time of the target commercial vehicle at the corresponding provincial and municipal location, the method for calculating the commercial vehicle transportation route further includes: Eliminate incomplete routes from the transport routes based on the query time range; Wherein, eliminating incomplete routes from the transportation routes based on the query time range includes: If a first time difference between the starting time of the first route within the query time range and the starting time of the query time is less than a first preset time, the first route is determined to be an incomplete route and the first route is eliminated; if a second time difference between the ending time of the last route within the query time range and the ending time of the query time is less than a second preset time, the last route is determined to be an incomplete route and the last route is eliminated.
2. A device for calculating a commercial vehicle transport route, characterized in that: include: A parking location acquisition module, used to acquire multiple parking locations of a target commercial vehicle; A parking position clustering module, used for clustering the plurality of parking positions to obtain a plurality of cluster center points of the target commercial vehicle; A regional information determination module, used to determine the regional information corresponding to the multiple cluster center points; wherein the regional information includes the provincial and municipal locations of the cluster center points and the retention time of the target commercial vehicle in the corresponding provincial and municipal locations, and each provincial and municipal location corresponds to one cluster center point; A regional path construction module, for connecting the provincial and municipal locations of the plurality of cluster center points in series to construct a continuous regional path for the target commercial vehicle based on temporal continuity and spatial continuity; A transportation route calculation module, used to calculate the transportation route of the target commercial vehicle according to the continuous regional path and the retention time of the target commercial vehicle in the corresponding province or city; The transportation route calculation module is configured as follows: According to the continuous area path, calculating the first deflection angle between adjacent line segments; wherein the line segment is a line connecting the adjacent cluster center points on the continuous area path; According to the continuous area path, calculating the second deflection angle between each line segment and the initial line segment; wherein the initial line segment is a line connecting an initial cluster center point and its adjacent cluster center points on the continuous area path; If the first deflection angle between the current line segment and the preceding line segment of the current line segment is less than the preset first angle threshold, the second deflection angle between the current line segment and the initial line segment is less than the preset second angle threshold, and the retention time of the target commercial vehicle at the corresponding province or city is less than the preset time threshold, then the current line segment is determined to be a section of the transportation route of the target commercial vehicle; wherein the first angle threshold is less than the second angle threshold; If the first deflection angle between the current line segment and the previous line segment is greater than or equal to the first angle threshold, or the second deflection angle between the current line segment and the initial line segment is greater than or equal to the second angle threshold, or the retention time of the target commercial vehicle at the corresponding province or city is greater than or equal to the retention time threshold, the cluster center point corresponding to the province or city is determined as the end point of the previous transport task of the target commercial vehicle or the starting point of the next transport task; The parking location clustering module is configured as follows: Selecting a target parking position from the non-clustered parking positions, and acquiring a first parking position to be allocated, the distance between the non-clustered parking positions and the target parking position being less than a preset distance threshold; If the number of the first parking positions to be allocated is greater than or equal to 1, allocating the target parking position and the first parking positions to be allocated into a new cluster; respectively acquiring second parking positions to be allocated from the non-clustered parking positions, the distance between which and the first parking position to be allocated is less than the distance threshold; Allocating the second parking location to be allocated to the new cluster; Selecting the new cluster containing the most parking locations in the same province or city as the target cluster; Calculating the center point of the target cluster to obtain the cluster center point of the target commercial vehicle; The area information determination module is configured as follows: Calculate the number of intersections between the ray endpoints and the boundary polygons of the province or city area with the cluster center point as the endpoint; If the number of intersections is an odd number, the cluster center point is located inside the boundary polygon of the province or city, otherwise it is not located inside the boundary polygon of the province or city; The computing device for the commercial vehicle transport route is further configured as follows: Eliminate incomplete routes from the transport routes based on the query time range; Wherein, eliminating incomplete routes from the transportation routes based on the query time range includes: If a first time difference between the starting time of the first route within the query time range and the starting time of the query time is less than a first preset time, the first route is determined to be an incomplete route and the first route is eliminated; if a second time difference between the ending time of the last route within the query time range and the ending time of the query time is less than a second preset time, the last route is determined to be an incomplete route and the last route is eliminated.
3. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method for calculating the commercial vehicle transport route according to claim 1.
4. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to execute the method for calculating the commercial vehicle transport route according to claim 1.
Citation Information
Patent Citations
Method for automatically obtaining vehicle-mounted laser point cloud driving track abnormal area
CN112415536A
Commercial vehicle subdivision market identification method and device based on Internet of Vehicles, and medium
CN114331568A
Method, device and equipment for determining permanent parking point of vehicle and storage medium
CN117241212A
Terminal positioning track determination method and device and storage medium
CN117750495A
