A method for displaying energy consumption curve, vehicle, storage medium and program product

By analyzing the changing trends of energy consumption data points, calculating auxiliary points, and generating a smooth energy consumption curve, the problem of abrupt and fluctuating energy consumption curves in existing technologies is solved, improving the visual experience and information accuracy.

CN122111545APending Publication Date: 2026-05-29ZHEJIANG GEELY HLDG GRP CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG GEELY HLDG GRP CO LTD
Filing Date
2026-01-16
Publication Date
2026-05-29

Smart Images

  • Figure CN122111545A_ABST
    Figure CN122111545A_ABST
Patent Text Reader

Abstract

The one or more embodiments of the specification provide a method for displaying energy consumption curve, a vehicle, a storage medium and a program product, the method comprising: acquiring a sequence of energy consumption data of a vehicle in a continuous time period, and determining a plurality of data point pairs according to the sequence of energy consumption data, each data point pair comprising a first data point and a second data point adjacent in time; for each data point pair, calculating a value of at least one auxiliary point between the first data point and the second data point in the corresponding data point pair based on the preceding change trend, the current change trend and the subsequent change trend; and generating and displaying a corresponding energy consumption curve according to the first data point, the at least one auxiliary point and the second data point in each data point pair.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of vehicle technology, and more particularly to a method for displaying energy consumption curves, a vehicle, a storage medium, and a program product. Background Technology

[0002] With the rapid development of the new energy vehicle industry, vehicle energy consumption has become a core concern for users. In-vehicle dashboards, especially fully digital smart dashboards, have evolved into comprehensive information terminals integrating vehicle status, navigation, and energy management. Based on this, energy consumption curves, as a highly efficient and visual way to intuitively display dynamic energy consumption, are widely used in high-end intelligent electric vehicles. This function aims to transform complex energy consumption data into an easily understandable graphical language, thereby helping drivers optimize driving behavior, alleviate range anxiety, and ultimately improve the vehicle's practical range.

[0003] In related technologies, energy consumption curves are typically displayed by determining auxiliary points based on the instantaneous energy consumption values ​​of the current and previous moments, and then drawing the curve according to the Bézier curve formula. However, this method has significant drawbacks: First, the drawn Bézier curves often appear abrupt at data inflection points, lacking smooth transitions and severely impacting the visual experience; second, when drawing multiple consecutive line segments with the same slope, what should be displayed as smooth diagonal lines actually presents an unnatural wavy shape, causing curve distortion and failing to accurately reflect the true energy consumption trend. Summary of the Invention

[0004] In view of the above, one or more embodiments of this specification provide the following technical solutions: According to a first aspect of one or more embodiments of this specification, a method for displaying energy consumption curves is provided, the method comprising: The energy consumption data sequence of the vehicle over a continuous time period is obtained, and multiple data point pairs are determined based on the energy consumption data sequence. Each data point pair includes a first data point and a second data point that are adjacent in time. For each data point pair, a preceding trend is determined based on the first data point and at least one historical data point preceding it; a current trend is determined based on the first data point and the second data point; and a subsequent trend is determined based on the second data point and at least one future data point following it. Furthermore, based on the preceding trend, the current trend, and the subsequent trend, the value of at least one auxiliary point between the first data point and the second data point in the corresponding data point pair is calculated. Based on the first data point, the at least one auxiliary point, and the second data point in each data point pair, a corresponding energy consumption curve is generated and displayed.

[0005] According to a second aspect of one or more embodiments of this specification, a vehicle is provided, comprising: a processor and a memory for storing processor-executable instructions; wherein the processor implements the steps of the method described in the first aspect by executing the executable instructions.

[0006] According to a third aspect of this specification, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0007] According to a fourth aspect of this specification, a computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first aspect.

[0008] As can be seen from the above embodiments, the present invention, through comprehensive analysis of the preceding, current, and subsequent change trends of each data point pair, collaboratively determines the value of the auxiliary point, enabling the final generated energy consumption curve to achieve a smooth and natural transition at the data inflection point, avoiding the problem of abrupt curve turns in the prior art; at the same time, this multi-trend linkage auxiliary point value method effectively suppresses the phenomenon of unnecessary fluctuations in the curve in continuous segments with the same slope, ensuring the accuracy and smoothness of the graphic display, and significantly improving the user's visual experience and the intuitiveness of information interpretation. Attached Figure Description

[0009] Figure 1 This is a flowchart illustrating a method for displaying an energy consumption curve according to an embodiment of the present invention; Figures 2a-2d This is a schematic diagram showing the curve structures corresponding to different first products and second products in the embodiments disclosed in this invention; Figure 3 This is a schematic diagram illustrating a curve projection transformation process according to an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating another method for displaying energy consumption curves according to an embodiment of the present invention; Figure 5 This is a schematic structural diagram of an electronic device according to an embodiment of the present invention; Figure 6 This is a block diagram of an energy consumption curve display device shown in an embodiment of the present invention. Detailed Implementation

[0010] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification.

[0011] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0012] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0013] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data shall comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals shall be provided for users to choose to authorize or refuse.

[0014] Figure 1 This is a flowchart illustrating an exemplary embodiment of an energy consumption curve display method. Figure 1 As shown, the method may include the following steps: Step S102: Obtain the energy consumption data sequence of the vehicle in a continuous time period, and determine multiple data point pairs based on the energy consumption data sequence. Each data point pair includes a first data point and a second data point that are adjacent in time.

[0015] This manual first obtains the energy consumption data sequence of a vehicle over a continuous time period and then structurally identifies multiple data point pairs from it. Specifically, after obtaining the raw energy consumption data sequence, it undergoes normalization preprocessing to improve the adaptability and robustness of the subsequent curve generation algorithm to energy consumption data with different dimensions or numerical ranges.

[0016] The energy consumption curve processing system described in this specification first determines the numerical range of the energy consumption data sequence, i.e., the maximum and minimum values. Then, based on this range, it maps the value of each data point in the sequence to a unified predetermined interval, such as [0, 1], through linear transformation or other methods. This processing effectively eliminates the display scaling imbalance caused by excessively large differences in absolute values, ensuring that the final generated energy consumption curve more clearly and consistently reflects the relative trend of energy consumption changes, thus laying a unified numerical foundation for subsequent smoothing calculations.

[0017] It is worth mentioning that the energy consumption curve processing system used to perform the above steps of this method can be flexibly deployed on different computing nodes according to the needs and resource allocation of the actual application scenario. For example, the system can be directly integrated into the vehicle's in-vehicle infotainment system to achieve low-latency localized processing using the vehicle's computing power; it can also be deployed on a cloud server associated with the vehicle or in a user's mobile electronic device for centralized or distributed computing. This application does not limit the specific deployment location of the system; its core lies in the execution logic of the above method and the resulting technical effects.

[0018] The term "energy consumption data" mentioned in the aforementioned energy consumption data sequence can have a broad meaning, aiming to encompass various vehicle energy consumption information suitable for visualization through continuous curves. Specific forms of representation may include, but are not limited to: the electricity consumption of pure electric vehicles (units may be kWh / 100km), the fuel consumption of hybrid vehicles or conventional gasoline vehicles (units may be L / 100km), and even the hydrogen consumption of hydrogen fuel cell vehicles. This application does not limit the specific type of energy consumption data; its core method is applicable to any vehicle energy measurement index with time-varying characteristics.

[0019] Furthermore, each of the aforementioned data point pairs consists of a first data point and a second data point that are temporally adjacent. This step transforms the continuous energy consumption data stream into a series of discrete line segment units to be processed, laying the data structure foundation for subsequent refined curve smoothing calculations.

[0020] Specifically, this specification can introduce a pre-defined dataset as an intermediate carrier to more systematically organize and manage these discrete data points. Logically, this dataset acts as an ordered buffer, responsible for receiving and storing data points from the aforementioned energy consumption data sequence in chronological order. When it is necessary to determine data point pairs, the system traverses this dataset, dynamically pairing every two adjacent data points in chronological order—for example, the nth point with the (n+1)th point—to form a data point pair to be processed. In this way, the original data sequence is efficiently and completely transformed into multiple contiguous data point pairs, ensuring that the subsequent curve generation process covers every detail of energy consumption data variation, providing reliable data preparation for obtaining a high-fidelity smooth curve.

[0021] Those skilled in the art will understand that the aforementioned dataset, in practical applications, can dynamically receive new data from the energy consumption data sequence while maintaining a fixed length, thereby enabling real-time and smooth updates of the energy consumption curve. In this case, the essence of the aforementioned dataset is a "sliding window." This specification provides optimized update strategies for different data structures used in the dataset.

[0022] In one embodiment, when the data set is implemented using an array, the update process of the data set includes: shifting the existing data in the array as a whole along a predetermined direction, for example, towards the beginning of the array. This operation overwrites the oldest data, thereby creating a space at the end of the array, and then adding the new energy consumption data point to that space.

[0023] In another embodiment, when the above data set is implemented using a linked list, the update operation of the above data set is more efficient than the previous embodiment: the data point at the head of the linked list, that is, the earliest data in the energy consumption data sequence, is directly removed, and the new data point is added to the tail of the linked list.

[0024] Both of these strategies efficiently maintain a data view reflecting the latest energy consumption status, ensuring that the energy consumption curve updates smoothly and without flickering as new data arrives, providing drivers with real-time and continuous visual feedback. Specifically, the traditional stitching method, which stitches the newly generated instantaneous energy consumption curve segment with the complete curve from the previous moment each time data is updated and overwrites the old curve during display, is prone to screen flickering or brief blank spaces due to mismatched rendering timing or coverage areas, resulting in untimely and inconsistent display. In contrast, the data set mechanism introduced in this specification maintains a cache containing the latest data view, allowing the system to regenerate the entire energy consumption curve based on the complete data set each time it is updated and render it to the display area all at once. This data caching and one-time display strategy fundamentally avoids the flickering and blank space problems caused by curve segment stitching, ensuring the instantaneity of information display and high stability of the image, providing drivers with a seamless and smooth visual experience.

[0025] In addition, those skilled in the art may use other applicable data structures besides arrays and linked lists to implement the above sliding window according to actual needs, and this specification does not limit this.

[0026] Correspondingly, in the process of constructing the above-mentioned data set, this specification may also introduce a boundary virtual data point mechanism to ensure that the subsequent curve generation algorithm can also run stably and generate natural curves at the boundaries of the data sequence, that is, at the beginning and end, especially when the above-mentioned curve generation algorithm depends on the calculation of the changing trend of the preceding and following data points.

[0027] Specifically, when adding initial data points to the energy consumption data sequence in the dataset, the aforementioned energy consumption curve processing system can simultaneously add a virtual data point with the same value before that initial data point, i.e., at the adjacent preceding position. Similarly, when adding the latest data point in the sequence, an identical virtual data point is added after it, i.e., at the adjacent following position. These virtual data points do not represent actual energy consumption measurements; their purpose is to provide necessary contextual references for the start and end points of the sequence, enabling the calculation of the changing trends of boundary data point pairs and guiding the curve to have a logical direction of extension at the start and end points. This effectively avoids unnatural flatness or truncation of the curve at both ends of the display area, ensuring the visual integrity and smoothness of the entire energy consumption curve.

[0028] Step S104: For each data point pair, determine the preceding change trend based on the first data point and at least one historical data point before it, determine the current change trend based on the first data point and the second data point, and determine the subsequent change trend based on the second data point and at least one future data point after it; and, based on the preceding change trend, the current change trend and the subsequent change trend, calculate the value of at least one auxiliary point between the first data point and the second data point in the corresponding data point pair.

[0029] It is important to emphasize that the so-called "trend of change" is a key parameter used to quantify the direction and rate of change in a data point sequence. Specifically, it can be obtained by calculating the numerical difference or slope between two or more data points. A positive trend of change roughly corresponds to an "upward" or "increased" curve segment, while a negative trend corresponds to a "downward" or "decreased" curve segment. The absolute value of the trend further reflects the drasticness of the change in that curve segment. By defining the trend of change in three dimensions—"previous," "current," and "next"—for each data point pair, this method can comprehensively grasp the dynamic characteristics of the data flow from a microscopic perspective of the curve between the current first and second data points to a macroscopic perspective of the overall context.

[0030] In this step, for each pair of acquired data points, the method described in this specification does not process the two points in isolation, but rather introduces an analytical framework that incorporates contextual information. Specifically, it determines the preceding trend based on the first data point and its preceding historical data points, the current trend based on the first and second data points, and the subsequent trend based on the second data point and its subsequent future data points. Finally, it systematically integrates these three trends to calculate the value of the auxiliary point located between the first and second data points. This step, as the core of this solution, ensures that the auxiliary point's value setting proactively aligns with the overall direction of the data flow by integrating local and global change information.

[0031] In one embodiment, the aforementioned systematic synthesis process can be achieved through precise mathematical judgment. First, the first product of the preceding trend and the current trend, and the second product of the current trend and the subsequent trend are calculated. The signs of these two products, i.e., positive or negative, are crucial, as they collectively reveal whether the trend of the preceding and following data segments at the current data point is continuous or has reversed. Subsequently, based on the combination of signs of the first and second products, the system selects a matching one from a set of preset value rules to calculate the value of at least one auxiliary point. This judgment and rule selection mechanism based on product signs enables the curve generation algorithm to intelligently adapt to various complex data forms, thereby accurately reflecting the inherent changing characteristics of the data while ensuring the overall smoothness of the curve.

[0032] Specifically, suppose we need to calculate two auxiliary points, first auxiliary point b and second auxiliary point c, between the first data point a and the second data point d. The system can choose one of the following four value rules to execute based on the sign combination of the first and second products: Rule 1: When both the first and second products are greater than zero, it indicates that the preceding, current, and subsequent change trends are in the same direction. In this case, the system calculates the first auxiliary point based on the preceding change trend and the second auxiliary point based on the current change trend. Figure 2a For example, we can assume four consecutive data points: historical data point P0, first data point P1, second data point P2, and future data point P3. Let k1 = P1 - P0 (previous trend), k2 = P2 - P1 (current trend), and k3 = P3 - P2 (future trend). In this case, k1k2>0 and k2k3>0, corresponding to a curve shape of "rise-rise-rise" or "fall-fall-fall". To generate a smooth transition curve, we can determine the first auxiliary point b = P1 + k1 / 3 and the second auxiliary point c = P2 - k2 / 3. Selecting one-third (1 / 3) as the coefficient for converting the trend into control point displacement is an optimization design based on the mathematical characteristics of the cubic Bézier curve model used in this embodiment. This coefficient aims to balance the smoothness of the curve with the fidelity to the original data trend, ensuring that the final displayed energy consumption curve is both natural and smooth, and accurately reflects the true changes in energy consumption. In other words, if the curve algorithm corresponding to this embodiment changes, this coefficient can also be adjusted accordingly.

[0033] Rule 2: When the first product is not greater than zero and the second product is greater than zero, it indicates a trend reversal at the first data point. Therefore, the system can set the value of the first auxiliary point to be the same as the first data point and calculate the second auxiliary point based on the current trend. Figure 2b For example, in this case, k1k2 ≤ 0 and k2k3>0, the corresponding curve shape is "rise-fall-fall" or "fall-rise-rise". In order to anchor the curve at the turning point (P1) and maintain the trend thereafter, we can determine the auxiliary point b = P1 and the auxiliary point c = P2 - k2 / 3.

[0034] Rule 3: When the first product is greater than zero and the second product is not greater than zero, it indicates that the trend reversal occurred at the second data point. Accordingly, the system calculates the first auxiliary point based on the preceding trend and sets the value of the second auxiliary point to be the same as the second data point. Figure 2c For example, in this case, k1k2>0 and k2k3≤0, the corresponding curve shape is "rise-rise-fall" or "fall-fall-rise". In order to maintain the trend in the first segment and anchor the curve at the turning point (P2), we can determine the auxiliary point b = P1 + k1 / 3 and the auxiliary point c = P2.

[0035] Rule 4: For other complex fluctuation situations not described above, the system adopts a conservative strategy, that is, setting the value of the first auxiliary point to be the same as the first data point, and setting the value of the second auxiliary point to be the same as the second data point. Figure 2d For example, for other complex fluctuations besides the three cases mentioned above, such as k1k2 ≤ 0 and k2k3 ≤ 0, auxiliary point b can be set as P1 and auxiliary point c can be set as P2.

[0036] Through precise matching and adaptive selection of the above four rules, this method can intelligently respond to various data forms: generate smooth curves in segments with consistent trends to optimize visual appeal; accurately anchor curves at trend inflection points to truly reflect data changes; and maintain simplicity in complex fluctuation segments, thereby achieving the dual technical effects of smooth and natural curves and accurate preservation of change characteristics as a whole.

[0037] It should be noted that the specific implementation of rules one through four above is described in a specific configuration environment. This environment is mainly limited to: configuring two auxiliary points (b and c) between the first data point P1 and the second data point P2, and when calculating the preceding and following trends, only one adjacent historical data point P0 and one adjacent future data point P3 are involved, respectively.

[0038] It should be understood that the core of this method lies in the mechanism of adaptively selecting different value rules based on the product sign of multiple changing trends, rather than the specific rules themselves under the aforementioned specific configuration. Therefore, in practical application scenarios, if the number of auxiliary points required by the energy consumption curve algorithm described below changes—for example, some parametric curve algorithms may only require one or three or more auxiliary points—or the number of historical or future data points considered for calculating the changing trend changes—for example, by using more complex filtering or weighted calculations, so that the calculated preceding and following changing trends can themselves represent more complex local sequence features, such as presenting local detailed trends containing multiple stages, such as "decline-decline," "rise-decline-decline," "decline-rise-decline-decline," etc., or local overall trends obtained from further analysis such as weighted averaging of such detailed trends—then the number of corresponding value rules and their specific calculation content also need to be adaptively adjusted. This specification does not impose any restrictions on this. In short, this strategy of dynamically selecting the corresponding auxiliary point value based on the data trend pattern represented by the trend product can be regarded as one of the core ideas of this specification.

[0039] Step S106: Generate and display the corresponding energy consumption curve based on the first data point, the at least one auxiliary point, and the second data point in each data point pair.

[0040] After calculating the auxiliary points corresponding to each data point pair, this specification combines the original first and second data points with these newly calculated auxiliary points to generate the corresponding energy consumption curve segment and display the final complete curve. This step transforms the aforementioned calculation results into an intuitive visual graphic, connecting each data point with a smooth and accurate curve, ultimately presenting the user with an optimized display effect that avoids abrupt inflection points and truly reflects the trend of energy consumption changes. The output device for the aforementioned energy consumption curve can be flexibly selected according to the actual application scenario. Typical examples include, but are not limited to: in-vehicle screens such as instrument panel displays, center console smart car screens, or head-up displays; and user mobile terminals associated with the vehicle, such as corresponding application pages or mini-program interfaces on smartphones and tablets. This method does not limit the specific form and type of the display device; its core lies in rendering the processed energy consumption curve data into a visual graphic and presenting it to the user.

[0041] Specifically, the process of generating the energy consumption curve segment described above essentially transforms mathematical interpolation points into visual elements in computer graphics. This method achieves this transformation by introducing a parametric curve algorithm. For each pair of data points, the system uses the first data point as the starting point of the curve segment, the second data point as the ending point of the curve segment, and at least one calculated auxiliary point as a control point for shaping the curve. By executing a preset parametric curve algorithm, a smooth energy consumption curve segment connecting the starting and ending points is generated.

[0042] The parametric curve algorithm described above is preferably a Bézier curve algorithm. Especially when two auxiliary points exist, a cubic Bézier curve algorithm that closely matches this situation can be used, which can generate an extremely smooth curve using two endpoints and two control points. However, those skilled in the art should understand that the parametric curve algorithm described above is not limited to this; it can also be any algorithm that can use control points to define a smooth path, such as B-spline curves, non-uniform rational B-splines (NURBS), or Hermite interpolation. The system can use a fixed algorithm or dynamically select the most suitable one from a set of preset algorithms based on display requirements, computing resources, or data characteristics. Finally, by connecting the curve segments generated from all data point pairs end-to-end and combining them with the original or processed energy consumption data points, a complete and smooth energy consumption curve is formed and displayed to the user. This parametric curve generation method fundamentally ensures the mathematical continuity and visual smoothness of the graphic output, and is a key technical guarantee for achieving optimized display effects.

[0043] After calculating and generating the curve segment, this method can also perform boundary constraint processing to ensure that the final graphic output is correctly constrained within the specified display boundaries, preventing the curve from being drawn outside the view area due to numerical calculation errors or extreme data. Specifically, the system can judge and constrain the ordinate value Y of the calculated curve point prepared for rendering. The processing scheme is as follows: if the Y value is less than the lower boundary of the display range, such as the normalized value of 0, it is set to 0; if the Y value is greater than the upper boundary of the display range, such as the normalized value of 1, it is set to 1; if the Y value is between 0 and 1, its original calculated value is retained. This processing, as a robustness guarantee, can effectively avoid any potential display boundary issues, ensuring that the energy consumption curve is presented to the user completely and correctly.

[0044] Furthermore, after generating the aforementioned energy consumption curve, this method can also introduce a dynamic linewidth compensation mechanism to further optimize its visual performance on display devices. This mechanism aims to solve a common display rendering problem: theoretically, line segments with the same width on a pixel grid will appear to have different widths due to their different slopes. Specifically, the smaller the absolute value of the slope (i.e., closer to a horizontal line segment), the closer the visual width is to the set value; the larger the absolute value of the slope (i.e., closer to a vertical line segment), the thinner its visual width will be. This is because the way pixels project diagonal lines is different from that of straight lines; for details, please refer to [link to relevant documentation]. Figure 3 As shown.

[0045] Based on this, this method can dynamically compensate for line width through the following steps: First, based on the generated energy consumption curve segment, especially the first data point, the second data point, and at least one auxiliary point constituting the curve segment, the instantaneous slope k of the energy consumption curve at at least one position between the first data point and the second data point is calculated using the differentiation formula of parametric curves such as Bézier curves. Then, the displayed line width of the curve at that position is dynamically adjusted according to this instantaneous slope. The core principle is that the displayed line width is negatively correlated with the absolute value of the instantaneous slope. That is, when |k| is small, a wider line width is used; when |k| is large, a narrower line width is used, thereby compensating for the visual thinning effect caused by the slope, so that the line width perceived by the user tends to be consistent throughout the entire curve range.

[0046] In one embodiment, this can be achieved using a predetermined linewidth compensation function. For example... Figure 3 As shown, the input parameters of this function can include a preset base linewidth w, which typically corresponds to the ideal linewidth with a slope of zero, the aforementioned instantaneous slope k, and a configurable compensation intensity coefficient t. The system can use this function to calculate the compensated actual display linewidth W. The aforementioned compensation intensity coefficient t allows for flexible adjustment based on different display hardware characteristics and visual preferences to achieve a balance between visual consistency, computational overhead, and display effect. Through this refined linewidth compensation, this method ultimately presents the user with a uniform linewidth, visually harmonious, and distortion-free energy consumption curve, greatly enhancing the intuitiveness and professionalism of information display.

[0047] The following is combined with Figure 4 This section introduces a schematic diagram illustrating another method for displaying energy consumption curves. For example... Figure 4 As shown, the above method includes the following steps: Step S402: Normalize and cache the raw energy consumption data.

[0048] In one embodiment, the data preprocessing module of the energy consumption curve processing system first acquires the original energy consumption data sequence. This module determines the maximum value *b* and the minimum value *a* of the sequence, and performs a normalization calculation on each data point *t* in the sequence: *P* = (t - a) / (b - a), thereby mapping the values ​​of all data points to a predetermined interval [0, 1]. Subsequently, the module adds these normalized data points sequentially to an array of fixed size *N*, i.e., the aforementioned data set. When new data arrives, the module updates the array using a sliding window mechanism: shifting the data from position 0 to position N-2 forward by one position, thus freeing up position N-1, and filling that position with the latest normalized value *P*.

[0049] Step S404: The processed data is passed to the graphics rendering pipeline.

[0050] In one embodiment, the data binding module of the above system encapsulates the N data points in the array, denoted as P0 to Pn-1, and transmits the data to the vertex shader of the graphics rendering pipeline in real time and efficiently through the binding mechanism of a graphics API, such as OpenGL or Vulkan. This step acts as a data bridge between the application backend and the frontend graphics rendering unit, ensuring that the vertex shader can obtain the latest energy consumption data sequence in a timely manner for subsequent calculations.

[0051] Step S406: Expand the data sequence and determine the curve segment in the vertex shader.

[0052] In one embodiment, the curve construction module running in the vertex shader first expands the received N data points into a sequence of N+2 points S[0] to S[N+1], where S[0] is a virtual data point added at the beginning and S[N+1] is a virtual data point added at the end, thus constructing a complete computational context. For each curve segment to be drawn, the module selects four consecutive points from the expanded sequence as computational units: for example, S[i] as the historical data point (P0), S[i+1] as the starting point (P1, i.e., the first data point), S[i+2] as the ending point (P2, i.e., the second data point), and S[i+3] as the future data point (P3).

[0053] Step S408: Adaptively determine the auxiliary point value based on the trend product.

[0054] In one embodiment, the auxiliary point calculation module calculates the preceding trend k1 = P1 - P0, the current trend k2 = P2 - P1, and the subsequent trend k3 = P3 - P2 based on the four selected points P0, P1, P2, and P3. Subsequently, the module calculates the first product (k1 × k2) and the second product (k2 × k3), and according to their sign combination, [the result is missing from the original text]. Figures 2a to 2d Choose one of the four value rules shown in detail to calculate the values ​​of two auxiliary points b and c located between P1 and P2. For example, in the case of continuous rise or fall, calculate b = P1 + k1 / 3, c = P2 - k2 / 3.

[0055] Step S410: Generate curve segments based on the Bézier curve algorithm.

[0056] In one embodiment, the curve rendering module uses P1 as the starting point and P2 as the ending point, and the calculated auxiliary points b and c as control points to execute a cubic Bézier curve algorithm. The module calculates according to the formula Y=P1×(1-x)³+3×b×(1-x)²×x+3×c×(1-x)×x²+P2×x³, where x is a parameter that varies in the interval [0,1], representing the horizontal rendering progress from the starting point to the ending point, and Y is the calculated ordinate value of the curve point.

[0057] Step S412: Perform an out-of-bounds check on the rendering coordinates.

[0058] In one embodiment, the boundary constraint module judges and processes each ordinate value Y calculated by the curve rendering module. If the value of Y is less than 0, it is set to 0; if the value of Y is greater than 1, it is set to 1; if the value of Y is between 0 and 1, its original value is retained. This operation strictly restricts all curve points used for rendering within the normalized display boundary [0,1], effectively avoiding display boundary issues caused by numerical calculation deviations.

[0059] Step S414: Dynamically adjust the display line width based on the instantaneous slope.

[0060] In one embodiment, the linewidth compensation module first calculates the instantaneous slope k of the curve at the current parameter x based on the derivative formula of the Bézier curve. Then, the module dynamically calculates the actual display linewidth W at this position according to a predetermined linewidth compensation function W = w × sqrt(1.0 + t × k × k). Here, w is the preset base linewidth, and t is a configurable compensation intensity coefficient. This operation automatically thins the curve in sections with large slopes to compensate for visual deviations, thereby achieving a uniform visual linewidth effect across the entire curve range.

[0061] Figure 5 This is a schematic structural diagram of an electronic device according to an exemplary embodiment. Please refer to... Figure 5At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile storage, and may also include other necessary hardware. The processor reads the corresponding computer program from the non-volatile memory into memory and then executes it, forming a display device based on the energy consumption curve at the logical level. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0062] Figure 6 This invention provides a block diagram of an energy consumption curve display device according to an embodiment of the invention. Please refer to... Figure 6 The device includes: The data acquisition unit 602 is used to acquire the energy consumption data sequence of the vehicle in a continuous time period, and determine multiple data point pairs based on the energy consumption data sequence. Each data point pair includes a first data point and a second data point that are adjacent in time. The trend determination unit 604 is configured to, for each data point pair, determine a preceding trend based on the first data point and at least one historical data point preceding it, determine a current trend based on the first data point and the second data point, and determine a subsequent trend based on the second data point and at least one future data point following it; and, based on the preceding trend, the current trend, and the subsequent trend, calculate the value of at least one auxiliary point between the first data point and the second data point in the corresponding data point pair. The curve display unit 606 is used to generate and display the corresponding energy consumption curve based on the first data point, the at least one auxiliary point, and the second data point in each data point pair.

[0063] Optionally, the data acquisition unit 602 is specifically used for: Add the data points in the energy consumption data sequence to a preset data set in sequence; Each pair of data points that are adjacent in chronological order in the data set is defined as a data point pair.

[0064] Optionally, the device further includes: The data update unit is used to shift existing data in the array along a predetermined direction and add new data points to the positions vacated after the shift when the energy consumption data sequence is updated and the data set is an array. When the energy consumption data sequence is updated and the data set is a linked list, the data point at the head of the linked list is removed, and the new data point is added to the tail of the linked list.

[0065] Optionally, the data acquisition unit 602 is specifically used for: When adding an initial data point to the energy consumption data sequence, a virtual data point with the same value as the initial data point is added to the data set at the position preceding the initial data point; When adding the latest data point in the energy consumption data sequence, a virtual data point with the same value as the latest data point is added at the next position adjacent to the latest data point in the data set.

[0066] Optionally, the data acquisition unit 602 is specifically used for: Determine the numerical range of the energy consumption data sequence; Based on the numerical range, each data point in the sequence is normalized to map the value of each data point to a predetermined interval.

[0067] Optionally, the trend determination unit 604 is specifically used for: The step of calculating the value of at least one auxiliary point between the first data point and the second data point in a corresponding data point pair based on the preceding trend, the current trend, and the subsequent trend includes: Determine the first product of the preceding trend and the current trend, and the second product of the current trend and the subsequent trend; The value of the at least one auxiliary point is calculated based on the first product, the second product, and the corresponding value rules.

[0068] Optionally, the first data point and the second data point include a first auxiliary point and a second auxiliary point; the value selection rule includes at least one of the following: If both the first product and the second product are greater than zero, a first auxiliary point is calculated based on the preceding trend of change, and a second auxiliary point is calculated based on the current trend of change. If the first product is not greater than zero and the second product is greater than zero, the value of the first auxiliary point is set to be the same as that of the first data point, and the second auxiliary point is calculated based on the current trend of change. If the first product is greater than zero and the second product is not greater than zero, calculate the first auxiliary point based on the preceding change trend, and set the value of the second auxiliary point to be the same as the second data point; In other cases, the value of the first auxiliary point is set to be the same as that of the first data point, and the value of the second auxiliary point is set to be the same as that of the second data point.

[0069] Optionally, the device further includes: A linewidth adjustment unit is used to determine the instantaneous slope of the energy consumption curve at at least one position between the first data point and the second data point, based on at least one auxiliary point between the first data point and the second data point. The display line width of the energy consumption curve at the corresponding position is dynamically adjusted according to the instantaneous slope, and the display line width is negatively correlated with the absolute value of the instantaneous slope.

[0070] Optionally, the curve display unit 606 is specifically used for: Starting from the first data point and ending at the second data point, and using at least one auxiliary point as a control point, the energy consumption curve segment is generated using one or more preset parameter curve algorithms.

[0071] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0072] Based on the same concept as the methods described above, this specification also provides a vehicle, including: a processor and a memory for storing processor-executable instructions; wherein the processor executes the executable instructions to implement the steps of the method as described in any of the above embodiments.

[0073] Based on the same concept as the methods described above, this specification also provides a computer-readable storage medium having computer instructions stored thereon that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.

[0074] Based on the same concept as the methods described above, this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.

[0075] The embodiments of the subject matter and functional operation described in this specification can be implemented in the following ways: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof.

[0076] The processing and logic flow described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flow can also be executed by dedicated logic circuitry—such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the device can also be implemented as dedicated logic circuitry.

[0077] Computers suitable for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a GPS receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.

[0078] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.

[0079] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.

[0080] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0081] Therefore, specific embodiments of the subject matter have been described. Furthermore, the processes depicted in the figures are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.

[0082] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

Claims

1. A method for displaying energy consumption curves, characterized in that, The method includes: The energy consumption data sequence of the vehicle over a continuous time period is obtained, and multiple data point pairs are determined based on the energy consumption data sequence. Each data point pair includes a first data point and a second data point that are adjacent in time. For each data point pair, a preceding trend is determined based on the first data point and at least one historical data point preceding it; a current trend is determined based on the first data point and the second data point; and a subsequent trend is determined based on the second data point and at least one future data point following it. Furthermore, based on the preceding trend, the current trend, and the subsequent trend, the value of at least one auxiliary point between the first data point and the second data point in the corresponding data point pair is calculated. Based on the first data point, the at least one auxiliary point, and the second data point in each data point pair, a corresponding energy consumption curve is generated and displayed.

2. The method according to claim 1, characterized in that, The determination of multiple data point pairs based on the energy consumption data sequence includes: Add the data points in the energy consumption data sequence to a preset data set in sequence; Each pair of data points that are adjacent in chronological order in the data set is defined as a data point pair.

3. The method according to claim 2, characterized in that, The method further includes: When the energy consumption data sequence is updated and the data set is an array, the existing data in the array is shifted along a predetermined direction, and the new data points are added to the positions vacated after the shift. When the energy consumption data sequence is updated and the data set is a linked list, the data point at the head of the linked list is removed, and the new data point is added to the tail of the linked list.

4. The method according to claim 2, characterized in that, The step of adding data points from the energy consumption data sequence to a preset data set in sequence includes: When adding an initial data point to the energy consumption data sequence, a virtual data point with the same value as the initial data point is added to the data set at the position preceding the initial data point; When adding the latest data point in the energy consumption data sequence, a virtual data point with the same value as the latest data point is added at the next position adjacent to the latest data point in the data set.

5. The method according to claim 1, characterized in that, The acquisition of the vehicle's energy consumption data sequence over a continuous time period includes: Determine the numerical range of the energy consumption data sequence; Based on the numerical range, each data point in the sequence is normalized to map the value of each data point to a predetermined interval.

6. The method according to claim 1, characterized in that, The step of calculating the value of at least one auxiliary point between the first data point and the second data point in a corresponding data point pair based on the preceding trend, the current trend, and the subsequent trend includes: Determine the first product of the preceding trend and the current trend, and the second product of the current trend and the subsequent trend; The value of the at least one auxiliary point is calculated based on the first product, the second product, and the corresponding value rules.

7. The method according to claim 6, characterized in that, The first data point and the second data point are connected by a first auxiliary point and a second auxiliary point; the value selection rule includes at least one of the following: If both the first product and the second product are greater than zero, calculate the first auxiliary point based on the previous change trend, and calculate the second auxiliary point based on the current change trend; If the first product is not greater than zero and the second product is greater than zero, the value of the first auxiliary point is set to be the same as that of the first data point, and the second auxiliary point is calculated based on the current trend of change. If the first product is greater than zero and the second product is not greater than zero, calculate the first auxiliary point based on the preceding change trend, and set the value of the second auxiliary point to be the same as the second data point; In other cases, the value of the first auxiliary point is set to be the same as that of the first data point, and the value of the second auxiliary point is set to be the same as that of the second data point.

8. The method according to claim 1, characterized in that, The method further includes: Based on at least one auxiliary point between the first data point and the second data point, determine the instantaneous slope of the energy consumption curve at at least one position between the first data point and the second data point; The display line width of the energy consumption curve at the corresponding position is dynamically adjusted according to the instantaneous slope, and the display line width is negatively correlated with the absolute value of the instantaneous slope.

9. The method according to claim 1, characterized in that, The step of generating and displaying the corresponding energy consumption curve based on the first data point, the at least one auxiliary point, and the second data point in each data point pair includes: Starting from the first data point and ending at the second data point, and using at least one auxiliary point as a control point, the energy consumption curve segment is generated using one or more preset parameter curve algorithms.

10. A vehicle, characterized in that, include: A processor; a memory for storing processor-executable instructions; wherein the processor implements the steps of the method as claimed in any one of claims 1-9 by executing the executable instructions.

11. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-9.

12. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-9.