Data processing method, device, and electronic device
By obtaining and analyzing the identity identification number, channel identification and timestamp of CAN messages of new energy vehicle, the problem of inefficient gateway performance verification of new energy vehicle gateways is solved, and fast and accurate gateway performance evaluation is achieved, and the vehicle design and testing efficiency is improved.
Patent Information
- Application Number
- CN202211581192.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-12-09
AI Technical Summary
How to effectively verify the gateway performance of new energy vehicles during the development process, ensure reliable transmission of signals between multiple network segments, taking into account the increase in the number of electronic control units and electromagnetic interference problems.
By obtaining the identity identification number, channel identification and timestamp of the controller's LAN CAN message, calculate the frame drop rate and delay time, use regular expressions to analyze the Trace file, and automatically obtain the frame drop rate and delay time of the CAN gateway route of the new energy real-time vehicle.
It improves the design and testing efficiency of new energy vehicle vehicles, achieves fast and accurate gateway performance evaluation, and reduces the dependence of manual analysis.
Smart Images

Figure CN115865753B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of automotive electronic and electrical technology, and in particular to a data processing method, device, and electronic equipment. Background Art
[0002] Compared to traditional fuel vehicles, new energy vehicles (NEVs) have a significantly larger number of electronic control units (ECUs), leading to an increasing number of communication signals between ECUs. These signals are transmitted across network segments through the vehicle gateway controller. Furthermore, NEVs generate greater electromagnetic interference than traditional fuel vehicles, making it crucial to ensure the reliability of signal transmission across multiple network segments. This reliability is based on verifying the performance of gateways during the development process. Therefore, verifying the performance of gateways during the development of NEVs is an urgent issue. Summary of the Invention
[0003] The present disclosure provides a data processing method, device, and electronic device to at least solve the above technical problems existing in the prior art.
[0004] According to a first aspect of the present disclosure, there is provided a data processing method, comprising:
[0005] Obtain at least one Controller Area Network (CAN) message;
[0006] Confirm the identity number, channel ID and timestamp of each CAN message;
[0007] Determine the frame loss rate of at least one CAN message based on the identity identification number and channel identification of each CAN message;
[0008] Based on the identity identification number, channel identification and timestamp of each CAN message, the delay time of the at least one CAN message is confirmed.
[0009] In the above solution, obtaining at least one controller area network (CAN) message includes:
[0010] Obtaining a first file including at least one CAN message;
[0011] Obtaining the at least one CAN message in the first file based on a regular expression;
[0012] Among them, the first file includes a Trace file, and the at least one CAN message includes at least one CAN message of each network segment of the actual vehicle.
[0013] In the above solution, the confirmation of the identity number, channel identifier and timestamp of each CAN message includes:
[0014] The identity identification number, channel identification and timestamp of each CAN message are obtained based on a regular expression.
[0015] In the above solution, the step of determining the frame loss rate of at least one CAN message based on the identity identification number and channel identification of each CAN message includes:
[0016] Based on the number of messages on the receiving channels of different channel identifiers for each ID card identification number, the frame loss rate of at least one CAN message is determined.
[0017] In the above solution, the number of messages on the receiving channels identified by different channels based on each ID card identification number is used to determine the frame loss rate of at least one CAN message, including:
[0018] Confirm the number of CAN messages of each identification number on the receiving channels of different channel identifications;
[0019] A first difference is obtained by subtracting the number of messages on at least two receiving channels whose numbers are not zero and taking the absolute value;
[0020] It is determined that a quotient of the first difference and the number of messages on a first receiving channel of the at least two receiving channels is a frame loss rate of CAN messages on the first receiving channel.
[0021] In the above solution, the determining of the delay time of the at least one CAN message based on the identity identification number, channel identification and timestamp of each CAN message includes:
[0022] In response to the CAN message being a routing message, CAN messages with the same identity identification number are grouped based on the channel identification of the receiving channel;
[0023] Based on the time stamps of the at least two CAN messages in each group, a delay time of the at least one CAN message is determined.
[0024] In the above solution, the determining of the delay time of the at least one CAN message based on the timestamps of the at least two CAN messages in each group includes:
[0025] Confirm the absolute value of the difference between the base timestamp and other timestamps in each group;
[0026] The maximum absolute value of the difference in all the groups is determined to be the delay time of the at least one CAN message.
[0027] In the above solution, the method further includes:
[0028] The frame loss rate of the at least one CAN message and the delay time of the at least one message are recorded in the analysis report.
[0029] According to a second aspect of the present disclosure, there is provided a data processing device, comprising:
[0030] An acquisition unit, configured to acquire at least one controller area network (CAN) message;
[0031] Confirmation unit, used to confirm the identity number, channel identifier and timestamp of each CAN message;
[0032] A first processing unit, configured to determine a frame loss rate of at least one CAN message based on an identification number and a channel identifier of each CAN message;
[0033] The second processing unit is used to confirm the delay time of the at least one CAN message based on the identity identification number, channel identification and timestamp of each CAN message.
[0034] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0035] at least one processor; and
[0036] a memory communicatively connected to the at least one processor; wherein,
[0037] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present disclosure.
[0038] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the present disclosure.
[0039] The data processing method disclosed herein obtains at least one controller area network (CAN) message; confirms the identity identification number, channel identification, and timestamp of each CAN message; confirms the frame loss rate of at least one CAN message based on the identity identification number and channel identification of each CAN message; and confirms the delay time of the at least one CAN message based on the identity identification number, channel identification, and timestamp of each CAN message; and can obtain gateway performance during the development process.
[0040] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings, in which several embodiments of the present disclosure are shown by way of example and not limitation, wherein:
[0042] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts.
[0043] Figure 1 An optional flow chart of the data processing method provided by an embodiment of the present disclosure is shown;
[0044] Figure 2 Another optional flow chart of the data processing method provided by the embodiment of the present disclosure is shown;
[0045] Figure 3 An optional structural diagram of a data processing device provided by an embodiment of the present disclosure is shown;
[0046] Figure 4 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0047] To make the purposes, features, and advantages of the present disclosure more apparent and understandable, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative work shall fall within the scope of protection of the present disclosure.
[0048] Figure 1 An optional flow chart of the data processing method provided by an embodiment of the present disclosure is shown, and will be explained according to each step.
[0049] Step S101: Obtain at least one controller area network message.
[0050] In some embodiments, a data processing device (hereinafter referred to as the device) obtains a first file including at least one CAN message; obtains the at least one CAN message in the first file based on a regular expression; wherein, the first file includes a Trace file, and the at least one CAN message includes at least one CAN message from each network segment of the actual vehicle.
[0051] In some embodiments, the Trace file includes valid line data such as the CAN message's identity number, channel identifier, and timestamp, and may also include auxiliary line data such as comment text; wherein both the valid line data and the auxiliary line data are stored in the Trace file in the form of text.
[0052] Step S102: confirm the identity number, channel identifier and timestamp of each CAN message.
[0053] In some embodiments, after obtaining the first file, the device obtains valid line data in the first file based on a regular expression; and then obtains the identity number, channel identifier and timestamp of each CAN message in the valid line data based on the regular expression.
[0054] The identity identification number may be a CANID, that is, an identity identification number (ID) of the message; and the channel identification may be an identification of a receiving channel, such as channel 1, channel 2, and the like.
[0055] Step S103: confirming the frame loss rate of at least one CAN message based on the identity identification number and channel identification of each CAN message.
[0056] In some embodiments, the device confirms the frame loss rate of at least one CAN message based on the number of CAN messages of each ID card identification number on the receiving channels of different channel identifications.
[0057] In a specific implementation, the device determines the number of CAN messages with each identification number on receiving channels identified by different channel identifiers; subtracts the number of messages on at least two receiving channels whose numbers are not zero and takes the absolute value to obtain a first difference; and determines the quotient of the first difference and the number of messages on a first receiving channel of the at least two receiving channels as the frame loss rate of the CAN messages on the first receiving channel. If the at least two receiving channels include three or more receiving channels, the difference is determined by subtracting each of the two receiving channels.
[0058] The number of CAN messages of each identity identification number on receiving channels with different channel identifiers may include the number of CAN messages of one identity identification number on receiving channels with different channel identifiers.
[0059] For example, the device confirms that the CAN message with the identity identification number CANID1 has 2 messages on the receiving channel of channel 1 and 2 messages on the receiving channel of channel 2, then the first difference is |2-2|=0; further, the frame loss rate of the CAN message with the identity identification number CANID1 on channel 1 is 0÷2×100%=0%; the frame loss rate of the CAN message with the identity identification number CANID1 on channel 2 is 0÷2×100%=0%.
[0060] Step S104: confirming the delay time of the at least one CAN message based on the identity identification number, channel identification and timestamp of each CAN message.
[0061] In some embodiments, the device can pre-determine whether the CAN message is a routing message, and in response to the CAN message being a routing message, confirm the delay time of the at least one CAN message based on the identity identification number, channel identification and timestamp of the CAN message.
[0062] In some embodiments, the apparatus groups CAN messages with the same identification number based on a channel identifier of a receiving channel; and confirms a delay time of at least two CAN messages in each group based on timestamps of the at least two CAN messages.
[0063] In a specific implementation, the device can group CAN messages based on the timestamp of a CAN message with an identity number and the channel identifier of the receiving channel. When grouping, at least two messages with adjacent timestamps and different channel identifiers are confirmed to be a group, and the messages in each group are different from the messages in other groups.
[0064] Furthermore, when determining the delay time, the device confirms the absolute value of the difference between the basic timestamp and other timestamps in each group; and confirms the maximum absolute value of the difference in all groups as the delay time of the at least one CAN message.
[0065] In some optional embodiments, after confirming the frame loss rate and the delay time, the apparatus may further record the frame loss rate of the at least one CAN message and the delay time of the at least one message in an analysis report.
[0066] In this way, the data processing method provided by the embodiment of the present disclosure is compared with the traditional new energy real vehicle CAN gateway routing test process, which can only obtain the frame loss rate and delay time of the real vehicle CAN gateway routing by manually analyzing the Trace data. The present disclosure uses a computer to analyze the Trace file to extremely quickly obtain the frame loss rate and delay time of the new energy real vehicle CAN gateway routing, greatly improving the efficiency of vehicle design and testing.
[0067] Figure 2 Another optional flow chart of the data processing method provided by the embodiment of the present disclosure is shown, and will be explained according to each step.
[0068] Step S201: import the trace file including the CAN messages of each network segment of the actual vehicle.
[0069] In some embodiments, in addition to valid lines such as CANID, timestamp, and receiving channel, the Trace file also includes auxiliary lines such as comment text, and various data are saved in the Trace file in text form.
[0070] Step S202: read each line of data in the Trace file and record the CANID, channel identifier, and timestamp of each message.
[0071] In some embodiments, the data processing device uses regular expressions to obtain valid line data of the Trace file, and then obtains CANID, timestamp, channel identification of the receiving channel and other contents from the valid line through regular expressions, and saves them in a structure array, wherein the structure members include CANID, timestamp list, and channel identification of the receiving channel.
[0072] The contents of the trace file can be as follows:
[0073] date 11 / 3 / 202211:16:4.742
[0074] base hex timestamps absolute
[0075]
[0076] The device can be obtained based on a regular expression, the CANID is 0CFF0827x, the channel identifiers of the receiving channels are channel 1 and channel 2, and the timestamps are 4.030043, 4.030053, 4.045053 and 4.045047.
[0077] In some embodiments, the apparatus may determine the frame loss rate and delay time based on the CANID, the timestamp, and the channel identifier of the receiving channel, which may specifically include:
[0078] Step S203: Analyze the frame loss rates of CAN messages in the source network segment and the target network segment.
[0079] In some embodiments, the device counts the number of each CANID on the corresponding receiving channel; performs a difference on each channel whose CANID number is not 0 to obtain the absolute value of the difference; divides the absolute value of the difference by the number of CANIDs, and then multiplies it by 100% to obtain the frame loss rate of the corresponding channel.
[0080] In a specific implementation, for a CAN message with a CAN ID of 0CFF0827x, two frames of messages are included on channel 2 and two frames of messages are included on channel 1. The absolute value of the difference between the message data of channel 2 and channel 1 (the first difference) is |2-2|=0.
[0081] For channel 1, the absolute value of the difference / the number of CANIDs * 100% = 0 / 2 * 100% = 0%; for channel 2, the absolute value of the difference / the number of CANIDs * 100% = 0 / 2 * 100% = 0%;
[0082] Step S204: Analyze the delay time of the CAN message in the source network segment and the target network segment.
[0083] In some embodiments, the device traverses each CANID and counts its number in each channel; determines whether it is a routing message; for a routing message, calculates the basic time for sending the message; traverses the timestamp list of each channel, and calculates the absolute value of the difference between each item in the timestamp list and the basic time; and uses the maximum value of the calculated absolute value of the difference as the routing delay time of the CAN message.
[0084] In some embodiments, if there is a CAN message of a certain CANID in receiving channels with different channel identifiers, the CAN message is a routing message.
[0085] In some embodiments, the apparatus groups CAN messages with the same CAN ID, confirming that at least two messages with adjacent timestamps and different channel identifiers are grouped together, and that the messages in each group are different from the messages in other groups; for example, the first group of messages is:
[0086]
[0087] The second set of messages is:
[0088]
[0089] For the first group of routing messages, the base time is the timestamp 4.030053 of channel 1; for the second group of routing messages, the base time is the timestamp 4.045047 of channel 1.
[0090] For the first group of routing messages, the absolute value of the difference between the base time and other timestamps is |4.030053-4.030043|=0.00001.
[0091] For the second group of routing messages, the absolute value of the difference between the base time and other timestamps = |4.045047-4.045053| = 0.000006.
[0092] The maximum value of 0.00001 and 0.000006 is 0.00001, which is taken as the maximum routing delay time in the trace file for CAN ID 0CFF0827x.
[0093] Step S205: Writing the analysis results of the frame loss rate and delay time into an analysis report file.
[0094] In some embodiments, the device may further record the analysis results of the frame loss rate and delay time in an analysis report file, for example:
[0095] CANID Frame loss rate Delay time 0CFF0827x 0% 0.00001s
[0096] In this way, the data processing method provided by the embodiment of the present disclosure is compared with the traditional new energy real vehicle CAN gateway routing test process, which can only obtain the frame loss rate and delay time of the real vehicle CAN gateway routing by manually analyzing the Trace data. The present disclosure uses a computer to analyze the Trace file to extremely quickly obtain the frame loss rate and delay time of the new energy real vehicle CAN gateway routing, greatly improving the efficiency of vehicle design and testing.
[0097] Next, based on an actual operation example, the above steps S101 to S104 and steps S201 to S205 are explained.
[0098] After importing the trace file containing the following content into the device running the parsing program:
[0099] date 11 / 3 / 202211:16:4.742
[0100] base hex timestamps absolute
[0101]
[0102] The processor CPU (or the above-mentioned data processing device) runs the regular expression "\d+\.\d{6}+\d+\w{8,}+\w{1}x+d\d" to obtain valid lines of the trace file. The obtained valid behavior is:
[0103]
[0104] The CPU traverses each valid line and obtains the timestamps [4.030043, 4.030053, 4.045053, 4.04504] using the regular expression "\d+\.\d{6}", the receiving channel [2,1] using the regular expression "\d+\.\d{6}+\d", and the CAN ID 0CFF0827x using the regular expression "\w{7,}x".
[0105] The CPU executes a method for analyzing the frame loss rate, which includes the following steps:
[0106] Count the number of each CANID on the corresponding receiving channel, specifically including: CANID = 0CFF0827x, contains 2 frames of messages on channel 2, and contains 2 frames of messages on channel 1.
[0107] For each channel whose CAN ID number is not 0, perform a subtraction and obtain the absolute value of the difference. For example, if CANID = 0CFF0827x, the absolute value of the message data difference between channel 2 and channel 1 = |2-2| = 0. Divide the absolute value of the difference by the number of CAN IDs, then multiply by 100% to obtain the frame loss rate for the corresponding channel. For channel 1, the absolute value of the difference / the number of CAN IDs * 100% = 0 / 2 * 100% = 0%. For channel 2, the absolute value of the difference / the number of CAN IDs * 100% = 0 / 2 * 100% = 0%.
[0108] That is, the frame loss rate of channel 1 and channel 2 when CANID is 0CFF0827x is 0.
[0109] The CPU traverses each CAN ID and counts its number in each channel; CAN ID = 0CFF0827x, contains 2 frames in channel 1, and contains 2 frames in channel 2. In response to the CAN message with CAN ID = 0CFF0827x being a routing message, the basic time of sending the message is calculated:
[0110] For the first group of routing messages, the base time is the timestamp 4.030053 of channel 1; for the second group of routing messages, the base time is the timestamp 4.045053 of channel 1.
[0111] Traverse the timestamp list of each channel and calculate the absolute value of the difference between each item in the timestamp list and the base time; for the first group of routing messages, the absolute value of the difference between the base time and other timestamps = |4.030053-4.030043|=0.00001; for the second group of routing messages, the absolute value of the difference between the base time and other timestamps = |4.045047-4.045053|=0.000006.
[0112] The maximum value of the calculated absolute value of the difference is determined as the delay time of the CAN message; the maximum value 0.00001 of 0.00001 and 0.000006 is taken as the maximum routing delay time of CANID=0CFF0827x in the Trace file.
[0113] The processor CPU writes the analysis results of the frame loss rate and delay time into the analysis report file. By running the interface method of reading and writing Excel files, the analysis results are written into the file in a standard format:
[0114] CANID Frame loss rate Delay time 0CFF0827x 0% 0.00001s
[0115] Figure 3 An optional structural diagram of a data processing device provided by an embodiment of the present disclosure is shown, and will be explained according to each part.
[0116] In some embodiments, the data processing device 400 includes an acquiring unit 401 , a confirming unit 402 , a first processing unit 403 , and a second processing unit 404 .
[0117] The acquisition unit 401 is configured to acquire at least one controller area network (CAN) message;
[0118] Confirmation unit 402, used to confirm the identity identification number, channel identification and timestamp of each CAN message;
[0119] The first processing unit 403 is configured to determine a frame loss rate of at least one CAN message based on the identity identification number and channel identification of each CAN message;
[0120] The second processing unit 404 is configured to determine the delay time of the at least one CAN message based on the identity identification number, channel identification, and timestamp of each CAN message.
[0121] The acquisition unit 401 is specifically used to acquire a first file including at least one CAN message; acquire the at least one CAN message in the first file based on a regular expression; wherein, the first file includes a Trace file, and the at least one CAN message includes at least one CAN message from each network segment of the actual vehicle.
[0122] The confirmation unit 402 is specifically configured to obtain the identity identification number, channel identification and timestamp of each CAN message based on a regular expression.
[0123] The first processing unit 403 is specifically configured to determine the frame loss rate of at least one CAN message based on the number of messages on receiving channels identified by different channel identifiers for each identity card identification number.
[0124] The first processing unit 403 is specifically used to confirm the number of CAN messages of each identity identification number on the receiving channels of different channel identifiers; obtain a first difference based on the difference in the number of messages on at least two receiving channels whose numbers are not 0 and take the absolute value; confirm that the quotient of the first difference and the number of messages on the first receiving channel of the at least two receiving channels is the frame loss rate of the CAN message on the first receiving channel.
[0125] The second processing unit 404 is specifically used to group CAN messages with the same identity number based on the channel identifier of the receiving channel in response to the CAN message being a routing message; and confirm the delay time of the at least one CAN message based on the timestamps of at least two CAN messages in each group.
[0126] The second processing unit 404 is specifically configured to determine the absolute value of the difference between the basic timestamp and other timestamps in each group; and determine the maximum absolute value of the difference in all groups as the delay time of the at least one CAN message.
[0127] In some embodiments, the data processing device 400 may further include a recording unit 405 .
[0128] The recording unit 405 is configured to record the frame loss rate of the at least one CAN message and the delay time of the at least one message in the analysis report.
[0129] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
[0130] Figure 4 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments 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, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0131] like Figure 4 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0132] Multiple components in the electronic device 800 are connected to the I / O interface 805, including an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0133] The computing unit 801 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the data processing method. For example, in some embodiments, the data processing method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the data processing method described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the data processing method in any other appropriate manner (e.g., by means of firmware).
[0134] Various embodiments of the systems and techniques described herein 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), system-on-chip systems (SOCs), 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.
[0135] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can 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.
[0136] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. 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.
[0137] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer 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 computer. 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).
[0138] 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 having a graphical user interface or a 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), and the Internet.
[0139] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0140] It should be understood that the various forms of the 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 disclosed in this disclosure can be achieved. This is not a limitation herein.
[0141] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the present disclosure, "plurality" means two or more, unless otherwise specifically defined.
[0142] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A data processing method, characterized in that: The method comprises: Get at least one controller area network (CAN) message; Confirm the identity number, channel ID and timestamp of each CAN message; Determine the frame loss rate of at least one CAN message based on the identity identification number and channel identification of each CAN message; Determine the delay time of the at least one CAN message based on the identification number, channel identifier and timestamp of each CAN message, The determining the frame loss rate of at least one CAN message based on the identity identification number and the channel identification of each CAN message includes: Confirm the number of CAN messages of each identification number on the receiving channels of different channel identifications; A first difference is obtained by subtracting the number of messages on at least two receiving channels whose numbers are not zero and taking the absolute value; confirming that the quotient of the first difference and the number of messages on the first receiving channel of the at least two receiving channels is the frame loss rate of the CAN message on the first receiving channel, Determining the delay time of the at least one CAN message based on the identity identification number, channel identification, and timestamp of each CAN message includes: In response to the CAN message being a routing message, CAN messages with the same identity identification number are grouped based on the channel identification of the receiving channel; Confirm the absolute value of the difference between the base timestamp and other timestamps in each group; The maximum absolute value of the difference in all the groups is determined to be the delay time of the at least one CAN message.
2. The method according to claim 1, characterized in that The obtaining of at least one controller area network (CAN) message includes: Obtaining a first file including at least one CAN message; Obtaining the at least one CAN message in the first file based on a regular expression; Among them, the first file includes a Trace file, and the at least one CAN message includes at least one CAN message of each network segment of the actual vehicle.
3. The method according to claim 1 or 2, characterized in that The identification number, channel identifier and timestamp of each CAN message are confirmed, including: The identity identification number, channel identification and timestamp of each CAN message are obtained based on a regular expression.
4. The method according to claim 1, wherein The method further comprises: The frame loss rate of the at least one CAN message and the delay time of the at least one CAN message are recorded in the analysis report.
5. A data processing device, characterized in that: The device comprises: An acquisition unit, configured to acquire at least one controller area network (CAN) message; Confirmation unit, used to confirm the identity number, channel identifier and timestamp of each CAN message; A first processing unit, configured to determine a frame loss rate of at least one CAN message based on an identification number and a channel identifier of each CAN message; The second processing unit is configured to determine the delay time of the at least one CAN message based on the identity identification number, channel identification and timestamp of each CAN message, The first processing unit confirms the frame loss rate of at least one CAN message based on the identity identification number and the channel identification of each CAN message, including: Confirm the number of CAN messages of each identification number on the receiving channels of different channel identifications; A first difference is obtained by subtracting the number of messages on at least two receiving channels whose numbers are not zero and taking the absolute value; confirming that the quotient of the first difference and the number of messages on the first receiving channel of the at least two receiving channels is the frame loss rate of the CAN message on the first receiving channel, The second processing unit confirming the delay time of the at least one CAN message based on the identity identification number, channel identification, and timestamp of each CAN message includes: In response to the CAN message being a routing message, CAN messages with the same identity identification number are grouped based on the channel identification of the receiving channel; Confirm the absolute value of the difference between the base timestamp and other timestamps in each group; The maximum absolute value of the difference in all the groups is determined to be the delay time of the at least one CAN message.
6. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Link quality measurement method and device
CN115277463A
Mac Ping initiation method and system
CN1968149A