Implementation method of measurement data filter, storage medium and electronic device

By setting hierarchically connected filters for each measurement window in the automotive bus tool software, the problems of repeated configuration and high CPU load in traditional methods are solved, and minimal configuration and efficient filtering effects for complex data processing are achieved.

CN117834464BActive Publication Date: 2024-10-18SHANGHAI TOSUN TECH LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311775184.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-21
Publication Date
2024-10-18
Estimated Expiration
2043-12-21

AI Technical Summary

Technical Problem

In an in-the-loop simulation scenario, traditional hardware needs to activate multiple CAN buses at the same time for testing, resulting in high CPU load for the measurement window of the automotive bus tool software, and users need to repeatedly configure filters in each window, making configuration time-consuming, labor-intensive and easy. An error occurred, affecting the testing process.

Method used

Design a measurement data filter. By setting the upstream data flow input port, downstream data flow output port and filtering function for each measurement window, and forming a hierarchical connection, each layer of measurement windows can receive and filter data to avoid repeated configuration of filters. device.

Benefits of technology

It achieves the minimum configuration for complex data processing and testing, reduces the CPU consumption of automotive bus tool software, improves filter configuration and modification efficiency, and reduces repeated configuration work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117834464B_ABST
    Figure CN117834464B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of data filtering, and specifically relates to a method for implementing a measurement data filter, a storage medium and an electronic device, wherein the method for implementing the measurement data filter comprises: setting an upstream data stream input port, a downstream data stream output port and a filtering function for each measurement window; each measurement window upstream data stream input port is connected to a measurement window downstream data stream output port or a data source other than its own measurement window to form a hierarchical connection; each layer of measurement window receives data from an upper layer measurement window through its upstream data stream input port, and filters the received data and flows it out to a lower layer measurement window through its downstream data stream output port.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is based upon and claims the benefit of priority from U.S. patent application No. 18 / 512,137 filed on November 17, 2023. The entire contents of the above application are incorporated herein by reference. Technical Field

[0002] The present invention belongs to the technical field of data filtering, and in particular relates to a method for implementing a measurement data filter, a storage medium and an electronic device. Background Art

[0003] In traditional hardware-in-the-loop simulation scenarios, in order to test a specific ECU such as the ABS algorithm, it is often necessary to simultaneously activate multiple CAN buses connected to the ABS module, and the load rates of these buses are relatively high. This leads to the challenge of high CPU load in each measurement window of the automotive bus tool software, because each window needs to process all the messages received on the CAN bus.

[0004] After the user adds a traditional filter in the graphic window A and configures the filtering conditions for the signals that need to be observed by the ABS module, if it is necessary to observe part of the signals that the ABS module has observed in the graphic window A in another measurement window such as the graphic window B, the numerical window, the panel window, or the signal value window (for example, 4 wheel speed signals), it is necessary to add a traditional filter again in front of each measurement window that needs to be observed and configure the relevant data filtering conditions. Since these data filtering conditions are different from the data filtering conditions of the graphic window A, repeated configuration work is time-consuming and labor-intensive, and prone to errors, affecting the test process. Summary of the invention

[0005] The purpose of the present invention is to provide a method for implementing a measurement data filter, a storage medium and an electronic device.

[0006] In order to solve the above technical problems, the present invention provides a method for implementing a measurement data filter, comprising:

[0007] Set the upstream data stream input port, downstream data stream output port and filtering function for each measurement window;

[0008] Each measurement window upstream data flow input port is connected to a measurement window downstream data flow output port or data source outside its own measurement window to form a hierarchical connection;

[0009] Each layer of measurement window receives data from the upper layer measurement window through its upstream data flow input port, and filters the received data before flowing out to the lower layer measurement window through its downstream data flow output port.

[0010] On the other hand, the present invention also provides a computer-readable storage medium storing computer-readable instructions, which, when executed by at least one processor, causes the following operations to be performed: an upstream data flow input port, a downstream data flow output port and a filtering function are set for each measurement window; each measurement window upstream data flow input port is connected to a measurement window downstream data flow output port or a data source other than its own measurement window to form a hierarchical connection; each layer of measurement windows receives data from the upper layer measurement window through its upstream data flow input port, and filters the received data before the data flows out to the lower layer measurement window through its downstream data flow output port.

[0011] In a third aspect, the present invention further provides an electronic device, comprising:

[0012] at least one memory storing instructions;

[0013] At least one processor executes the instructions so that the processor performs the method for implementing the measurement data filter as described above.

[0014] The beneficial effect of the present invention is that each measurement window in the filter designed by the present invention is equivalent to a filter unit, a hierarchical connection is formed between the measurement windows, and each measurement window can be connected to multiple lower-level measurement windows. The hierarchical connection can enable the filtering result of the current measurement window to be transmitted to the lower layer, so that multiple measurement windows requiring the same filtering result do not need to repeatedly set the filtering function in front of each measurement window like traditional filters, and step-by-step filtering can be achieved without setting up special filters between the measurement windows of each layer, so that complex data processing and data testing can be achieved with minimal configuration, reducing the CPU consumption of the automotive bus tool software.

[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.

[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 A step diagram showing a method for implementing a measurement data filter according to some embodiments;

[0019] Figure 2 A schematic diagram showing a case where measurement windows involved in some embodiments form a dynamic hierarchical connection;

[0020] Figure 3 A schematic diagram showing a case where measurement windows involved in some embodiments form a dynamic hierarchical connection;

[0021] Figure 4 A schematic diagram showing a case where measurement windows involved in some embodiments form a dynamic hierarchical connection;

[0022] Figure 5 A schematic diagram of a “CAN / CAN FD Send” window according to some embodiments is shown;

[0023] Figure 6 A schematic diagram showing an application case of forming a dynamic hierarchical connection among measurement windows involved in some embodiments;

[0024] Figure 7 A schematic diagram showing an application case of forming a dynamic hierarchical connection among measurement windows involved in some embodiments;

[0025] Figure 8 A schematic diagram showing an application case of forming a dynamic hierarchical connection among measurement windows involved in some embodiments;

[0026] Fig. 9 A schematic diagram showing a case of deleting a measurement window involved in some embodiments;

[0027] Fig.10 A schematic diagram showing a case of deleting a measurement window involved in some embodiments;

[0028] Fig.11 A schematic diagram showing a measurement data filter reset case involved in some embodiments;

[0029] Fig.12 A schematic diagram showing a measurement data filter reset case involved in some embodiments;

[0030] Fig.13 A schematic diagram showing an example of configuration content of a display measurement window involved in some embodiments;

[0031] Fig.14 A schematic diagram showing an example of configuration content of a display measurement window involved in some embodiments;

[0032] Fig.15A principle block diagram of a measurement data filtering system involved in some embodiments is shown;

[0033] Fig.16 A principle block diagram of a measurement data filtering system involved in some embodiments is shown;

[0034] Fig.17 A principle block diagram of an electronic device involved in some embodiments is shown;

[0035] Fig.18 A principle block diagram of a measurement data filtering system involved in some embodiments is shown. DETAILED DESCRIPTION

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

[0037] In traditional hardware-in-the-loop simulation scenarios, in order to test a specific ECU such as the ABS algorithm, it is often necessary to simultaneously activate multiple CAN buses connected to the ABS module, and the load rates of these buses are relatively high. This leads to the challenge of high CPU load in each measurement window of the automotive bus tool software, because each window needs to process all the messages received on the CAN bus.

[0038] After the user adds a traditional filter in the graphic window A and configures the filtering conditions for the signals that need to be observed by the ABS module, if it is necessary to observe part of the signals that the ABS module has observed in the graphic window A in another measurement window such as the graphic window B, the numerical window, the panel window, or the signal value window (for example, 4 wheel speed signals), it is necessary to add a traditional filter again in front of each measurement window that needs to be observed and configure the relevant data filtering conditions. Since these data filtering conditions are different from the data filtering conditions of the graphic window A, repeated configuration work is time-consuming and labor-intensive, and prone to errors, affecting the test process.

[0039] Therefore, at least one embodiment provides a method for implementing a measurement data filter, including: setting an upstream data stream input port, a downstream data stream output port, and a filtering function for each measurement window;

[0040] Each measurement window upstream data flow input port is connected to a measurement window downstream data flow output port or data source outside its own measurement window to form a hierarchical connection;

[0041] Each layer of measurement window receives data from the upper layer measurement window through its upstream data flow input port, and filters the received data before flowing out to the lower layer measurement window through its downstream data flow output port.

[0042] Compared with traditional filters that can only perform a single filtering function, each measurement window in the filter designed in the embodiment of the present disclosure is equivalent to a filter unit, and a hierarchical connection is formed between the measurement windows, and each measurement window can be connected to multiple lower-level measurement windows. The hierarchical connection can enable the filtering result of the current measurement window to be transmitted to the lower layer, so that multiple measurement windows requiring the same filtering result do not need to repeatedly set the filtering function in front of each measurement window like traditional filters, and step-by-step filtering can be achieved without setting up special filters between the measurement windows of each layer, thereby being able to implement complex data processing and data testing with minimal configuration, reducing the CPU consumption of the automotive bus tool software.

[0043] Various non-limiting implementations of the embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.

[0044] like Figure 1 As shown, some embodiments provide a method for implementing a measurement data filter, including:

[0045] Step S101, setting the upstream data stream input port, downstream data stream output port and filtering function for each measurement window;

[0046] Step S102, each measurement window upstream data flow input port is connected to a measurement window downstream data flow output port or data source outside its own measurement window to form a hierarchical connection;

[0047] Step S103 : Each layer measurement window receives data from the upper layer measurement window through its upstream data flow input port, filters the received data, and then flows it out to the lower layer measurement window through its downstream data flow output port.

[0048] Specifically, the measurement window refers to a window for measuring bus data, which includes various forms of display, such as graphic display and text display; graphic display includes, but is not limited to, graphic windows, monitorable signal curves, etc.; text display includes, but is not limited to, message information windows, monitorable signal value change processes, etc.

[0049] In some embodiments, each measurement window is dynamically hierarchically connected to other measurement windows. Each measurement window can adjust its connection relationship with other measurement windows or data sources, so as to filter out the required data according to different usage requirements. In addition, the dynamic connection can quickly switch the upper layer connection of a measurement window, which allows the filtering results of the measurement window to be quickly switched, thereby improving the configuration efficiency of the filter and the modification efficiency of the filtering results.

[0050] The following is a detailed description of how each measurement window forms a dynamic hierarchical connection, combined with the case drawings:

[0051] like Figure 2 As shown, in the measurement setting window of the measurement data filter, the data source is the data source of all filters in each layer, the C code editor is connected to the data source and is located at the first level; the graphic window is connected to the C code editor and is located at the second level.

[0052] like Figure 3 As shown, Figure 2 The graphics window in the editor is dynamically dragged and connected to the data source, so that the graphics window and the C code editor are at the same level.

[0053] like Figure 4 As shown, you can also Figure 2 The graphic window in the CAN / CAN FD message information window is dynamically dragged and connected to the CAN / CAN FD message information window, so that the graphic window is still at the second level, but receives the filtered signal from the CAN / CAN FD message information window.

[0054] The following is a detailed description of how each measurement window forms a dynamic hierarchical connection, combined with the application case attached:

[0055] like Figure 5 As shown, in the car test, the engine-related messages are automatically sent through the "CAN / CAN FD Send" window. There are three frames in total, and their identifiers are: 0x064, 0x110 and 0x111.

[0056] like Figure 6As shown in the figure, during use, the user wants to open the Trace window to display the message information, and only wants to view the three frames of message information sent by himself, and filter out other messages, such as the messages sent by the car ECU. At this time, you only need to create a new Trace window, and in the measurement setting window of the measurement data filter, drag this Trace window to the right side of the "CAN / CAN FD Send" window, and make it the lower measurement window of "CAN / CAN FD Send". At this time, the three frames of message information in the "CAN / CAN FD Send" window automatically become the filtering conditions of the Trace window. This method does not even need to configure a filter specifically for the Trace window, which greatly improves the configuration efficiency of the filter.

[0057] like Figure 7 As shown, if the user wants to view the message information corresponding to the gateway signal and filter out other irrelevant information, the software system already has a gateway signal curve chart window "Gateway Signals". At this time, you only need to drag the Trace window to the right of the "Gateway Signals" curve chart window in the measurement setting window of the measurement data filter to meet the user's needs without designing any filters for the Trace window.

[0058] like Figure 8 As shown in the figure, if the user wants to view all the message information during use and does not want to filter out any bus messages, he only needs to drag the Trace window to the right of "Data Source" in the measurement setting window of the measurement data filter, that is, to a position parallel to the "CAN / CAN FD Send" window and the "Gateway Signals" window to meet the user's needs without clearing any filters for the Trace window.

[0059] In some embodiments, the method of setting an upstream data flow input port for each measurement window includes:

[0060] Set the data receiving callback function for each measurement window;

[0061] When the data receiving callback function is called, the measurement window reads the data flowing out of the upper measurement window from the parameters of the callback function.

[0062] An example is used to explain in detail how to set the upstream data stream input port for the measurement window:

[0063] For example, in the window base class of the automotive CAN bus tool software written in C language, the data receiving callback function is set as follows:

[0064] void on_rx_frame(const ACAN:PCAN);

[0065] The data receiving callback function has a parameter ACAN, which is a CAN message pointer of PCAN type. When the data receiving callback function is called by the vehicle bus tool system, the system will assign the latest CAN message pointer currently received to the function parameter ACAN, thereby enabling the measurement window to read the CAN message content from the parameter of the data receiving callback function.

[0066] Since the data receiving callback function exists as the base class of all window types, it means that each measurement window supports the calling of the data receiving callback function. Therefore, when data flows out from the upper measurement window to the lower measurement window, the data receiving callback function of the lower measurement window will be called, and the lower measurement window can obtain the CAN message content flowing out of the upper measurement window.

[0067] In some embodiments, a method for setting a downstream data flow output port for each measurement window includes:

[0068] Set the data distribution callback function list and data distribution procedure for each measurement window;

[0069] The data distribution callback function list includes: a data receiving callback function connecting all lower-level measurement windows of the current measurement window;

[0070] When data flows out of the current measurement window, the data distribution program calls the data receiving callback functions in the data distribution callback function list one by one.

[0071] An example is used to explain in detail how to set the downstream data flow output port for the measurement window:

[0072] For example, in the window base class of the automotive CAN bus tool software written in C language, the data receiving callback function is set as follows:

[0073] bool rx_frame(const ACAN:PCAN);

[0074] Set the data distribution callback function list "dispatch_list", which is an array whose elements include data receiving callback function pointers of all lower-level measurement windows connected to the current measurement window.

[0075] Set the data distribution callback function as follows:

[0076] void dispatch_frame(const ACAN:PCAN);

[0077] The data receiving callback function and the data distributing callback function both have a parameter ACAN, which is a CAN message pointer of the PCAN type. When the data receiving callback function and the data distributing callback function are called by the vehicle bus tool system, the system will assign the latest CAN message pointer currently received to the parameters of the data receiving callback function and the data distributing callback function, thereby enabling the measurement window to read the CAN message content from the parameters of the data receiving callback function and the data distributing callback function.

[0078] The data receiving callback function is a function with a return value, which indicates whether the parameter data has passed the filtering of its own measurement window filter.

[0079] In the data distribution callback function code, the current measurement window first directly calls the data receiving callback function of its own measurement window to trigger the current measurement window to filter the data. During the filtering process, if the data passes the filter of the current measurement window, the data receiving callback function returns true, otherwise it returns false. If the data receiving callback function returns true, the current measurement window will then traverse the data distribution callback function list, call each data receiving callback function in the data distribution callback function list, and distribute the read CAN message content to each measurement window in the lower layer. The data distribution program code is as follows:

[0080]

[0081]

[0082] Since the data receiving callback function and the data distributing callback function exist as the base classes of all window types, this means that each measurement window supports the calling of the data receiving callback function and the data distributing callback function. Therefore, when data flows out from the current measurement window to the lower measurement window, the current measurement window will distribute the data to all lower measurement windows connected to the current measurement window. During the distribution process, the data distributing callback function will be called. The current measurement window first calls its own data receiving callback function in the function to distribute the data flowing out of the current measurement window one by one according to each lower measurement window defined in the data distributing callback function list, that is, each related lower measurement window can obtain the CAN message data flowing out of the current measurement window.

[0083] In some embodiments, a method of setting a filter function for each measurement window includes:

[0084] Extract the configuration content of the measurement window to form a filter entry;

[0085] Set up the comparison procedure;

[0086] When data flows into the measurement window, the comparison program first compares the incoming data with the filter items one by one, and the data that matches the comparison is allowed to flow out of the measurement window.

[0087] Taking the case where the measurement window under the graphics window of the automotive CAN bus tool software needs to be filtered as an example, the method of setting the filtering function for the measurement window is described in detail:

[0088] First, extract all the signals in the graphic window and the channel numbers and message IDs corresponding to the signals to form a corresponding table as follows:

[0089]

[0090]

[0091] Then, based on the above correspondence table, the same message ID information in the table is removed to form a channel-ID correspondence table as follows. The entry content in the channel-ID correspondence table is the filtering entry:

[0092] Channel Number Message ID 1 0x64 1 0x300 2 0x70

[0093] When the graphic window receives a CAN message from the upper measurement window, the comparison program will first extract the channel number and message ID of the CAN message, and compare it with the entry content in the channel-ID correspondence table. Only when the channel number and message ID are the same, the CAN message can pass through the graphic window filter and be passed to the lower measurement window. For example, the 0x33 message from channel 3 cannot find the corresponding entry content in the correspondence table, so it cannot pass the graphic window filter; while the 0x300 message from channel 1 finds the corresponding entry content in the second row of the correspondence table, so it can pass the graphic window filter.

[0094] In some embodiments, when any layer of measurement windows is deleted, the measurement windows of the lower layers connected thereto will be moved to the layer where the deleted measurement window is located.

[0095] like Fig. 9 As shown in the figure, when the measurement window "CAN / CAN FD Transmit" is deleted, the lower measurement windows "Engine Speed" and "Engine Force" connected to this measurement window will be moved to the level of this measurement window, as shown in the figure. Fig.10 shown.

[0096] In some embodiments, when the measurement data filter settings are reset, each measurement window will be reset to be directly connected to the data source.

[0097] Specifically, an example is used to show the changes before and after the reset of the measurement data filter settings, such as Fig.11As shown in the figure, before resetting the measurement data filter settings, each measurement window is set to be hierarchical connection. Click Fig.11 Reset mark The measurement data filter settings can be reset. Fig.12 As shown, each measurement window is reset to be connected to the data source.

[0098] Some embodiments further provide a data filtering method, comprising:

[0099] like Fig.13 As shown, a data source window and at least one measurement window connected to the data source window are displayed through a measurement setting display interface, and each measurement window upstream data flow input port is connected to a measurement window downstream data flow output port or data source other than its own measurement window to form a hierarchical connection; and

[0100] Each layer of measurement window receives data from the upper layer measurement window through its upstream data flow input port, and filters the received data before flowing out to the lower layer measurement window through its downstream data flow output port.

[0101] The data filtering method further comprises:

[0102] The configuration content of the corresponding measurement window is displayed after the command trigger area in each measurement window is triggered;

[0103] Specifically, Fig.13 As shown, right-click the measurement window to trigger the instruction trigger area, and then click "Open Selected" to display the configuration content of the measurement window, such as Fig.14 shown.

[0104] When any measurement window moves, it forms an automatic connection with the corresponding upstream data stream input port and downstream data stream output port of other measurement windows;

[0105] By triggering the delete indicator in the toolbar of the measurement data filter display interface After that, the selected measurement window is deleted and the lower measurement window of the deleted measurement window is moved to the level where the deleted measurement window is located;

[0106] By triggering the reset indicator in the toolbar of the measurement data filter display interface After that, reset each measurement window to be directly connected to the data source;

[0107] By triggering the expansion indicator in the measurement data filter display interface toolbar After that, all measurement windows are expanded and displayed;

[0108] By triggering the measurement data filter display interface toolbar collapse indicator Then, collapse and hide all measurement windows; and

[0109] By triggering the connection mark between the upper and lower measurement windows After that, expand to show or collapse to hide the lower measurement window.

[0110] like Fig.15 As shown, some embodiments further provide a measurement data filtering system, comprising:

[0111] at least one bus adapter configured to obtain a data source from the ECU;

[0112] At least one computer device, the computer device comprising: a processor, a display communicating with the processor to present a graphical interface, a readable storage medium, a communication bus and a communication interface; wherein

[0113] The processor, the readable storage medium and the communication interface communicate with the bus adapter via the communication bus;

[0114] The readable storage medium is configured to store an instruction program;

[0115] The processor module is configured to execute the instructions after obtaining the data source so that the processor performs the following operations: setting an upstream data flow input port, a downstream data flow output port and a filtering function for each measurement window; connecting the upstream data flow input port of each measurement window to a downstream data flow output port or a data source of a measurement window other than its own measurement window to form a hierarchical connection; each layer of measurement window receives data from the upper layer measurement window through its upstream data flow input port, and filters the received data and flows it out to the lower layer measurement window through its downstream data flow output port;

[0116] The display displays a data source window and at least one measurement window connected to the data source window through a graphical interface.

[0117] Some embodiments further provide a data filtering method for a measurement system, comprising:

[0118] Obtain data source from ECU via bus adapter;

[0119] After obtaining the data source, an upstream data stream input port, a downstream data stream output port and a filtering function are set for each measurement window; the upstream data stream input port of each measurement window is connected to a downstream data stream output port or a data source of a measurement window other than its own measurement window to form a hierarchical connection; each layer of measurement windows receives data from the upper layer measurement window through its upstream data stream input port, and filters the received data and then flows it out to the lower layer measurement window through its downstream data stream output port; the data source window and at least one measurement window connected to the data source window are displayed through a graphical interface.

[0120] The implementation method of the measurement data filter involved in the measurement data filtering system and the filtering method of the measurement system is described in detail above and will not be repeated here.

[0121] like Fig.16 As shown, some embodiments further provide a measurement data filtering system, including a setting module, a measurement window connection module and a data processing module, wherein

[0122] a setting module configured to set an upstream data stream input port, a downstream data stream output port and a filtering function for each measurement window;

[0123] The measurement window connection module is configured to connect each measurement window upstream data flow input port to a measurement window downstream data flow output port or data source outside its own measurement window to form a hierarchical connection;

[0124] The data processing module is configured so that each layer of measurement window receives data from the upper layer measurement window through its upstream data flow input port, and filters the received data before flowing out to the lower layer measurement window through its downstream data flow output port.

[0125] Among them, computer instructions corresponding to the specific implementation functions of the setting module, measurement window connection module and data processing module are stored in a computer-readable storage medium and implemented in a computer device. For details, please refer to the content of the implementation method of the aforementioned measurement data filter, which will not be repeated here.

[0126] The electronic device in the embodiment of the present disclosure is described below from the perspective of hardware processing:

[0127] The specific implementation methods of some embodiments do not limit the specific implementation of the electronic device.

[0128] like Fig.16 As shown, the electronic device includes: a processor, a readable storage medium (also referred to as a memory), a communication bus and a communication interface; wherein the processor, the readable storage medium and the communication interface communicate with each other through the communication bus; the readable storage medium is used to store a program for executing the implementation method of the measurement data filter, and the program enables the processor to execute operations corresponding to the implementation method of the measurement data filter, and the implementation method of the measurement data filter includes: setting an upstream data stream input port, a downstream data stream output port and a filtering function for each measurement window; each measurement window upstream data stream input port is connected to a measurement window downstream data stream output port or a data source other than its own measurement window to form a hierarchical connection; each layer of measurement window receives data from the upper layer measurement window through its upstream data stream input port, and filters the received data and then flows it out to the lower layer measurement window through its downstream data stream output port.

[0129] For details, please refer to the detailed description of the implementation method of the measurement data filter, which will not be repeated here.

[0130] In other embodiments, a computer device or an industrial computer may also be used as a type of electronic device.

[0131] Fig.17 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0132] In some embodiments, the communication interface may be RS232, RS485, USB port, TYPE port, etc., which may be connected to an external bus adapter. It may also include a wired or wireless network interface, and the network interface may optionally include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the computer device and other electronic devices.

[0133] Among them, the readable storage medium or computer-readable storage medium includes at least one type of memory, and the memory includes flash memory, hard disk, multimedia card, card-type memory (such as SD memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, it can be an internal storage unit of a computer device, such as a hard disk of the computer device. In other embodiments, the memory can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory can also include both an internal storage unit of a computer device and an external storage device. The memory can not only be used to store application software and various types of data installed in the computer device, such as the code of a computer program, etc., but can also be used to temporarily store data that has been output or is to be output.

[0134] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip for running program codes stored in a memory or processing data, such as executing a computer program.

[0135] In some embodiments, the communication bus may also be an input / output bus, which may be a Peripheral Component Interconnect (PCI) bus or an Enhanced Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.

[0136] Optionally, the computer device may further include a user interface, which may include a display (Display), an input unit such as a keyboard (Keyboard), and optionally, the user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the computer device and to display a visual user interface.

[0137] When the processor executes the program, the above Figure 1 The steps in the embodiment of the method for implementing the measurement data filter shown are, for example, Figure 1 Steps S101 to S103 are shown. Or the processor implements the functions of each module or unit in the above-mentioned device embodiments when executing the computer program.

[0138] Some embodiments further provide a computer-readable storage medium configured to store any possible implementation method of the measurement data filter described above.

[0139] Some embodiments further provide a computer-readable storage medium storing computer-readable instructions, which, when executed by at least one processor, enables the aforementioned implementation method of the measurement data filter to be executed, specifically, for each measurement window, an upstream data stream input port, a downstream data stream output port, and a filtering function are set; each measurement window upstream data stream input port is connected to a measurement window downstream data stream output port or a data source other than its own measurement window to form a hierarchical connection; each layer of measurement window receives data from the upper layer measurement window through its upstream data stream input port, and filters the received data and flows it out to the lower layer measurement window through its downstream data stream output port. Please refer to the specific description of the implementation method of the measurement data filter, which will not be repeated here.

[0140] Some embodiments further provide a computer program product, comprising a computer program or instructions, wherein when the computer program or instructions are executed on a computer, the computer is enabled to execute any possible method for implementing the measurement data filter described above.

[0141] Some embodiments further provide a computer program product, including a computer-readable storage medium having computer-readable program code stored thereon, the computer-readable program code including instructions, the instructions causing at least one processor or one or more computer devices to perform the following operations:

[0142] An upstream data stream input port, a downstream data stream output port and a filtering function are set for each measurement window; the upstream data stream input port of each measurement window is connected to a downstream data stream output port or a data source of a measurement window other than its own measurement window to form a hierarchical connection; each layer of measurement window receives data from the upper layer measurement window through its upstream data stream input port, and filters the received data and then flows it out to the lower layer measurement window through its downstream data stream output port.

[0143] For details, please refer to the detailed description of the implementation method of the measurement data filter, which will not be repeated here.

[0144] like Fig.18 As shown, some embodiments also provide a measurement data filtering system, including: a computer device, a bus adapter;

[0145] The computer device comprises: a processor, a readable storage medium, a communication bus and a communication interface; wherein

[0146] The readable storage medium is configured to store a program for executing the method for implementing the measurement data filter, and the processor is configured to execute the program for implementing the method for implementing the measurement data filter as described above;

[0147] The processor, the readable storage medium and the communication interface communicate with the bus adapter via the communication bus to obtain a data source obtained from the ECU.

[0148] In some embodiments, the bus adapter can be a CAN (Controller Area Network) bus adapter, a CAN FD (Controller Area Network Flexible Data Rate) bus adapter, a FastLIN (Fast Local Interconnect Network) bus adapter, a LIN (Local Interconnect Network) bus adapter, an Ethernet bus adapter, a FlexRay bus adapter, or one-way to multiple-way, or multiple-way to multiple-way. In other embodiments, the specific implementation of the bus adapter is not limited. In some embodiments, the corresponding data source can be obtained by communicating with the debugging device through the UDS (Unified Diagnostic Services) or XCP (Universal Calibration Protocol) protocol. In some embodiments, the UDS (Unified Diagnostic Services) or XCP (Universal Calibration Protocol) or CCP (CAN Calibration Protocol) protocol can also be used to communicate with the debugging device, such as the automotive ECU (Electronic Control Unit) and its related systems to obtain the data source from the ECU.

[0149] In some embodiments, the debugging equipment in the automotive field can specifically be a vehicle ECU (Electronic Control Unit) and its related systems, such as but not limited to electronic power steering system EPS, anti-lock braking system ABS, electronic stability system ESC, automobile engine management system, battery management system BMS and other devices can be connected to the computer device via a bus to receive the data source.

[0150] In some embodiments, the implementation method of the measurement data filter, the measurement data filtering system, the filtering method of the measurement system, and the data filtering method can be used for the data source obtained from the ECU collected by the automobile bus tool software.

[0151] In the several embodiments provided, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0152] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0153] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.

[0154] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.

Claims

1. A method for implementing a measurement data filter, characterized in that: include: Obtain data source from ECU via bus adapter; After obtaining the data source, set the upstream data stream input port, downstream data stream output port and filtering function for each measurement window; Each measurement window upstream data flow input port is connected to a measurement window downstream data flow output port or data source outside its own measurement window to form a hierarchical connection; Each layer of measurement window receives data from the upper layer measurement window through its upstream data flow input port, and filters the received data before flowing out to the lower layer measurement window through its downstream data flow output port; Each measurement window is dynamically hierarchically connected with other measurement windows, and each measurement window can adjust its connection relationship with other measurement windows or data sources; in The method of setting the upstream data stream input port for each measurement window includes: Set the data receiving callback function for each measurement window; When the data receiving callback function is called, the measurement window reads the data flowing out of the upper measurement window from the parameters of the data receiving callback function; The method of setting the downstream data flow output port for each measurement window includes: Set the data distribution callback function list and data distribution procedure for each measurement window; The data distribution callback function list includes: a data receiving callback function connecting all lower-level measurement windows of the current measurement window; When data flows out of the current measurement window, the data distribution program calls the data receiving callback functions in the data distribution callback function list one by one; and In the window base class of the automotive CAN bus tool system written in C language, the data receiving callback function is set as follows: bool rx_frame(const ACAN: PCAN); Set a data distribution callback function list "dispatch_list", where "dispatch_list" is an array, and the elements in the array include data receiving callback function pointers of all lower-level measurement windows connected to the current measurement window; Set the data distribution callback function as follows: void dispatch_frame(const ACAN: PCAN); The data receiving callback function and the data distributing callback function both have a parameter ACAN, which is a CAN message pointer of the PCAN type; when the data receiving callback function and the data distributing callback function are called by the automobile CAN bus tool system, the automobile CAN bus tool system will assign the latest CAN message pointer currently received to the parameter ACAN of the data receiving callback function and the data distributing callback function, so as to enable the measurement window to read the CAN message content from the parameter ACAN of the data receiving callback function and the data distributing callback function; The data receiving callback function is a function with a return value, and the return value indicates whether the parameter data has passed the filtering of its own measurement window filter; In the data distribution callback function, the current measurement window first directly calls the data receiving callback function of its own measurement window to trigger the current measurement window to filter the data. During the filtering process, if the data passes the filter of the current measurement window, the data receiving callback function returns true, otherwise it returns false; if the data receiving callback function returns true, then the current measurement window traverses the data distribution callback function list, calls each data receiving callback function in the data distribution callback function list, and distributes the read CAN message content to each measurement window in the lower layer; The data receiving callback function and the data distributing callback function exist as base classes of all window types, and each measurement window supports calling the data receiving callback function and the data distributing callback function; when data flows out from the current measurement window to the lower measurement window, the current measurement window will distribute the data to all lower measurement windows connected to the current measurement window. During the distribution process, the data distributing callback function will be called, and the current measurement window first calls its own data receiving callback function in the data receiving callback function to distribute the data flowing out of the current measurement window one by one according to each lower measurement window defined in the data distributing callback function list, that is, each related lower measurement window can obtain the CAN message data flowing out of the current measurement window.

2. The implementation method according to claim 1, characterized in that: Methods for setting filtering functions for each measurement window include: Extract the configuration content of the measurement window to form a filter entry; Set up the comparison procedure; When data flows into the measurement window, the comparison program first compares the incoming data with the filter items one by one, and the data that matches the comparison is allowed to flow out of the measurement window.

3. The implementation method according to claim 2, characterized in that: When any layer of measurement window is deleted, the measurement window of the lower layer connected to it will move to the level where the deleted measurement window is located.

4. The implementation method according to claim 3, characterized in that: When the measurement data filter settings are reset, each measurement window will be reset to be directly connected to the data source.

5. A computer-readable storage medium storing computer-readable instructions, which, when executed by at least one processor, enables the operation of the method for implementing the measurement data filter according to any one of claims 1 to 4 to be performed.

6. An electronic device comprising: at least one memory storing instructions; At least one processor executes the instructions so that the processor executes the method for implementing the measurement data filter according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Test method and device for CAN (Controller Area Network) bus

    CN108809741A