CN113886363A - Historical data display method and device, computer equipment and storage medium - Google Patents

Historical data display method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113886363A
CN113886363A CN202111214890.2A CN202111214890A CN113886363A CN 113886363 A CN113886363 A CN 113886363A CN 202111214890 A CN202111214890 A CN 202111214890A CN 113886363 A CN113886363 A CN 113886363A
Authority
CN
China
Prior art keywords
data
curve
historical
time period
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111214890.2A
Other languages
Chinese (zh)
Inventor
杜洁
吴勇刚
夏晓东
董志存
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
FAW Jiefang Automotive Co Ltd
Original Assignee
FAW Jiefang Automotive Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FAW Jiefang Automotive Co Ltd filed Critical FAW Jiefang Automotive Co Ltd
Priority to CN202111214890.2A priority Critical patent/CN113886363A/en
Publication of CN113886363A publication Critical patent/CN113886363A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application relates to a historical data display method, a historical data display system, a computer device and a storage medium. The method comprises the following steps: adding the acquired historical vehicle operation data to a first data queue based on the acquired time of the historical vehicle operation data; setting a first acquisition time period, and acquiring historical vehicle operation data of a vehicle in the first acquisition time period at the moment in the first data queue; and if the first display instruction is detected, determining a first curve according to the first acquisition time period and the first data queue, and inputting the first curve to a terminal for display. The invention expresses the historical data of certain information of the vehicle in the form of a curve, thereby being convenient for directly mastering the variation trend and the state of the information, and the curve drawn by adopting the spline curve technology is smoother. The scheme also utilizes the data queue to dynamically store and continuously update data, and reduces the requirement of the memory.

Description

Historical data display method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data display technologies, and in particular, to a method and an apparatus for displaying historical data, a computer device, and a storage medium.
Background
In recent years, with the development of new technologies in the automobile industry, the accessories on the automobile are updated completely. The full liquid crystal instrument panel is a device for displaying vehicle running information to a driver by replacing a traditional mechanical instrument panel with a whole liquid crystal screen, a traditional physical pointer is cancelled, and all the information is displayed through an electronic screen. The full liquid crystal instrument panel is rich in functions, basic information such as vehicle running speed, engine speed and residual oil amount displayed by a traditional mechanical instrument panel of a driver can be transmitted, the display effect is more gorgeous, personalized setting is realized, the display content is more abundant, and the technological sense of the whole vehicle is also improved.
At present, the current information and historical data display of the all-liquid crystal instrument is generally identified in a digital form, and the form is characterized by accuracy, and has the defects that if each piece of historical data is stored, the storage of the historical data is limited due to memory reasons, so that the total number of the historical data which can be inquired is limited, and the relationship between each piece of information cannot be directly expressed. Taking power information as an example, the power of an automobile fluctuates in a series of processes such as no starting, starting and the like, the fluctuation is firstly increased and then decreased or firstly decreased and then increased, the fluctuation is difficult to be intuitively expressed from recorded historical data, and a user can judge the change condition of the data only by comparing the data one by one.
In addition, the full liquid crystal instrument belongs to embedded equipment, and the performance and the cost of the full liquid crystal instrument are mutually restricted. Under the constraint of limited cost, the performance is limited by objective facts such as limited memory, dominant frequency and the like. Conventional digital displays are relatively simple and thus have limited memory usage. When advanced effects are employed, such as display in the form of curves, a large amount of memory is required to store the historical data. In this case, the amount of calculation and the amount of memory usage increase.
Disclosure of Invention
In view of the above, it is necessary to provide a history data display method system, a computer device and a storage medium, which can clearly display the vehicle history data in the liquid crystal display and save the memory.
A method of historical data display, the method comprising:
adding the acquired historical vehicle operation data to a first data queue based on the acquired time of the historical vehicle operation data;
setting a first acquisition time period, and acquiring historical vehicle operation data of a vehicle in the first acquisition time period at the moment in the first data queue;
and if the first display instruction is detected, determining a first curve according to the first acquisition time period and the first data queue, and inputting the first curve to a terminal for display.
In one embodiment, the historical operating data of the vehicle comprises at least one of the following three data, namely raw data, sampled data and average data;
the raw data is detected by a vehicle operation data detection device, the sampling data is obtained by sampling the raw data, and the average data is obtained by averaging the raw data within a preset range.
In one embodiment, the sampling data obtaining process includes:
acquiring the cycle length of an acquisition cycle when acquiring original data for the acquired original data of the historical operation of the vehicle;
determining a first quantity of the original data acquired in the first acquisition time period according to the cycle length and the duration of the first acquisition time period;
and if the first quantity is larger than the second quantity, sampling the first quantity of original data based on a sampling algorithm to obtain a second quantity of sampled data, wherein the second quantity is the upper limit quantity of the data stored in the first data queue.
In one embodiment, determining a first curve based on the first acquisition time period and the first data queue comprises:
and taking each vehicle historical operation data in the first data queue as a control point, obtaining a first fitting curve corresponding to the first data queue according to a spline curve algorithm, and taking the first fitting curve as a first curve corresponding to the first data queue, wherein the abscissa of the first curve is time, and the ordinate is vehicle historical operation data. In one embodiment, after obtaining the historical operating data of the vehicle in the first data queue, the time of obtaining the historical operating data of the vehicle in the first collection time period, the method further includes:
according to the historical running data of the vehicle, which is acquired in the first data queue at the moment and is in the first acquisition time period, determining the average value of the historical running data of the vehicle in the first acquisition time period, and adding the average value to the second data queue;
setting a second acquisition time period, and acquiring an average value of the acquisition time periods in the second acquisition time period in the second data queue;
and if a second display instruction is received, determining a second curve according to a second acquisition time period and a second data queue, and inputting the second curve to the terminal for display.
In one embodiment, obtaining the second curve according to the second acquisition duration and the second data queue includes:
and taking each average value in the second data queue as a control point, obtaining a second fitted curve corresponding to the second data queue according to a spline curve algorithm, and taking the second fitted curve as a second curve corresponding to the second data queue, wherein the abscissa of the second curve is time, and the ordinate of the second curve is historical vehicle operation data.
In one embodiment, the average value in the second data queue is obtained to meet a preset condition, and the preset condition is that the vehicle historical operation data in the first data queue adopted by the average value in the second data queue are not overlapped.
A historical data display apparatus, the apparatus comprising:
the array module is used for adding the acquired historical vehicle operation data to a first data array based on the acquired time of the historical vehicle operation data;
the acquisition module is used for setting a first acquisition time period and acquiring historical vehicle operation data of the vehicle in the first acquisition time period at the moment of acquisition in the first data queue;
and the drawing and displaying module is used for determining a first curve according to the first acquisition time period and the first data queue and inputting the first curve to the terminal for displaying if the first display instruction is detected.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
adding the acquired historical vehicle operation data to a first data queue based on the acquired time of the historical vehicle operation data;
setting a first acquisition time period, and acquiring historical vehicle operation data of a vehicle in the first acquisition time period at the moment in the first data queue;
and if the first display instruction is detected, determining a first curve according to the first acquisition time period and the first data queue, and inputting the first curve to a terminal for display.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
adding the acquired historical vehicle operation data to a first data queue based on the acquired time of the historical vehicle operation data;
setting a first acquisition time period, and acquiring historical vehicle operation data of a vehicle in the first acquisition time period at the moment in the first data queue;
and if the first display instruction is detected, determining a first curve according to the first acquisition time period and the first data queue, and inputting the first curve to a terminal for display.
According to the historical data display method, the historical data display system, the computer device and the storage medium, the acquired historical vehicle operation data are added to the first data queue based on the acquisition time of the acquired historical vehicle operation data; setting a first acquisition time period, and acquiring historical vehicle operation data of a vehicle in the first acquisition time period at the moment in the first data queue; and if the first display instruction is detected, determining a first curve according to the first acquisition time period and the first data queue, and inputting the first curve to a terminal for display. The invention expresses the historical data of certain information of the vehicle in the form of a curve, thereby being convenient for directly mastering the variation trend and the state of the information, and the curve drawn by adopting the spline curve technology is smoother. The scheme also utilizes the data queue to dynamically store and continuously update data, and reduces the requirement of the memory.
Drawings
FIG. 1 is a flow diagram illustrating a method for displaying historical data in one embodiment;
FIG. 2 is a flow chart illustrating a method for displaying historical data in another embodiment;
FIG. 3 is a graph plotting three different parameters using a spline curve algorithm;
FIG. 4 is a flowchart illustrating a method for displaying historical data in yet another embodiment;
FIG. 5 is a diagram of a history data display device in one embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various terms, but these terms are not limited by these terms unless otherwise specified. These terms are only used to distinguish one term from another. For example, the third preset threshold and the fourth preset threshold may be the same or different without departing from the scope of the present application.
In recent years, with the development of new technologies in the automobile industry, the accessories on the automobile are updated completely. The full liquid crystal instrument panel is a device for displaying vehicle running information to a driver by replacing a traditional mechanical instrument panel with a whole liquid crystal screen, a traditional physical pointer is cancelled, and all the information is displayed through an electronic screen. The full liquid crystal instrument panel is rich in functions, basic information such as vehicle running speed, engine speed and residual oil amount displayed by a traditional mechanical instrument panel of a driver can be transmitted, the display effect is more gorgeous, personalized setting is realized, the display content is more abundant, and the technological sense of the whole vehicle is also improved.
At present, the current information and historical data display of the all-liquid crystal instrument is generally identified in a digital form, and the form is characterized by accuracy, and has the defects that if each piece of historical data is stored, the storage of the historical data is limited due to memory reasons, so that the total number of the historical data which can be inquired is limited, and the relationship between each piece of information cannot be directly expressed. Taking power information as an example, the power of an automobile fluctuates in a series of processes such as no starting, starting and the like, the fluctuation is firstly increased and then decreased or firstly decreased and then increased, the fluctuation is difficult to be intuitively expressed from recorded historical data, and a user can judge the change condition of the data only by comparing the data one by one.
In addition, the full liquid crystal instrument belongs to embedded equipment, and the performance and the cost of the full liquid crystal instrument are mutually restricted. Under the constraint of limited cost, the performance is limited by objective facts such as limited memory, dominant frequency and the like. Conventional digital displays are relatively simple and thus have limited memory usage. When advanced effects are employed, such as display in the form of curves, a large amount of memory is required to store the historical data. In this case, the amount of calculation and the amount of memory usage increase.
In view of the problems in the related art, an embodiment of the present invention provides a method for displaying historical data, which is described with reference to fig. 1, taking an example that the method is applied to a server and an execution subject is the server, and the method includes the following steps:
step 101, adding acquired historical vehicle operation data to a first data queue based on the acquired historical vehicle operation data acquisition time;
step 102, setting a first acquisition time period, and acquiring historical vehicle operation data of a vehicle in the first acquisition time period at the moment of acquisition in a first data queue;
step 103, if the first display instruction is detected, determining a first curve according to the first acquisition time period and the first data queue, and inputting the first curve to the terminal for display.
It should be noted that, in the embodiment of the present invention, the data may be stored directly, or may be stored in a data queue, and a data queue bit sequence is described herein. A data queue is defined, which is a special linear table that allows only delete operations at the front end (front) of the table, while insert operations at the back end (rear) of the table, as in a stack, a queue is a linear table with restricted operations. The end performing the insert operation is called the tail of the queue, and the end performing the delete operation is called the head of the queue. When data storage is performed, only a fixed amount of data is stored, for example, 20 data are stored, when 21 st new data comes, the data is inserted into the tail of the data queue, and then one data is deleted from the head of the data queue, so that 60 data are always stored in the data queue. The data stored by the data queue is always stored in the system memory, so that the waste of memory caused by storing all data can be avoided.
After the "point" in the first data queue is obtained, the data in the first data queue may be plotted by using an API of OpenGL ES, so as to obtain a set first acquisition time period, and display the set first acquisition time period. OpenGL ES (OpenGL for embedded System) is a reduced subset of OpenGL (open Graphics library), is an advanced 3D Graphics API targeting handheld and embedded devices, is widely used in full liquid crystal instruments, and performs curve drawing by calling the API of OpenGL ES, and its drawing steps are as follows: initializing an equipment environment; compiling a shader; setting a window size (e.g., 1280 × 480); and drawing a corresponding horizontal coordinate and a corresponding vertical coordinate according to the selection of the user, wherein the horizontal coordinate is time, and the vertical coordinate is a vehicle historical data value. A preset algorithm is adopted to restore a limited number of points into a historical data curve, historical data at any time in an acquisition time period can be inquired on the curve, when the curve is not displayed, an interface disappears, and only data in a data queue is stored in a memory.
In the scheme, a method for storing and displaying historical data by using one data queue is described in detail, in the embodiment, the number of the data queues is not limited specifically, and various types of data display can be provided according to the acquisition time of the data queues in consideration of the use convenience of users, such as displaying historical data of past 1 minute, displaying historical data of past 1 hour, displaying historical data of past 1 day and the like. The specific implementation method can obtain the data queue of the long time period from the data queue of the short time period according to the length of the required display time period.
In the method provided by the embodiment, the acquired historical vehicle operation data is added to a first data queue based on the acquisition time of the acquired historical vehicle operation data; setting a first acquisition time period, and acquiring historical vehicle operation data of a vehicle in the first acquisition time period at the moment in the first data queue; and if the first display instruction is detected, determining a first curve according to the first acquisition time period and the first data queue, and inputting the first curve to a terminal for display. The invention expresses the historical data of certain information of the vehicle in the form of a curve, thereby being convenient for directly mastering the variation trend and the state of the information, and the curve drawn by adopting the spline curve technology is smoother. The scheme also utilizes the data queue to dynamically store and continuously update data, and reduces the requirement of the memory.
In one embodiment, the historical operating data of the vehicle comprises at least one of the following three data, namely raw data, sampled data and average data;
the raw data is detected by a vehicle operation data detection device, the sampling data is obtained by sampling the raw data, and the average data is obtained by averaging the raw data within a preset range.
It should be noted that, in general, when the relationship between the detection period and the collection time of the vehicle operation data is considered, the collected raw data is processed. The number of the vehicle historical operation data stored in the first data queue is limited, and when the original data are processed, the vehicle historical operation data can be obtained by averaging or directly sampling, and the specific mode is set according to the accuracy of the required data.
Taking the power signal as an example, the period of the general power signal is 100ms, 10 data are received in 1 second, and the collection time period can be set to be historical data display of 1 minute (9: 00-9: 01). Therefore, 10 data are taken first, then the average value of the 10 data is calculated, the average value is stored in a first data queue, the average value of the 60 data is stored in the first data queue, when the 61 st data comes, one data is deleted from the head of the data queue, then the 61 st new data is inserted into the tail of the data queue, and therefore the first data queue always keeps 60 data. If sampling data is obtained, a representative data is extracted from 10 data received in 1 second, and the data can be the first data or the last data in 10 data received in 1 second and is stored in a first data queue.
In this embodiment, three sources of data stored in the first data queue are given, and in a specific embodiment, a specific manner of data source is not limited.
In the method provided by the embodiment of the invention, the vehicle historical operation data comprises at least one of the following three data, namely raw data, sampling data and average data; the raw data is detected by a vehicle operation data detection device, the sampling data is obtained by sampling the raw data, and the average data is obtained by averaging the raw data within a preset range. Accurate data which can be stored in the data queue can be obtained in various modes, and then a curve graph which is closer to the fact can be obtained by using the data, a large amount of data do not need to be stored, and the memory is saved.
In one embodiment, referring to fig. 2, the sampling data acquisition process comprises:
step 201, acquiring the cycle length of an acquisition cycle when acquiring original data of acquired historical operation of a vehicle;
step 202, determining a first quantity of the original data acquired in the first acquisition time period according to the cycle length and the duration of the first acquisition time period;
step 203, if the first number is larger than the second number, sampling the first number of original data based on a sampling algorithm to obtain a second number of sampled data, where the second number is an upper limit number of data stored in the first data queue.
It should be noted that, in this embodiment, a step of determining whether or not sample data can be obtained is given. Whether sampling can be carried out or not is judged according to the step 201 and the step 202, and the most basic principle is utilized, namely when the number m of the existing data is larger than the required number n of the data, n data which can represent a certain type of data change condition of the vehicle in the time period can be extracted from the m data, and if m is smaller than or equal to n, the sampling cannot be carried out. In the specific extraction, the samples can be equally spaced samples or non-equally spaced samples; the first acquisition period may also be equally divided into n shares, with one data per share being selected.
In the method provided by the embodiment of the invention, the cycle length of the acquisition cycle when the original data is acquired for the acquired original data of the historical operation of the vehicle; determining a first quantity of the original data acquired in the first acquisition time period according to the cycle length and the duration of the first acquisition time period; and if the first quantity is larger than the second quantity, sampling the first quantity of original data based on a sampling algorithm to obtain a second quantity of sampled data, wherein the second quantity is the upper limit quantity of the data stored in the first data queue. Before sampling the data, a judgment condition is added to ensure that the sampling process is smoothly carried out, and the obtained accurate data is stored in a data queue and then displayed.
In one embodiment, determining a first curve based on the first acquisition time period and the first data queue comprises:
and taking each vehicle historical operation data in the first data queue as a control point, obtaining a first fitting curve corresponding to the first data queue according to a spline curve algorithm, and taking the first fitting curve as a first curve corresponding to the first data queue, wherein the abscissa of the first curve is time, and the ordinate is vehicle historical operation data.
The spline curve is a smooth curve passing through a series of given points, and in this embodiment, a plot of the historical operating data of the vehicle over the time period is obtained using the limited number of historical operating data of the vehicle stored in the first data queue. In the spline curve algorithm, a uniform B-spline curve, a quasi-uniform B-spline curve, a segmented Bezier curve, a non-uniform B-spline curve and other methods can be adopted to draw the curve, in different methods, different parameters are adopted to obtain different curves, and the setting of the parameters depends on the required accuracy setting of curve reduction. Referring to fig. 3, in one embodiment, the different parameters used are different curves obtained from 7 fixed points.
In the method provided by this embodiment, each vehicle historical operation data in the first data queue is used as a control point, a first fitted curve corresponding to the first data queue is obtained according to a spline curve algorithm, and the first fitted curve is used as a first curve corresponding to the first data queue, the abscissa of the first curve is time, and the ordinate is vehicle historical operation data. The original curve of the historical vehicle operation data is restored by utilizing a spline curve algorithm, the image is displayed only when the original curve is used, the historical vehicle operation data at any moment is obtained, the consumption of memory can be reduced, the curve obtained by utilizing the spline curve algorithm is smooth, and the better display effect is achieved.
In one embodiment, referring to fig. 4, after obtaining the historical operating data of the vehicle in the first data queue, the time of obtaining the historical operating data of the vehicle in the first collection time period, the method further includes:
step 401, according to the historical vehicle operation data which is acquired from the first data queue and is in the first acquisition time period, determining an average value of the historical vehicle operation data in the first acquisition time period, and adding the average value to the second data queue;
step 402, setting a second acquisition time period, and acquiring an average value of the acquisition time periods in the second acquisition time period in the second data queue;
and step 403, if a second display instruction is received, determining a second curve according to a second acquisition time period and a second data queue, and inputting the second curve to the terminal for display.
It should be noted that, in a specific embodiment, the steps of this embodiment may be repeated, so as to obtain the historical operating data of the vehicle in a required time period. In this embodiment, the average value of the first data queue is obtained as one data stored in the second data queue, or the middle value of the first data queue is used as the representative of the first data queue. The curve drawing in step 403 may adopt a spline curve algorithm, or may use OpenGL ES to perform curve drawing.
According to the method provided by the embodiment of the invention, the average value of the historical running data of the vehicle in the first acquisition time period is determined according to the historical running data of the vehicle in the first acquisition time period, and the average value is added to the second data queue; setting a second acquisition time period, and acquiring an average value of the acquisition time periods in the second acquisition time period in the second data queue; and if a second display instruction is received, determining a second curve according to a second acquisition time period and a second data queue, and inputting the second curve to the terminal for display. The flexible selection interval can be provided for a user, and historical vehicle operation data can be inquired. And moreover, by adopting a curve mode, the change trend of the historical data and the time corresponding to the maximum value or the minimum value of the historical data can be intuitively displayed, so that a user can more accurately master the vehicle dynamics.
In one embodiment, obtaining the second curve according to the second acquisition duration and the second data queue includes:
and taking each average value in the second data queue as a control point, obtaining a second fitted curve corresponding to the second data queue according to a spline curve algorithm, and taking the second fitted curve as a second curve corresponding to the second data queue, wherein the abscissa of the second curve is time, and the ordinate of the second curve is historical vehicle operation data.
The spline curve is a smooth curve passing through a series of given points, and in this embodiment, a plot of the historical operating data of the vehicle over the time period is obtained using the limited number of historical operating data of the vehicle stored in the first data queue. In the spline curve algorithm, a uniform B-spline curve, a quasi-uniform B-spline curve, a segmented Bezier curve, a non-uniform B-spline curve and other methods can be adopted to draw the curve, in different methods, different parameters are adopted to obtain different curves, and the setting of the parameters depends on the required accuracy setting of curve reduction.
In the method provided by the embodiment of the invention, each average value in the second data queue is used as a control point, a second fitted curve corresponding to the second data queue is obtained according to a spline curve algorithm, the second fitted curve is used as a second curve corresponding to the second data queue, the abscissa of the second curve is time, and the ordinate of the second curve is vehicle historical operation data. The original curve of the historical vehicle operation data is restored by utilizing a spline curve algorithm, the image is displayed only when the original curve is used, the historical vehicle operation data at any moment is obtained, the consumption of memory can be reduced, the curve obtained by utilizing the spline curve algorithm is smooth, and the better display effect is achieved.
In one embodiment, the average value in the second data queue is obtained to meet a preset condition, and the preset condition is that the vehicle historical operation data in the first data queue adopted by the average value in the second data queue are not overlapped.
It should be noted that, since the second data queue is obtained from the first data queue, when new data is inserted into the first data queue, dynamic relationships between the two data queues are various, for example, updating one first data queue to obtain a new second data queue, but the calculation amount of the method is too large, in the embodiment of the present invention, when an average value required by docking of the second data is obtained, there is no overlap between the vehicle historical operation data in the first data queue used by the previous average value. For example: the first data queue stores 6 data within 1 minute (9: 00-9: 01) and updates every 10 seconds; the second data queue stores 6 data within 6 minutes (9: 00-9: 06), and then when all 6 data in the first data queue between 9: 06-9: 07 are updated, the average value is obtained, and one data update is carried out on the second data queue.
In the method provided by the embodiment of the invention, the average value in the second data queue is obtained to meet the preset condition, and the preset condition is that the vehicle historical operation data in the first data queue adopted by the average value in the second data queue are not overlapped, so that the system calculation amount is reduced, the error rate is reduced, and the accuracy of the whole historical data display system is improved.
It should be understood that although the steps of fig. 1, 2 and 4 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1, 2 and 4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the other steps.
It should be noted that the technical solutions described above may be implemented as independent embodiments in actual implementation processes, or may be combined with each other and implemented as combined embodiments. In addition, when the contents of the embodiments of the present invention are described above, the different embodiments are described according to the corresponding sequence only based on the idea of convenient description, for example, the sequence of the data flow is not limited to the execution sequence between the different embodiments, nor is the execution sequence of the steps in the embodiments limited. Accordingly, in the actual implementation process, if it is necessary to implement multiple embodiments provided by the present invention, the execution sequence provided in the embodiments of the present invention is not necessarily required, but the execution sequence between different embodiments may be arranged according to requirements.
In conjunction with the above embodiments, in one embodiment, referring to fig. 5, there is provided a history data display system including: a sequence storage module 501, an acquisition module 502 and a drawing display module 503, wherein:
the array storage module 501 is configured to add the acquired historical vehicle operation data to a first data queue based on the acquired time of the acquired historical vehicle operation data;
the acquiring module 502 is configured to set a first acquisition time period, and acquire historical vehicle operation data in the first data queue, where the acquisition time is within the first acquisition time period;
and a drawing and displaying module 503, configured to determine a first curve according to the first acquisition time period and the first data queue if the first display instruction is detected, and input the first curve to the terminal for display.
In one embodiment, the sequence storage module 501 further includes: the vehicle historical operation data comprises at least one of the following three data, namely raw data, sampling data and average data;
the raw data is detected by a vehicle operation data detection device, the sampling data is obtained by sampling the raw data, and the average data is obtained by averaging the raw data within a preset range.
In one embodiment, the array storage module 501 includes an acquisition sub-module 5011, a determination sub-module 5012, and a sampling sub-module 5013, wherein:
the obtaining submodule 5011 is configured to obtain, for the obtained original data of the historical operation of the vehicle, a cycle length of a collection cycle when the original data is collected;
the determining submodule 5012 is configured to determine, according to the cycle length and the duration of the first acquisition time period, a first amount of the raw data acquired in the first acquisition time period;
the sampling submodule 5013 is configured to, if the first number is greater than the second number, sample the first number of original data based on a sampling algorithm to obtain a second number of sampled data, where the second number is an upper limit number of data stored in the first data queue.
In one embodiment, the drawing and displaying module 503 includes:
and taking each vehicle historical operation data in the first data queue as a control point, obtaining a first fitting curve corresponding to the first data queue according to a spline curve algorithm, and taking the first fitting curve as a first curve corresponding to the first data queue, wherein the abscissa of the first curve is time, and the ordinate is vehicle historical operation data.
In one embodiment, the obtaining module 502 further includes:
according to the historical running data of the vehicle, which is acquired in the first data queue at the moment and is in the first acquisition time period, determining the average value of the historical running data of the vehicle in the first acquisition time period, and adding the average value to the second data queue;
setting a second acquisition time period, and acquiring an average value of the acquisition time periods in the second acquisition time period in the second data queue;
and if a second display instruction is received, determining a second curve according to a second acquisition time period and a second data queue, and inputting the second curve to the terminal for display.
In one embodiment, the drawing and displaying module 503 comprises:
and taking each average value in the second data queue as a control point, obtaining a second fitted curve corresponding to the second data queue according to a spline curve algorithm, and taking the second fitted curve as a second curve corresponding to the second data queue, wherein the abscissa of the second curve is time, and the ordinate of the second curve is historical vehicle operation data.
In one embodiment, the obtaining module 502 includes: and the average value in the second data queue meets a preset condition, wherein the preset condition is that the vehicle historical operation data in the first data queue adopted by the average value in the second data queue are not overlapped.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the preset threshold value. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a history data display method.
Those skilled in the art will appreciate that the configuration shown in fig. 6 is a block diagram of only a portion of the configuration associated with the present application and is not intended to limit the computing device to which the present application may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
adding the acquired historical vehicle operation data to a first data queue based on the acquired time of the historical vehicle operation data;
setting a first acquisition time period, and acquiring historical vehicle operation data of a vehicle in the first acquisition time period at the moment in the first data queue;
and if the first display instruction is detected, determining a first curve according to the first acquisition time period and the first data queue, and inputting the first curve to a terminal for display.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the vehicle historical operation data comprises at least one of the following three data, namely raw data, sampling data and average data;
the raw data is detected by a vehicle operation data detection device, the sampling data is obtained by sampling the raw data, and the average data is obtained by averaging the raw data within a preset range.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring the cycle length of an acquisition cycle when acquiring original data for the acquired original data of the historical operation of the vehicle;
determining a first quantity of the original data acquired in the first acquisition time period according to the cycle length and the duration of the first acquisition time period;
and if the first quantity is larger than the second quantity, sampling the first quantity of original data based on a sampling algorithm to obtain a second quantity of sampled data, wherein the second quantity is the upper limit quantity of the data stored in the first data queue.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and taking each vehicle historical operation data in the first data queue as a control point, obtaining a first fitting curve corresponding to the first data queue according to a spline curve algorithm, and taking the first fitting curve as a first curve corresponding to the first data queue, wherein the abscissa of the first curve is time, and the ordinate is vehicle historical operation data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
according to the historical running data of the vehicle, which is acquired in the first data queue at the moment and is in the first acquisition time period, determining the average value of the historical running data of the vehicle in the first acquisition time period, and adding the average value to the second data queue;
setting a second acquisition time period, and acquiring an average value of the acquisition time periods in the second acquisition time period in the second data queue;
and if a second display instruction is received, determining a second curve according to a second acquisition time period and a second data queue, and inputting the second curve to the terminal for display.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and taking each average value in the second data queue as a control point, obtaining a second fitted curve corresponding to the second data queue according to a spline curve algorithm, and taking the second fitted curve as a second curve corresponding to the second data queue, wherein the abscissa of the second curve is time, and the ordinate of the second curve is historical vehicle operation data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and the average value in the second data queue meets a preset condition, wherein the preset condition is that the vehicle historical operation data in the first data queue adopted by the average value in the second data queue are not overlapped.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
adding the acquired historical vehicle operation data to a first data queue based on the acquired time of the historical vehicle operation data;
setting a first acquisition time period, and acquiring historical vehicle operation data of a vehicle in the first acquisition time period at the moment in the first data queue;
and if the first display instruction is detected, determining a first curve according to the first acquisition time period and the first data queue, and inputting the first curve to a terminal for display.
In one embodiment, the computer program when executed by the processor further performs the steps of: the vehicle historical operation data comprises at least one of the following three data, namely raw data, sampling data and average data;
the raw data is detected by a vehicle operation data detection device, the sampling data is obtained by sampling the raw data, and the average data is obtained by averaging the raw data within a preset range.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring the cycle length of an acquisition cycle when acquiring original data for the acquired original data of the historical operation of the vehicle;
determining a first quantity of the original data acquired in the first acquisition time period according to the cycle length and the duration of the first acquisition time period;
and if the first quantity is larger than the second quantity, sampling the first quantity of original data based on a sampling algorithm to obtain a second quantity of sampled data, wherein the second quantity is the upper limit quantity of the data stored in the first data queue.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and taking each vehicle historical operation data in the first data queue as a control point, obtaining a first fitting curve corresponding to the first data queue according to a spline curve algorithm, and taking the first fitting curve as a first curve corresponding to the first data queue, wherein the abscissa of the first curve is time, and the ordinate is vehicle historical operation data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
according to the historical running data of the vehicle, which is acquired in the first data queue at the moment and is in the first acquisition time period, determining the average value of the historical running data of the vehicle in the first acquisition time period, and adding the average value to the second data queue;
setting a second acquisition time period, and acquiring an average value of the acquisition time periods in the second acquisition time period in the second data queue;
and if a second display instruction is received, determining a second curve according to a second acquisition time period and a second data queue, and inputting the second curve to the terminal for display.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and taking each average value in the second data queue as a control point, obtaining a second fitted curve corresponding to the second data queue according to a spline curve algorithm, and taking the second fitted curve as a second curve corresponding to the second data queue, wherein the abscissa of the second curve is time, and the ordinate of the second curve is historical vehicle operation data.
In one embodiment, the computer program when executed by the processor further performs the steps of: and the average value in the second data queue meets a preset condition, wherein the preset condition is that the vehicle historical operation data in the first data queue adopted by the average value in the second data queue are not overlapped.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of displaying historical data, the method comprising:
adding the acquired historical vehicle operation data to a first data queue based on the acquired time of the historical vehicle operation data;
setting a first acquisition time period, and acquiring historical vehicle operation data of the vehicle in the first acquisition time period at the moment of acquisition in the first data queue;
and if a first display instruction is detected, determining a first curve according to the first acquisition time period and the first data queue, and inputting the first curve to a terminal for display.
2. The method of claim 1, wherein the vehicle historical operating data includes at least one of raw data, sampled data, and averaged data, respectively;
the raw data is detected by a vehicle operation data detection device, the sampling data is obtained by sampling the raw data, and the average data is obtained by averaging the raw data within a preset range.
3. The method of claim 2, wherein the obtaining of the sample data comprises:
acquiring the cycle length of an acquisition cycle when acquiring the original data of the acquired historical operation of the vehicle;
determining a first quantity of the original data acquired in the first acquisition time period according to the cycle length and the duration of the first acquisition time period;
and if the first quantity is larger than a second quantity, sampling the first quantity of original data based on a sampling algorithm to obtain a second quantity of sampled data, wherein the second quantity is the upper limit quantity of data stored in the first data queue.
4. The method of claim 1, wherein determining a first profile based on the first acquisition time period and the first data queue comprises:
and taking the historical running data of each vehicle in the first data queue as a control point, obtaining a first fitted curve corresponding to the first data queue according to a spline curve algorithm, and taking the first fitted curve as a first curve corresponding to the first data queue, wherein the abscissa of the first curve is time, and the ordinate is the historical running data of the vehicle.
5. The method of claim 1, wherein said obtaining historical vehicle operating data in said first data queue at a time of said obtaining within said first collection time period further comprises:
according to the historical vehicle operation data which are acquired from the first data queue and are in the first acquisition time period, determining an average value of the historical vehicle operation data in the first acquisition time period, and adding the average value to a second data queue;
setting a second acquisition time period, and acquiring an average value of the acquisition time periods in the second acquisition time period in the second data queue;
and if a second display instruction is received, determining a second curve according to the second acquisition time period and the second data queue, and inputting the second curve to a terminal for display.
6. The method of claim 5, wherein obtaining a second curve based on the second acquisition duration and the second data queue comprises:
and taking each average value in the second data queue as a control point, obtaining a second fitted curve corresponding to the second data queue according to a spline curve algorithm, and taking the second fitted curve as a second curve corresponding to the second data queue, wherein the abscissa of the second curve is time, and the ordinate of the second curve is vehicle historical operating data.
7. The method of claim 5, wherein the average values in the second data queue are obtained to satisfy a predetermined condition that there is no coincidence between the historical operating data of the vehicles in the first data queue used by the average values in the second data queue.
8. An apparatus for displaying historical data, the apparatus comprising:
the array storage module is used for adding the acquired historical vehicle operation data to a first data queue based on the acquired time of the historical vehicle operation data;
the acquisition module is used for setting a first acquisition time period and acquiring historical vehicle operation data of the first data queue, wherein the acquisition time of the historical vehicle operation data is within the first acquisition time period;
and the drawing and displaying module is used for determining a first curve according to the first acquisition time period and the first data queue and inputting the first curve to a terminal for displaying if a first display instruction is detected.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111214890.2A 2021-10-19 2021-10-19 Historical data display method and device, computer equipment and storage medium Pending CN113886363A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111214890.2A CN113886363A (en) 2021-10-19 2021-10-19 Historical data display method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111214890.2A CN113886363A (en) 2021-10-19 2021-10-19 Historical data display method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113886363A true CN113886363A (en) 2022-01-04

Family

ID=79003479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111214890.2A Pending CN113886363A (en) 2021-10-19 2021-10-19 Historical data display method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113886363A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115618033A (en) * 2022-12-15 2023-01-17 山东科技大学 Data acquisition and processing method, system, computer equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113284585A (en) * 2020-02-19 2021-08-20 华为技术有限公司 Data display method, terminal device and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113284585A (en) * 2020-02-19 2021-08-20 华为技术有限公司 Data display method, terminal device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115618033A (en) * 2022-12-15 2023-01-17 山东科技大学 Data acquisition and processing method, system, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US7937257B2 (en) Estimating performance of application based on automatic resizing of shared memory for messaging
CN107180117B (en) Chart recommendation method and device and computer equipment
CN104391725A (en) Page display method and page display device
CN109344044B (en) Method and system for calculating rendering time of first screen of page
CN112908297A (en) Response speed testing method, device, equipment and storage medium for vehicle-mounted equipment
CN113886363A (en) Historical data display method and device, computer equipment and storage medium
US20140046735A1 (en) Evaluation value calculation device, evaluation value calculation method, and computer program product
CN109684566B (en) Label engine implementation method and device, computer equipment and storage medium
CN115357740A (en) Large-scale data visualization method and device and electronic device
CN112599182A (en) Nonvolatile storage life prediction method, device, equipment and medium
US20170300108A1 (en) Applicaiton low power control and the apparatus using the same
CN114302152A (en) Live broadcast room recommendation method, device, equipment and storage medium
US20130030759A1 (en) Smoothing a time series data set while preserving peak and/or trough data points
CN110333816B (en) Carousel processing method and device
CN107203463B (en) Interface testing method, interface drawing method and device
CN115114332A (en) Database query method, device and equipment and readable storage medium
CN110516333A (en) Device layout methods, device, equipment and readable storage medium storing program for executing in a kind of PCB
CN110309208A (en) The implementation method and device of data visualization
CN109783745B (en) Method, device and computer equipment for personalized typesetting of pages
US20180033169A1 (en) Apparatus, method and system for resolution dependent graphical representation of signals
CN109710521B (en) Multimedia application performance test method and device, computer equipment and storage medium
CN114020717A (en) Method, device, equipment and medium for acquiring performance data of distributed storage system
CN113176909A (en) Method and device for determining fluency of terminal, electronic equipment and storage medium
CN110580731A (en) 3D character rendering method, medium, device and apparatus
CN110377229B (en) Data analysis method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination