Waveform display method and device, equipment and medium

By writing variable data of the engine electronic control unit into a memory mapped file and reading it by the waveform display control, the problem of slow refresh and lag caused by the waveform display control storing a large amount of data is solved, and an efficient data reading and writing process is achieved.

CN120510656APending Publication Date: 2025-08-19WEICHAI POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510617683.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

During the calibration process of car calibration software, the waveform display controls have slow refreshing or stuttering due to storing a large amount of variable data.

Method used

By collecting variable data in the engine electronic control unit, writing it to the memory mapped file, and the waveform display control reads variable data from the memory mapped file, deleting variable data that has completed the waveform display, simplifying the data reading and writing process.

Benefits of technology

The memory map writing and reading of variable data of the engine electronic control unit is realized, reducing the amount of data in the waveform display control, and avoiding slow refresh and lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120510656A_ABST
    Figure CN120510656A_ABST
Patent Text Reader

Abstract

The invention discloses a waveform display method and device, equipment and a medium. The method comprises the steps of collecting variable data in an engine electronic control unit; variable data in the engine electronic control unit is written into the memory mapping file; the waveform display control reads variable data in the engine electronic control unit from the memory mapping file; and the waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and deletes the variable data after waveform display from the waveform display control. According to the technical scheme, memory mapping writing and reading of the variable data in the engine electronic control unit are achieved, file I / O operation does not need to be executed, the data reading and writing process is simplified, the variable data with waveform display completed are deleted from the waveform display control, the data size in the waveform display control is reduced, and the user experience is improved. Therefore, when a large amount of variable data is processed, the problems of slow waveform display refreshing and lagging can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a waveform display method, device, equipment, and medium. Background Art

[0002] During the calibration process, the vehicle calibration software needs to monitor the variable data in the engine's Electronic Control Unit (ECU) in real time, such as engine speed, engine load, intake air temperature, intake air pressure, current and voltage.

[0003] To clearly display the changing trends of variable data, a real-time waveform display is required. The waveform display control receives variable data, stores it, and refreshes the displayed waveform. This process continuously accumulates variable data. After monitoring variable data at a high frequency for several hours, the large amount of variable data stored in the waveform display control may cause the waveform display control to refresh slowly or freeze. Summary of the Invention

[0004] The present disclosure provides a waveform display method, apparatus, device, and medium, which implement memory-mapped writing and reading of variable data in an engine electronic control unit, eliminate the need to perform file I / O operations, simplify the data reading and writing process, and delete variable data that has completed waveform display from a waveform display control, reducing the amount of data in the waveform display control. This can avoid the problems of slow waveform display refresh and lag when processing large amounts of variable data.

[0005] According to one aspect of the present disclosure, there is provided a waveform display method, comprising:

[0006] Collect variable data from the engine electronic control unit;

[0007] Writing variable data in the engine electronic control unit into a memory mapped file;

[0008] The waveform display control reads variable data in the engine electronic control unit from the memory mapping file;

[0009] The waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and deletes the variable data for which waveform display has been completed from the waveform display control.

[0010] According to another aspect of the present disclosure, there is provided a waveform display device, comprising:

[0011] Electronic control unit variable data acquisition module, used to collect variable data in the engine electronic control unit;

[0012] A variable data writing module for a memory mapped file is used to write the variable data in the engine electronic control unit into a memory mapped file;

[0013] An electronic control unit variable data reading module is used for a waveform display control to read variable data in the engine electronic control unit from the memory mapping file;

[0014] The variable data waveform display module is used for the waveform display control to perform waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and to delete the variable data that has completed waveform display from the waveform display control.

[0015] According to another aspect of the present disclosure, an electronic device is provided, comprising:

[0016] at least one processor;

[0017] and a memory communicatively coupled to the at least one processor;

[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the waveform display method described in any embodiment of the present disclosure.

[0019] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the waveform display method described in any embodiment of the present disclosure when executed.

[0020] The technical solution of the embodiment of the present disclosure collects variable data from the engine electronic control unit and then writes the variable data in the engine electronic control unit into a memory-mapped file. Then, a waveform display control reads the variable data in the engine electronic control unit from the memory-mapped file. Then, the waveform display control performs waveform display based on the variable data in the engine electronic control unit read from the memory-mapped file, and deletes the variable data that has completed waveform display from the waveform display control. In the above technical solution, memory mapping writing and reading of variable data in the engine electronic control unit are realized without performing file I / O operations, simplifying the data reading and writing process, and deleting the variable data that has completed waveform display from the waveform display control, reducing the amount of data in the waveform display control, thereby avoiding the problems of slow waveform display refresh and lag when processing a large amount of variable data.

[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0023] Figure 1 is a flow chart of a waveform display method provided according to an embodiment of the present disclosure;

[0024] Figure 2 is a flow chart of another waveform display method provided according to an embodiment of the present disclosure;

[0025] Figure 3 is a flow chart of another waveform display method provided according to an embodiment of the present disclosure;

[0026] Figure 4 A flowchart of writing data to a memory-mapped file provided in an embodiment of the present disclosure;

[0027] Figure 5 A schematic diagram of a storage format of a memory-mapped file provided in an embodiment of the present disclosure;

[0028] Figure 6 A flowchart of writing a memory mapped file provided in an embodiment of the present disclosure;

[0029] Figure 7 A flowchart of another waveform display method provided by an embodiment of the present disclosure;

[0030] Figure 8 A flow chart of variable data reading provided by an embodiment of the present disclosure;

[0031] Figure 9 Flowchart of another waveform display method provided by an embodiment of the present disclosure

[0032] Figure 10 A flowchart of querying historical variable data provided by an embodiment of the present disclosure;

[0033] Figure 11 A waveform diagram provided in an embodiment of the present disclosure;

[0034] Figure 12 is a structural schematic diagram of a waveform display device provided according to an embodiment of the present disclosure;

[0035] Figure 13 3 is a schematic structural diagram of an electronic device for implementing the waveform display method of an embodiment of the present disclosure. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.

[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of the present disclosure comply with the relevant provisions of national laws and regulations.

[0038] Figure 1 This is a flow chart of a waveform display method provided by an embodiment of the present disclosure. This embodiment is applicable to the case of performing real-time waveform display of variable data of an engine electronic control unit. The method can be executed by a waveform display device, which can be implemented in the form of hardware and / or software. The waveform display device can be configured in an electronic device such as a waveform display. Figure 1 As shown, the method includes:

[0039] S110: Collect variable data in the engine electronic control unit.

[0040] Among them, variable data refers to data collected or calculated by the engine electronic control unit through sensors, which can be one or more of engine speed, engine load, intake temperature, intake pressure, current and voltage, etc., and is not specifically limited here.

[0041] Specifically, the waveform display can detect the engine electronic control unit in real time, thereby obtaining one or more types of variable data in the engine electronic control unit. When collecting multiple types of variable data in the engine electronic control unit, the waveform display can simultaneously display the waveform corresponding to each type of variable data.

[0042] S120: Writing variable data in the engine electronic control unit into a memory mapping file.

[0043] A memory-mapped file maps a file to a block of memory, mapping a target area in the process's virtual address space to part or all of the contents of the target file on disk. Once the target area and the target file are mapped, the mapped target file can be accessed directly through the target area without having to perform file I / O operations or buffer the target file's contents.

[0044] Specifically, the waveform display can write variable data in the engine electronic control unit into a memory mapping file in real time.

[0045] S130: The waveform display control reads variable data in the engine electronic control unit from the memory mapping file.

[0046] Among them, the waveform display control is a graphical interface component that can visually display variable data. It can use time as the horizontal axis and variable value as the vertical axis to draw the variable data as a continuous waveform curve in real time or offline.

[0047] Specifically, the waveform display control can read all or part of the variable data in the engine electronic control unit from the memory mapping file every 200 milliseconds or other preset time lengths.

[0048] S140. The waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and deletes the variable data for which waveform display has been completed from the waveform display control.

[0049] It can be understood that when the waveform display control is used to display the variable data in a waveform, the user can view the waveform diagram of the variable data through the waveform display interface, and the waveform in the waveform display interface changes in real time with the variable data, that is, the waveform currently displayed in the waveform display interface uses the variable data that is being displayed in the waveform, and the waveform corresponding to the variable data that has completed the waveform display has disappeared from the waveform display interface. The embodiment of the present disclosure deletes the variable data that has completed the waveform display, which does not affect the display of the current waveform and can also reduce the amount of data in the waveform display control, thereby avoiding the problems of slow waveform display refresh and jamming when processing a large amount of variable data.

[0050] The technical solution of the embodiment of the present disclosure collects variable data from the engine electronic control unit and then writes the variable data in the engine electronic control unit into a memory-mapped file. Then, a waveform display control reads the variable data in the engine electronic control unit from the memory-mapped file. Then, the waveform display control performs waveform display based on the variable data in the engine electronic control unit read from the memory-mapped file, and deletes the variable data that has completed waveform display from the waveform display control. In the above technical solution, memory mapping writing and reading of variable data in the engine electronic control unit are realized without performing file I / O operations, simplifying the data reading and writing process, and deleting the variable data that has completed waveform display from the waveform display control, reducing the amount of data in the waveform display control, thereby avoiding the problems of slow waveform display refresh and lag when processing a large amount of variable data.

[0051] Figure 2 A flowchart of another waveform display method provided in an embodiment of the present disclosure, the method of this embodiment can be combined with the various optional schemes in the waveform display method provided in the above embodiments. In this embodiment, based on the above embodiments, optionally, the variable data in the engine electronic control unit includes multiple time values and variable values corresponding to each time value; accordingly, writing the variable data in the engine electronic control unit to a memory mapping file includes: subtracting an initial time value from each time value in the variable data in the engine electronic control unit to obtain a timestamp corresponding to each time value; and writing the timestamp corresponding to each time value and the variable value corresponding to each time value to the memory mapping file.

[0052] like Figure 2 As shown, the method includes:

[0053] S210 : Collect variable data in an engine electronic control unit, where the variable data in the engine electronic control unit includes a plurality of time values and a variable value corresponding to each time value.

[0054] S220. Subtract an initial time value from each time value in the variable data in the engine electronic control unit to obtain a timestamp corresponding to each time value; and write the timestamp corresponding to each time value and the variable value corresponding to each time value into a memory mapping file.

[0055] It should be noted that compared with time values, timestamps take up less memory, which can speed up the saving of variable data and save memory.

[0056] For example, the variable data may be voltage data, which includes multiple time values and the voltage value corresponding to each time value. The initial time value may be 2024-1-1 00:00:00. By subtracting the initial time value from each time value in the voltage data, a long-type timestamp corresponding to each time value can be obtained. The time value occupies 16 bits, while the long-type timestamp occupies 8 bits. Each voltage value and the long-type timestamp corresponding to each time value can then be written to a memory-mapped file, which can speed up the storage of variable data and save memory. When reading voltage data, the waveform display control can restore the long-type timestamp to obtain the time value for waveform display.

[0057] S230: The waveform display control reads variable data in the engine electronic control unit from the memory mapping file.

[0058] S240: The waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and deletes the variable data for which waveform display has been completed from the waveform display control.

[0059] The technical solution of the embodiment of the present disclosure speeds up the saving of variable data and saves memory by writing the timestamp corresponding to each time value into a memory-mapped file.

[0060] Figure 3 A flowchart of another waveform display method provided by an embodiment of the present disclosure, the method of this embodiment can be combined with the various optional schemes in the waveform display method provided in the above embodiments. Based on the above embodiments, this embodiment optionally writes the variable data in the engine electronic control unit into a memory mapping file, including: determining the variable identifier of the variable data in the engine electronic control unit; if there is a file name identical to the variable identifier in the memory mapping, writing the variable data in the engine electronic control unit into the memory mapping file corresponding to the variable identifier; if there is no file name identical to the variable identifier in the memory mapping, creating a memory mapping file with the variable identifier as the file name, and writing the variable data in the engine electronic control unit into the memory mapping file corresponding to the variable identifier.

[0061] like Figure 3 As shown, the method includes:

[0062] S310: Collect variable data in the engine electronic control unit.

[0063] S320: Determine the variable identifier of the variable data in the engine electronic control unit.

[0064] The variable identifier can uniquely represent the type of the variable data, which can be included in the variable data. For example, voltage data can be represented by 00001, current data can be represented by 00002, and so on.

[0065] S330. If a file name identical to the variable identifier exists in the memory mapping, the variable data in the engine electronic control unit is written into the memory mapping file corresponding to the variable identifier; if a file name identical to the variable identifier does not exist in the memory mapping, a memory mapping file is created with the variable identifier as the file name, and the variable data in the engine electronic control unit is written into the memory mapping file corresponding to the variable identifier.

[0066] It should be noted that if a file with the same name as the variable identifier exists in the memory map, it indicates that the data variable of that type has been saved in the memory map, and the data variable of that type can be written to a memory-mapped file of that type. If a file with the same name as the variable identifier does not exist in the memory map, it indicates that the data variable of that type has not been saved in the memory map, and a memory-mapped file can be created with the variable identifier as the file name, and the data variable of that type can be written to the memory-mapped file of that type.

[0067] For example, the variable identifier of the voltage data can be 00001. If there is a file name identical to 00001 in the memory mapping, the voltage data is written to the memory mapping file with the file name 00001; if there is no file name identical to 00001 in the memory mapping, a memory mapping file with the name 00001 is created, and then the voltage data is written to the memory mapping file with the file name 00001.

[0068] Figure 4 A flowchart of writing data to a memory-mapped file provided in an embodiment of the present disclosure. Specifically, variable data is obtained, and it is determined whether data variables of this type have been stored in the memory mapping. If data variables of this type have not been stored, a memory-mapped file is created with the variable identifier as the file name, and size=0 is set, where size represents the number of data. If data variables of this type have been stored, the size in the memory-mapped file is obtained. The data index of the first data point of the variable data is then set to size, that is, FirstIndex=size. It should be noted that by setting the data index of the first data point of the variable data to size, the acquisition of variable data can be facilitated. In other words, if the variable data is to be queried later, it can be queried through FirstIndex, thereby improving the query efficiency of the variable data.

[0069] Then write the data variable of this type into the memory mapped file of this type

[0070] S340: The waveform display control reads variable data in the engine electronic control unit from the memory mapping file.

[0071] S350: The waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and deletes the variable data for which waveform display has been completed from the waveform display control.

[0072] On the basis of the above embodiments, optionally, when there is a file name identical to the variable identifier in the memory mapping, the variable data in the engine electronic control unit is written into the memory mapping file corresponding to the variable identifier, including: when there is a file name identical to the variable identifier in the memory mapping, obtaining the data number information in the memory mapping file corresponding to the variable identifier; determining the remaining capacity information of the memory mapping file corresponding to the variable identifier based on the data number information; when the remaining capacity information of the memory mapping file corresponding to the variable identifier is greater than or equal to the occupied capacity information of the variable data in the engine electronic control unit, writing the variable data in the engine electronic control unit into the memory mapping file corresponding to the variable identifier; when the remaining capacity information of the memory mapping file corresponding to the variable identifier is less than the occupied capacity information of the variable data in the engine electronic control unit, expanding the memory mapping file corresponding to the variable identifier, and writing the variable data in the engine electronic control unit into the memory mapping file corresponding to the expanded variable identifier.

[0073] In the embodiment of the present disclosure, the format of saving variable data in the memory mapped file can be as follows: Figure 5 As shown in the figure, the first 4 bytes of the memory-mapped file are used to store fixed data quantity information, and variable data is stored starting from the 5th byte.

[0074] The data count information refers to the number of variable data in the memory-mapped file. Each variable data corresponds to a fixed number of bytes. Therefore, the used capacity of the memory-mapped file can be determined based on the data count information, and the remaining capacity of the memory-mapped file can be determined based on the used capacity information.

[0075] For example, the variable identifier of the voltage data can be 00001, and the memory mapping file named 00001 contains 100 voltage data. That is, the first 4 bytes of the memory mapping file named 00001 store the data number information: 100; and 100 voltage data are stored starting from the 5th byte. The calculation formula for the remaining capacity information is:

[0076] Remaining capacity information = memory mapping file capacity information - used capacity information;

[0077] Used capacity information = data quantity information occupied capacity information + variable data occupied capacity information.

[0078] If the remaining capacity information of the memory mapping file with the file name 00001 is greater than or equal to the occupied capacity information of the newly collected voltage data, the newly collected voltage data is directly written into the memory mapping file with the file name 00001; if the remaining capacity information of the memory mapping file with the file name 00001 is less than the occupied capacity information of the newly collected voltage data, the memory mapping file is expanded, and the expanded capacity can be 1M or other capacity, and then the newly collected voltage data is written into the memory mapping file with the expanded file name 00001.

[0079] Figure 6 A flowchart of writing a memory-mapped file is provided for an embodiment of the present disclosure. Specifically, the variable identifier of the variable data can be obtained, and then the memory-mapped file corresponding to the variable identifier can be searched in the memory mapping according to the variable identifier of the variable data. Then, the first four bytes of the memory-mapped file are read to obtain the size, and then the remaining capacity of the memory-mapped file is calculated according to the size; when the remaining capacity can write the variable data, the variable data is written to the memory-mapped file corresponding to the variable identifier, and 1 is added to the size. When the remaining capacity cannot write the variable data, the memory-mapped file corresponding to the variable identifier is expanded, and the expanded capacity can be 1M, and then the variable data is written to the memory-mapped file corresponding to the expanded variable identifier.

[0080] The technical solution of the embodiment of the present disclosure determines whether variable data has been stored in the memory map through variable identification, and classifies and stores the variable data according to the variable identification, thereby improving data management efficiency.

[0081] Figure 7 A flowchart of another waveform display method provided in an embodiment of the present disclosure is provided. The method of this embodiment can be combined with the various optional schemes of the waveform display method provided in the above embodiments. Based on the above embodiments, this embodiment optionally displays the waveform according to the variable data in the engine electronic control unit read from the memory-mapped file, and deletes the variable data that has completed waveform display from the waveform display control, including: obtaining a waveform display time range window; based on the waveform display time range window, moving and intercepting the variable data in the engine electronic control unit; the waveform display control displays the variable data within the waveform display time range window as a waveform; and deleting the variable data outside the waveform display time range window and that has completed waveform display from the waveform display control.

[0082] like Figure 7 As shown, the method includes:

[0083] S410: Collect variable data in the engine electronic control unit.

[0084] S420: Write the variable data in the engine electronic control unit into a memory mapping file.

[0085] S430: The waveform display control reads variable data in the engine electronic control unit from the memory mapping file.

[0086] S440, obtaining a waveform display time range window; based on the waveform display time range window, moving and intercepting the variable data in the engine electronic control unit; the waveform display control displays the variable data within the waveform display time range window in a waveform; and deleting the variable data outside the waveform display time range window and already displayed in a waveform from the waveform display control.

[0087] The waveform display time range window refers to the maximum time range that can be displayed on the waveform display interface.

[0088] For example, the horizontal axis of the waveform display interface is time, and the vertical axis is voltage. The horizontal axis display range can be 20 seconds, and the vertical axis display range can be 50mV, that is, the waveform display time range window is 20 seconds. In other words, the monitoring range of the waveform display is 20 seconds. Assuming that 100 seconds of voltage data are read, the voltage data corresponding to 0 seconds can be used as the starting point, and the 100 seconds of voltage data can be intercepted by moving the 20-second waveform display time range window, and the voltage data in the waveform display time range window is displayed as a waveform until it moves to the voltage data corresponding to 80 seconds. When the voltage data corresponding to 80 seconds is moved, the voltage data corresponding to 80-100 seconds is retained, and the voltage data corresponding to 0-79 seconds is deleted.

[0089] Based on the above embodiments, optionally, the waveform display control reads variable data in the engine electronic control unit from a memory-mapped file, including: obtaining a current data reading index and a historical data reading index; the waveform display control reads the variable data in the engine electronic control unit from the memory-mapped file based on the current data reading index and the historical data reading index.

[0090] The current data reading index may be information about the number of data items, and the historical data reading index may be an index of the last data read.

[0091] For example, Figure 8A flow chart of variable data reading provided for an embodiment of the present disclosure. Specifically, variable data is read every 200 milliseconds, and each reading is the variable data between LastIndex and size, where LastIndex is the index of the last read data and size is the number of data. After the variable data is read, the size value is assigned to LastIndex, thereby updating the historical data reading index to facilitate subsequent variable data reading. Furthermore, the read variable data is binary data. The read variable data can be converted into decimal and assigned to the waveform display control, and the variable data refresh control that has completed the waveform display can be deleted.

[0092] The technical solution of the embodiment of the present disclosure reduces the amount of data in the waveform display control by deleting variable data that is outside the waveform display time range window in the waveform display control and has been waveform displayed, thereby avoiding the problems of slow waveform display refresh and jamming when processing a large amount of variable data.

[0093] Figure 9 A flowchart of another waveform display method provided in an embodiment of the present disclosure, the method of this embodiment can be combined with the various optional schemes in the waveform display method provided in the above embodiments. Based on the above embodiments, this embodiment optionally further includes, after the waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file: in response to a drag operation on the waveform display interface, determining the current interface waveform display time range, the previous interface waveform display time range corresponding to the current interface waveform display time range, and the next interface waveform display time range corresponding to the current interface waveform display time range; from the memory mapping file, the waveform display control reads the variable data corresponding to the current interface waveform display time range, the previous interface waveform display time range corresponding to the current interface waveform display time range, and the next interface waveform display time range corresponding to the current interface waveform display time range.

[0094] like Figure 9 As shown, the method includes:

[0095] S510: Collect variable data in the engine electronic control unit.

[0096] S520: Write the variable data in the engine electronic control unit into a memory mapping file.

[0097] S530: The waveform display control reads variable data in the engine electronic control unit from the memory mapping file.

[0098] S540: The waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and deletes the variable data for which waveform display has been completed from the waveform display control.

[0099] S550. In response to a drag operation on the waveform display interface, determine a current interface waveform display time range, a previous interface waveform display time range corresponding to the current interface waveform display time range, and a next interface waveform display time range corresponding to the current interface waveform display time range.

[0100] S560. The waveform display control reads variable data corresponding to the current interface waveform display time range, the previous interface waveform display time range corresponding to the current interface waveform display time range, and the next interface waveform display time range corresponding to the current interface waveform display time range from the memory mapping file.

[0101] When users want to view the waveforms of historical variable data, they can drag the waveform display interface to view the waveforms before and after the current interface. In the disclosed embodiment, to avoid waveform freezes, after responding to the drag operation on the waveform display interface, the variable data corresponding to the current interface, the previous interface, and the next interface can be obtained and displayed. This ensures the continuity of the displayed waveform and avoids freezes caused by excessive data volume.

[0102] For example, Figure 10 This is a flowchart for querying historical variable data provided by an embodiment of the present disclosure. If the waveform display time range on the current interface is (50, 70), the waveform display time range on the previous interface is (30, 50), and the waveform display time range on the next interface is (70, 90), that is, after the user drags the waveform display interface, the waveform display control can read the variable data corresponding to the time range (30, 90) from the memory-mapped file, clear the waveform on the waveform display interface, and then display the variable data corresponding to the time range (30, 90) as a waveform, refreshing the waveform display control. Figure 11 A waveform diagram is provided in an embodiment of the present disclosure, where the horizontal axis is time and the vertical axis is variable value.

[0103] The technical solution of the embodiment of the present disclosure can obtain the variable data corresponding to the current interface, the previous interface and the next interface for display in response to the drag operation of the waveform display interface, thereby ensuring the continuity of the displayed waveform and avoiding the occurrence of lag caused by excessive data volume.

[0104] Figure 12 This is a schematic diagram of the structure of a waveform display device provided by an embodiment of the present disclosure. Figure 12 As shown, the device includes:

[0105] The electronic control unit variable data acquisition module 710 is used to collect variable data in the engine electronic control unit;

[0106] A variable data writing module 720 is used to write the variable data in the engine electronic control unit into a memory mapped file;

[0107] The electronic control unit variable data reading module 730 is used for the waveform display control to read the variable data in the engine electronic control unit from the memory mapping file;

[0108] The variable data waveform display module 740 is used for the waveform display control to perform waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and to delete the variable data that has completed waveform display from the waveform display control.

[0109] The technical solution of the embodiment of the present disclosure collects variable data from the engine electronic control unit and then writes the variable data in the engine electronic control unit into a memory-mapped file. Then, a waveform display control reads the variable data in the engine electronic control unit from the memory-mapped file. Then, the waveform display control performs waveform display based on the variable data in the engine electronic control unit read from the memory-mapped file, and deletes the variable data that has completed waveform display from the waveform display control. In the above technical solution, memory mapping writing and reading of variable data in the engine electronic control unit are realized without performing file I / O operations, simplifying the data reading and writing process, and deleting the variable data that has completed waveform display from the waveform display control, reducing the amount of data in the waveform display control, thereby avoiding the problems of slow waveform display refresh and lag when processing a large amount of variable data.

[0110] Based on any optional technical solution in the embodiment of the present disclosure, optionally, the variable data in the engine electronic control unit includes multiple time values and variable values corresponding to each time value;

[0111] Accordingly, the variable data writing memory mapping file module 720 can also be used to:

[0112] Subtracting an initial time value from each time value in the variable data in the engine electronic control unit to obtain a timestamp corresponding to each time value;

[0113] Write the timestamp corresponding to each time value and the variable value corresponding to each time value to the memory mapped file.

[0114] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the variable data is written into the memory-mapped file module 720, including:

[0115] a variable identification determination unit, configured to determine a variable identification of variable data in the engine electronic control unit;

[0116] an identifier-same writing unit, configured to write the variable data in the engine electronic control unit into a memory mapping file corresponding to the variable identifier when a file name identical to the variable identifier exists in the memory mapping;

[0117] Identify a different writing unit, which is used to create a memory mapping file with the variable identifier as the file name when there is no file name with the same variable identifier in the memory mapping, and write the variable data in the engine electronic control unit into the memory mapping file corresponding to the variable identifier.

[0118] Based on any optional technical solution in the embodiments of the present disclosure, optionally, identifying the same writing unit can also be used for:

[0119] If there is a file name identical to the variable identifier in the memory map, obtaining information on the number of data in the memory map file corresponding to the variable identifier;

[0120] Determine the remaining capacity information of the memory mapping file corresponding to the variable identifier based on the data quantity information;

[0121] When the remaining capacity information of the memory mapping file corresponding to the variable identifier is greater than or equal to the occupied capacity information of the variable data in the engine electronic control unit, writing the variable data in the engine electronic control unit into the memory mapping file corresponding to the variable identifier;

[0122] When the remaining capacity information of the memory mapping file corresponding to the variable identifier is less than the occupied capacity information of the variable data in the engine electronic control unit, the memory mapping file corresponding to the variable identifier is expanded, and the variable data in the engine electronic control unit is written into the memory mapping file corresponding to the expanded variable identifier.

[0123] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the electronic control unit variable data reading module 730 may also be used to:

[0124] Get the current data reading index and historical data reading index;

[0125] The waveform display control reads the variable data in the engine electronic control unit from the memory mapping file based on the current data reading index and the historical data reading index.

[0126] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the variable data waveform display module 740 can also be used to:

[0127] Get the waveform display time range window;

[0128] Based on the waveform display time range window, the variable data in the engine electronic control unit is moved and intercepted;

[0129] The waveform display control displays the variable data within the waveform display time range window in waveform form;

[0130] Variable data that is outside the waveform display time range window and has been waveform displayed is deleted from the waveform display control.

[0131] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the waveform display device further includes:

[0132] a time range determination module, configured to determine, in response to a drag operation on the waveform display interface, a waveform display time range of a current interface, a waveform display time range of a previous interface corresponding to the waveform display time range of the current interface, and a waveform display time range of a next interface corresponding to the waveform display time range of the current interface;

[0133] A range data reading module is used to read the variable data corresponding to the current interface waveform display time range, the previous interface waveform display time range corresponding to the current interface waveform display time range, and the next interface waveform display time range corresponding to the current interface waveform display time range from the memory mapping file by the waveform display control.

[0134] The waveform display device provided in the embodiments of the present disclosure can execute the waveform display method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0135] Figure 13 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0136] like Figure 13As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An I / O interface 15 is also connected to the bus 14.

[0137] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0138] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the waveform display method, which includes:

[0139] Collect variable data from the engine electronic control unit;

[0140] Writing variable data in the engine electronic control unit into a memory mapped file;

[0141] The waveform display control reads variable data in the engine electronic control unit from the memory mapping file;

[0142] The waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and deletes the variable data for which waveform display has been completed from the waveform display control.

[0143] In some embodiments, the waveform display method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the waveform display method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the waveform display method in any other appropriate manner (e.g., by means of firmware).

[0144] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0145] Computer programs for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0146] In the context of the present disclosure, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0147] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0148] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0149] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0150] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions of this disclosure can be achieved, and this document is not limited here.

[0151] An embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, implements the waveform display method provided in any embodiment of the present disclosure.

[0152] The computer program product, during implementation, may be written in one or more programming languages, or a combination thereof, for performing the operations of the present disclosure and may include computer program code written in object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0153] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication unit 19, or installed from the storage unit 18, or installed from the ROM 12. When the computer program is executed by the processor 11, the above-mentioned functions defined in the method of the embodiment of the present invention are performed.

[0154] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A waveform display method, characterized in that: include: Collect variable data from the engine electronic control unit; Writing variable data in the engine electronic control unit into a memory mapped file; The waveform display control reads variable data in the engine electronic control unit from the memory mapping file; The waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and deletes the variable data for which waveform display has been completed from the waveform display control.

2. The method according to claim 1, characterized in that The variable data in the engine electronic control unit includes a plurality of time values and a variable value corresponding to each time value; Accordingly, writing the variable data in the engine electronic control unit into a memory mapping file includes: Subtracting an initial time value from each time value in the variable data in the engine electronic control unit to obtain a timestamp corresponding to each time value; Write the timestamp corresponding to each time value and the variable value corresponding to each time value to the memory mapped file.

3. The method according to claim 1, characterized in that Writing the variable data in the engine electronic control unit into a memory mapping file comprises: determining variable identifiers of variable data in the engine electronic control unit; If there is a file name identical to the variable identifier in the memory map, writing the variable data in the engine electronic control unit into the memory map file corresponding to the variable identifier; If there is no file name identical to the variable identifier in the memory map, a memory map file is created with the variable identifier as the file name, and the variable data in the engine electronic control unit is written into the memory map file corresponding to the variable identifier.

4. The method according to claim 3, characterized in that When a file name identical to the variable identifier exists in the memory map, writing the variable data in the engine electronic control unit into the memory map file corresponding to the variable identifier comprises: If there is a file name identical to the variable identifier in the memory map, obtaining information on the number of data in the memory map file corresponding to the variable identifier; Determine the remaining capacity information of the memory mapping file corresponding to the variable identifier based on the data quantity information; When the remaining capacity information of the memory mapping file corresponding to the variable identifier is greater than or equal to the occupied capacity information of the variable data in the engine electronic control unit, writing the variable data in the engine electronic control unit into the memory mapping file corresponding to the variable identifier; When the remaining capacity information of the memory mapping file corresponding to the variable identifier is less than the occupied capacity information of the variable data in the engine electronic control unit, the memory mapping file corresponding to the variable identifier is expanded, and the variable data in the engine electronic control unit is written into the memory mapping file corresponding to the expanded variable identifier.

5. The method according to claim 1, wherein The waveform display control reads variable data in the engine electronic control unit from the memory mapping file, including: Get the current data reading index and historical data reading index; The waveform display control reads the variable data in the engine electronic control unit from the memory mapping file based on the current data reading index and the historical data reading index.

6. The method according to claim 1, characterized in that The waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and deleting the variable data that has completed waveform display from the waveform display control includes: Get the waveform display time range window; Based on the waveform display time range window, the variable data in the engine electronic control unit is moved and intercepted; The waveform display control displays the variable data within the waveform display time range window in waveform form; Variable data that is outside the waveform display time range window and has been waveform displayed is deleted from the waveform display control.

7. The method according to any one of claims 1 to 6, characterized in that: After the waveform display control performs waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, the further comprising: In response to a drag operation on the waveform display interface, determining a current interface waveform display time range, a previous interface waveform display time range corresponding to the current interface waveform display time range, and a next interface waveform display time range corresponding to the current interface waveform display time range; The waveform display control reads variable data corresponding to the current interface waveform display time range, the previous interface waveform display time range corresponding to the current interface waveform display time range, and the next interface waveform display time range corresponding to the current interface waveform display time range from the memory mapping file.

8. A waveform display device, characterized in that: include: Electronic control unit variable data acquisition module, used to collect variable data in the engine electronic control unit; A variable data writing module for a memory mapped file is used to write the variable data in the engine electronic control unit into a memory mapped file; An electronic control unit variable data reading module is used for a waveform display control to read variable data in the engine electronic control unit from the memory mapping file; The variable data waveform display module is used for the waveform display control to perform waveform display according to the variable data in the engine electronic control unit read from the memory mapping file, and to delete the variable data that has completed waveform display from the waveform display control.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the waveform display method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the waveform display method according to any one of claims 1 to 7 when executed.