Vehicle prompt line display method and device, electronic equipment and storage medium

By analyzing the difference in distance data between the vehicle and the obstacle and determining the animation display strategy, the curve segments are rendered and connected, and the problem of line display jumps is solved, achieving more accurate distance perception and safer driving.

CN119941945AActive Publication Date: 2025-05-06ZHEJIANG ZEEKR INTELLIGENT TECH CO LTD +1
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202510002479.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-06
Estimated Expiration
2045-01-02

AI Technical Summary

Technical Problem

When the distance between a vehicle and an obstacle changes, the display of lines in the prior art will change, resulting in insufficient accuracy in grasping the actual distance.

Method used

By obtaining the curve segment and distance data between the vehicle and the obstacle, analyzing the difference in distance data, determining the animation display strategy, and rendering and connecting the curve segments according to the strategy to form a continuous prompt line.

Benefits of technology

It realizes a more intuitive display of the distance changes between the vehicle and the obstacle, avoids the problem of inaccurate distance control, improves the driver's perception of distance changes, and makes safer driving decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941945A_ABST
    Figure CN119941945A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing, in particular to a vehicle prompt line display method and device, electronic equipment and a storage medium. According to the method provided by the embodiment of the invention, by analyzing the difference of the distance data and performing animation display, the distance change between the vehicle and the obstacle can be displayed more intuitively, and the problem of inaccurate distance mastering caused by jumping is avoided. And a driver can better judge the distance between the driver and the obstacle, so that a safer driving decision can be made. The curve segments are rendered according to the animation display strategy, and the rendered curve segments in different directions are connected to form a complete continuous prompt line, so that the display of the distance is smoother, and jump caused by the change of the direction / distance is avoided. Therefore, a driver can more accurately sense the change of the distance between the vehicle and the obstacle and make a more timely and accurate driving decision, and the driving safety is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method, device, electronic equipment and storage medium for displaying a vehicle prompt line. Background Art

[0002] In the current visual display design of vehicles, turtle images with multiple orientations are often used to achieve the purpose. It distinguishes the distance from obstacles by corresponding different distance ranges with different numbers and colors of lines. For example, when the distance is 10-30cm, red lines will appear to indicate that the car model is closer; when the distance is 80-120cm, green lines will appear to indicate that the car model is farther away. However, as the distance continues to approach or move away, when switching between different display ranges, the display of the lines will jump, resulting in an inaccurate grasp of the actual distance. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method, device, electronic device and storage medium for displaying vehicle prompt lines to solve the problem that as the distance continues to approach or move away, the display of the lines will only jump when switching different display ranges, resulting in inaccurate grasp of the actual distance.

[0004] In a first aspect, an embodiment of the present invention provides a method for displaying a vehicle prompt line, the method comprising:

[0005] Acquire a curve segment and first distance data between the vehicle and obstacles at different directions at a current moment, wherein the curve segment is located between the vehicle and the obstacle;

[0006] Analyze the difference between the first distance data and the second distance data in the same direction to obtain the animation display strategy corresponding to the curve segment, wherein the second distance data is the distance data between the vehicle and the obstacle in the same direction at the last moment;

[0007] The curve segment is rendered according to the animation display strategy to obtain a rendered curve segment, and the rendered curve segments located in different directions are connected to obtain a prompt line of the vehicle at the current moment.

[0008] Furthermore, the analyzing the difference between the first distance data and the second distance data of the same orientation to obtain the animation display strategy corresponding to the curve segment includes:

[0009] comparing the first distance data with the second distance data;

[0010] If the first distance data is inconsistent with the second distance data, determining a first state corresponding to the first distance data according to whether there is a jump abnormality in the first distance data;

[0011] Acquire a second state corresponding to the second distance data;

[0012] A corresponding animation display strategy is determined according to whether switching occurs between the first state and the second state.

[0013] Further, determining the first state corresponding to the first distance data according to whether there is a jump abnormality in the first distance data includes:

[0014] If the first distance data has a jump abnormality, determining that the first state corresponding to the first distance data is a hidden state; or if the first distance data does not have a jump abnormality, determining that the first state corresponding to the first distance data is a display state;

[0015] Acquiring a second state corresponding to the second distance data includes: querying historical detection records, and acquiring a second state corresponding to the second distance data from the historical detection records, wherein the second state is a hidden state or a displayed state.

[0016] Furthermore, rendering the curve segment according to the animation display strategy to obtain the rendered curve segment includes:

[0017] If the animation display strategy is a first animation display strategy, determining the initial transparency of the displayed animation according to the first state, wherein the first animation display strategy is an animation display strategy corresponding to when switching occurs between the first state and the second state;

[0018] Obtaining the animation frame number of the display animation corresponding to the curve segment, and calculating the transparency of each frame of the display animation according to the position of each frame of the display animation in the animation frame number and the initial transparency;

[0019] The curve segment is rendered according to the transparency of each frame of the animation to obtain a rendered curve segment.

[0020] Furthermore, rendering the curve segment according to the animation display strategy to obtain the rendered curve segment includes:

[0021] If the animation display strategy is the second animation display strategy, the distance difference between the first distance data and the second distance data is calculated, and the color difference between the first color value corresponding to the first distance data and the second color value corresponding to the second distance data is calculated, wherein the second animation display strategy is the animation display strategy corresponding to when no switching occurs between the first state and the second state, and the second color value is the color value corresponding to the second distance data;

[0022] Calculating the moving step length of each movement by using the distance difference and a preset smoothing coefficient, and calculating the color value of each update according to the color difference and a preset gradient coefficient;

[0023] The curve segment is gradually rendered according to the moving step length and the color value to obtain a rendered curve segment.

[0024] Furthermore, the connecting of the rendered curve segments at different positions to obtain the prompt line of the vehicle at the current moment includes:

[0025] Determine the fan-shaped areas corresponding to the curve segments rendered in different directions, and the level corresponding to each of the fan-shaped areas, wherein the level is determined according to the distance between the fan-shaped area and the obstacle;

[0026] Compare the levels corresponding to each two adjacent sector areas to obtain a level difference, and determine the adjacent sector areas whose level difference is greater than or equal to a preset value as two sector areas to be connected;

[0027] The curve segments corresponding to the to-be-connected sector areas are connected to obtain a prompt line of the vehicle at the current moment.

[0028] Furthermore, the step of connecting the curve segments corresponding to the to-be-connected sector areas to obtain a prompt line of the vehicle at the current moment includes:

[0029] The target equally divided points in the two fan-shaped areas to be connected are taken as the starting points of the smooth curve;

[0030] Creating an initial curve segment based on the starting point and the initial control point;

[0031] The control points in the initial curve segment are updated according to the interpolation factor, and the Bezier curve is recalculated using the updated control points to obtain an updated curve segment;

[0032] A prompt line of the vehicle at the current moment is constructed based on the updated curve segment and the target curve segment, wherein the target curve segment is a curve segment corresponding to other fan-shaped areas in all fan-shaped areas except the fan-shaped area to be connected.

[0033] In a second aspect, an embodiment of the present invention provides a display device for a vehicle prompt line, the device comprising:

[0034] An acquisition module, used to acquire a curve segment and first distance data between the vehicle and obstacles at different directions at a current moment, wherein the curve segment is located between the vehicle and the obstacle;

[0035] an analysis module, configured to analyze the difference between the first distance data and second distance data of the same orientation, and obtain an animation display strategy corresponding to the curve segment, wherein the second distance data is the distance data between the vehicle and the obstacle at a previous moment;

[0036] The rendering module is used to render the curve segment according to the animation display strategy to obtain the rendered curve segment, and connect the rendered curve segments located in different directions to obtain the prompt line of the vehicle at the current moment.

[0037] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0038] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof.

[0039] The method provided in the embodiment of the present application can more intuitively display the distance change between the vehicle and the obstacle by analyzing the difference in distance data and performing animation display, avoiding the problem of inaccurate distance control caused by jumps. It helps the driver to better judge the distance to the obstacle and make safer driving decisions. By rendering the curve segments according to the animation display strategy and connecting the curve segments rendered in different directions, a complete and continuous prompt line is formed, making the distance display smoother and avoiding jumps caused by changes in direction / distance. The driver can perceive the distance change between the vehicle and the obstacle more accurately, make more timely and accurate driving decisions, and improve driving safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 is a flow chart of a method for displaying a vehicle prompt line according to some embodiments of the present invention;

[0042] Figure 2 is a flow chart of a method for displaying a vehicle prompt line according to some embodiments of the present invention;

[0043] Figure 3 is a schematic diagram of a curve connection according to some embodiments of the present invention;

[0044] Figure 4 is a schematic diagram of the actual effect of the vehicle prompt line according to some embodiments of the present invention;

[0045] Figure 5 is a structural block diagram of a display device for a vehicle prompt line according to an embodiment of the present invention;

[0046] Figure 6 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0048] According to an embodiment of the present invention, a method, device, electronic device and storage medium for displaying vehicle prompt lines are provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0049] In this embodiment, a method for displaying a vehicle prompt line is provided. Figure 1 is a flow chart of a method for displaying a vehicle prompt line according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0050] Step S101, obtaining curve segments and first distance data between the vehicle and obstacles at different directions at the current moment, wherein the curve segment is located between the vehicle and the obstacle.

[0051] In the embodiment of the present application, the driver turns on the parking distance measuring device, and the distance measuring devices (such as radar or distance measuring sensors) located at different positions of the vehicle start to transmit signals and receive reflected signals. The distance measuring device should be able to monitor the environment around the vehicle in real time and continuously update the information of obstacles. For each received reflected signal, the distance measuring device will calculate the first distance data between the obstacle and the vehicle based on parameters such as the time difference and frequency change of the signal.

[0052] The fan-shaped area is constructed based on the position where the ranging device is located and the scanning range. The curve segment corresponding to each fan-shaped area is located between a specific part of the vehicle (such as the side, front, etc.) and the obstacle. The shape of the curve segment depends on many factors, including the relative position and shape of the vehicle and the obstacle, as well as the influence of the surrounding environment. In general, the curve segment may not be a strict straight line, but may present a certain curvature or irregular shape. For example, if there are other objects or terrain between the vehicle and the obstacle, the curve segment may become curved due to reflection, refraction or occlusion of the signal. In addition, the shape of the vehicle and the obstacle may also cause the shape of the curve segment to change.

[0053] Step S102, analyzing the difference between the first distance data and the second distance data in the same direction, and obtaining an animation display strategy corresponding to the curve segment, wherein the second distance data is the distance data between the vehicle and the obstacle in the same direction at the previous moment.

[0054] In the embodiment of the present application, the difference between the first distance data and the second distance data is first calculated. If the difference is positive, it means that the distance between the vehicle and the obstacle is getting larger; if the difference is negative, it means that the distance is getting smaller. Then, according to the size of the difference, the relative movement speed and trend between the vehicle and the obstacle can be determined. A larger difference may mean that the vehicle is approaching or moving away from the obstacle quickly.

[0055] If the first distance data or the second distance data exceeds the preset range, the current state and the previous data state are switched between display and hiding, indicating that the relative position relationship between the vehicle and the obstacle has changed significantly. At this time, the animation display strategy is the first animation display strategy, that is, the animation of gradually disappearing and appearing in place. When the distance changes from the display range to the out-of-range range, the curve segment gradually disappears; when the distance changes from the out-of-range range to the display range, the curve segment gradually appears. This can avoid the visual interference caused by sudden display or hiding to the driver.

[0056] If the first distance data and the second distance data are both within the preset range, and the current state and the previous data state do not switch between display and hiding, it means that the relative position relationship between the vehicle and the obstacle is relatively stable. At this time, the animation display strategy is the second animation display strategy, that is, the interpolation of the current distance and the previous distance is calculated, and the display position of the curve segment is gradually adjusted to make it a smooth transition. At the same time, the target color value is calculated according to the current distance, and interpolated with the previous color value, so that the color of the curve segment changes gradually with the distance.

[0057] Step S103, rendering the curve segment according to the animation display strategy to obtain the rendered curve segment, and connecting the rendered curve segments located in different directions to obtain the prompt line of the vehicle at the current moment.

[0058] In an embodiment of the present application, animation display strategies are determined in different situations, such as determining the display state based on whether the distance data is within a preset range, performing interpolation operations to achieve smooth movement and color gradients, and executing in-place fade-in and fade-out animations.

[0059] For each curve segment in each orientation: Determine the properties of the curve segment, including position, shape, color, transparency, etc., based on the current animation display strategy and related data (such as distance data, color value, etc.). Use the functions and methods provided by the graphics library (such as OpenGL, Canvas, etc.) to draw and render the curve segment according to the determined properties.

[0060] Traverse all the rendered curve segments in all directions and determine the connection points of the curve segments in adjacent directions. For example, you can select the endpoints of the curve segments or points at specific locations. Use the functions for drawing lines or curves provided by the graphics library to connect the curve segments in adjacent directions at the connection points. You can set the properties of the connecting lines, such as color, width, etc., to coordinate with the curve segments. For curve segments in non-adjacent directions, you can connect them in segments or use other connection methods as needed to ensure the continuity and integrity of the prompt line. After completing the connection of all the curve segments, you will get the prompt line of the vehicle at the current moment.

[0061] The method provided in the embodiment of the present application can more intuitively display the distance change between the vehicle and the obstacle by analyzing the difference in distance data and performing animation display, avoiding the problem of inaccurate distance control caused by jumps. It helps the driver to better judge the distance to the obstacle and make safer driving decisions. By rendering the curve segments according to the animation display strategy and connecting the curve segments rendered in different directions, a complete and continuous prompt line is formed, making the distance display smoother and avoiding jumps caused by changes in direction / distance. The driver can perceive the distance change between the vehicle and the obstacle more accurately, make more timely and accurate driving decisions, and improve driving safety.

[0062] Figure 2 is a flow chart of a method for displaying a vehicle prompt line according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0063] Step S201, obtaining the curve segments and first distance data between the vehicle and obstacles at different directions at the current moment, wherein the curve segment is located between the vehicle and the obstacle. For details, please refer to step S101 in the above embodiment, which will not be repeated here.

[0064] Step S202: Analyze the difference between the first distance data and the second distance data to obtain an animation display strategy corresponding to the curve segment, wherein the second distance data is the distance data between the vehicle and the obstacle in the same direction at the previous moment.

[0065] In the embodiment of the present application, the difference between the first distance data and the second distance data in the same direction is analyzed to obtain the animation display strategy corresponding to the curve segment, including the following steps A1-A4:

[0066] Step A1, comparing the first distance data with the second distance data.

[0067] Specifically, the first distance data is the distance between the vehicle and the obstacle at the current moment, and the second distance data is the distance between the vehicle and the obstacle at the previous moment. The first distance data is compared with the second distance data, for example, by comparing the numerical values ​​or calculating the difference between the two.

[0068] Step A2: if the first distance data is inconsistent with the second distance data, determining a first state corresponding to the first distance data according to whether there is a jump abnormality in the first distance data.

[0069] In an embodiment of the present application, the first state corresponding to the first distance data is determined based on whether there is a jump abnormality in the first distance data, including: if there is a jump abnormality in the first distance data, determining that the first state corresponding to the first distance data is a hidden state; if there is no jump abnormality in the first distance data, determining that the first state corresponding to the first distance data is a display state.

[0070] Specifically, determine whether the first distance data is equal to the second distance data. If they are not equal, it is considered that the values ​​are inconsistent, and it is necessary to further determine whether there is a jump abnormality in the first distance data. For example, if the first distance data is 1.2 meters and the second distance data is 1 meter, the values ​​are inconsistent. Determining whether there is a jump abnormality in the first distance data can be determined by setting a reasonable jump threshold. If the difference between the first distance data and the second distance data exceeds this threshold, it is considered that there is a jump abnormality. For example, the jump threshold is set to 3 meters. If the difference between the first distance data and the second distance data is greater than 3 meters, it is considered that there is a jump abnormality in the first distance data.

[0071] The first state is determined according to whether there is a jump abnormality. If the first distance data has a jump abnormality, the first state is determined to be a hidden state; if the first distance data does not have a jump abnormality, the first state is determined to be a display state. For example, if the first distance data has a jump abnormality, the first state is set to a hidden state, indicating that it may not be suitable to display relevant information at this time due to an abnormal situation. If there is no jump abnormality, the first state is set to a display state.

[0072] Step A3, obtaining a second state corresponding to the second distance data.

[0073] Specifically, query the historical detection record, and obtain the second state corresponding to the second distance data from the historical detection record, wherein the second state is a hidden state or a displayed state. The historical detection record contains distance data of multiple historical moments and their corresponding state information. Then, filter out the record entries related to the second distance data of the previous moment, and extract the state corresponding to the second distance data, i.e., the hidden state or the displayed state.

[0074] Step A4, determining a corresponding animation display strategy according to whether switching occurs between the first state and the second state.

[0075] Specifically, the first state and the second state are compared to see if they are the same. If they are different, it is considered that a state switch has occurred; if they are the same, no state switch has occurred. For example, if the first state is a hidden state and the second state is a displayed state, it is determined that a state switch has occurred.

[0076] Determine the animation display strategy: Determine the corresponding animation display strategy based on whether the state switching occurs. If the state switching does not occur, interpolation operations may be adopted to implement animation display strategies such as smooth movement and color gradient. For example, when the first state and the second state are both display states, interpolation operations are performed based on the current distance and the previous distance to make the displayed curve segment move smoothly, and color gradients are performed according to the distance change.

[0077] If a state switch occurs, a fade-in animation may be executed. For example, when the first state is hidden and the second state is displayed, a fade-out animation of the curve segment is executed; when the first state is displayed and the second state is hidden, a fade-in animation is executed. This can avoid the discomfort caused by sudden state changes to the user and make the display effect more natural and smooth.

[0078] Step S203, rendering the curve segment according to the animation display strategy to obtain the rendered curve segment, and connecting the rendered curve segments located in different directions to obtain the prompt line of the vehicle at the current moment.

[0079] In the embodiment of the present application, the curve segment is rendered according to the animation display strategy to obtain the rendered curve segment, including the following steps B1-B3:

[0080] Step B1: if the animation display strategy is the first animation display strategy, determine the initial transparency of the displayed animation according to the first state, wherein the first animation display strategy is the animation display strategy corresponding to when switching occurs between the first state and the second state.

[0081] Specifically, first determine whether the current animation display strategy is the first animation display strategy. The first animation display strategy is the animation display strategy corresponding to the switching between the first state and the second state. For example, the current animation display strategy type can be determined by a flag variable or a specific judgment logic.

[0082] If it is determined to be the first animation display strategy, it is necessary to determine the initial transparency of the display animation based on the first state. If the first state is the display state, it means that the current state is switched from display to other states (possibly hidden states), and the initial transparency can be set to a higher value, such as 100% (completely opaque). This is because in a fade-in animation, the initial state is completely visible and then gradually becomes transparent. If the first state is the hidden state, it means that the current state is switched from hidden to display, and the initial transparency can be set to a lower value, such as 0% (completely transparent). In a fade-in animation, the initial state is completely invisible and then gradually becomes opaque.

[0083] Step B2, obtaining the animation frame number of the display animation corresponding to the curve segment, and calculating the transparency of each frame of the display animation according to the position of each frame of the display animation in the animation frame number and the initial transparency.

[0084] Specifically, determine the total number of frames of the displayed animation corresponding to the curve segment. This can be calculated based on the duration and frame rate of the animation. For example, if the animation duration is 1 second and the frame rate is 30 frames / second, then the number of animation frames is 30 frames. The number of animation frames can be calculated dynamically based on pre-set parameters or based on system performance and requirements.

[0085] For each frame of the animation, the transparency of the frame is calculated based on its position in the animation frame number and the initial transparency. If it is a fade-in animation that switches from display to hiding, the transparency can be gradually reduced as the number of frames increases. For example, the initial transparency is 100%, if the current frame is the nth frame and the total number of frames is N, then the transparency can be calculated as (Nn) / N×100%. In this way, as the animation progresses, the transparency gradually decreases to achieve a fade-in effect.

[0086] If it is a gradual animation from hiding to showing, the transparency will gradually increase as the number of frames increases. For example, if the initial transparency is 0%, the transparency can be calculated as n / N×100%. As the animation progresses, the transparency gradually increases to achieve a gradual effect.

[0087] Step B3, rendering the curve segment according to the transparency of each frame of the animation, to obtain the rendered curve segment.

[0088] Specifically, for each frame of animation, the curve segment is rendered according to the transparency of the frame. The transparency of the curve segment is set to the transparency value calculated for the current frame using the function of the graphics library. Then the curve segment is drawn according to its position, shape and other properties to obtain the rendering result of the frame. This process is repeated until all frames are rendered, and a series of curve segment images with different transparency are obtained to achieve a fade-in and fade-out animation effect.

[0089] The method provided in the embodiment of the present application can achieve a smooth visual transition effect by determining the initial transparency and calculating and adjusting the transparency frame by frame for animation rendering when the first state and the second state are switched. For example, when switching from the display state to the hidden state, it will not disappear suddenly, but gradually become transparent, making the user's visual experience more natural and reducing the visual impact caused by the sudden change of state.

[0090] For drivers or users, this animation display strategy can more clearly convey changes in information status. In vehicle scenarios, when the distance data status between the vehicle and the obstacle switches, the gradual transparency allows the driver to more intuitively understand the system's judgment and feedback on the current situation, so that they can make better decisions and improve driving safety and comfort. It avoids confusion or misjudgment that may be caused by sudden display or hiding changes.

[0091] In the embodiment of the present application, the curve segment is rendered according to the animation display strategy to obtain the rendered curve segment, including the following steps C1-C3:

[0092] Step C1, if the animation display strategy is the second animation display strategy, calculate the distance difference between the first distance data and the second distance data, and calculate the color difference between the first color value corresponding to the first distance data and the second color value corresponding to the second distance data, wherein the second animation display strategy is the animation display strategy corresponding to the situation when no switching occurs between the first state and the second state.

[0093] Specifically, it is determined whether the current animation display strategy is the second animation display strategy. The second animation display strategy is an animation display strategy corresponding to when no switching occurs between the first state and the second state.

[0094] The first distance data is the distance between the vehicle and the obstacle at the current moment, and the second distance data is the distance between the vehicle and the obstacle at the previous moment. Calculate the distance difference, which is the result of subtracting the second distance data from the first distance data. Determine the first color value corresponding to the first distance data and the second color value corresponding to the second distance data. The color value can be determined according to the distance data through a specific mapping relationship, for example, the color is darker when the distance is closer and the color is lighter when the distance is farther. Calculate the difference between the first color value and the second color value in each color channel (such as RGB channel). For example, if the first color value is (100, 120, 150) and the second color value is (90, 110, 140), the color difference on the R channel is 10, the color difference on the G channel is 10, and the color difference on the B channel is 10.

[0095] Step C2, calculating the moving step length of each movement by using the distance difference and the preset smoothing coefficient, and calculating the color value of each update according to the color difference and the preset gradient coefficient.

[0096] Specifically, a preset smoothing coefficient is obtained. The smoothing coefficient is usually a value less than 1 and is used to control the speed of smooth movement. For example, the smoothing coefficient can be set to 0.1. The moving step length of each movement is obtained by multiplying the distance difference by the smoothing coefficient.

[0097] Get the preset gradient coefficient, which is also a value less than 1, and is used to control the speed of color gradient. For example, you can set the gradient coefficient to 0.05. For each color channel, multiply the color difference by the gradient coefficient to get the color value of the channel each time it is updated. For example, if the color difference on the R channel is 10 and the gradient coefficient is 0.05, then the color value of the R channel each time it is updated is 0.5.

[0098] Step C3, gradually rendering the curve segment according to the moving step length and the color value to obtain a rendered curve segment.

[0099] Specifically, first, the position of the curve segment is gradually updated according to the current position and the moving step. If the current curve segment indicates that the distance between the vehicle and the obstacle is 1 meter and the moving step is 0.2 meters, then the position of the curve segment is moved one small step to the position corresponding to the new distance each time it is rendered. At the same time, the color of the curve segment is gradually updated according to the calculated updated color value. If the current color is (90,110,140) and the color value of the R channel is 0.5 each time it is updated, then the value of the R channel is increased by 0.5 each time it is rendered, and the same is true for other channels, so that the color of the curve segment gradually changes.

[0100] This process is repeated until the distance and color reach new values, completing the smooth movement and color gradient rendering of the curve segment, and obtaining the rendered curve segment.

[0101] The method provided in the embodiment of the present application can accurately capture subtle changes in data by calculating the distance difference and color difference when the first state and the second state are not switched. The moving step length is calculated using the distance difference and the smoothing coefficient, so that the curve segment can move gradually in small steps when representing the change in the distance between the vehicle and the obstacle, avoiding sudden position changes and achieving a smooth transition. The color value of each update is calculated based on the color difference and the gradient coefficient, so that the color of the curve segment can gradually change with the change in distance, enhancing the visual continuity and naturalness.

[0102] For users (such as drivers), this progressive rendering method can more accurately reflect the actual changes between the vehicle and the obstacle. Through smooth movement and color gradient, users can more intuitively feel the trend of small changes in distance and make better decisions. It helps to improve users' trust in the system. Stable and accurate information feedback makes users believe that the system can reliably provide information about the vehicle's surroundings, which enhances users' reliance on the system and confidence in its use.

[0103] In the embodiment of the present application, connecting the rendered curve segments at different positions to obtain the prompt line of the vehicle at the current moment includes the following steps D1-D3:

[0104] Step D1, determining the sector areas corresponding to the curve segments rendered in different directions, and the level corresponding to each sector area, wherein the level is determined according to the distance between the sector area and the obstacle.

[0105] Specifically, first, clarify the definition and scope of the sector areas into which the space around the vehicle is divided. For example, the various ranging devices deployed on the vehicle can be divided into multiple sector areas at a certain angle with the vehicle as the center. For each rendered curve segment, the sector area to which it belongs is determined according to its orientation in space. The level is determined based on the distance between the sector area and the obstacle. Multiple distance intervals can be set, and each distance interval corresponds to a level. For each sector area, measure the distance between the nearest obstacle and the vehicle in the sector area. Determine the level corresponding to the sector area based on this distance.

[0106] Step D2, comparing the levels corresponding to each two adjacent sector areas to obtain a level difference, and determining the adjacent sector areas whose level difference is greater than or equal to a preset value as two sector areas to be connected.

[0107] Specifically, all adjacent pairs of sector areas are compared in sequence. For each sector area, its adjacent sector areas are determined, and they can be traversed according to the numbering order or spatial position relationship of the sector areas. The levels of each pair of adjacent sector areas are compared. A preset value set according to the level difference is obtained. If the level difference between two adjacent sector areas is greater than the preset value, the two sector areas are determined as sector areas to be connected. For example, the preset value is 2. If the level of a sector area is 1 and the level of its adjacent sector area is 3, and the level difference is 2 equal to the preset value, then the two sector areas are sector areas to be connected.

[0108] Step D3, connecting the curve segments corresponding to the sector-shaped areas to be connected to obtain the prompt line of the vehicle at the current moment.

[0109] Specifically, the curve segments corresponding to the to-be-connected sector areas are connected to obtain the prompt line of the vehicle at the current moment, including: taking the target equally divided points in the two sector areas to be connected as the starting points of the smooth curve; creating an initial curve segment based on the starting point and the initial control point; updating the control points in the initial curve segment according to the interpolation factor, and recalculating the Bezier curve using the updated control points to obtain an updated curve segment; constructing the prompt line of the vehicle at the current moment based on the updated curve segment and the target curve segment, wherein the target curve segment is the curve segment corresponding to the other sector areas in all sector areas except the to-be-connected sector area.

[0110] First, for the two sector areas to be connected, determine the target dividing point as the starting point of the smooth curve. For example, the edge curve of each sector area can be divided into equal parts according to a certain ratio, such as taking the 1 / 3 dividing point as the target dividing point. In this way, the two sector areas to be connected have two starting points for creating a smooth curve to connect the curve segments of the two areas.

[0111] Secondly, an initial curve segment is created based on the starting point and the initial control point. The initial control point can be determined based on experience or specific design rules. For example, the midpoint of the line connecting the centers of two sector areas can be selected as an initial control point. The Bezier curve algorithm is used to create the initial curve segment with two starting points and the initial control point.

[0112] Then, the control points in the initial curve segment are updated according to the interpolation factor. The interpolation factor can change gradually according to time or the number of iterations, for example, gradually increase from 0 to 1. The new control point position is calculated according to the interpolation factor. For example, the linear interpolation method can be used, and the new control point position = (1-interpolation factor) × old control point position + interpolation factor × target control point position. The Bezier curve is recalculated using the updated control points to obtain an updated curve segment. As the interpolation factor changes, the curve segment gradually transitions from the initial state to the target state, achieving a smooth transition effect.

[0113] Finally, the prompt line of the vehicle at the current moment is constructed based on the updated curve segment and the target curve segment. The target curve segment is the curve segment corresponding to all the fan-shaped areas except the fan-shaped area to be connected. Figure 3 As shown, the updated curve segment is connected with the target curve segment to form a complete prompt line. Each curve segment can be connected in sequence to ensure the continuity and integrity of the prompt line.

[0114] It should be noted that the purpose of the connection method provided in the embodiment of the present application is to provide a smoother visual effect by connecting the lines of adjacent sectors with smooth curves when the difference between the lines is small; and to disconnect when the difference between the levels is large to avoid unnatural transitions. At the same time, the use of Bezier curves and interpolation operations can further enhance the smoothness and realism of the curves, making the entire effect cooler, such as Figure 4 As shown, in the traditional solution, the connection between different areas is often not specially processed, there is an obvious sense of segmentation, and the user cannot visually perceive the connection between the areas. This makes the overall display effect not coherent enough, and it is difficult to visually judge the relationship between different areas and distance information. However, the embodiment of the present application achieves seamless connection at the connection between different fan-shaped areas. The transition between different fan-shaped areas is made more natural, eliminating possible gaps or discontinuities, and improving the overall visual consistency.

[0115] In addition, when the distance between adjacent fan-shaped areas changes, it can be calculated in real time and the curve can be drawn according to the calculation method of the Bezier curve. In this way, the curve can be adjusted and drawn in time according to the dynamic change of the distance between the vehicle and the obstacle to reflect the current actual situation.

[0116] In this embodiment, a display device for vehicle prompt lines is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0117] This embodiment provides a display device for vehicle prompt lines, such as Figure 5 As shown, including:

[0118] An acquisition module 501 is used to acquire a curve segment and first distance data between the vehicle and obstacles at different positions at a current moment, wherein the curve segment is located between the vehicle and the obstacle;

[0119] An analysis module 502 is used to analyze the difference between the first distance data and the second distance data in the same direction, and obtain an animation display strategy corresponding to the curve segment, wherein the second distance data is the distance data between the vehicle and the obstacle in the same direction at the previous moment;

[0120] The rendering module 503 is used to render the curve segment according to the animation display strategy to obtain the rendered curve segment, and connect the rendered curve segments located in different directions to obtain the prompt line of the vehicle at the current moment.

[0121] In an embodiment of the present application, the analysis module 502 is used to compare the first distance data with the second distance data; if the first distance data is inconsistent with the second distance data, determine the first state corresponding to the first distance data according to whether there is a jump abnormality in the first distance data; obtain the second state corresponding to the second distance data; and determine the corresponding animation display strategy according to whether a switch occurs between the first state and the second state.

[0122] In the embodiment of the present application, the analysis module 502 is used to determine that the first state corresponding to the first distance data is a hidden state if there is a jump abnormality in the first distance data; if there is no jump abnormality in the first distance data, determine that the first state corresponding to the first distance data is a display state.

[0123] The analysis module 502 is further used to query historical detection records, and obtain a second state corresponding to the second distance data from the historical detection records, wherein the second state is a hidden state or a displayed state.

[0124] In an embodiment of the present application, the rendering module 503 is used to determine the initial transparency of the displayed animation according to the first state if the animation display strategy is the first animation display strategy, wherein the first animation display strategy is the animation display strategy corresponding to the switching between the first state and the second state; obtain the animation frame number of the displayed animation corresponding to the curve segment, and calculate the transparency of each frame of the displayed animation according to the position of each frame of the displayed animation in the animation frame number and the initial transparency; render the curve segment according to the transparency of each frame of the displayed animation to obtain the rendered curve segment.

[0125] In an embodiment of the present application, the rendering module 503 is used to calculate the distance difference between the first distance data and the second distance data, and calculate the color difference between the first color value corresponding to the first distance data and the second color value corresponding to the second distance data if the animation display strategy is the second animation display strategy, wherein the second animation display strategy is the animation display strategy corresponding to the case where no switching occurs between the first state and the second state; calculate the moving step length of each movement using the distance difference and the preset smoothing coefficient, and calculate the color value of each update according to the color difference and the preset gradient coefficient; render the curve segment step by step according to the moving step length and the color value to obtain the rendered curve segment.

[0126] In an embodiment of the present application, the rendering module 503 is used to determine the sector-shaped areas corresponding to the curve segments rendered in different directions, and the level corresponding to each sector-shaped area, where the level is determined based on the distance between the sector-shaped area and the obstacle; compare the levels corresponding to each two adjacent sector-shaped areas to obtain the level difference, and determine the adjacent sector-shaped areas whose level difference is greater than or equal to a preset value as two sector-shaped areas to be connected; connect the curve segments corresponding to the sector-shaped areas to be connected to obtain the prompt line of the vehicle at the current moment.

[0127] In an embodiment of the present application, the rendering module 503 is used to use the target equally divided points in the two sector areas to be connected as the starting points of the smooth curve; create an initial curve segment based on the starting point and the initial control point; update the control points in the initial curve segment according to the interpolation factor, and recalculate the Bezier curve using the updated control points to obtain an updated curve segment; construct a prompt line of the vehicle at the current moment based on the updated curve segment and the target curve segment, wherein the target curve segment is the curve segment corresponding to all sector areas except the sector area to be connected.

[0128] See also Figure 6 , Figure 6 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0129] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0130] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0131] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of an electronic device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0132] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0133] The electronic device further comprises a communication interface 30 for the electronic device to communicate with other devices or a communication network.

[0134] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0135] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for displaying a vehicle prompt line, characterized in that: The method comprises: Acquire a curve segment and first distance data between the vehicle and obstacles at different directions at a current moment, wherein the curve segment is located between the vehicle and the obstacle; Analyze the difference between the first distance data and the second distance data to obtain an animation display strategy corresponding to the curve segment, wherein the second distance data is the distance data between the vehicle and the obstacle in the same direction at the previous moment; The curve segment is rendered according to the animation display strategy to obtain a rendered curve segment, and the rendered curve segments located in different directions are connected to obtain a prompt line of the vehicle at the current moment.

2. The method according to claim 1, characterized in that The analyzing the difference between the first distance data and the second distance data in the same direction to obtain the animation display strategy corresponding to the curve segment includes: comparing the first distance data with the second distance data; If the first distance data is inconsistent with the second distance data, determining a first state corresponding to the first distance data according to whether there is a jump abnormality in the first distance data; Acquire a second state corresponding to the second distance data; A corresponding animation display strategy is determined according to whether switching occurs between the first state and the second state.

3. The method according to claim 2, characterized in that The determining, according to whether the first distance data has a jump abnormality, a first state corresponding to the first distance data includes: If the first distance data has a jump abnormality, determining that the first state corresponding to the first distance data is a hidden state; or if the first distance data does not have a jump abnormality, determining that the first state corresponding to the first distance data is a display state; Acquiring a second state corresponding to the second distance data includes: querying historical detection records, and acquiring a second state corresponding to the second distance data from the historical detection records, wherein the second state is a hidden state or a displayed state.

4. The method according to claim 2, characterized in that: The step of rendering the curve segment according to the animation display strategy to obtain the rendered curve segment includes: If the animation display strategy is a first animation display strategy, determining the initial transparency of the displayed animation according to the first state, wherein the first animation display strategy is an animation display strategy corresponding to when switching occurs between the first state and the second state; Obtaining the animation frame number of the display animation corresponding to the curve segment, and calculating the transparency of each frame of the display animation according to the position of each frame of the display animation in the animation frame number and the initial transparency; The curve segment is rendered according to the transparency of each frame of the animation to obtain a rendered curve segment.

5. The method according to claim 2, characterized in that: The step of rendering the curve segment according to the animation display strategy to obtain the rendered curve segment includes: If the animation display strategy is the second animation display strategy, the distance difference between the first distance data and the second distance data is calculated, and the color difference between the first color value corresponding to the first distance data and the second color value corresponding to the second distance data is calculated, wherein the second animation display strategy is the animation display strategy corresponding to when no switching occurs between the first state and the second state; Calculating the moving step length of each movement by using the distance difference and a preset smoothing coefficient, and calculating the color value of each update according to the color difference and a preset gradient coefficient; The curve segment is gradually rendered according to the moving step length and the color value to obtain a rendered curve segment.

6. The method according to claim 1, characterized in that The connecting of the rendered curve segments at different positions to obtain the prompt line of the vehicle at the current moment includes: Determine the fan-shaped areas corresponding to the curve segments rendered in different directions, and the level corresponding to each of the fan-shaped areas, wherein the level is determined according to the distance between the fan-shaped area and the obstacle; Compare the levels corresponding to each two adjacent sector areas to obtain a level difference, and determine the adjacent sector areas whose level difference is greater than or equal to a preset value as two sector areas to be connected; The curve segments corresponding to the to-be-connected sector areas are connected to obtain a prompt line of the vehicle at the current moment.

7. The method according to claim 6, characterized in that The step of connecting the curve segments corresponding to the to-be-connected sector areas to obtain a prompt line of the vehicle at the current moment includes: The target equally divided points in the two fan-shaped areas to be connected are taken as the starting points of the smooth curve; Creating an initial curve segment based on the starting point and the initial control point; The control points in the initial curve segment are updated according to the interpolation factor, and the Bezier curve is recalculated using the updated control points to obtain an updated curve segment; A prompt line of the vehicle at the current moment is constructed based on the updated curve segment and the target curve segment, wherein the target curve segment is a curve segment corresponding to other fan-shaped areas in all fan-shaped areas except the fan-shaped area to be connected.

8. A display device for a vehicle prompt line, characterized in that: The device comprises: An acquisition module, used to acquire a curve segment and first distance data between the vehicle and obstacles at different directions at a current moment, wherein the curve segment is located between the vehicle and the obstacle; an analysis module, configured to analyze the difference between the first distance data and second distance data of the same orientation, and obtain an animation display strategy corresponding to the curve segment, wherein the second distance data is the distance data between the vehicle and the obstacle at a previous moment; The rendering module is used to render the curve segment according to the animation display strategy to obtain the rendered curve segment, and connect the rendered curve segments located in different directions to obtain the prompt line of the vehicle at the current moment.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Assisted driving method, device and system based on vehicle-mounted terminal and storage medium

    CN110525360A

  • Method, device and equipment for detecting obstacles around target object and medium

    CN115932866A

  • Remote driving information display method and device, electronic equipment and storage medium

    CN116022174A

  • Auxiliary driving method and device for narrow road section, automobile and medium

    CN117184138A

  • Vehicle radar detection information display method and device, vehicle-mounted terminal and storage medium

    CN118625323A