Method and apparatus for processing data, device, and readable storage medium
By splitting the lane curve into candidate division curves and generating unit lane compression data, the problem of low compression rate of existing map data is solved, and more efficient storage and transmission is achieved.
Patent Information
- Application Number
- PCT/CN2024/133118
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-11-20
- Publication Date
- 2025-07-03
AI Technical Summary
The existing map data compression algorithm is difficult to significantly improve the compression rate on the existing basis, resulting in a large amount of storage space and network resources occupied during map data storage and transmission, affecting the smoothness of map data.
By splitting the lane curve into candidate division curves and fitting the mathematical curve function to generate unit lane compression data, only the shape start point, shape end point and target point combination are saved, reducing the amount of data.
It reduces the storage cost of lane curves and network resource consumption during transmission, and improves the storage and transmission efficiency of map data.
Smart Images

Figure CN2024133118_03072025_PF_FP_ABST
Abstract
Description
Data processing method, device, equipment and readable storage medium
[0001] Related applications
[0002] This application claims priority to Chinese patent application number 2023118530285, filed on December 29, 2023, entitled “Data processing method, device, apparatus and readable storage medium,” the entire text of which is hereby incorporated by reference. Technical Field
[0003] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, and readable storage medium. Background Art
[0004] In current map data, map data is usually stored and transmitted in blocks, and compressed at the data expression level to reduce the amount of map data. However, the existing data compression algorithm is already very mature and it is difficult to make significant improvements on the existing basis, and the compression rate is low.
[0005] With the demand for map data accuracy, the number of shape points in lane curves has increased, and the amount of data used to store the coordinate information of the shape points has become larger and larger. This will take up a lot of storage space during the storage of map data and consume a lot of network resources during the transmission process. When the amount of data is too large, it will also affect the smoothness of the client's reception and use of map data. Summary of the Invention
[0006] Embodiments of the present application provide a data processing method, apparatus, device, and readable storage medium.
[0007] In one aspect, an embodiment of the present application provides a data processing method, which is executed by a computer device and includes:
[0008] Obtain a candidate partition curve divided from a lane curve, the candidate partition curve including a shape start point, a shape end point, and M shape points located between the shape start point and the shape end point, the shape points including points representing curve turning positions in the lane curve, where M is a positive integer;
[0009] Determine N shape point combinations from the M shape points, each shape point combination includes the same number of shape points, and N is a positive integer;
[0010] Obtaining shape lengths between each of the M shape points and the shape starting point, and determining parameters to be fitted corresponding to each of the M shape points based on the shape lengths;
[0011] Determine N fitting point combinations corresponding one-to-one to the N shape point combinations using the parameters to be fitted;
[0012] Generate N fitting curves based on the shape starting point, the shape end point, and the N fitting points;
[0013] If it is determined according to the N fitting curves that a fitting point combination that satisfies the shape deviation condition exists, then the fitting point combination that satisfies the shape deviation condition is determined as the target point combination; and
[0014] The shape starting point, the shape ending point, and the target point are combined to determine the unit lane compression data corresponding to the candidate dividing curve.
[0015] The present application also provides a data processing method, which is executed by a computer device and includes:
[0016] Obtain complete lane compression data for a lane curve sent by a service server, and obtain A unit lane compression data from the complete lane compression data; the lane curve is composed of candidate dividing curves corresponding to the A unit lane compression data; each unit lane compression data includes a shape starting point, a shape ending point, and a target point combination of the corresponding candidate dividing curve, the target point combination being determined based on shape points in the candidate dividing curve corresponding to the unit lane compression data, the shape points including points representing turning points in the lane curve; A is a positive integer; and
[0017] A restoration curve is generated based on the combination of A shape starting points, A shape ending points and A target points, and a displayable lane curve matching the lane curve is generated through the A restoration curves.
[0018] In one aspect, an embodiment of the present application provides a data processing device, including:
[0019] a curve segmentation module, configured to obtain a candidate segmentation curve segmented from a lane curve, wherein the candidate segmentation curve includes a shape start point, a shape end point, and M shape points located between the shape start point and the shape end point, wherein the shape points include points representing curve turning positions in the lane curve, and M is a positive integer;
[0020] a combination processing module, configured to determine N shape point combinations from the M shape points, each shape point combination comprising the same number of shape points, where N is a positive integer;
[0021] a fitting processing module, configured to obtain shape lengths between each of the M shape points and the shape starting point, determine parameters to be fitted corresponding to each of the M shape points based on the shape lengths, determine N fitting point combinations corresponding one-to-one to the N shape point combinations based on the parameters to be fitted, and generate N fitting curves based on the shape starting point, the shape end point, and the N fitting point combinations;
[0022] A data generation module is configured to, if a fitting point combination that satisfies a shape deviation condition is determined based on the N fitting curves, determine the fitting point combination that satisfies the shape deviation condition as a target point combination, and determine the shape starting point, the shape end point, and the target point combination as unit lane compression data corresponding to the candidate dividing curve.
[0023] On one hand, an embodiment of the present application provides another data processing device, including:
[0024] a data acquisition module configured to acquire complete lane compression data for a lane curve sent by a service server, and to acquire A units of lane compression data from the complete lane compression data; the lane curve is composed of candidate dividing curves corresponding to the A units of lane compression data; each unit of lane compression data includes a shape starting point, a shape ending point, and a target point combination of the corresponding candidate dividing curve; the target point combination is determined based on shape points in the candidate dividing curve corresponding to the unit lane compression data, the shape points including points representing turning points in the lane curve; and A is a positive integer;
[0025] A curve generation module is used to generate A restoration curves based on A shape starting points, A shape end points and A target points, and to generate a displayable lane curve that matches the lane curve through the A restoration curves.
[0026] An embodiment of the present application provides a computer device, including: a processor, a memory, and a network interface;
[0027] The processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication functions, and the memory is used to store computer programs. When the computer program is executed by the processor, the computer device executes the method provided in the embodiment of the present application.
[0028] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.
[0029] In one aspect, an embodiment of the present application provides a computer program product, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method provided in the embodiment of the present application.
[0030] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.
[0032] FIG1 is a schematic diagram of a network architecture provided by an embodiment of the present application;
[0033] FIG2 is a schematic diagram of a data processing scenario provided by an embodiment of the present application;
[0034] FIG3 is a flowchart of a data processing method according to an embodiment of the present application;
[0035] FIG4 is a second schematic diagram of a data processing scenario provided in an embodiment of the present application;
[0036] FIG5 is a second flow chart of a data processing method provided in an embodiment of the present application;
[0037] FIG6 is a third flow chart of a data processing method provided in an embodiment of the present application;
[0038] FIG7 is a first structural diagram of a data processing device provided in an embodiment of the present application;
[0039] FIG8 is a second structural diagram of a data processing device provided in an embodiment of the present application;
[0040] FIG9 is a schematic structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0042] The solution provided in the embodiments of this application relates to the field of maps, and is specifically described through the following embodiments:
[0043] Please refer to Figure 1, which is a schematic diagram of a network architecture provided by an embodiment of the present application. As shown in Figure 1, the network architecture may include a business server 100 and a terminal device cluster, and the terminal device cluster may include terminal device 10a, terminal device 10b, ..., terminal device 10n, wherein any terminal device in the terminal device cluster may have a communication connection with the business server 100, for example, there is a communication connection between terminal device 10a and the business server 100, and there is a communication connection between terminal device 10b and the business server 100, wherein the above-mentioned communication connection does not limit the connection method, and may be directly or indirectly connected by wired communication, or directly or indirectly connected by wireless communication, or by other methods, and the present application does not make any restrictions here.
[0044] It should be understood that each terminal device in the terminal cluster shown in Figure 1 can be installed with an application client. When the application client runs in each terminal device, it can interact with the business server 100 shown in Figure 1 above, so that the business server 100 can receive business data from each terminal device. Among them, the application client can be a game application, video editing application, social application, instant messaging application, live broadcast application, short video application, video application, music application, shopping application, novel application, payment application, browser, etc., which has image, video and other data information functions. Among them, the application client can be an independent client or an embedded sub-client integrated in a client (such as an instant messaging client, a social client, a video client, etc.), which is not limited here.
[0045] As shown in FIG1 , the service server 100 may split the lane curve into several candidate dividing curves, and for each candidate dividing curve, perform fitting using a mathematical curve function to generate unit lane compression data corresponding to the candidate dividing curve.
[0046] A lane curve is a special curve in map data that can represent the shape of a lane. For example, it can be a lane marking or lane edge line. Lane curves are commonly used to represent road networks in map data and are used for vehicle navigation and path planning. Lane curves can include segment points, which can be points at the turning points and positions of the lane curve. Candidate segmentation curves can be curves within a lane curve.
[0047] The service server 100 may combine the unit lane compression data corresponding to several candidate dividing curves into complete unit lane compression data.
[0048] When the service server receives a data acquisition request sent by a terminal device (eg, the terminal device 10a) that needs to display the lane curve, the service server 100 may send the complete unit lane compressed data to the terminal device 10a.
[0049] The terminal device 10a can obtain the complete lane compression data for the lane curve sent by the service server 100 and obtain a plurality of unit lane compression data within the complete lane compression data. Based on the aforementioned mathematical curve function, the terminal device 10a can generate a restoration curve from the unit lane compression data. Using the restoration curve corresponding to each unit lane compression data, the terminal device 10a can generate a displayable lane curve that matches the lane curve. The displayable lane curve can be used to represent the road network in map data for vehicle navigation and route planning.
[0050] It is understandable that in the specific implementation of this application, the user data involved, when the above and following embodiments of this application are applied to specific products or technologies, needs to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of the relevant regions.
[0051] The embodiment of the present application generates unit lane compression data through some shape points in the candidate dividing curve, that is, the unit lane compression data no longer needs to save all the shape points in the lane curve, so the data volume of the compressed data corresponding to the lane curve is greatly reduced, thereby reducing the storage cost of the lane curve and the network resource consumption during the transmission process.
[0052] Please refer to Figure 2, which is a schematic diagram of a data processing scenario provided in an embodiment of the present application.
[0053] As shown in FIG. 2 , the map data of a road 200 may include a lane curve 201 , a lane curve 202 , a lane curve 203 , and a lane curve 204 .
[0054] A lane curve is a special type of curve in map data that represents the shape of a lane. For example, it can be a lane marking or lane edge line. Lane curves are commonly used to represent road networks in map data for vehicle navigation and path planning. Lane curves are composed of shape points, which are the turning points and positions of lane curves. In map data, the positions of lane curve shape points are typically represented by a series of coordinates that represent the physical location of lane lines.
[0055] For ease of understanding, taking lane curve 201 as an example, the service server 100 can obtain the initial fitting range of lane curve 201, wherein the initial fitting range can be a numerical range with an upper limit value less than or equal to 1, for example, it can be 0 to 0.5, that is, the initial fitting range is [0, 0.5]. The shape points of lane curve 201 can include shape point P a , shape point P b , shape point P c Equal shape points.
[0056] The service server 100 may obtain the candidate dividing curve 1 in the lane curve 201 through the initial fitting range [0, 0.5], where the initial fitting range [0, 0.5] is half of the lane curve 201 .
[0057] The candidate dividing curve 1 may be a portion of the curve determined based on the fitting range in the lane curve 201. The candidate dividing curve 1 includes a portion of the shape points of the lane curve 201. The shape point located at the starting position of the candidate dividing curve may be referred to as the shape starting point of the candidate dividing curve, and the shape point located at the ending position of the candidate dividing curve may be referred to as the shape end point of the candidate dividing curve. When there is no shape point located at the starting position or the ending position in the candidate dividing curve, for example, in the fitting range [0, 0.3], the candidate dividing curve does not have a shape point located at 30% of the total length. The business server 100 may use two points P1 and P2 close to 30% of the total length (the percentage of P1 is less than 30%, and the percentage of P2 is greater than 30%) to linearly interpolate the shape points of 30% of the total length using P1 and P2. At this time, P1 and P2 may also be referred to as shape end points. The candidate dividing curve may include a shape starting point, a shape end point, and several shape points located between the shape starting point and the shape end point.
[0058] Shape point P in candidate segmentation curve 1 a It can be called the shape starting point P of the candidate segmentation curve 1 a , shape point P in candidate partition curve 1 b It can be called the shape end point P of the candidate segmentation curve 1 b .
[0059] Therefore, the candidate segmentation curve 1 may include the shape starting point P a , shape end point P b , and the starting point P of the shape a and shape endpoint P b The service server 100 may fit the candidate segmentation curve 1 using a mathematical curve function to obtain a first fitting point combination (including fitting point q1 and fitting point q2) that meets the shape deviation condition. The service server 100 may determine the first fitting point combination as the first target point combination (including fitting point q1 and fitting point q2).
[0060] The shape deviation condition may be that the deviation distance determined based on the fitting point combination is less than or equal to the shape deviation threshold. The deviation distance determined based on the fitting point combination may be the average deviation distance corresponding to the fitting point combination, or the maximum deviation distance corresponding to the fitting point combination, or the minimum deviation distance corresponding to the fitting point combination, or the weighted deviation distance corresponding to the fitting point combination. The average deviation distance may be the average deviation value between the shape point and the fitting curve generated by the mathematical curve function, the maximum deviation distance may be the maximum deviation value between the shape point and the fitting curve generated by the mathematical curve function, the minimum deviation distance may be the minimum deviation value between the shape point and the fitting curve generated by the mathematical curve function, and the weighted deviation distance may be the weighted deviation value between the shape point and the fitting curve generated by the mathematical curve function. The shape deviation threshold may be the allowable error value of the lane curve, for example, 0.1 meter.
[0061] The service server 100 can a , shape end point P b The unit lane compression data 1 corresponding to the candidate dividing curve 1 is determined in combination with the first target point.
[0062] Among them, the mathematical curve function can be a third-order Bezier curve, which is defined by two control points (which can be a combination of target points) and two endpoints (shape starting point and shape end point). The two endpoints are the starting point and end point of the curve, and the other two control points are used to control the shape of the curve. The third-order Bezier curve has a cubic Bezier equation. The mathematical curve function can also be other functions that draw a curve on a two-dimensional plane, and the embodiments of the present application are not limited here.
[0063] It can be understood that the unit lane compression data 1 may only include the shape starting point P of the candidate dividing curve 1. a , shape end point P b Combined with the first target point, the data volume of the unit lane compressed data 1 is much smaller than the data volume occupied by the coordinate information of all shape points in the candidate dividing curve 1, which can greatly reduce the data volume of the compressed data corresponding to the lane curve 201.
[0064] The business server 100 can determine the initial fitting range corresponding to the candidate dividing curve 1 as the fitted range. The business server 100 can continue to determine the fitting range in the range other than the fitted range in the lane curve 201. For example, the candidate dividing curve 2 in the lane curve 201 can be obtained through the newly determined fitting range.
[0065] Candidate segmentation curve 2 may include shape starting point P b , shape end point P c , and the starting point P of the shape band shape endpoint P c The service server 100 may fit the candidate segmentation curve 2 using a mathematical curve function to obtain a second fitting point combination (including fitting point q3 and fitting point q4) that meets the shape deviation condition. The service server 100 may determine the second fitting point combination as the second target point combination (including fitting point q3 and fitting point q4).
[0066] The service server 100 can b , shape end point P c The unit lane compression data 2 corresponding to the candidate dividing curve 2 is determined in combination with the second target point.
[0067] The service server 100 may combine the unit lane compression data 1 corresponding to the candidate dividing curve 1 split from the lane curve 201 and the unit lane compression data 2 corresponding to the candidate dividing curve 2 into complete lane compression data.
[0068] It can be understood that the generation time of the unit lane compression data 1 is later than the generation time of the unit lane compression data 2, and the candidate dividing curve 2 corresponding to the unit lane compression data 2 is adjacent to the candidate dividing curve 1 corresponding to the unit lane compression data 1, and the shape end point P in the unit lane compression data 1 is b The shape starting point P of the unit lane compression data 2 b For the same data point S, the number of data points S included in the complete lane compression data is one, that is, the data volume of the complete lane compression data is less than the sum of the compression data of each unit lane, further reducing the data volume of the lane curve 201.
[0069] The service server 100 may send the complete unit lane compression data to a terminal device that needs to display the lane curve 201 , such as the terminal device 10 a .
[0070] The terminal device 10a can obtain the complete lane compression data for the lane curve sent by the service server 100, and obtain the unit lane compression data 1 and the unit lane compression data 2 from the complete lane compression data. The terminal device 10a can use the shape starting point P in the unit lane compression data 1 based on the above mathematical curve function. a , shape end point P b And the first target point combination generates the restoration curve 1, through the shape starting point P in the unit lane compression data 2 b , shape end point P c And the second target point combination generates restoration curve 2.
[0071] The terminal device 10a can generate a displayable lane curve that matches the lane curve 201 by restoring the curve 1 and the curve 2. The displayable lane curve can be used to represent a road network in map data for vehicle navigation and path planning.
[0072] In an embodiment of the present application, candidate partitioning curves are obtained from lane curves, and M shape point combinations between the shape start point and the shape end point in the candidate partitioning curves are determined as N shape point combinations, with each shape point combination containing the same number of shape points. The shape lengths between each of the M shape points and the shape start point are obtained, and the parameters to be fitted corresponding to each of the M shape points are determined based on the shape lengths. N fitting point combinations corresponding to the N shape point combinations are determined based on the parameters to be fitted. N fitting curves are generated using a mathematical curve function based on the shape start point, the shape end point, and the N fitting point combinations. If a fitting point combination that satisfies a shape deviation condition is determined in the N fitting curves, the fitting point combination that satisfies the shape deviation condition is determined as a target point combination, and the shape start point, the shape end point, and the target point combination are determined as the unit lane compression data corresponding to the candidate partitioning curve. By splitting the lane curve into several candidate dividing curves, determining the fitting point combination that meets the shape deviation condition in the candidate dividing curve, obtaining the target point combination, and determining the shape starting point, shape end point and target point combination as the unit lane compressed data corresponding to the candidate dividing curve, the embodiment of the present application determines the fitting point combination that meets the shape deviation condition as the target point combination, which can improve the accuracy of restoring the lane curve through the unit lane compressed data. Moreover, since the unit lane compressed data only contains the shape starting point, shape end point and target point combination, that is, the unit lane compressed data no longer needs to save all the shape points in the lane curve, the data volume of the compressed data corresponding to the lane curve is greatly reduced, thereby reducing the storage cost of the lane curve and the network resource consumption during the transmission process.
[0073] Please refer to Figure 3, which is a flowchart of a data processing method provided in an embodiment of the present application. The data processing method can be executed by a computer device, which can be the business server 100 shown in Figure 1. The following description will take the data processing method executed by a computer device as an example. The data processing method can include at least the following steps S301-S307:
[0074] Step S301, obtaining a candidate dividing curve divided from a lane curve, wherein the candidate dividing curve includes a shape starting point, a shape end point, and M shape points located between the shape starting point and the shape end point, wherein the shape points include points representing the turning position of the curve in the lane curve, and M is a positive integer.
[0075] Specifically, the computer device may obtain candidate dividing curves divided from the lane curves.
[0076] The candidate segmentation curve may be determined by the computer device within the lane curve using an initial fitting range. The initial fitting range may be a numerical range with an upper limit less than or equal to 1. When the computer device first segments the lane curve, the initial fitting range may be 0 to 1, i.e., the initial fitting range is [0, 1]. The computer device may determine the entire lane curve as the candidate segmentation curve.
[0077] A lane curve is a special type of curve in map data that represents the shape of a lane. For example, it can be a lane marking or lane edge line. Lane curves are commonly used to represent road networks in map data for vehicle navigation and path planning. Lane curves are composed of shape points, which are the turning points and positions of lane curves. In map data, the positions of lane curve shape points are typically represented by a series of coordinates that represent the physical location of lane lines.
[0078] A candidate dividing curve may be a portion of a lane curve determined based on a fitting range. The candidate dividing curve includes a portion of shape points of the lane curve. The shape point located at the starting position of the candidate dividing curve may be referred to as a shape starting point of the candidate dividing curve, and the shape point located at the ending position of the candidate dividing curve may be referred to as a shape end point of the candidate dividing curve. When there is no shape point located at the starting position or the ending position in the candidate dividing curve, for example, in the fitting range [0, 0.3], there is no shape point located at 30% of the total length in the candidate dividing curve. The computer device may linearly interpolate a shape point at 30% of the total length using two points P1 and P2 close to 30% of the total length (the percentage of P1 is less than 30%, and the percentage of P2 is greater than 30%). In this case, P1 and P2 may also be referred to as shape end points. The candidate dividing curve may include a shape starting point, a shape end point, and a plurality of shape points located between the shape starting point and the shape end point.
[0079] Step S302: Determine N shape point combinations from the M shape points. Each shape point combination contains the same number of shape points, and N is a positive integer.
[0080] Specifically, the computer device may determine N shape point combinations from the M shape points of the candidate partition curve. A shape point combination may be a combination of any points in the candidate partition curve, and the number of shape points included in each shape point combination may be the same. For example, when each shape point combination includes two shape points, the computer device may combine any two shape points to obtain a shape point combination. For example, if the M shape points may include shape point p2, shape point p3, and shape point p4, the computer device may combine to obtain shape point combination 1 (which may include shape point p2 and shape point p3), shape point combination 2 (which may include shape point p3 and shape point p4), and shape point combination 3 (which may include shape point p2 and shape point p4).
[0081] Step S303 : obtaining shape lengths between each of the M shape points and the shape starting point, and determining the parameters to be fitted corresponding to each of the M shape points based on the shape lengths.
[0082] Step S304: determining N fitting point combinations corresponding one-to-one to the N shape point combinations through the parameters to be fitted.
[0083] Step S305 : generating N fitting curves based on the shape starting point, the shape ending point, and the N fitting points.
[0084] Specifically, the computer device may obtain the shape lengths between each of the M shape points and the shape starting point.
[0085] The computer device can determine the shape lengths between each of the M shape points and the shape starting point by: obtaining the total length of the shape curve of the candidate dividing curve, obtaining the shape lengths between each of the M shape points and the shape starting point; and determining the parameters to be fitted corresponding to each of the M shape points based on the ratio of the shape lengths corresponding to each of the M shape points to the total length of the shape curve.
[0086] Specifically, the computer device may obtain the total length of the shape curve of the candidate segmentation curve by: determining the total length of the shape curve of the candidate segmentation curve based on the shape positions of the shape starting point, the M shape points, and the shape end point;
[0087] Specifically, the candidate segmentation curves may include a shape starting point p1, M shape points (p2, p3, p4, etc.) and a shape end point p M+1 .
[0088] The computer device can pass the shape starting point p1, M shape points (shape point p2, shape point p3, shape point p4, etc.) and the shape end point p M+1 The shape position (which can be the coordinate information of the point) is used to determine the total length L of the shape curve of the candidate partition curve. The calculation of the total length L of the shape curve is shown in formula (1):
[0089] Among them, when v=1, p v That is the shape starting point p1, when v=M, p v This is the shape end point p M+1 , shape point p2 is a shape point adjacent to the shape starting point p1.
[0090] The computer device can obtain the shape lengths between the M shape points and the shape starting point, and the process can be: if i is equal to 2, then based on the shape position of the shape starting point and shape point p2, the shape length of shape point p2 is determined; shape point p2 is a shape point adjacent to the shape starting point; if i is greater than 2, then based on the shape starting point, shape point p i And the shape position of the middle shape point, determine the shape point p i The shape length; the middle shape point is located between the shape starting point and the shape point p i The shape points between.
[0091] Specifically, the computer device can calculate the shape point p i The corresponding shape length l i .
[0092] If i is equal to 2, the computer device may determine the shape length l2 of the shape point p2 based on the shape starting point p1 and the shape position of the shape point p2;
[0093] If i is greater than 2, the computer device can be based on the shape starting point p1, shape point p i And the shape position of the middle shape point, determine the shape point p i The shape length l i Among them, the middle shape point is located between the shape starting point p1 and the shape point p i The shape points between.
[0094] For any shape point p among the M shape points of the candidate partition curve i , its shape length l i The calculation can be shown as formula (2):
[0095] Among them, the shape point p i The corresponding shape length is l i .
[0096] The computer device can point the shape to p i The corresponding shape length l i The ratio of the total length L of the shape curve is determined as the shape point p i The corresponding parameter to be fitted ω i Parameter to be fitted ω i The calculation of can be shown as formula (3):
[0097] Among them, the shape point p i The corresponding parameter to be fitted is ω i .
[0098] The computer device can determine N fitting point combinations that correspond one-to-one to the N shape point combinations through the parameters to be fitted.
[0099] For ease of understanding, let's take a third-order Bezier curve as an example of a mathematical curve function fitted by a computer device. A third-order Bezier curve is defined by two control points and two endpoints. The two endpoints are the starting and ending points of the curve, and the other two control points are used to control the shape of the curve. A third-order Bezier curve has a cubic Bezier equation. The mathematical curve function can also be other functions that draw curves on a two-dimensional plane, and this is not limited in the present embodiment.
[0100] The number of shape points in each shape point combination can be equal to the number of control points in the third-order Bezier curve, that is, the number of shape points in each shape point combination can be 2, and the shape point combination T is composed of N shape point combinations. i , shape point combination T i Take the first shape point and the second shape point as an example.
[0101] The process of the computer device determining N fitting point combinations corresponding one-to-one to the N shape point combinations based on the parameters to be fitted may be: determining a first fitting point corresponding to the first shape point based on the parameters to be fitted corresponding to the first shape point, determining a second fitting point corresponding to the second shape point based on the parameters to be fitted corresponding to the second shape point, and determining the first fitting point and the second fitting point as the shape point combination T i The corresponding combination of fitting points.
[0102] Specifically, the first shape point may be the shape point p2, and the second shape point may be the shape point p4. The computer device determines the first fitting point (which may be referred to as fitting point q2) corresponding to the shape point p2 based on the to-be-fitted parameter ω2 corresponding to the shape point p2, and determines the second fitting point (which may be referred to as fitting point q4) corresponding to the shape point p4 based on the to-be-fitted parameter ω4 corresponding to the shape point p4. i Determine the shape point p i The corresponding fitting point q i The calculation process can be shown as formula (4):
[0103] Among them, p1 is the starting point of the shape, p M+1 is the shape end point, shape point p i The corresponding fitting point is q i .
[0104] The computer device may determine the first fitting point and the second fitting point as a shape point combination T i The corresponding combination of fitting points.
[0105] The computer device may generate N fitting curves based on the shape start point, the shape end point, and the N fitting point combinations.
[0106] It can be understood that the fitting curve is a third-order Bezier curve, the two control points in the third-order Bezier curve can be a combination of fitting points, and the two endpoints in the third-order Bezier curve can be a shape start point and a shape end point. The computer device can determine the endpoints of the fitting curve based on the shape start point and the shape end point, and control the shape of the fitting curve using the combination of fitting points.
[0107] Step S306: If it is determined according to the N fitting curves that a fitting point combination that meets the shape deviation condition exists, the fitting point combination that meets the shape deviation condition is determined as the target point combination.
[0108] Step S307 : The shape starting point, the shape ending point, and the target point are combined to determine the unit lane compression data corresponding to the candidate dividing curve.
[0109] Specifically, the computer device may determine whether there is a fitting point combination that meets the shape deviation condition through N fitting curves.
[0110] The process of the computer device determining whether there is a shape deviation condition that is satisfied may be: determining the average deviation distances corresponding to the N fitting point combinations based on the M shape points; if there is a fitting point combination that is less than the shape deviation threshold value among the average deviation distances corresponding to the N fitting point combinations, then determining the fitting point combination with the smallest average deviation distance as the fitting point combination that satisfies the shape deviation condition; if there is no fitting point combination that is less than the shape deviation threshold value among the average deviation distances corresponding to the N fitting point combinations, then determining that there is no fitting point combination that satisfies the shape deviation condition.
[0111] Specifically, the computer device may determine the average deviation distances corresponding to the N fitting point combinations respectively through the M shape points.
[0112] The process of determining the average deviation distance corresponding to each fitting point combination can be: based on the fitting curve c i The corresponding curve function determines the shape point p i Corresponding business fitting point q i , through the shape point p i The coordinate components of the business fitting point q i The coordinate components of the shape point p i With the fitting curve c i When the M shape points are obtained and the fitting curve ci When the deviation distance between them is , the M deviation distances are averaged to obtain the fitting point combination H i The corresponding average deviation distance.
[0113] Specifically, the N fitting point combinations may include the fitting point combination H i , fitting point combination H i The associated fitted curve can be the fitted curve c i , for ease of understanding, take the shape point p among the M shape points i For example.
[0114] The computer device can be fitted with the curve c i The corresponding curve function f i , determine the shape point p i Corresponding business fitting point q i , business fitting point q i The calculation of q can be shown as formula (5): i =f i (p i ) Formula (5)
[0115] Among them, p i It can be expressed as a coordinate component, the horizontal coordinate component can be The ordinate component can be q i It can be expressed as a coordinate component, the horizontal coordinate component can be The ordinate component can be
[0116] Computer equipment can be used through the shape point p i The coordinate components of the business fitting point q i The coordinate components of the shape point p i With the fitting curve c i Deviation distance Deviation distance The calculation of can be shown as formula (6):
[0117] Among them, the shape point p i With the fitting curve c i The deviation distance is
[0118] M shape points and fitting curve c i The sum of the deviation distances can be expressed as The calculation of can be shown as formula (7):
[0119] Optionally, the computer device can establish a model to solve the minimum value of the sum of the deviation distances in N fitting curves by using the curve function corresponding to the fitting curve. The process can be: based on the fitting curve r i The corresponding curve function and the coordinate components of the M shape points determine the objective function, the gradient matrix corresponding to the objective function is determined by the first-order partial derivative of the objective function, the curvature matrix corresponding to the objective function is determined by the second-order partial derivative of the objective function, and the fitting point combination K is determined based on the gradient matrix and the curvature matrix. i The corresponding average deviation distance.
[0120] Specifically, the computer device can be based on the fitting curve r i The corresponding curve function and the coordinate components of the M shape points determine the objective function f, and the computer device can solve the fitting point combination (which can include the fitting point q α and fitting The coordinate components can be The ordinate component can be Fitting point q α The horizontal component of can be The ordinate component can be Fitting point q β The horizontal component of can be The ordinate component can be
[0121] The computer device can use the convex optimization calculation tool and the objective function f to solve the combination of fitting points (which can include the fitting points q α and fitting point q β ). The convex optimization calculation tool can be an open source convex optimization calculation library such as Ipopt.
[0122] For ease of understanding, taking the Ipopt open source convex optimization computing library as an example, the minimum value of the objective function f can be solved through the gradient matrix and curvature matrix (also known as the Hessian matrix) corresponding to the objective function.
[0123] The computer device can determine the gradient matrix g corresponding to the objective function f through the first-order partial derivative of the objective function. The calculation of the gradient matrix g can be shown as formula (9):
[0124] in, It can be shown as formula (10):
[0125] in, It can be shown as formula (11):
[0126] in, It can be shown as formula (12):
[0127] in, It can be shown as formula (13):
[0128] The computer device can determine the curvature matrix corresponding to the objective function through the second-order partial derivative of the objective function. The calculation of the curvature matrix h can be shown as formula (14):
[0129] in, It can be shown as formula (15):
[0130] in, It can be shown as formula (16):
[0131] in, It can be shown as formula (17):
[0132] in, It can be shown as formula (18):
[0133] in, It can be shown as formula (19):
[0134] in, It can be shown as formula (20):
[0135] in, It can be shown as formula (21):
[0136] in, It can be shown as formula (22):
[0137] In summary, through formulas (15) to (22), formula (14) can be simplified as shown in formula (23):
[0138] The computer device may determine an average deviation distance (shapeOffset) corresponding to the fitting point combination based on the gradient matrix and the curvature matrix.
[0139] The computer device can calculate M deviation distances (which may include deviation distances Deviation distance ..., deviation distance ) are averaged to obtain the average deviation distance (shapeOffset) corresponding to the fitting point combination. The calculation of the average deviation distance can be shown in formula (24):
[0140] The computer device can obtain the shape deviation threshold S max The shape deviation threshold may be an allowable error value for a lane curve, for example, 0.1 meter.
[0141] The computer device can combine the N fitting points to form the corresponding average deviation distance shapeOffset and shape deviation threshold S max Make a judgment.
[0142] If there is a fitting point combination smaller than the shape deviation threshold among the average deviation distances corresponding to the N fitting point combinations, the computer device may determine the fitting point combination with the smallest average deviation distance shapeOffset as the fitting point combination that meets the shape deviation condition.
[0143] If a fitting point combination that satisfies the shape deviation condition is determined through N fitting curves, the computer device can determine the fitting point combination that satisfies the shape deviation condition as the target point combination, and determine the shape starting point, shape end point and target point combination as the unit lane compression data corresponding to the candidate dividing curve.
[0144] Please also refer to Figure 4, which is a second schematic diagram of a data processing scenario provided by an embodiment of the present application. As shown in Figure 4, after determining the unit lane compression data 2, the computer device can continue to divide the lane curve into new candidate division curves (which can be the candidate division curve 3 shown in Figure 4). The process can be: obtaining an initial fitting range of the candidate division curve in the lane curve, determining a first lower limit value and a first upper limit value through the initial fitting range, generating a first fitting range based on the first lower limit value and the first upper limit value, and determining the initial fitting range as the fitted range; the first fitting range is the range in the lane curve excluding the fitted range; re-determining a new candidate division curve through the first fitting range, if the unit lane compression data corresponding to the new candidate division curve is obtained, then the first fitting range is determined as the fitted range, until the fitted range contains the complete lane curve, and the complete lane compression data corresponding to the lane curve is obtained.
[0145] Specifically, the computer device can obtain the fitting range of the candidate dividing curve 2 in the lane curve. For example, the fitting range of the candidate dividing curve 2 can be 0 to 0.25, that is, [0, 0.25]. The computer device can determine the first lower limit value and the first upper limit value through the fitting range of the candidate dividing curve 2. For example, the first lower limit value can be 0.25 and the first upper limit value can be 1.
[0146] The computer device may generate a first fitting range based on the first lower limit value and the first upper limit value, and determine the fitting range of the candidate dividing curve 2 as the fitted range. The first fitting range may be 0.25 to 1, ie [0.25, 1].
[0147] It can be understood that the first fitting range is the range of the lane curve excluding the fitted range. If the fitted range of the lane curve only includes [0, 0.25], then the first fitting range can also be [0.25, 0.5], or [0.75, 1]. The embodiment of the present application does not limit the method for determining the first fitting range.
[0148] The computer device can re-determine a new candidate dividing curve 3 through the first fitting range. If the unit lane compression data 3 corresponding to the new candidate dividing curve 3 is obtained, the first fitting range is determined as the fitted range. Until the fitted range contains the complete lane curve, the computer device can obtain the complete lane compression data corresponding to the lane curve.
[0149] It can be understood that the complete lane compression data may include A unit lane compression data, and the candidate division curves corresponding to the A unit lane compression data respectively constitute the lane curve; the A unit lane compression data may include unit lane compression data A1 and unit lane compression data A2; the generation time of the unit lane compression data A2 may be later than the generation time of the unit lane compression data A1, and the candidate division curve corresponding to the unit lane compression data A2 is adjacent to the candidate division curve corresponding to the unit lane compression data A1, the shape end point in the unit lane compression data A1 and the shape starting point in the unit lane compression data A2 are the same data point S, and the number of data points S contained in the complete lane compression data is one.
[0150] If there is no fitting point combination smaller than the shape deviation threshold value in the average deviation distances corresponding to the N fitting point combinations, it is determined that there is no fitting point combination that meets the shape deviation condition.
[0151] The computer device may redetermine a new candidate dividing curve after determining that there is no fitting point combination that satisfies the shape deviation condition. The process may be: if it is determined based on N fitting curves that there is no fitting point combination that satisfies the shape deviation condition, then an initial fitting range of the candidate dividing curve in the lane curve is obtained, a second lower limit value and a second upper limit value are determined through the initial fitting range, and a second fitting range is generated based on the second lower limit value and the second upper limit value; a new candidate dividing curve is redetermined through the second fitting range; the new candidate dividing curve is used to redetermine a new fitting point combination, the second fitting range occupies a range of the lane curve that is smaller than the initial fitting range, and the initial fitting range covers the second fitting range.
[0152] Specifically, an initial fitting range of the candidate dividing curve in the lane curve is obtained. For example, when the initial fitting range is 0 to 0.5 (the initial fitting range is [0, 0.5]), there is no fitting point combination that meets the shape deviation condition. The computer device can determine the second lower limit value and the second upper limit value through the initial fitting range. The second lower limit value can be 0 and the second upper limit value can be 0.25.
[0153] The computer device may generate a second fitting range based on the second lower limit value and the second upper limit value, and re-determine a new candidate partition curve using the second fitting range. The second fitting range may be 0 to 0.25, that is, [0, 0.25].
[0154] It can be understood that the second fitting range occupies a smaller range of the lane curve than the initial fitting range, and the initial fitting range covers the second fitting range. The second fitting range can also be [0.25, 0.5], or [0.2, 0.4]. The embodiment of the present application does not limit the method for determining the second fitting range.
[0155] The computer device may redetermine a new candidate partition curve through the second fitting range, and redetermine a new fitting point combination through the new candidate partition curve.
[0156] To facilitate understanding of the above process, let's take the first time a computer device divides a lane curve as an example.
[0157] As shown in FIG4 , the computer device may obtain the lane curve and determine an initial fitting range of 0 to 1 (the initial fitting range is [0, 1]), that is, determine the complete lane curve as the candidate dividing curve 1 .
[0158] The computer device can fit the candidate partition curve 1 through a mathematical curve function and calculate the average shape deviation of each fitting point combination in the candidate partition curve. The minimum average shape deviation corresponding to the candidate partition curve 1 can be 0.15 meters, which is greater than the shape deviation threshold of 0.1 meters.
[0159] The computer device may determine that no combination of fitting points that satisfies the shape deviation condition exists in the candidate segmentation curve 1 .
[0160] The computer device may determine a new fitting range, such as [0, 0.25], from the initial fitting range [0, 1]. The computer device may determine the candidate dividing curve 2 in the lane curve through the new fitting range.
[0161] The computer device can fit the candidate partition curve 2 through a mathematical curve function and calculate the average shape deviation of each fitting point combination in the candidate partition curve. The minimum average shape deviation corresponding to the candidate partition curve 2 can be 0.08 meters, which is less than the shape deviation threshold of 0.1 meters.
[0162] The computer device can determine that there is a combination of fitting points that meets the shape deviation condition in the candidate segmentation curve 2 (segment2), and the computer device can determine the combination of fitting points that meets the shape deviation condition as the target point combination, and the shape starting point in the candidate segmentation curve 2 (which can be called the shape starting point) ), shape end point (can be called shape end point ) and the target point combination (which can be called the fitting point and fitting points ) is determined as the unit lane compression data 2 corresponding to the candidate division curve 2, and the fitting range [0,0.25] is determined as the fitted range.
[0163] The computer device may determine a new fitting range, for example, [0.25, 1], through the fitting range [0, 25] corresponding to the candidate dividing curve 2. The computer device may determine the candidate dividing curve 3 in the lane curve through the new fitting range.
[0164] The computer device can fit the candidate partition curve 3 through a mathematical curve function and calculate the average shape deviation of each fitting point combination in the candidate partition curve. The minimum average shape deviation corresponding to the candidate partition curve 3 can be 0.07 meters, which is less than the shape deviation threshold of 0.1 meters.
[0165] The computer device can determine that there is a combination of fitting points that meets the shape deviation condition in the candidate segmentation curve 3 (segment3), and the computer device can determine the combination of fitting points that meets the shape deviation condition as the target point combination, and the (which can be called the shape starting point) in the candidate segmentation curve 3 ), shape end point (can be called shape end point ) and the target point combination (which can be called the fitting point and fitting points ) is determined as the unit lane compression data 3 corresponding to the candidate division curve 3, and the fitting range [0.5,1] is determined as the fitted range.
[0166] The fitted range includes [0, 0.25] and [0.25, 1]. When the fitted range includes a complete lane curve, the computer device can combine the unit lane compression data 2 and the unit lane compression data 3 into complete lane compression data corresponding to the lane curve.
[0167] The computer device may store the unit lane compression data through the result list result. For example, the unit lane compression data in the result list result may be organized as shown in Table 1:
[0168] Table 1
[0169] Among them, in the result list result, the unit lane compression data 2 corresponding to the candidate dividing curve 2 can include the shape starting point Fitting Points Fitting Points and shape end points The unit lane compression data 3 corresponding to the candidate dividing curve 3 may include the fitting point Fitting Points and shape end points The unit lane compression data A corresponding to the candidate dividing curve A may include the fitting point Fitting Points and shape end points
[0170] The computer device may determine the result list as complete lane compression data.
[0171] It can be understood that the generation time of the unit lane compression data 2 is later than the generation time of the unit lane compression data 3, and the candidate dividing curve 3 corresponding to the unit lane compression data 3 is adjacent to the candidate dividing curve 2 corresponding to the unit lane compression data 2, and the shape end point in the unit lane compression data 2 (which can be called the shape end point) ) and the shape starting point of the unit lane compression data 3 (which can be called the shape starting point ) is the same data point S.
[0172] For the same data point S in the unit lane compression data 2 and the unit lane compression data 3, only one data point S can be stored in the complete lane compression data. That is, the number of data points S contained in the complete lane compression data is one. The data volume of the complete lane compression data is less than the sum of the compression data of each unit lane, which can further reduce the data volume of the lane curve.
[0173] In an embodiment of the present application, candidate partitioning curves are obtained from lane curves, and M shape point combinations between the shape start point and the shape end point in the candidate partitioning curves are determined as N shape point combinations, with each shape point combination containing the same number of shape points. The shape lengths between each of the M shape points and the shape start point are obtained, and the parameters to be fitted corresponding to each of the M shape points are determined based on the shape lengths. N fitting point combinations corresponding to the N shape point combinations are determined based on the parameters to be fitted. N fitting curves are generated using a mathematical curve function based on the shape start point, the shape end point, and the N fitting point combinations. If a fitting point combination that satisfies a shape deviation condition is determined in the N fitting curves, the fitting point combination that satisfies the shape deviation condition is determined as a target point combination, and the shape start point, the shape end point, and the target point combination are determined as the unit lane compression data corresponding to the candidate partitioning curve. By splitting the lane curve into several candidate dividing curves, determining the fitting point combination that meets the shape deviation condition in the candidate dividing curve, obtaining the target point combination, and determining the shape starting point, shape end point and target point combination as the unit lane compressed data corresponding to the candidate dividing curve, the embodiment of the present application determines the fitting point combination that meets the shape deviation condition as the target point combination, which can improve the accuracy of restoring the lane curve through the unit lane compressed data. Moreover, since the unit lane compressed data only contains the shape starting point, shape end point and target point combination, that is, the unit lane compressed data no longer needs to save all the shape points in the lane curve, the data volume of the compressed data corresponding to the lane curve is greatly reduced, thereby reducing the storage cost of the lane curve and the network resource consumption during the transmission process.
[0174] Please refer to Figure 5, which is a second flow chart of a data processing method provided in an embodiment of the present application. The data processing method can be executed by a computer device, which can be the terminal device 10a shown in Figure 1. The following description will take the data processing method executed by a computer device as an example. The data processing method may include at least the following steps S501-S502:
[0175] Step S501: Obtain complete lane compression data for a lane curve sent by a business server, and obtain A unit lane compression data in the complete lane compression data; the lane curve is composed of candidate dividing curves corresponding to the A unit lane compression data, each unit lane compression data includes a shape starting point, a shape end point, and a target point combination of the corresponding candidate dividing curve, the target point combination is determined based on the shape points in the candidate dividing curve corresponding to the unit lane compression data, the shape points include points representing the turning positions of the curve in the lane curve, and A is a positive integer.
[0176] Specifically, the computer device may obtain the complete lane compression data for the lane curve sent by the service server.
[0177] A lane curve is a special curve in map data that can represent the shape of a lane. For example, it can be a lane marking or lane edge line. Lane curves are commonly used to represent road networks in map data and are used for vehicle navigation and path planning. Lane curves can be composed of shape points, which can be the turning points and positions of the lane curve.
[0178] The complete lane compression data may be compression data for a lane curve. The complete lane compression data may include A unit lane compression data. The candidate dividing curves corresponding to the A unit lane compression data respectively constitute the lane curve.
[0179] The A unit lane compression data in the complete lane compression data may include unit lane compression data A1 and unit lane compression data A2. The unit lane compression data A2 may be generated later than the unit lane compression data A1, and the candidate dividing curve corresponding to the unit lane compression data A2 is adjacent to the candidate dividing curve corresponding to the unit lane compression data A1. The end point of the shape in the unit lane compression data A1 and the starting point of the shape in the unit lane compression data A2 are the same data point S. The complete lane compression data includes one data point S.
[0180] The candidate dividing curve can be a part of the curve in the lane curve. The candidate dividing curve includes a part of the shape points of the lane curve. The shape point located at the starting position of the candidate dividing curve can be called the shape starting point of the candidate dividing curve. The shape point located at the ending position of the candidate dividing curve can be called the shape end point of the candidate dividing curve. The candidate dividing curve includes the shape starting point, the shape end point and M shape points located between the shape starting point and the shape end point.
[0181] The unit lane compression data is the compressed data corresponding to the candidate partition curve. Each unit lane compression data includes a shape start point, a shape end point, and a target point combination. The target point combination is a fitting point combination that satisfies the shape deviation condition and is determined by the service server based on the shape points in the selected partition curve. The fitting point combination is determined based on the parameters to be fitted and the shape point combination. The shape point combination is determined from the M shape points in the candidate partition curve. Each shape point combination contains the same number of shape points. The parameters to be fitted are determined based on the shape lengths between each of the M shape points and the shape start point.
[0182] For the contents of the candidate dividing curves, unit lane compression data and complete lane compression data, please refer to the relevant description of steps S306-S307 of the embodiment of Figure 3 above, and the embodiment of this application will not be repeated here.
[0183] The computer device obtains A unit lane compression data from the complete lane compression data. For example, the complete lane compression data may include the shape starting point. Fitting Points Fitting Points Shape End Fitting Points Fitting Points Shape End Fitting Points and shape end points
[0184] The computer device can be used to Fitting Points Fitting Points and shape end points Determine the unit lane compression data 2 and set the shape end point Fitting Points Fitting Points and shape end points Determine the unit lane compression data 3 and set the shape end point Fitting Points and shape end points The unit lane compressed data A is determined, thereby obtaining A unit lane compressed data.
[0185] Step S502: Generate A restoration curves based on the combination of A shape starting points, A shape ending points, and A target points, and generate a displayable lane curve that matches the lane curve through the A restoration curves.
[0186] Specifically, the computer device may generate a restoration curve representing the candidate segmentation curve by combining the shape starting point, the shape ending point, and the target point in each candidate segmentation curve, and obtain A restoration curves.
[0187] The computer device can generate a displayable lane curve that matches the lane curve through the A restoration curves. The process of generating the displayable lane curve through the A restoration curves can be: based on the restoration curve e i The smoothness of the restored curve e is determined by i The number of smoothing points B is obtained, based on the number of smoothing points B, B smoothness parameters are obtained, based on the B smoothness parameters and the unit lane compression data d i Generate B smooth points corresponding to the target point combination, and restore the curve e i and B smooth points to generate unit lane compression data d i The corresponding smooth curve; B is a positive integer; the smooth curves corresponding to the A unit lane compression data are spliced into a displayable lane curve that matches the lane curve.
[0188] Specifically, the application client in the computer device has a requirement for the smoothness of the lane curve that can be displayed. The computer device can restore the curve e i The smoothness and smoothness requirements of the restoration curve e are determined i The number of smoothing points B.
[0189] The computer device can obtain B smoothness parameters σ based on the number of smoothing points B i , smoothness parameter σ i The calculation of can be shown as formula (25):
[0190] The computer device can compress the data d by B smoothness parameters and unit lanes i Generate B smooth points corresponding to the target point combination, smooth point τ i The calculation of can be shown as formula (26):
[0191] Among them, p S is the shape starting point corresponding to the candidate partition curve, q1 and q2 are the target point combinations corresponding to the candidate partition curve, and p e The end point of the shape corresponding to the candidate partition curve.
[0192] Computer equipment can be restored by the curve e i and B smooth points to generate unit lane compression data d i The corresponding smooth curves are spliced together to form a displayable lane curve that matches the lane curve.
[0193] It can be understood that the calculation process of the smooth point coordinates can adopt CPU (Central Processing Unit, central processing unit) multi-threaded parallel computing, and can also use the GPU (Graphics Processing Unit, graphics processing unit) of the application client for parallel computing, which can improve the speed of calculating the smooth point coordinates and improve the feasibility of this solution.
[0194] This embodiment of the present application obtains complete lane compression data for a lane curve sent by a service server and obtains A unit lane compression data from the complete lane compression data. The lane curve is composed of candidate segmentation curves corresponding to the A unit lane compression data. Each unit lane compression data includes a shape start point, a shape end point, and a target point combination for the corresponding candidate segmentation curve. The target point combination is determined based on the shape points in the candidate segmentation curve corresponding to the unit lane compression data. The shape points include points representing curve turning points in the lane curve. A restoration curve is then generated using the A shape start point, A shape end point, and A target point combinations. A displayable lane curve matching the lane curve is then generated using the A restoration curves. This embodiment of the present application improves the accuracy of lane curve restoration generated from the unit lane compression data by determining a fitting point combination that meets a shape deviation condition as a target point combination. Furthermore, since the unit lane compression data only contains the shape start point, shape end point, and target point combination, i.e., the unit lane compression data no longer needs to store all the shape points in the lane curve, the data volume of the compressed data corresponding to the lane curve is significantly reduced, thereby reducing the storage cost of the lane curve and network resource consumption during transmission.
[0195] On the other hand, the smoothness requirement can be set in the application client to dynamically interpolate any number of smooth points between the shape start point and the shape end point of the restored curve, thereby achieving the goal of a smooth and displayable lane curve.
[0196] Please refer to Figure 6, which is a flow chart of a data processing method provided in an embodiment of the present application. The data processing method can be executed by a computer device, which can be the business server 100 shown in Figure 1. The following description will take the data processing method executed by a computer device as an example. The data processing method may include at least the following steps S601-S609:
[0197] Step S601, obtaining a lane curve;
[0198] Specifically, the computer device can obtain a lane curve. A lane curve is a special curve in map data that can represent the shape of a lane, such as a lane marking or lane edge. Lane curves are typically used to represent road networks in map data and are used for vehicle navigation and path planning. A lane curve can be composed of shape points, which can be turning points and positions of the lane curve.
[0199] Step S602, creating a result list;
[0200] Specifically, the computer device may create a result list result to store the compressed data of the lane curve.
[0201] Step S603, obtaining an initial fitting range;
[0202] Specifically, an initial fitting range is obtained (the lower limit value of the initial fitting range is lb, and the upper limit value is ub). The initial fitting range can be 0 to 1, that is, the initial fitting range is [0,1]. The computer device can determine the complete lane curve as a candidate dividing curve.
[0203] The computer device can determine whether the fitted range of the lane curve already contains the complete lane curve by determining the numerical relationship between the lower limit and the upper limit of the fitting range. When the lower limit of the fitting range is greater than or equal to the upper limit of the fitting range, it can be determined that the fitted range contains the complete lane curve. When the lower limit of the fitting range is less than the upper limit of the fitting range, the computer device can determine a candidate dividing curve in the lane curve based on the fitting range.
[0204] Step S604, obtaining the average shape deviation within the fitting range determined by lb and ub;
[0205] Specifically, the computer device can determine the fitting range through the lower limit value and the upper limit value of the fitting range, obtain the candidate dividing curve corresponding to the fitting range, determine M shape point combinations in the candidate dividing curve, generate the fitting point combinations corresponding to the M shape point combinations through the parameters to be fitted, generate the fitting curves corresponding to the M fitting point combinations through the mathematical curve function, calculate the shape deviation between each fitting curve and the M shape points, average the M shape deviations to obtain the average shape deviation corresponding to the fitting curve, and obtain the minimum average shape deviation within the fitting range.
[0206] The computer device can determine whether the average shape deviation meets the shape deviation condition.
[0207] Step S605, obtaining a second fitting range;
[0208] Specifically, if the average shape deviation is greater than or equal to the shape deviation threshold indicated by the shape deviation condition, it can be determined that there is no fitting point combination that meets the shape deviation condition in the candidate dividing curve corresponding to the fitting range, and the fitting range can be narrowed and re-judged. For example, the upper limit value of the new fitting range can be determined as half of the sum of the upper limit value and the lower limit value of the previous fitting range, that is, ub = (lb + ub) / 2, to generate a new fitting range (also called the second fitting range), and re-obtain the average shape deviation within the new fitting range.
[0209] Step S606, obtaining a target point combination corresponding to the average shape deviation;
[0210] Specifically, if the average shape deviation is less than a shape deviation threshold indicated by the shape deviation condition, it can be determined that the average shape deviation satisfies the shape deviation condition. The shape deviation threshold may be an allowable error value for lane curves, such as 0.1 meters.
[0211] The computer device may determine a fitting point combination whose average shape deviation satisfies a shape deviation condition as a target point combination.
[0212] Step S607: Determine the shape start point, shape end point, and target point combination as unit lane compression data and save it in a result list;
[0213] Specifically, the computer device can determine the shape starting point, shape end point and target point combination corresponding to the candidate dividing curve as unit lane compression data, save the unit lane compression data to a result list, and determine the fitting range corresponding to the unit lane compression data as the fitted range.
[0214] Step S608, obtaining a first fitting range;
[0215] Specifically, after generating the single-lane compression data, the computer device may continue to determine a new fitting range (also referred to as a first fitting range) in a range other than the already fitted range in the lane curve. For example, the lower limit value of the new fitting range may be determined as the upper limit value of the fitting range when generating the unit lane compression data, and the upper limit value of the new fitting range may be determined as 1. That is, each calculation selects a fitting range as large as possible (that is, a greedy strategy is adopted). If a fitting curve that meets the requirements cannot be obtained in this interval, the upper limit value of the fitting range is narrowed until a fitting range that meets the requirements is found.
[0216] It is understandable that there may not be a shape point in the lane curve that is exactly at the lb or ub percentage. For example, there is no point in the lane curve that is exactly at 30% of the total length. The computer device can use two points P1 and P2 close to 30% of the total length (the percentage of P1 is less than 30%, and the percentage of P2 is greater than 30%) to linearly interpolate the shape point of 30% of the total length using P1 and P2.
[0217] Step S609 , determining the result list as complete lane compression data;
[0218] Specifically, if new unit lane compression data is obtained, the computer device may store the new unit lane compression data in the result list result until the fitted range includes the complete lane curve, and the computer device may determine the result list as complete lane compression data.
[0219] For the contents of the candidate dividing curves, unit lane compression data and complete lane compression data, please refer to the relevant description of steps S306-S307 of the embodiment of Figure 3 above, and the embodiment of this application will not be repeated here.
[0220] In an embodiment of the present application, candidate partitioning curves are obtained from lane curves, and M shape point combinations between the shape start point and the shape end point in the candidate partitioning curves are determined as N shape point combinations, with each shape point combination containing the same number of shape points. The shape lengths between each of the M shape points and the shape start point are obtained, and the parameters to be fitted corresponding to each of the M shape points are determined based on the shape lengths. N fitting point combinations corresponding to the N shape point combinations are determined based on the parameters to be fitted. N fitting curves are generated using a mathematical curve function based on the shape start point, the shape end point, and the N fitting point combinations. If a fitting point combination that satisfies a shape deviation condition is determined in the N fitting curves, the fitting point combination that satisfies the shape deviation condition is determined as a target point combination, and the shape start point, the shape end point, and the target point combination are determined as the unit lane compression data corresponding to the candidate partitioning curve. By splitting the lane curve into several candidate dividing curves, determining the fitting point combination that meets the shape deviation condition in the candidate dividing curve, obtaining the target point combination, and determining the shape starting point, shape end point and target point combination as the unit lane compressed data corresponding to the candidate dividing curve, the embodiment of the present application determines the fitting point combination that meets the shape deviation condition as the target point combination, which can improve the accuracy of restoring the lane curve through the unit lane compressed data. Moreover, since the unit lane compressed data only contains the shape starting point, shape end point and target point combination, that is, the unit lane compressed data no longer needs to save all the shape points in the lane curve, the data volume of the compressed data corresponding to the lane curve is greatly reduced, thereby reducing the storage cost of the lane curve and the network resource consumption during the transmission process.
[0221] Please refer to Figure 7, which is a structural diagram of a data processing device according to an embodiment of the present application. As shown in Figure 7, the data processing device 700 includes a curve segmentation module 710, a combination processing module 720, a fitting processing module 730, and a data generation module 740.
[0222] The curve segmentation module 710 is configured to obtain candidate segmentation curves segmented from a lane curve; the candidate segmentation curves include a shape start point, a shape end point, and M shape points located between the shape start point and the shape end point; the shape points include points representing turning points in the lane curve; and M is a positive integer.
[0223] The combination processing module 720 is used to determine N shape point combinations from the M shape points; each shape point combination contains the same number of shape points; N is a positive integer;
[0224] The fitting processing module 730 is configured to obtain shape lengths between each of the M shape points and the shape starting point, determine the parameters to be fitted corresponding to each of the M shape points based on the shape lengths, determine fitting point combinations corresponding one-to-one to the N shape point combinations based on the parameters to be fitted, and generate N fitting curves based on the shape starting point, the shape end point, and the N fitting point combinations;
[0225] The data generation module 740 is used to determine the fitting point combination that meets the shape deviation condition as the target point combination if it is determined based on the N fitting curves that there is a fitting point combination that meets the shape deviation condition, and to determine the shape starting point, shape end point and target point combination as the unit lane compression data corresponding to the candidate dividing curve.
[0226] In a possible implementation, the data generation module 740 is further configured to perform the following operations:
[0227] Obtaining an initial fitting range of the candidate dividing curve in the lane curve, determining a first lower limit value and a first upper limit value based on the initial fitting range, generating a first fitting range based on the first lower limit value and the first upper limit value, and determining the initial fitting range as a fitted range; the first fitting range is a range in the lane curve excluding the fitted range;
[0228] A new candidate dividing curve is re-determined through the first fitting range. If the unit lane compression data corresponding to the new candidate dividing curve is obtained, the first fitting range is determined as the fitted range. Until the fitted range contains the complete lane curve, the complete lane compression data corresponding to the lane curve is obtained.
[0229] Among them, the complete lane compression data includes A unit lane compression data, and the candidate division curves corresponding to the A unit lane compression data respectively constitute the lane curve; the A unit lane compression data include unit lane compression data A1 and unit lane compression data A2; the generation time of the unit lane compression data A2 is later than the generation time of the unit lane compression data A1, and the candidate division curve corresponding to the unit lane compression data A2 is adjacent to the candidate division curve corresponding to the unit lane compression data A1, the shape end point in the unit lane compression data A1 and the shape starting point in the unit lane compression data A2 are the same data point S, and the number of data points S contained in the complete lane compression data is one.
[0230] In a possible implementation, the data generation module 740 is further configured to perform the following operations:
[0231] If it is determined based on the N fitting curves that no combination of fitting points satisfies the shape deviation condition, an initial fitting range of the candidate dividing curve in the lane curve is obtained, a second lower limit value and a second upper limit value are determined based on the initial fitting range, and a second fitting range is generated based on the second lower limit value and the second upper limit value;
[0232] A new candidate dividing curve is re-determined through the second fitting range; the new candidate dividing curve is used to redetermine a new fitting point combination, the range of the lane curve occupied by the second fitting range is smaller than the initial fitting range, and the initial fitting range covers the second fitting range.
[0233] In one possible implementation, the fitting processing module 730 is configured to obtain shape lengths between each of the M shape points and the shape starting point, and to determine the parameters to be fitted corresponding to each of the M shape points based on the shape lengths, specifically performing the following operations:
[0234] Obtain the total length of the shape curve of the candidate partition curve, and obtain the shape lengths between each of the M shape points and the shape starting point;
[0235] Based on the ratio of the shape lengths respectively corresponding to the M shape points to the total length of the shape curve, the parameters to be fitted respectively corresponding to the M shape points are determined.
[0236] In one possible implementation, the M shape points include shape point p i , i is a positive integer greater than or equal to 2; when the fitting processing module 730 is used to obtain the total length of the shape curve of the candidate segmentation curve, it is specifically used to perform the following operations:
[0237] Determine the total length of the shape curve of the candidate partition curve based on the shape positions of the shape starting point, the M shape points, and the shape end point;
[0238] Get the shape lengths between each of the M shape points and the shape starting point, including:
[0239] If i is equal to 2, then the shape length of shape point p2 is determined based on the shape starting point and the shape position of shape point p2; shape point p2 is a shape point adjacent to the shape starting point;
[0240] If i is greater than 2, then based on the shape starting point and shape point p i And the shape position of the middle shape point, determine the shape point p i The shape length; the middle shape point is located between the shape starting point and the shape point p i The shape points between.
[0241] In a possible implementation, the N shape point combinations include shape point combination T i , shape point combination T i Including a first shape point and a second shape point, i is a positive integer; the fitting processing module 730 is used to determine N fitting point combinations corresponding to the N shape point combinations one by one through the parameters to be fitted, specifically to perform the following operations:
[0242] Determine a first fitting point corresponding to the first shape point based on the to-be-fitted parameter corresponding to the first shape point, determine a second fitting point corresponding to the second shape point based on the to-be-fitted parameter corresponding to the second shape point, and determine the first fitting point and the second fitting point as a shape point combination T i The corresponding combination of fitting points.
[0243] In a possible implementation, the data generation module 740 is further configured to perform the following operations:
[0244] Determine the average deviation distance corresponding to each combination of N fitting points based on M shape points;
[0245] If there is a fitting point combination that is smaller than the shape deviation threshold value among the average deviation distances corresponding to the N fitting point combinations, the fitting point combination with the smallest average deviation distance is determined as the fitting point combination that meets the shape deviation condition;
[0246] If there is no fitting point combination smaller than the shape deviation threshold value in the average deviation distances corresponding to the N fitting point combinations, it is determined that there is no fitting point combination that meets the shape deviation condition.
[0247] In one possible implementation, the N fitting curves include the fitting point combinations H i The associated fitting curve c i , M shape points including shape point p i , i is a positive integer; when the data generation module 740 is used to determine the average deviation distances corresponding to the N fitting point combinations according to the M shape points, it is specifically used to perform the following operations:
[0248] Based on the fitting curve c i The corresponding curve function determines the shape point p i Corresponding business fitting point q i , through the shape point p i The coordinate components of the business fitting point q i The coordinate components of the shape point p i With the fitting curve c i Deviation distance;
[0249] When M shape points are obtained and respectively matched with the fitting curve c i When the deviation distance between them is , the M deviation distances are averaged to obtain the fitting point combination H i The corresponding average deviation distance.
[0250] In one possible implementation, the N fitting curves include the fitting point combinations K i The associated fitting curve r i, i is a positive integer; when the data generation module 740 is used to determine the average deviation distances corresponding to the N fitting point combinations according to the M shape points, it is specifically used to perform the following operations:
[0251] Based on the fitting curve r i The corresponding curve function and the coordinate components of the M shape points determine the objective function, the gradient matrix corresponding to the objective function is determined by the first-order partial derivative of the objective function, the curvature matrix corresponding to the objective function is determined by the second-order partial derivative of the objective function, and the fitting point combination K is determined based on the gradient matrix and the curvature matrix. i The corresponding average deviation distance.
[0252] Please refer to FIG8 , which is a second structural diagram of a data processing device provided in an embodiment of the present application. As shown in FIG8 , the data processing device 800 includes a data acquisition module 810 and a curve generation module 820 .
[0253] The data acquisition module 810 is configured to acquire complete lane compression data for a lane curve sent by the service server, and to acquire A units of lane compression data from the complete lane compression data. The lane curve is composed of candidate dividing curves corresponding to the A units of lane compression data. Each unit of lane compression data includes a shape starting point, a shape ending point, and a target point combination of the corresponding candidate dividing curve. The target point combination is determined based on shape points in the candidate dividing curve corresponding to the unit lane compression data. The shape points include points representing turning points in the lane curve. A is a positive integer.
[0254] The curve generation module 820 is used to generate A restoration curves based on A shape starting points, A shape ending points and A target points, and generate a displayable lane curve that matches the lane curve through the A restoration curves.
[0255] In a possible implementation, the A unit lane compression data include the unit lane compression data d i , A restoration curve includes the unit lane compression data d i The corresponding reduction curve e i When the curve generating module 820 is used to generate a displayable lane curve that matches the lane curve using the A restoration curves, it is specifically used to perform the following operations:
[0256] Based on the restoration curve e i The smoothness of the restored curve e is determined by i The number of smoothing points B is obtained, based on the number of smoothing points B, B smoothness parameters are obtained, based on the B smoothness parameters and the unit lane compression data d i Generate B smooth points corresponding to the target point combination, and restore the curve e i and B smooth points to generate unit lane compression data di The corresponding smooth curve; B is a positive integer;
[0257] The smooth curves corresponding to the A unit lane compression data are spliced into a displayable lane curve that matches the lane curve.
[0258] Please refer to Figure 9, which is a structural diagram of a computer device provided in an embodiment of the present application. As shown in Figure 9, the computer device 900 may include: a processor 901, a network interface 904 and a memory 905. In addition, the above-mentioned computer device 900 may also include: a user interface 903, and at least one communication bus 902. Among them, the communication bus 902 is used to realize the connection and communication between these components. Among them, the user interface 903 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 903 may also include a standard wired interface and a wireless interface. The network interface 904 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 905 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 905 may optionally be at least one storage device located away from the aforementioned processor 901. As shown in Figure 9, the memory 905 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module and a device control application.
[0259] In the computer device 900 shown in FIG9 , the network interface 904 can provide a network communication element; the user interface 903 is mainly used to provide an interface for user input; and the processor 901 can be used to call the device control application stored in the memory 905 to achieve:
[0260] When the computer device 900 executes the description of the data processing method in the embodiment corresponding to FIG. 3 above, the following is achieved:
[0261] Obtain a candidate dividing curve divided from the lane curve; the candidate dividing curve includes a shape starting point, a shape end point, and M shape points located between the shape starting point and the shape end point; the shape points include points representing turning positions of the lane curve; M is a positive integer;
[0262] Determine N shape point combinations from the M shape points; each shape point combination contains the same number of shape points; N is a positive integer;
[0263] Obtain shape lengths between each of the M shape points and the shape starting point, determine the parameters to be fitted corresponding to each of the M shape points based on the shape lengths, determine a fitting point combination corresponding one-to-one to the N shape point combinations based on the parameters to be fitted, and generate N fitting curves based on the shape starting point, the shape end point, and the N fitting point combinations;
[0264] If a fitting point combination that satisfies the shape deviation condition is determined based on the N fitting curves, the fitting point combination that satisfies the shape deviation condition is determined as the target point combination, and the shape starting point, shape end point, and target point combination are determined as the unit lane compression data corresponding to the candidate dividing curve.
[0265] When the computer device 900 executes the description of the data processing method in the embodiment corresponding to FIG. 5 , the following is achieved:
[0266] Obtain complete lane compression data for a lane curve sent by a service server, and obtain A unit lane compression data from the complete lane compression data; the lane curve is composed of candidate dividing curves corresponding to the A unit lane compression data; each unit lane compression data includes a shape starting point, a shape ending point, and a target point combination of the corresponding candidate dividing curve, where the target point combination is determined based on shape points in the candidate dividing curve corresponding to the unit lane compression data, where the shape points include points representing turning points in the lane curve; A is a positive integer;
[0267] A restoration curves are generated based on a combination of A shape starting points, A shape ending points, and A target points, and a displayable lane curve that matches the lane curve is generated through the A restoration curves.
[0268] It should be understood that the computer device 900 described in the embodiment of the present application can execute the description of the data processing method in any of the embodiments corresponding to Figures 3 and 5 above, which will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated.
[0269] In addition, it should be noted that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program. When the processor executes the computer program, it can perform the description of the data processing method in the embodiment corresponding to any one of Figures 3 and 5 above. Therefore, it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0270] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Furthermore, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been displayed or is about to be displayed.
[0271] In addition, it should be noted that embodiments of the present application also provide a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method provided in any of the embodiments corresponding to FIG. 3 and FIG. 5 .
[0272] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0273] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example in terms of network elements. Whether these network elements are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described network elements for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0274] The method and related apparatus provided in the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided in the embodiment of the present application, and specifically can be implemented by computer program instructions for each process and / or box of the method flow chart and / or structural diagram, and the combination of the process and / or box in the flow chart and / or block diagram. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable device to produce a machine, so that the instructions executed by the processor of the computer or other programmable device produce a device for implementing the function specified in one process or multiple processes of the flow chart and / or one box or multiple boxes of the structural diagram. These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, and the instruction device implements the function specified in one process or multiple processes of the flow chart and / or one box or multiple boxes of the structural diagram. These computer program instructions can also be loaded onto a computer or other programmable device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the structural diagram.
[0275] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0276] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0277] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0278] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A data processing method, executed by a computer device, comprising: Obtaining candidate division curves divided from a lane curve, the candidate division curves including a shape start point, a shape end point, and M shape points located between the shape start point and the shape end point, the shape points including points representing curve turning positions in the lane curve, and M being a positive integer; Determining N shape point combinations among the M shape points, each shape point combination including the same number of shape points, and N being a positive integer; Obtaining the shape lengths between the M shape points and the shape start point respectively, and determining the fitting parameters corresponding to the M shape points respectively based on the shape lengths; Determining N fitting point combinations corresponding one by one to the N shape point combinations through the fitting parameters; Generating N fitting curves based on the shape start point, the shape end point, and the N fitting point combinations; If it is determined according to the N fitting curves that there is a fitting point combination that meets the shape deviation condition, then determining the fitting point combination that meets the shape deviation condition as the target point combination; And Determining the shape start point, the shape end point, and the target point combination as the unit lane compression data corresponding to the candidate division curve.
2. The method according to claim 1, further comprising: Obtaining an initial fitting range of the candidate division curve in the lane curve, determining a first lower limit value and a first upper limit value through the initial fitting range, generating a first fitting range based on the first lower limit value and the first upper limit value, and determining the initial fitting range as the fitted range; the first fitting range is the range in the lane curve except the fitted range; Redetermining a new candidate division curve through the first fitting range, if the unit lane compression data corresponding to the new candidate division curve is obtained, then determining the first fitting range as the fitted range, until when the fitted range includes the entire lane curve, obtaining the complete lane compression data corresponding to the lane curve.
3. The method according to claim 2, the complete lane compression data includes A unit lane compression data, the candidate division curves respectively corresponding to the A unit lane compression data constitute the lane curve; the A unit lane compression data includes unit lane compression data A1 and unit lane compression data A2; the generation time of the unit lane compression data A2 is later than the generation time of the unit lane compression data A1, and the candidate division curve corresponding to the unit lane compression data A2 is adjacent to the candidate division curve corresponding to the unit lane compression data A1, the shape end point in the unit lane compression data A1 and the shape start point of the unit lane compression data A2 are the same data point S, and the number of data points S included in the complete lane compression data is one.
4. The method according to any one of claims 1 to 3, further comprising: If it is determined that there is no combination of fitting points that satisfies the shape deviation condition according to the N fitting curves, obtain the initial fitting range of the candidate division curve in the lane curve, determine a second lower limit value and a second upper limit value through the initial fitting range, and generate a second fitting range based on the second lower limit value and the second upper limit value; Redetermine a new candidate division curve through the second fitting range; the new candidate division curve is used to redetermine a new combination of fitting points, the range of the second fitting range in the lane curve is smaller than the initial fitting range, and the initial fitting range covers the second fitting range.
5. The method according to any one of claims 1 to 4, wherein the obtaining the shape lengths between the M shape points and the shape starting point respectively, and determining the fitting parameters corresponding to the M shape points respectively based on the shape lengths, comprises: Obtain the total length of the shape curve of the candidate division curve, and obtain the shape lengths between the M shape points and the shape starting point respectively; Determine the fitting parameters corresponding to the M shape points respectively based on the ratios of the shape lengths corresponding to the M shape points respectively to the total length of the shape curve.
6. The method according to claim 5, wherein the M shape points include a shape point p i , where i is a positive integer greater than or equal to 2; The obtaining the total length of the shape curve of the candidate division curve comprises: Determine the total length of the shape curve of the candidate division curve based on the shape positions of the shape starting point, the M shape points and the shape ending point; The obtaining the shape lengths between the M shape points and the shape starting point respectively comprises: If i is greater than 2, then based on the shape starting point, the shape point p i and the shape positions of the intermediate shape points, determine the shape length of the shape point p i ; the intermediate shape points are the shape points located between the shape starting point and the shape point p i .
7. The method according to claim 6, wherein the obtaining the shape lengths between the M shape points and the shape starting point respectively further comprises: If i is equal to 2, determine the shape length of the shape point p2 based on the shape positions of the shape starting point and the shape point p2; the shape point p2 is a shape point adjacent to the shape starting point.
8. The method according to any one of claims 1 to 7, wherein the N shape point combinations include a shape point combination T i , the shape point combination T i includes a first shape point and a second shape point, where i is a positive integer; the determining of the N fitting point combinations corresponding one-to-one to the N shape point combinations by the to-be-fitted parameters includes: Determine a first fitting point corresponding to the first shape point based on the fitting parameter corresponding to the first shape point, determine a second fitting point corresponding to the second shape point based on the fitting parameter corresponding to the second shape point, and determine the first fitting point and the second fitting point as a shape point combination T i The corresponding fitting point combination.
9. The method according to any one of claims 1 to 8, further comprises: Determine the average deviation distances corresponding to the N combinations of fitting points respectively according to the M shape points; If there is a combination of fitting points with an average deviation distance less than the shape deviation threshold among the average deviation distances corresponding to the N combinations of fitting points respectively, determine the combination of fitting points with the smallest average deviation distance as the combination of fitting points that satisfies the shape deviation condition.
10. The method according to claim 9, further comprises: If there is no combination of fitting points with an average deviation distance less than the shape deviation threshold among the average deviation distances corresponding to the N combinations of fitting points respectively, determine that there is no combination of fitting points that satisfies the shape deviation condition.
11. The method according to claim 9 or 10, wherein the N fitting curves include a fitting point combination H i associated fitting curve c i , the M shape points include a shape point p i , where i is a positive integer; determining the average deviation distances corresponding to the N fitting point combinations according to the M shape points includes: Based on the fitting curve c i For the corresponding curve function, determine the shape point p i For the corresponding service fitting point q i , through the coordinate components of the shape point p i and the coordinate components of the service fitting point q i , determine the shape point p i and the deviation distance from the fitting curve c i ; When the deviation distances between the M shape points and the fitting curve c are obtained, average processing is performed on the M deviation distances to obtain the average deviation distance corresponding to the fitting point combination H i i 12. The method according to claim 9 or 10, wherein the N fitting curves include a fitting point combination K i associated fitting curve r i , where i is a positive integer; determining the average deviation distances corresponding to the N fitting point combinations according to the M shape points respectively includes: Based on the fitting curve r i Determine the objective function according to the curve function corresponding to the curve and the coordinate components of the M shape points, determine the gradient matrix corresponding to the objective function through the first-order partial derivative of the objective function, determine the curvature matrix corresponding to the objective function through the second-order partial derivative of the objective function, and determine the fitting point combination K based on the gradient matrix and the curvature matrix i The corresponding average deviation distance.
13. The method according to any one of claims 1 to 12, the deviation distance determined based on the combination of fitting points that satisfies the shape deviation condition is less than or equal to a preset shape deviation threshold.
14. A data processing method, executed by a computer device, comprising: Obtain the complete lane compression data for the lane curve sent by the service server, and obtain A unit lane compression data from the complete lane compression data; The lane curve is composed of candidate division curves corresponding to A pieces of the unit lane compression data respectively; each piece of unit lane compression data includes the shape start point, shape end point and target point combination corresponding to the candidate division curve, and the target point combination is determined based on the shape points in the candidate division curve corresponding to the unit lane compression data, and the shape points include the points representing the curve turning positions in the lane curve; A is a positive integer; and Based on A shape start points, A shape end points and A target point combinations, A restored curves are generated, and a displayable lane curve matching the lane curve is generated through the A restored curves. The smooth curves corresponding to the A pieces of the unit lane compression data are spliced into a displayable lane curve matching the lane curve.
15. The method according to claim 14, wherein the A unit lane compression data includes unit lane compression data d i , and the A restoration curves include the unit lane compression data d i corresponding restoration curve e i , and generating a displayable lane curve matching the lane curve through the A restoration curves includes: Determine the number of smooth points B of the reduction curve e based on the smoothness of the reduction curve e i Obtain B smoothness parameters based on the number of smooth points B, and generate B smooth points for the corresponding target point combination based on the B smoothness parameters and the unit lane compression data d i Generate the smooth curve corresponding to the unit lane compression data d through the reduction curve e i and the B smooth points; B is a positive integer; i Generate the unit lane compression data d through the reduction curve e i and the B smooth points; B is a positive integer; 16. A data processing device, comprising: A curve division module, configured to obtain candidate division curves divided from a lane curve, where the candidate division curves include a shape start point, a shape end point, and M shape points located between the shape start point and the shape end point, and the shape points include the points representing the curve turning positions in the lane curve, and M is a positive integer; A combination processing module, configured to determine N shape point combinations from the M shape points, and the number of shape points included in each shape point combination is the same, and N is a positive integer; A fitting processing module, configured to obtain the shape lengths between the M shape points and the shape start point respectively, determine the to-be-fitted parameters corresponding to the M shape points respectively based on the shape lengths, determine N fitting point combinations corresponding to the N shape point combinations one by one through the to-be-fitted parameters, and generate N fitting curves based on the shape start point, the shape end point, and the N fitting point combinations; A data generation module, configured to, if a fitting point combination satisfying the shape deviation condition is determined according to the N fitting curves, determine the fitting point combination satisfying the shape deviation condition as the target point combination, and determine the shape start point, the shape end point, and the target point combination as the unit lane compression data corresponding to the candidate division curve.
17. A data processing device, comprising: A data acquisition module, configured to acquire the complete lane compression data for the lane curve sent by a service server, and acquire A pieces of unit lane compression data from the complete lane compression data; The lane curve is composed of candidate division curves corresponding to A pieces of the unit lane compression data respectively; each piece of unit lane compression data includes the shape start point, shape end point and target point combination corresponding to the candidate division curve, and the target point combination is determined based on the shape points in the candidate division curve corresponding to the unit lane compression data, and the shape points include the points representing the curve turning positions in the lane curve; A is a positive integer; A curve generation module, configured to generate A restored curves based on A shape start points, A shape end points and A target point combinations, and generate a displayable lane curve matching the lane curve through the A restored curves. A processor, a memory, and a network interface; 18. A computer device, comprising: The processor is connected to the memory and the network interface. Among them, the network interface is used to provide data communication functions, the memory is used to store computer programs, and the processor is used to call the computer programs so that the computer device executes the method according to any one of claims 1-14.
19. A computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to execute the method according to any one of claims 1-14.
20. A computer program product comprising a computer program stored in a computer-readable storage medium and adapted to be read and executed by a processor to cause a computer device having the processor to execute the method according to any one of claims 1-14.
Citation Information
Patent Citations
A method and a system for establishing an auxiliary driving database
CN109726489A
Lane line data processing and updating method, device and equipment
CN109916416A
Unmanned vehicle path planning method based on navigation map and high-precision map matching
CN115077550A
Lane line-based lane vanishing point detection method, terminal and storage medium
CN115661790A
Lane line data processing method, high-precision map drawing method, equipment and medium
CN116363257A