Method for determining the convenience of passenger orders and data processing method
By compressing and grouping the trajectory points of the driver's driving path, the distance between the target point and the target driving path is calculated, and the problem of excessive resource consumption in the existing technology is solved, and efficient and accurate road-by-path determination is achieved.
Patent Information
- Application Number
- CN202210539829.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-18
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2042-05-18
AI Technical Summary
When determining the route between the passenger order and the driver's driving path, the prior art requires storage and calculation of a large number of track points, resulting in excessive consumption of storage resources and computing resources, affecting the processing of other service data of the server.
The trajectory points of the target driving path are compressed by the preset compression threshold, and the compressed candidate trajectory points are obtained, and they are divided into multiple trajectory point groups. The distance between the target point and the target driving path is calculated to determine the path.
It effectively reduces the consumption of storage and computing resources, realizes efficient and accurate determination of the route between passenger orders and driver driving paths, and reduces data processing costs.
Smart Images

Figure CN115018130B_ABST
Abstract
Description
Technical Field
[0001] The present specification belongs to the field of Internet technology, and in particular, relates to a method for determining the convenience of a passenger order and a data processing method. Background Art
[0002] In a ride-sharing scenario, drivers are usually more willing to pick up passengers who are more along their planned driving route.
[0003] Based on the existing methods, when the platform server screens and pushes passenger orders to drivers, it often needs to determine the shortest distance between certain trajectory points in the riding path and the driving path by calculating the distance between the trajectory points in the passenger's riding path and each trajectory point in the driver's driving path, and then determine the contiguity between the passenger's riding path and the driver's driving path based on the shortest distance.
[0004] However, when the above method is implemented, it is necessary to store and calculate each trajectory point in the driving path. When the driving path is long, the number of trajectory points to be stored and calculated by the above method will become very large. At this time, it is bound to occupy and consume a lot of storage resources and computing resources of the platform server, and even affect the normal processing of other business data of the platform server.
[0005] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0006] The present specification provides a method for determining the convenience of a passenger order and a data processing method, which can effectively reduce the consumption of storage resources when storing trajectory points and the consumption of computing resources when processing trajectory points, and thus can efficiently and accurately determine the distance between a target point in a target riding path and a target driving path of a target driver at a lower data processing cost, and accurately determine the convenience between the target riding path and the target driving path.
[0007] An embodiment of the present specification provides a method for determining the convenience of a passenger order, comprising: obtaining a target point and a target driving path of a target driver; wherein the target point is a ride start point and / or ride end point of the target ride path; the target ride path is determined according to the target passenger order; according to a preset compression threshold, the trajectory points included in the target driving path are compressed to obtain a plurality of compressed candidate trajectory points; the plurality of candidate trajectory points are divided into a plurality of trajectory point groups; and according to the plurality of trajectory point groups, the distance between the target point and the target driving path is calculated; and according to the distance between the target point and the target driving path, the convenience of the target ride path and the target driving path is determined.
[0008] The embodiment of this specification also provides a data processing method, including: receiving and responding to a trigger operation of a target driver, and providing a target driving path of the target driver to a server; wherein the server compresses the trajectory points contained in the target driving path according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points; the server also divides the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculates the distance between the target point and the target driving path based on the plurality of trajectory point groups; wherein the target point is a ride start point and / or ride end point of a target ride path corresponding to a target passenger order; the server also determines a passenger order that matches the target driver based on the distance between the target point and the target driving path; receives a passenger order that matches the target driver fed back by the server; and displays the passenger order that matches the target driver to the target driver.
[0009] The embodiments of the present specification also provide a data processing method, including: obtaining a target point and a target trajectory; compressing the trajectory points included in the target trajectory according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points; dividing the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculating the distance between the target point and the target trajectory according to the plurality of trajectory point groups.
[0010] The embodiments of the present specification also provide a device for determining the convenience of a passenger order, including: an acquisition module, used to acquire a target point and a target driving path of a target driver; wherein the target point is a ride start point and / or ride end point of the target ride path; the target ride path is determined according to the target passenger order; a compression module, used to compress the trajectory points included in the target driving path according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points; a processing module, used to divide the plurality of candidate trajectory points into a plurality of trajectory point groups; and based on the plurality of trajectory point groups, calculate the distance between the target point and the target driving path; a determination module, used to determine the convenience between the target ride path and the target driving path according to the distance between the target point and the target driving path.
[0011] The embodiment of the present specification also provides a server, including a processor and a memory for storing instructions executable by the processor, and when the processor executes the instructions, the relevant steps of the method for determining the convenience of the passenger order or the data processing method are implemented.
[0012] The embodiment of the present specification also provides a terminal device, including a processor and a memory for storing instructions executable by the processor, wherein the processor executes relevant steps of the data processing method.
[0013] The embodiments of this specification also provide a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the relevant steps of the method for determining the convenience of the passenger order or the data processing method.
[0014] Based on the method for determining the convenience of a passenger order and the data processing method provided in this specification, when it is necessary to determine the convenience between a target riding path corresponding to a target passenger order and a target driving path of a target driver, the trajectory points contained in the target driving path can be compressed according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points; the plurality of candidate trajectory points can then be divided into a plurality of trajectory point groups; and based on the plurality of trajectory point groups, the distance between the target point and the target driving path can be calculated; and then the convenience between the target riding path and the target driving path can be determined based on the distance between the target point and the target driving path, so that there is no need to store all trajectory points in the target driving path, nor is there any need to separately calculate the distance between the target point in the target riding path and all trajectory points in the target driving path.
[0015] Based on the above method, by compressing the trajectory points included in the target driving path according to a preset compression threshold, the number of trajectory points to be processed can be effectively reduced, the consumption of storage resources when storing trajectory points, and the consumption of computing resources when subsequently processing trajectory points can be reduced; and by dividing a plurality of compressed candidate trajectory points into a plurality of trajectory point groups; and calculating the distance between the target point and the target driving path according to the plurality of trajectory point groups, the consumption of computing resources when processing trajectory points can be further reduced, so that the distance between the target point in the target riding path and the target driving path of the target driver can be efficiently and accurately determined at a lower data processing cost, and then the contiguity of the target riding path and the target driving path can be accurately determined. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flowchart of a method for determining the convenience of a passenger order provided by an embodiment of the present specification;
[0018] Figure 2 It is a schematic diagram of an embodiment of a method for determining the convenience of a passenger order provided by an embodiment of this specification in a scenario example;
[0019] Figure 3It is a schematic diagram of an embodiment of a method for determining the convenience of a passenger order provided by an embodiment of this specification in a scenario example;
[0020] Figure 4 It is a schematic diagram of an embodiment of a method for determining the convenience of a passenger order provided by an embodiment of this specification in a scenario example;
[0021] Figure 5 It is a schematic diagram of an embodiment of a method for determining the convenience of a passenger order provided by an embodiment of this specification in a scenario example;
[0022] Figure 6 It is a schematic diagram of an embodiment of a method for determining the convenience of a passenger order provided by an embodiment of this specification in a scenario example;
[0023] Figure 7 It is a schematic diagram of an embodiment of a method for determining the convenience of a passenger order provided by an embodiment of this specification in a scenario example;
[0024] Figure 8 is a flowchart of a data processing method provided by an embodiment of this specification;
[0025] Fig. 9 It is a schematic diagram of the structure of a server provided by an embodiment of this specification;
[0026] Fig.10 It is a schematic diagram of the structure of a device for determining the convenience of a passenger order provided by an embodiment of the present specification;
[0027] Fig.11 It is a schematic diagram of the structural composition of a data processing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0029] See also Figure 1 As shown, the embodiment of this specification provides a method for determining the convenience of a passenger order. The method may include the following contents when it is specifically implemented:
[0030] S101: Acquire a target point and a target driving route of a target driver; wherein the target point is a ride start point and / or ride end point of a target ride route; and the target ride route is determined according to a target passenger order;
[0031] S102: compressing the trajectory points included in the target driving path according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points;
[0032] S103: Divide the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculate the distance between the target point and the target driving path according to the plurality of trajectory point groups;
[0033] S104: Determine the contiguity of the target riding route and the target driving route according to the distance between the target point and the target driving route.
[0034] Through the above embodiments, the distance between the target point in the target riding route and the target driving route can be determined efficiently and accurately at a low data processing cost, and then based on the distance, the contiguity of the target riding route and the target driving route can be accurately determined.
[0035] In some embodiments, the above-mentioned method for determining the convenience of a passenger order can be specifically applied on the server side.
[0036] Among them, see Figure 2 As shown, the above-mentioned server may specifically include a background server applied to one side of a network platform (for example, a ride-sharing network service platform) that can realize functions such as data transmission and data processing. Specifically, the server may be, for example, an electronic device with data calculation, storage and network interaction functions. Alternatively, the server may also be a software program running in the electronic device to provide support for data processing, storage and network interaction. In this embodiment, the number of the servers is not specifically limited. The server may specifically be one server, or several servers, or a server cluster formed by several servers.
[0037] See also Figure 2 As shown, a passenger user who needs to take a ride can send a passenger order to the server through a terminal device. The passenger order at least carries the ride start point and ride end point specified by the passenger user. Further, the passenger order may also include a ride path specified by the passenger user or automatically generated by the map data based on the ride start point and ride end point. Figure 3 shown.
[0038] Drivers who need to receive orders can provide their planned driving routes to the server through their terminal devices. For example, the driver can send an order request to the server through the terminal device. The order request can carry the driver's planned driving route, which can be found in Figure 3 In addition, the order receiving request may also only carry the driving start point and driving end point specified by the driver user, and the server may use the map data to automatically generate a corresponding driving route based on the driving start point and driving end point.
[0039] The above-mentioned client may specifically include a front end applied to the driver user and the passenger user side, which can realize functions such as data collection and data transmission. Specifically, the terminal device may be, for example, a tablet computer, a mobile phone, a smart wearable device, or other electronic device. Alternatively, the terminal device may also be a software application that can run in the above-mentioned electronic device. For example, it may be a ride-sharing APP running on a mobile phone.
[0040] See also Figure 2 As shown, the server can store the received passenger orders in the passenger order pool. When the server receives the order acceptance request initiated by the target driver, it can respond to the order acceptance request, obtain the target driving path of the target driver; retrieve the passenger order from the passenger order pool; and then determine the passenger order that matches the target driver from the retrieved passenger orders according to the target driving path by calculation and according to the degree of convenience; and then push the passenger order that matches the target driver to the terminal device of the target driver. In this way, the passenger orders determined and pushed to the target driver can be more targeted and more in line with the target driver's order acceptance expectations. Accordingly, the target driver's order acceptance rate can be improved.
[0041] In some embodiments, the target passenger order can be specifically understood as a passenger order that is currently to be determined whether it matches the target driver, wherein the target passenger order at least carries the coordinate data of the ride start point and the coordinate data of the ride end point specified by the target passenger.
[0042] See also Figure 3 As shown, the above-mentioned target riding path can be specifically understood as a path (or track) with the riding starting point specified by the target passenger as the starting point and the riding ending point specified by the target passenger as the terminal.
[0043] The above-mentioned target point may specifically include: a ride start point and / or a ride end point of the target ride route.
[0044] The target driving route can be understood as the driving route (or driving trajectory) that the target driver provides to the server. The target driver can be understood as a driver who cares about the convenience when accepting an order, such as a ride-sharing driver.
[0045] In some embodiments, the above-mentioned acquisition of the target point and the target driving path of the target driver, when implemented specifically, may include: receiving a target order acceptance request initiated by the target driver through a terminal device; determining the target driving path of the target driver based on the target order acceptance request; randomly picking up passenger orders from the passenger order pool as target passenger orders; and determining the target passenger's ride starting point, ride ending point, and target ride path based on the target passenger order.
[0046] In some embodiments, the preset compression threshold may specifically be a compression value determined by testing a large number of sample historical paths in advance and taking both the error rate and the compression rate into consideration.
[0047] In some embodiments, before implementation, the preset compression threshold may be determined in the following manner:
[0048] S1: Obtain and perform compression testing based on a large number of historical sample paths;
[0049] S2: According to the compression test results, find out the compression value that can make the mileage change rate (corresponding error rate) of the sample paths before and after compression of most of the historical sample paths less than or equal to the preset error rate threshold; at the same time, the ratio of the number of trajectory points deleted after compression to the number of trajectory points before compression (corresponding compression rate) is greater than or equal to the preset compression rate threshold, which is used as the preset compression threshold.
[0050] During specific implementation, the preset error rate threshold may be set to 5%; the preset compression rate threshold may be set to 87%.
[0051] Through the above embodiments, it is possible to accurately find a preset compression threshold that can effectively compress trajectory points and reduce the consumption burden of storage resources and computing resources by trajectory points; at the same time, it is also possible to better balance accuracy and reduce the error caused by compression processing. Then, based on the above preset compression threshold, under the premise of ensuring high accuracy, compression processing can be performed to effectively reduce the number of trajectory points to be processed and reduce the consumption of storage resources and computing resources for subsequent processing of trajectory points.
[0052] In some embodiments, the above-mentioned compression processing of the trajectory points included in the target driving path according to the preset compression threshold may include: compressing the trajectory points included in the current trajectory segment of the current wheel in the following manner:
[0053] S1: Determine the starting point and the ending point of the current trajectory segment; and use a straight line segment to connect the starting point and the ending point to obtain a reference line segment;
[0054] S2: Calculate the vertical distance from each track point in the current track segment to the reference line segment;
[0055] S3: Filter out the maximum vertical distance from each track point in the current track segment to the reference line segment; and compare the maximum vertical distance with a preset compression threshold to obtain a comparison result;
[0056] S4: According to the comparison result, the current trajectory segment is compressed accordingly.
[0057] In some embodiments, the above-mentioned calculation of the vertical distance from each trajectory point in the current trajectory segment to the reference line segment may include: calculating the vertical distance from the current trajectory point in the current trajectory segment to the reference line segment in the following manner:
[0058] S1: Calculate the arc length of the current trajectory segment, the arc length between the current trajectory point and the starting trajectory point, and the arc length between the current trajectory point and the ending trajectory point;
[0059] S2: Calculate the area of the triangle formed by the starting track point, the ending track point and the current track point according to the arc length of the current track segment, the arc length between the current track point and the starting track point, and the arc length between the current track point and the ending track point;
[0060] S3: Calculate the vertical distance from the current trajectory point to the reference line segment according to the area of the triangle and the arc length of the current trajectory segment.
[0061] When making specific calculations, it is considered that the coordinate data of the trajectory points obtained and used are often the latitude and longitude data of the trajectory points, which are data on a three-dimensional sphere, not data on a conventional two-dimensional plane. Therefore, in order to more accurately calculate the vertical distance from the current trajectory point to the reference line segment, the idea of equal triangle area can be adopted. First, according to the arc length of the current trajectory segment, the arc length between the current trajectory point and the starting trajectory point, and the arc length between the current trajectory point and the ending trajectory point, the area of the triangle formed by the starting trajectory point, the ending trajectory point and the current trajectory point is calculated using Heron's formula; then the area of the triangle is multiplied by 2 and then divided by the arc length of the current trajectory segment to obtain the quotient as the vertical distance from the current trajectory point to the reference line segment.
[0062] For example, see Figure 4As shown, the starting track point in the current track segment is recorded as A, and the ending track point is recorded as B. Take any track point in the current track segment as the current track point D. What needs to be calculated now is the distance between the current track point D and the current track segment AB. The arc length of the current track segment AB, the arc length of the track segment AD between the current track point and the starting track point (which can be recorded as l), and the arc length of the track segment BD between the current track point and the ending track point can be calculated based on the coordinate data of the track point. Use straight line segments to connect AB, AD, and BD to obtain triangle ABD. Among them, line segment AB can be understood as the reference line segment of the current track segment AB. Then use the arc length of the current track segment AB, the arc length of the track segment AD, and the arc length of the track segment BD to calculate the area of triangle ABD using Heron's formula, for example, recorded as S. Furthermore, the distance from the current track point D to the reference line segment AB can be calculated as: h=2S / l.
[0063] According to the above method, the vertical distance from each track point in the current track segment to the reference line segment can be calculated to filter out the maximum vertical distance, and the maximum vertical distance is compared with a preset compression threshold to obtain a corresponding comparison result.
[0064] In some embodiments, the above-mentioned compression processing is performed on the current trajectory segment according to the comparison result. When it is specifically implemented, it may include the following contents:
[0065] S1: According to the comparison result, when it is determined that the maximum vertical distance is less than the preset compression threshold, the starting trajectory point and the ending trajectory point of the current trajectory segment are retained as candidate trajectory points; and the compression process of the current trajectory segment is terminated;
[0066] S2: Based on the comparison result, when it is determined that the maximum vertical distance is greater than or equal to the preset compression threshold, the trajectory segment between the trajectory point corresponding to the maximum vertical distance and the starting trajectory point, and the trajectory segment between the trajectory point corresponding to the maximum distance and the ending trajectory point, are determined as the trajectory segments to be compressed in the next round.
[0067] Specifically, taking the current trajectory segment AB as an example, when it is determined that the maximum vertical distance is less than the preset compression threshold, only the starting trajectory point A and the ending trajectory point B of the current trajectory segment are retained as candidate trajectory points; other trajectory points of the current trajectory segment AB are eliminated to complete the compression processing of the current trajectory segment AB.
[0068] On the contrary, when it is determined that the maximum vertical distance is greater than or equal to the preset compression threshold, the trajectory point corresponding to the maximum vertical distance is determined, for example, trajectory point C. The current trajectory segment AB is split into trajectory segment AC and trajectory segment BC; and the above-mentioned trajectory segment AB and trajectory segment BC are used as the trajectory segments to be compressed in the next round.
[0069] After the current round of compression processing is completed, the above method can be repeated to perform the next round of compression processing on the trajectory segments split after the current round of compression processing, for example, trajectory segment AB and trajectory segment BC.
[0070] The above process is repeated until no more trajectory segments can be split. At this point, the huge number of trajectory points contained in the original target driving path can be compressed into a relatively small number of candidate trajectory points.
[0071] This can effectively reduce the consumption of storage resources for subsequent storage of trajectory points and the consumption of computing resources for processing trajectory points.
[0072] In some embodiments, the dividing the plurality of candidate trajectory points into a plurality of trajectory point groups includes: dividing a preset number of trajectory points from the plurality of trajectory points in order as a trajectory point group according to a preset grouping rule.
[0073] For details, see Figure 5 As shown, the above-mentioned multiple candidate trajectory points can be arranged in order according to the coordinate data. According to the preset grouping rule, a trajectory point group can be divided every 10 trajectory points. For example, the 10 trajectory points ranked from 1 to 10 among the multiple candidate trajectory points can be divided into trajectory point group 1, and the 10 trajectory points ranked from 11 to 20 can be divided into trajectory point group 2, and so on, to obtain multiple trajectory point groups, for example, trajectory point group 1, trajectory point group 2, trajectory point group 3...trajectory point group 11.
[0074] It should be noted that the above multiple track point groups are also arranged in order of position. For example, based on the coordinate data of the track points contained, track point group 1 is sorted before track point group 2, and track point group 3 is sorted after track point group 2. Figure 5 As shown, trajectory point group 1 and trajectory point group 3 can be called trajectory point groups adjacent to trajectory point group 2.
[0075] In some embodiments, the above-mentioned calculation of the distance between the target point and the target driving path based on multiple trajectory point groups may include the following contents during specific implementation:
[0076] S1: According to the preset screening rules, a candidate trajectory point group that meets the requirements is screened out from multiple trajectory point groups;
[0077] S2: Obtain a trajectory point group adjacent to the candidate trajectory point group, and merge the trajectory point group with the candidate trajectory point group to obtain a target trajectory point group;
[0078] S3: Calculate the distance between the target point and the target driving path according to the target trajectory point group.
[0079] Through the above embodiments, the distance between the target point and the target driving path can be accurately calculated based on the trajectory point group.
[0080] In some embodiments, the above-mentioned method of selecting a candidate trajectory point group that meets the requirements from multiple trajectory point groups according to a preset screening rule may include: calculating the first distances between the target point and the specified trajectory points in the multiple trajectory point groups respectively; and selecting the trajectory point group where the specified trajectory point with the smallest first distance is located as the candidate trajectory point group.
[0081] Among them, the above-mentioned first distance can be understood as the distance between the specified trajectory point and the target point in each trajectory point group. In specific implementation, the first distance between the specified trajectory point and the target trajectory point can be calculated based on the coordinate data of the specified trajectory point and the coordinate data of the target point. The above-mentioned trajectory point group adjacent to the candidate trajectory point group can specifically be the two trajectory point groups in front and behind the candidate trajectory point group, or a trajectory point group adjacent to the candidate trajectory point group in front of the candidate trajectory point group, or a trajectory point group adjacent to the candidate trajectory point group behind the candidate trajectory point group.
[0082] Specifically, the designated trajectory point may be the trajectory point that is ranked highest in the trajectory point group.
[0083] In some cases, the designated trajectory point may also be the trajectory point at the end of the trajectory point group, or the trajectory point in the middle of the trajectory point group.
[0084] In some embodiments, during specific implementation, the first distances between each target point and each designated trajectory point can be compared, and the trajectory point group where the designated trajectory point with the smallest first distance to the target point is located can be determined as the candidate trajectory point group. Further, one or two trajectory point groups adjacent to the candidate trajectory point group can be determined from the multiple trajectory point groups arranged in order; and the one or two trajectory point groups adjacent to the candidate trajectory point group determined can be merged with the candidate trajectory point group to obtain the target trajectory point group. For details, please refer to Figure 6 The determined candidate trajectory point group is trajectory point group 6, and then the two trajectory point groups adjacent to trajectory point group 6 are determined to be trajectory point group 5 and trajectory point group 7, respectively. Then, the above three trajectory point groups can be merged to obtain the corresponding target trajectory point group.
[0085] In this way, the distance between the target point and the target driving trajectory can be determined based on the merged target trajectory point group instead of a single candidate trajectory point group to avoid omissions.
[0086] In some embodiments, the above calculation of the distance between the target point and the target driving path according to the target trajectory point group may include the following contents during specific implementation:
[0087] S1: respectively calculating the second distance between the target point and each trajectory point included in the target trajectory point group;
[0088] S2: Connect two adjacent trajectory points in the target trajectory point group to obtain multiple connecting line segments;
[0089] S3: Calculate the vertical distances between the target point and the multiple connecting line segments respectively to obtain a third distance;
[0090] S4: Filter out the distance with the smallest value from the second distance and the third distance as the distance between the target point and the target driving path.
[0091] For details, see Figure 7 As shown, the second distance can be specifically understood as the distance between each track point in the target track point group and the target point. In specific implementation, the second distance between each track point in the target track point group and the target point can be calculated based on the coordinate data of each track point in the target track point group and the coordinate data of the target point.
[0092] The third distance may be specifically understood as the distance between the target point and the connecting line segments between any two adjacent trajectory points in the target trajectory point group.
[0093] It should be noted that the trajectory points of the target driving path usually obtained are often incomplete. For example, there are actually many trajectory points between two adjacent trajectory points, and these trajectory points are not taken into account. In order to avoid missing the trajectory points between two adjacent trajectory points in the target trajectory point group, and in order to be able to more accurately calculate the distance between the target point and the target driving trajectory. Therefore, after calculating the second distance, the two adjacent trajectory points in the target trajectory point group are also connected, and the third distance between the target point and the target driving trajectory is more accurately calculated by calculating the connecting line segment between the target point and the two adjacent trajectory points.
[0094] In specific implementation, the second distances can be compared first to find the minimum value in the second distances, recorded as v1; the third distances can be compared at the same time to find the minimum value in the third distances, recorded as v2. Then v1 and v2 are compared to find the minimum value of v1 and v2 as the distance between the target point and the target driving path.
[0095] Therefore, only a small number of trajectory points need to be stored and processed, and processing methods such as grouping are introduced to efficiently calculate the distance between the target point in the target riding path and the target driving path.
[0096] In some embodiments, the above-mentioned determination of the degree of convenience between the target riding route and the target driving route based on the distance between the target point and the target driving route may include: determining the degree of direction matching between the target driving route and the target riding route; and determining the degree of convenience between the target riding route and the target driving route based on the degree of direction matching and the distance between the target point and the target driving route. Generally, the higher the degree of direction matching between the target riding route and the target driving route, and the smaller the distance between the target point in the target riding route and the target driving route, the higher the corresponding degree of convenience.
[0097] In some embodiments, after determining the convenience of the target riding route and the target driving route based on the distance between the target point and the target driving route, the method may also include the following contents when implemented: determining whether the target passenger order matches the target driver based on the convenience of the target riding route and the target driving route; and pushing and displaying the target passenger order to the target driver when it is determined that the target passenger order matches the target driver.
[0098] In specific implementation, the degree of convenience can be compared with a preset degree of convenience threshold, and according to the comparison result, if it is determined that the degree of convenience is greater than or equal to the preset degree of convenience threshold, it is determined that the target passenger order matches the target driver. On the contrary, if it is determined that the degree of convenience is less than the preset degree of convenience threshold, it is determined that the target passenger order does not match the target driver.
[0099] In some embodiments, when it is determined that the target passenger order matches the target driver, the target passenger order can be sent to the terminal device of the target driver; the target driver is displayed and reminded of the target passenger order through the terminal device. At this time, the target driver has a greater probability of accepting the target passenger order.
[0100] When it is determined that the target passenger order does not match the target driver, a new passenger order is retrieved from the passenger order pool as the target passenger order, and whether the target order matches the target driver is determined in the above manner.
[0101] As can be seen from the above, based on the method for determining the convenience of a passenger order provided in the embodiment of this specification, when it is necessary to determine the convenience of the target riding path corresponding to the target passenger order and the target driving path of the target driver, the trajectory points contained in the target driving path can be compressed according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points; then the plurality of candidate trajectory points are divided into a plurality of trajectory point groups; and the distance between the target point and the target driving path is calculated according to the plurality of trajectory point groups; and then the convenience of the target riding path and the target driving path can be determined according to the distance between the target point and the target driving path. This can effectively reduce the consumption of storage resources when storing trajectory points and the consumption of computing resources when processing trajectory points, and can efficiently and accurately determine the distance between the target point in the target riding path and the target driving path of the target driver at a lower data processing cost. First, by compressing the trajectory points included in the target driving path according to a preset compression threshold, the number of trajectory points to be processed can be effectively reduced, the consumption of storage resources when storing the trajectory points, and the consumption of computing resources when subsequently processing the trajectory points can be reduced; then, by dividing a plurality of compressed candidate trajectory points into a plurality of trajectory point groups; and then calculating the distance between the target point and the target driving path according to the plurality of trajectory point groups, the consumption of computing resources when processing the trajectory points is further reduced, so that the distance between the target point in the target riding path and the target driving path of the target driver can be efficiently and accurately determined at a lower data processing cost, and then the contiguity of the target riding path and the target driving path can be accurately determined.
[0102] See also Figure 8 As shown, the embodiment of this specification also provides a data processing method. Wherein, when the method is implemented specifically, it may include the following contents:
[0103] S801: receiving and responding to a trigger operation of a target driver, and providing a target driving path of the target driver to a server; wherein the server compresses the track points included in the target driving path according to a preset compression threshold value to obtain a plurality of compressed candidate track points; the server also divides the plurality of candidate track points into a plurality of track point groups; and calculates the distance between the target point and the target driving path according to the plurality of track point groups; wherein the target point is a ride start point and / or ride end point of the target ride path corresponding to the target passenger order; the server also determines a passenger order that matches the target driver according to the distance between the target point and the target driving path;
[0104] S802: receiving a passenger order matched with a target driver fed back by the server;
[0105] S803: Displaying passenger orders matching the target driver to the target driver.
[0106] Among them, the above data processing method can be specifically applied to the terminal device held by the target driver.
[0107] In some embodiments, when the target driver has planned his target driving route and also wants to pick up passengers who are relatively close to the target driving route, he can open a ride-sharing APP on his mobile phone and click the "I want to accept the order" option in the APP interface to initiate a trigger operation. Accordingly, the terminal device can receive and respond to the above trigger operation of the target driver to generate an order request carrying the target driving route; and send the order request to the server. Accordingly, the server can obtain the target driving route provided by the terminal device based on the received order request.
[0108] In some embodiments, after displaying the passenger order matching the target driver to the target driver, the method further includes: receiving and responding to the target driver's acceptance operation for the displayed passenger order matching the target driver, generating order confirmation feedback, and sending the order confirmation feedback to the server.
[0109] Through the above embodiment, the terminal device can receive passenger orders that match the target driver, which are screened by the server based on the distance between the target point and the target driving path of the target driver, and promptly display the above matching passenger orders to the target driver, thereby improving the target driver's order acceptance rate.
[0110] The embodiment of this specification also provides a data processing method, which may include the following contents during specific implementation:
[0111] S1: Get the target point and target trajectory;
[0112] S2: compressing the trajectory points contained in the target trajectory according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points;
[0113] S3: Divide the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculate the distance between the target point and the target trajectory according to the plurality of trajectory point groups.
[0114] The target trajectory may be a riding trajectory, a driving trajectory, a running trajectory, etc. In specific implementation, the target trajectory may also include other types of trajectories according to specific application scenarios and processing requirements. This specification does not limit this.
[0115] Through the above embodiment, by first compressing the trajectory points included in the target trajectory according to a preset compression threshold, the number of trajectory points to be processed can be effectively reduced, the consumption of storage resources when storing the trajectory points, and the consumption of computing resources when subsequently processing the trajectory points can be reduced; then, by dividing a plurality of compressed candidate trajectory points into a plurality of trajectory point groups; and then calculating the distance between the target point and the target trajectory according to the plurality of trajectory point groups, the consumption of computing resources when processing the trajectory points is further reduced, so that the distance between the target point and the target trajectory can be determined efficiently and accurately at a lower data processing cost.
[0116] The embodiment of the present specification also provides a server, including a processor and a memory for storing processor executable instructions, and the processor can perform the following steps according to the instructions when implemented: obtaining a target point and a target driving path of a target driver; wherein the target point is a ride start point and / or ride end point of the target ride path; the target ride path is determined according to the target passenger order; according to a preset compression threshold, the trajectory points included in the target driving path are compressed to obtain a plurality of compressed candidate trajectory points; the plurality of candidate trajectory points are divided into a plurality of trajectory point groups; and based on the plurality of trajectory point groups, the distance between the target point and the target driving path is calculated; and based on the distance between the target point and the target driving path, the degree of convenience of the target ride path and the target driving path is determined.
[0117] In order to complete the above instructions more accurately, refer to Fig. 9 As shown, the embodiment of this specification also provides another specific server, wherein the server includes a network communication port 901, a processor 902 and a memory 903, and the above structures are connected through internal cables so that each structure can perform specific data interaction.
[0118] Among them, the network communication port 901 can be specifically used to obtain the target point and the target driving path of the target driver; wherein the target point is the starting point and / or the ending point of the target riding path; the target riding path is determined according to the target passenger order.
[0119] The processor 902 can be specifically used to compress the trajectory points included in the target driving path according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points; divide the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculate the distance between the target point and the target driving path according to the plurality of trajectory point groups; and determine the degree of contiguity between the target riding path and the target driving path according to the distance between the target point and the target driving path.
[0120] The memory 903 may be specifically used to store corresponding instruction programs.
[0121] In this embodiment, the network communication port 901 can be a virtual port that is bound to different communication protocols so that different data can be sent or received. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. In addition, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.
[0122] In this embodiment, the processor 902 may be implemented in any appropriate manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.
[0123] In this embodiment, the memory 903 may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function that has no physical form is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.
[0124] The embodiment of the present specification also provides a server, including a processor and a memory for storing processor executable instructions. When the processor is implemented, it can perform the following steps according to the instructions: receive and respond to the trigger operation of the target driver, and provide the target driving path of the target driver to the server; wherein the server compresses the trajectory points contained in the target driving path according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points; the server also divides the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculates the distance between the target point and the target driving path according to the plurality of trajectory point groups; wherein the target point is the ride starting point and / or ride ending point of the target ride path corresponding to the target passenger order; the server also determines the passenger order matching the target driver according to the distance between the target point and the target driving path; receives the passenger order matching the target driver fed back by the server; and displays the passenger order matching the target driver to the target driver.
[0125] The embodiment of the present specification also provides a server, including a processor and a memory for storing processor executable instructions. When the processor is implemented, it can perform the following steps according to the instructions: obtain a target point and a target trajectory; according to a preset compression threshold, compress the trajectory points included in the target trajectory to obtain a plurality of compressed candidate trajectory points; divide the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculate the distance between the target point and the target trajectory according to the plurality of trajectory point groups.
[0126] The embodiment of the present specification also provides a computer storage medium for a method for determining the convenience of the above-mentioned passenger order, wherein the computer storage medium stores computer program instructions, which, when executed, implement the following: obtaining a target point and a target driving path of a target driver; wherein the target point is a ride start point and / or ride end point of the target ride path; the target ride path is determined according to the target passenger order; according to a preset compression threshold, the trajectory points included in the target driving path are compressed to obtain a plurality of compressed candidate trajectory points; the plurality of candidate trajectory points are divided into a plurality of trajectory point groups; and based on the plurality of trajectory point groups, the distance between the target point and the target driving path is calculated; and based on the distance between the target point and the target driving path, the convenience of the target ride path and the target driving path is determined.
[0127] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.
[0128] The embodiment of the present specification also provides a computer storage medium of a data processing method, wherein the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the following are achieved: receiving and responding to a trigger operation of a target driver, and providing a target driving path of the target driver to a server; wherein the server compresses the trajectory points contained in the target driving path according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points; the server also divides the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculates the distance between the target point and the target driving path based on the plurality of trajectory point groups; wherein the target point is a ride start point and / or ride end point of a target ride path corresponding to a target passenger order; the server also determines a passenger order that matches the target driver based on the distance between the target point and the target driving path; receives a passenger order that matches the target driver fed back by the server; and displays the passenger order that matches the target driver to the target driver.
[0129] The embodiments of the present specification also provide a computer storage medium of a data processing method, wherein the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the following steps are implemented: obtaining a target point and a target trajectory; compressing the trajectory points included in the target trajectory according to a preset compression threshold to obtain a plurality of compressed candidate trajectory points; dividing the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculating the distance between the target point and the target trajectory according to the plurality of trajectory point groups.
[0130] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer storage medium can be explained in comparison with other implementations and will not be described in detail here.
[0131] See also Fig.10 As shown, at the software level, the embodiment of this specification also provides a device for determining the convenience of a passenger order, which may specifically include the following structural modules:
[0132] The acquisition module 1001 may be specifically used to acquire a target point and a target driving path of a target driver; wherein the target point is a ride start point and / or a ride end point of a target ride path; and the target ride path is determined according to a target passenger order;
[0133] The compression module 1002 may be specifically configured to compress the trajectory points included in the target driving path according to a preset compression threshold value to obtain a plurality of compressed candidate trajectory points;
[0134] The processing module 1003 may be specifically used to divide the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculate the distance between the target point and the target driving path according to the plurality of trajectory point groups;
[0135] The determination module 1004 may be specifically used to determine the degree of convenience between the target riding route and the target driving route according to the distance between the target point and the target driving route.
[0136] In some embodiments, when the compression module 1002 is implemented, the trajectory points contained in the current trajectory segment of the current wheel can be compressed in the following manner: determine the starting trajectory point and the ending trajectory point of the current trajectory segment; and use a straight line segment to connect the starting trajectory point and the ending trajectory point to obtain a reference line segment; calculate the vertical distance from each trajectory point in the current trajectory segment to the reference line segment; from the vertical distances from each trajectory point in the current trajectory segment to the reference line segment, filter out the maximum vertical distance; and compare the maximum vertical distance with a preset compression threshold to obtain a comparison result; according to the comparison result, perform corresponding compression processing on the current trajectory segment.
[0137] In some embodiments, when the compression module 1002 is specifically implemented, the vertical distance from the current trajectory point in the current trajectory segment to the reference line segment can be calculated in the following manner: the arc length of the current trajectory segment, the arc length between the current trajectory point and the starting trajectory point, and the arc length between the current trajectory point and the ending trajectory point are calculated; based on the arc length of the current trajectory segment, the arc length between the current trajectory point and the starting trajectory point, and the arc length between the current trajectory point and the ending trajectory point, the area of the triangle formed by the starting trajectory point, the ending trajectory point, and the current trajectory point is calculated; based on the area of the triangle and the arc length of the current trajectory segment, the vertical distance from the current trajectory point to the reference line segment is calculated.
[0138] In some embodiments, when the compression module 1002 is specifically implemented, the current trajectory segment can be compressed accordingly according to the comparison result in the following manner: according to the comparison result, when it is determined that the maximum vertical distance is less than a preset compression threshold, the starting trajectory point and the ending trajectory point of the current trajectory segment are retained as candidate trajectory points; and the compression processing of the current trajectory segment is terminated; according to the comparison result, when it is determined that the maximum vertical distance is greater than or equal to the preset compression threshold, the trajectory segment between the trajectory point corresponding to the maximum vertical distance and the starting trajectory point, and the trajectory segment between the trajectory point corresponding to the maximum distance and the ending trajectory point, are determined as the trajectory segments to be compressed in the next round.
[0139] In some embodiments, when the processing module 1003 is specifically implemented, the plurality of candidate trajectory points may be divided into a plurality of trajectory point groups in the following manner: according to a preset grouping rule, a preset number of trajectory points are sequentially divided from the plurality of trajectory points as a trajectory point group.
[0140] In some embodiments, when the above-mentioned processing module 1003 is specifically implemented, the distance between the target point and the target driving path can be calculated according to multiple trajectory point groups in the following manner: according to a preset screening rule, a candidate trajectory point group that meets the requirements is screened out from multiple trajectory point groups; a trajectory point group adjacent to the candidate trajectory point group is obtained, and the trajectory point group is merged with the candidate trajectory point group to obtain a target trajectory point group; based on the target trajectory point group, the distance between the target point and the target driving path is calculated.
[0141] In some embodiments, when the above-mentioned processing module 1003 is implemented, a candidate trajectory point group that meets the requirements can be screened out from multiple trajectory point groups according to preset screening rules in the following manner: respectively calculate the first distance between the target point and the specified trajectory point in the multiple trajectory point groups; and screen out the trajectory point group where the specified trajectory point with the smallest first distance is located as the candidate trajectory point group.
[0142] In some embodiments, when the above-mentioned processing module 1003 is specifically implemented, the distance between the target point and the target driving path can be calculated according to the target trajectory point group in the following manner: respectively calculating the second distance between the target point and each trajectory point included in the target trajectory point group; connecting two adjacent trajectory points in the target trajectory point group to obtain multiple connecting line segments; respectively calculating the vertical distance between the target point and the multiple connecting line segments to obtain a third distance; and selecting the distance with the smallest value from the second distance and the third distance as the distance between the target point and the target driving path.
[0143] In some embodiments, after determining the convenience of the target riding route and the target driving route based on the distance between the target point and the target driving route, when the device is implemented, it can also be used to determine whether the target passenger order matches the target driver based on the convenience of the target riding route and the target driving route; when it is determined that the target passenger order matches the target driver, the target passenger order is pushed to and displayed to the target driver.
[0144] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0145] As can be seen from the above, the device for determining the convenience of a passenger order provided in the embodiment of the present specification first compresses the trajectory points included in the target driving path according to a preset compression threshold, which can effectively reduce the number of trajectory points to be processed, reduce the consumption of storage resources when storing trajectory points, and reduce the consumption of computing resources when subsequently processing trajectory points; then divides a plurality of compressed candidate trajectory points into a plurality of trajectory point groups; and then calculates the distance between the target point and the target driving path based on the plurality of trajectory point groups, thereby further reducing the consumption of computing resources when processing trajectory points, so that the distance between the target point in the target riding path and the target driving path of the target driver can be efficiently and accurately determined at a lower data processing cost, thereby accurately determining the convenience of the target riding path and the target driving path.
[0146] The present specification also provides a data processing device. Fig.11 As shown, the following structural modules can be included:
[0147] The response module 1101 may be specifically used to receive and respond to a trigger operation of a target driver, and provide a target driving path of the target driver to a server; wherein the server compresses the track points included in the target driving path according to a preset compression threshold value, and obtains a plurality of compressed candidate track points; the server further divides the plurality of candidate track points into a plurality of track point groups; and calculates the distance between the target point and the target driving path according to the plurality of track point groups; wherein the target point is a ride start point and / or ride end point of a target ride path corresponding to a target passenger order; the server further determines a passenger order that matches the target driver according to the distance between the target point and the target driving path;
[0148] The receiving module 1102 may be specifically used to receive the passenger order matched with the target driver fed back by the server;
[0149] The display module 1103 can be specifically used to display passenger orders matching the target driver to the target driver.
[0150] The present specification also provides a data processing device, which may include the following structural modules during specific implementation:
[0151] The acquisition module can be used to obtain the target point and target trajectory;
[0152] The compression module may be specifically used to compress the trajectory points contained in the target trajectory according to a preset compression threshold value to obtain a plurality of compressed candidate trajectory points;
[0153] The calculation module may be specifically configured to divide the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculate the distance between the target point and the target trajectory according to the plurality of trajectory point groups.
[0154] Although the present specification provides method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent a unique execution order. When the device or client product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. The first, second, etc. words are used to represent the name, and do not represent any particular order.
[0155] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.
[0156] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media including storage devices.
[0157] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that the present specification can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can essentially be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.
[0158] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. This specification can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.
[0159] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.
Claims
1. A method for determining the convenience of a passenger order, characterized in that: include: Obtaining a target point and a target driving path of a target driver; wherein the target point is a ride start point and / or ride end point of a target ride path; and the target ride path is determined according to a target passenger order; According to a preset compression threshold, the trajectory points included in the target driving path are compressed to obtain a plurality of compressed candidate trajectory points; wherein the preset compression threshold is determined in the following manner: a compression test is performed based on the historical sample path; according to the compression test result, a compression value is found that makes the mileage change rate of the sample path before and after compression of most of the historical sample paths less than or equal to a preset error rate threshold; at the same time, a compression value at which the ratio of the number of trajectory points deleted after compression to the number of trajectory points before compression is greater than or equal to a preset compression rate threshold is used as the preset compression threshold; Divide the plurality of candidate trajectory points into a plurality of trajectory point groups; and calculate the distance between the target point and the target driving path according to the plurality of trajectory point groups; wherein, calculating the distance between the target point and the target driving path according to the plurality of trajectory point groups comprises: selecting a candidate trajectory point group that meets the requirements from the plurality of trajectory point groups according to a preset screening rule; obtaining a trajectory point group adjacent to the candidate trajectory point group, and merging the trajectory point group with the candidate trajectory point group to obtain a target trajectory point group; and calculating the distance between the target point and the target driving path according to the target trajectory point group; According to the distance between the target point and the target driving path, the contiguity between the target riding path and the target driving path is determined.
2. The method according to claim 1, characterized in that According to the preset compression threshold, the trajectory points contained in the target driving path are compressed, including: The trajectory points contained in the current trajectory segment of the current wheel are compressed in the following manner: Determine the starting track point and the ending track point of the current track segment; and use a straight line segment to connect the starting track point and the ending track point to obtain a reference line segment; Calculate the vertical distance from each track point in the current track segment to the reference line segment; Filter out the maximum vertical distance from each track point in the current track segment to the reference line segment; and compare the maximum vertical distance with a preset compression threshold to obtain a comparison result; According to the comparison result, the current trajectory segment is compressed accordingly.
3. The method according to claim 2, characterized in that Calculate the vertical distance from each track point in the current track segment to the reference line segment, including: The vertical distance from the current track point to the reference line segment in the current track segment is calculated as follows: Calculate the arc length of the current track segment, the arc length between the current track point and the starting track point, and the arc length between the current track point and the ending track point; Calculate the area of the triangle formed by the starting track point, the ending track point and the current track point according to the arc length of the current track segment, the arc length between the current track point and the starting track point, and the arc length between the current track point and the ending track point; The vertical distance from the current trajectory point to the reference line segment is calculated according to the area of the triangle and the arc length of the current trajectory segment.
4. The method according to claim 2, characterized in that: According to the comparison result, the current trajectory segment is compressed accordingly, including: According to the comparison result, when it is determined that the maximum vertical distance is less than the preset compression threshold, the starting trajectory point and the ending trajectory point of the current trajectory segment are retained as candidate trajectory points; and the compression process of the current trajectory segment is terminated; According to the comparison results, when it is determined that the maximum vertical distance is greater than or equal to the preset compression threshold, the trajectory segment between the trajectory point corresponding to the maximum vertical distance and the starting trajectory point, as well as the trajectory segment between the trajectory point corresponding to the maximum distance and the ending trajectory point, are determined as the trajectory segments to be compressed in the next round.
5. The method according to claim 1, characterized in that Dividing the plurality of candidate trajectory points into a plurality of trajectory point groups comprises: According to a preset grouping rule, a preset number of trajectory points are sequentially divided from the plurality of trajectory points as a trajectory point group.
6. The method according to claim 1, characterized in that According to the preset screening rules, the candidate trajectory point groups that meet the requirements are screened out from multiple trajectory point groups, including: respectively calculating first distances between the target point and designated trajectory points in the plurality of trajectory point groups; The trajectory point group where the designated trajectory point with the smallest first distance is located is selected as the candidate trajectory point group.
7. The method according to claim 1, characterized in that According to the target trajectory point group, the distance between the target point and the target driving path is calculated, including: respectively calculating the second distance between the target point and each trajectory point included in the target trajectory point group; Connect two adjacent trajectory points in the target trajectory point group to obtain multiple connecting line segments; Calculate the vertical distances between the target point and the multiple connecting line segments respectively to obtain a third distance; The distance with the smallest value is selected from the second distance and the third distance as the distance between the target point and the target driving path.
8. The method according to claim 1, characterized in that After determining the convenience between the target riding route and the target driving route according to the distance between the target point and the target driving route, the method further includes: Determine whether the target passenger order matches the target driver based on the contiguity of the target ride route and the target driving route; When it is determined that the target passenger order matches the target driver, the target passenger order is pushed and displayed to the target driver.
9. A data processing method, characterized in that: include: Receive and respond to the trigger operation of the target driver, and provide the target driving path of the target driver to the server; wherein the server compresses the track points contained in the target driving path according to a preset compression threshold to obtain a plurality of compressed candidate track points; the server also divides the plurality of candidate track points into a plurality of track point groups; and calculates the distance between the target point and the target driving path according to the plurality of track point groups; wherein the target point is the ride start point and / or ride end point of the target ride path corresponding to the target passenger order; the server also determines the passenger order matching the target driver according to the distance between the target point and the target driving path; the preset compression threshold is determined in the following manner: obtain and calculate the distance between the target point and the target driving path based on the historical sample path; , perform compression test; according to the compression test result, find out the mileage change rate of the sample paths before and after compression of most of the historical sample paths that is less than or equal to the preset error rate threshold; at the same time, the ratio of the number of trajectory points deleted after compression to the number of trajectory points before compression is greater than or equal to the compression value of the preset compression rate threshold, which is used as the preset compression threshold; according to multiple trajectory point groups, calculate the distance between the target point and the target driving path, including: according to the preset screening rules, screen out candidate trajectory point groups that meet the requirements from multiple trajectory point groups; obtain a trajectory point group adjacent to the candidate trajectory point group, and merge the trajectory point group with the candidate trajectory point group to obtain a target trajectory point group; according to the target trajectory point group, calculate the distance between the target point and the target driving path; Receive the passenger order matching the target driver from the server; The target driver is presented with the passenger orders that match the target driver.
10. A data processing method, characterized in that: include: Get the target point and target trajectory; According to a preset compression threshold, the trajectory points included in the target trajectory are compressed to obtain a plurality of compressed candidate trajectory points; wherein the preset compression threshold is determined in the following manner: a compression test is performed based on a historical sample path and a mileage change rate of the sample path before and after compression of most of the historical sample paths is found to be less than or equal to a preset error rate threshold according to the compression test result; at the same time, a compression value at which the ratio of the number of trajectory points deleted after compression to the number of trajectory points before compression is greater than or equal to a preset compression rate threshold is used as the preset compression threshold; The multiple candidate trajectory points are divided into multiple trajectory point groups; and the distance between the target point and the target trajectory is calculated according to the multiple trajectory point groups; wherein, the distance between the target point and the target path is calculated according to the multiple trajectory point groups, including: according to a preset screening rule, a candidate trajectory point group that meets the requirements is screened out from the multiple trajectory point groups; a trajectory point group adjacent to the candidate trajectory point group is obtained, and the trajectory point group is merged with the candidate trajectory point group to obtain a target trajectory point group; and the distance between the target point and the target path is calculated according to the target trajectory point group.
11. A device for determining the convenience of a passenger order, characterized in that: include: An acquisition module, used to acquire a target point and a target driving path of a target driver; wherein the target point is a ride start point and / or ride end point of a target ride path; and the target ride path is determined according to a target passenger order; A compression module is used to compress the trajectory points included in the target driving path according to a preset compression threshold value to obtain a plurality of compressed candidate trajectory points; wherein the preset compression threshold value is determined in the following manner: obtaining and performing a compression test based on a historical sample path; according to the compression test result, finding a compression value that makes the mileage change rate of the sample path before and after compression of most of the historical sample paths less than or equal to a preset error rate threshold value; at the same time, a compression value at which the ratio of the number of trajectory points deleted after compression to the number of trajectory points before compression is greater than or equal to a preset compression rate threshold value is used as the preset compression threshold value; A processing module is used to divide the multiple candidate trajectory points into multiple trajectory point groups; and calculate the distance between the target point and the target driving path according to the multiple trajectory point groups; wherein the processing module is specifically used to filter out a candidate trajectory point group that meets the requirements from the multiple trajectory point groups according to a preset filtering rule; obtain a trajectory point group adjacent to the candidate trajectory point group, and merge the trajectory point group with the candidate trajectory point group to obtain a target trajectory point group; calculate the distance between the target point and the target driving path according to the target trajectory point group; The determination module is used to determine the contiguity of the target riding route and the target driving route according to the distance between the target point and the target driving route.
12. A server, characterized in that: The invention comprises a processor and a memory for storing processor-executable instructions, wherein the processor implements the steps of the method according to any one of claims 1 to 8 or 10 when executing the instructions.
13. A terminal device, characterized in that: The invention comprises a processor and a memory for storing processor-executable instructions, wherein the steps of the method according to claim 9 are implemented when the processor executes the instructions.
14. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed by a processor, the steps of the method described in any one of claims 1 to 8, or 9, or 10 are implemented.
Citation Information
Patent Citations
Order processing method and device, computer equipment and storage medium
CN110599300A
Data processing method and device, electronic equipment and storage medium
CN113131946A