Data transmission consistency test method, device, equipment and storage medium
Patent Information
- Application Number
- CN202310408744.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-04-12
AI Technical Summary
[0004]本发明的主要目的在于提供一种数据传输一致性测试方法、装置、设备及存储介质,旨在解决现有技术数据传输缺失和错误的技术问题
[0039]本发明通过接收CAN模拟器连续发送的实时更新的CAN数据,得到原始CAN报文;通过MCU将原始CAN报文以文本方式进行打印,得到打印CAN报文;将原始CAN报文与打印CAN报文进行对比,得到对比结果;根据对比结果得到一致性测试结果。通过上述方式,将原始CAN报文与打印CAN报文进行对比,根据对比结果判断数据传输的一致性,解决数据传输缺失和错误的问题,提高数据传输质量,保证数据传输的完整性,提升车辆状态的数据情况分析。
Smart Images

Figure CN116527524B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission technology, and in particular to a data transmission consistency testing method, apparatus, device, and storage medium. Background Technology
[0002] With the rapid development of the new energy vehicle industry in recent years, the demand for T-BOX vehicle-mounted remote monitoring terminals will continue to increase. The T-BOX terminal acts as the vehicle's network exit, connecting the independent vehicle network environment to the internet, thus promoting the formation of the current vehicle-to-everything (V2X) network. It also monitors vehicle instrument panel information, battery information, motor information, and fault information. If the T-BOX terminal experiences data transmission abnormalities during vehicle alarms or accidents, it will directly affect the analysis of abnormal vehicle conditions and accident causes. Therefore, improving the data transmission quality of the T-BOX terminal and completing data transmission consistency testing during the research and development phase is of great significance.
[0003] In industry testing, only the normal transmission of raw data and the display and viewing of data on the monitoring platform are typically tested, without paying attention to the data transmission process. When the data transmission load increases or there is an abnormal network outage, data transmission will be lost, causing the vehicle ECU data to be unable to be uploaded to the data monitoring platform, thus affecting vehicle data monitoring. Summary of the Invention
[0004] The main objective of this invention is to provide a data transmission consistency testing method, apparatus, device, and storage medium, aiming to solve the technical problems of missing and erroneous data transmission in the prior art.
[0005] To achieve the above objectives, the present invention provides a data transmission consistency testing method. The data transmission consistency testing method is applied to an in-vehicle T-BOX, which includes an MCU and a data storage and network forwarding module. A CAN simulator is sequentially connected to the MCU, the data storage and network forwarding module, a monitoring platform server, and a terminal device. The method includes the following steps:
[0006] Receive the continuously updated CAN data sent by the CAN simulator in real time to obtain the original CAN message;
[0007] The MCU prints the original CAN message as text to obtain a printed CAN message, and transmits the printed CAN message to the terminal device to obtain a national standard CAN message and a display CAN message;
[0008] The original CAN message is compared with the printed CAN message to obtain the comparison result;
[0009] The consistency test results are obtained based on the comparison results.
[0010] Optionally, comparing the original CAN message with the printed CAN message to obtain a comparison result includes:
[0011] Obtain the data content of the printed CAN message, print and save the data content of the printed CAN message to obtain the printed CAN message text;
[0012] Obtain the data content of the original CAN message;
[0013] The printed CAN message text is automatically compared with the data content of the original CAN message using a Python applet to obtain the comparison result.
[0014] Optionally, obtaining the consistency test result based on the comparison result includes:
[0015] Determine whether there is any mismatched data in the comparison results;
[0016] If it exists, an error will be reported and the consistency test result will be determined to be inconsistent and the data transmission between the CAN simulator and the MCU will be faulty.
[0017] If it does not exist, then it is determined that the data transmission between the CAN simulator and the MCU is normal, and further it is determined whether the data transmission after the MCU is normal.
[0018] Optionally, the further determination of whether the data transmission after the MCU is normal includes:
[0019] Compare the national standard CAN message and the display CAN message with the print CAN message respectively;
[0020] If the data content of the national standard CAN message and the display CAN message are consistent with the data content of the printed CAN message, then the consistency test result is determined to be consistent and the data transmission is normal.
[0021] Optionally, after comparing the national standard CAN message and the display CAN message with the printed CAN message respectively, the method further includes:
[0022] If the data content of the national standard CAN message or the displayed CAN message is inconsistent with the data content of the printed CAN message, then the consistency test result is determined to be inconsistent and there is a data transmission failure.
[0023] Optionally, transmitting the printed CAN message to the terminal device to obtain the national standard CAN message and the display CAN message includes:
[0024] The MCU forwards the printed CAN message to the data storage and network forwarding module.
[0025] The printed CAN message is converted into a national standard format by the translation program of the data storage and network forwarding module to obtain a national standard CAN message. The data format of the printed CAN message is different from that of the national standard CAN message.
[0026] The national standard CAN message is sent to the monitoring platform server, so that the monitoring platform server converts the national standard CAN message into a display CAN message and sends it to the terminal device for display. The display CAN message is real-time log data of vehicle information, and the data format of the national standard CAN message and the display CAN message is the same.
[0027] Optionally, comparing the national standard CAN message and the display CAN message with the printed CAN message respectively includes:
[0028] Obtain the boundary values of the national standard CAN message, the display CAN message, and the print CAN message;
[0029] By testing the boundary values of the national standard CAN message, the display CAN message, and the print CAN message, it is determined whether the data content of the national standard CAN message and the display CAN message is consistent with the data content of the print CAN message.
[0030] If the boundary values are the same, then the data content is considered to be the same.
[0031] If the boundary values are inconsistent, the data content is determined to be inconsistent.
[0032] Furthermore, to achieve the above objectives, the present invention also proposes a data transmission consistency testing device, the data transmission consistency testing device comprising:
[0033] The receiving module receives the real-time updated CAN data continuously sent by the CAN simulator and obtains the original CAN message;
[0034] The printing module is used to print the original CAN message as text through the MCU to obtain the printed CAN message, and transmit the printed CAN message to the terminal device to obtain the national standard CAN message and the display CAN message;
[0035] The comparison module is used to compare the original CAN message with the printed CAN message to obtain the comparison result;
[0036] The results module is used to obtain consistency test results based on the comparison results.
[0037] Furthermore, to achieve the above objectives, the present invention also proposes a data transmission consistency testing device, which includes: a memory, a processor, and a data transmission consistency testing program stored in the memory and executable on the processor. The data transmission consistency testing program is configured to implement the steps of the data transmission consistency testing method described above.
[0038] Furthermore, to achieve the above objectives, the present invention also proposes a storage medium storing a data transmission consistency test program, wherein when the data transmission consistency test program is executed by a processor, it implements the steps of the data transmission consistency test method described above.
[0039] This invention obtains the original CAN message by receiving continuously updated CAN data from a CAN simulator; the MCU prints the original CAN message as text to obtain a printed CAN message; the original CAN message and the printed CAN message are compared to obtain a comparison result; and a consistency test result is obtained based on the comparison result. By comparing the original CAN message and the printed CAN message in this way, the consistency of data transmission is determined based on the comparison result, solving the problems of missing and erroneous data transmission, improving data transmission quality, ensuring data transmission integrity, and enhancing the analysis of vehicle status data. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of the structure of a data transmission consistency testing device for the hardware operating environment involved in the embodiments of the present invention;
[0041] Figure 2 This is a flowchart illustrating the first embodiment of the data transmission consistency testing method of the present invention;
[0042] Figure 3 This is a schematic diagram of the overall message transmission process in one embodiment of the data transmission consistency testing method of the present invention;
[0043] Figure 4 This is a flowchart illustrating the second embodiment of the data transmission consistency testing method of the present invention;
[0044] Figure 5 This is a flowchart illustrating the third embodiment of the data transmission consistency testing method of the present invention;
[0045] Figure 6 This is a schematic diagram of the specific message transmission process in three embodiments of the data transmission consistency test method of the present invention;
[0046] Figure 7This is a structural block diagram of the first embodiment of the data transmission consistency testing device of the present invention.
[0047] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0048] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0049] Reference Figure 1 , Figure 1 This is a schematic diagram of the data transmission consistency testing device for the hardware operating environment involved in the embodiments of the present invention.
[0050] like Figure 1 As shown, the data transmission consistency testing device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0051] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the data transmission consistency test equipment and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0052] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a data transmission consistency test program.
[0053] exist Figure 1In the data transmission consistency testing device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the data transmission consistency testing device of the present invention can be set in the data transmission consistency testing device, and the data transmission consistency testing device calls the data transmission consistency testing program stored in the memory 1005 through the processor 1001 and executes the data transmission consistency testing method provided in the embodiment of the present invention.
[0054] This invention provides a data transmission consistency testing method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the data transmission consistency testing method of the present invention.
[0055] In this embodiment, the data transmission consistency test method is applied to an in-vehicle T-BOX. The in-vehicle T-BOX includes an MCU and a data storage and network forwarding module. A CAN simulator is sequentially connected to the MCU, the data storage and network forwarding module, the monitoring platform server, and the terminal device. The data transmission consistency test method includes the following steps:
[0056] Step S10: Receive the real-time updated CAN data continuously sent by the CAN simulator to obtain the original CAN message.
[0057] It should be noted that the execution subject of this embodiment is a data transmission consistency testing device. The aforementioned data transmission consistency testing device can be an in-vehicle T-BOX. This embodiment does not impose specific limitations on this. This embodiment uses an in-vehicle T-BOX as an example for explanation.
[0058] As is understandable, the in-vehicle T-BOX, or Telematics Processor, is a type of in-vehicle remote monitoring terminal. The vehicle networking system comprises four parts: the main unit, the in-vehicle T-BOX, the mobile app, and the backend system. The main unit is primarily used for in-vehicle audio-visual entertainment and vehicle information display; the in-vehicle T-BOX is mainly used to communicate with the backend system or the mobile app, enabling the mobile app to display and control vehicle information. When a user sends a control command via the mobile app, the TSP backend sends a monitoring request instruction to the in-vehicle T-BOX. After receiving the control command, the vehicle sends a control message via the CAN bus to control the vehicle, and finally, the operation result is fed back to the user's mobile app. This function alone allows users to remotely start the vehicle, turn on the air conditioning, adjust the seat to a comfortable position, etc.
[0059] It should be noted that the CAN simulator simulates the raw data output of CAN communication, used to continuously send large amounts of real-time updated CAN data, with a CAN bus rate of over 90% and operation for 24 hours. The CAN simulator can be a VECTOR model, CANOE_6501. The bus jammer VH6501 is connected to the CANOE. The bus jammer VH6501 can perform specific interference on the CAN bus, including digital and analog interference, thereby simulating the interference situation during data transmission and determining the consistency of test data transmission.
[0060] Step S20: The original CAN message is printed as text using the MCU to obtain a printed CAN message, and the printed CAN message is transmitted to the terminal device to obtain a national standard CAN message and a display CAN message.
[0061] It should be noted that MCU, or Microcontroller Unit, also known as a single-chip microcomputer or microcontroller, is a chip-level computer that integrates a central processing unit with a reduced frequency and specifications, and peripheral interfaces such as memory, counters, USB, A / D converter, UART, PLC, DMA, and even LCD driver circuits onto a single chip. This allows for different combinations of control for different applications.
[0062] It is understandable that the information transmitted on the CAN bus is called a message, and the original CAN message contains real vehicle data.
[0063] It is worth noting that the MCU sequentially transmits the printed CAN message to the data storage and network forwarding module, the monitoring platform server, and the terminal device to obtain the national standard CAN message and the display CAN message.
[0064] It should be noted that the terminal device refers to a device that inputs programs and data to a computer or receives the computer's output processing results via communication facilities, such as a smartphone, tablet computer, laptop computer, or PDA, etc. This embodiment does not impose specific limitations on this.
[0065] Step S30: Compare the original CAN message with the printed CAN message to obtain the comparison result.
[0066] Step S40: Obtain the consistency test results based on the comparison results.
[0067] It should be noted that by comparing the data content of the original CAN message with that of the printed CAN message, if the data content is consistent, it indicates that there is no data loss or error, and the data transmission between the CAN simulator and the MCU is normal. Further judgment should be made on the data transmission after the MCU. If the data content is inconsistent, it indicates that there is a data transmission fault between the CAN simulator and the MCU, and specific fault location and repair are required.
[0068] like Figure 3 As shown, Figure 3 This embodiment of the data transmission consistency test method is illustrated in the overall process diagram of message transmission. In the diagram, the actual vehicle data sends the original CAN message DATA1 to the vehicle-mounted T-BOX. The vehicle-mounted T-BOX remote monitoring terminal is responsible for receiving the message, converting it to the national standard, and simultaneously sending the data to the monitoring platform server through the 4G network. The user will see the text log data on the terminal device as the displayed CAN message DATA4.
[0069] This embodiment obtains the original CAN message by receiving continuously updated CAN data from the CAN simulator; the MCU then prints the original CAN message as text to obtain the printed CAN message; the original CAN message and the printed CAN message are compared to obtain the comparison result; and the consistency test result is obtained based on the comparison result. By comparing the original CAN message and the printed CAN message in this way, the consistency of data transmission is determined based on the comparison result, resolving issues of missing and incorrect data transmission, improving data transmission quality, ensuring data transmission integrity, and enhancing the analysis of vehicle status data.
[0070] refer to Figure 4 , Figure 4 This is a flowchart illustrating the second embodiment of the data transmission consistency testing method of the present invention.
[0071] Based on the first embodiment described above, step S30 in the data transmission consistency test method of this embodiment includes:
[0072] Step S301: Obtain the data content of the printed CAN message, print and save the data content of the printed CAN message to obtain the printed CAN message text.
[0073] It should be noted that the vehicle-mounted T-BOX prints out the data content of the CAN message and saves it in a text file, thus obtaining the printed CAN message text.
[0074] Step S302: Obtain the data content of the original CAN message.
[0075] It should be noted that the data content of the original CAN message is the CAN message data on the vehicle. Printing the CAN message refers to printing the original CAN message in text format.
[0076] It is understandable that the data in the original CAN message is a large amount of real-time data that is continuously sent, and the original CAN message will continue to be sent even if its state does not change, while the data in the printed CAN message is only updated when the data in the original CAN message changes.
[0077] Step S303: The printed CAN message text is automatically compared with the data content of the original CAN message using a Python applet to obtain the comparison result.
[0078] It should be noted that the original CAN message data is set to be continuously updated, so that the printed CAN message data is also constantly updated.
[0079] It is worth noting that Python is a computer programming language that can be used to develop mini-programs. The Python mini-program mentioned above is a mini-program developed using Python.
[0080] Understandably, a small Python program is used to compare the printed CAN message text with the data content of the original CAN message, and the result is used to determine if there is any mismatch.
[0081] This embodiment obtains the data content of the printed CAN message, prints and saves it to obtain the printed CAN message text; it also obtains the data content of the original CAN message; and automatically compares the printed CAN message text with the data content of the original CAN message using a Python applet to obtain the comparison result. This method of automatically comparing the printed CAN message text with the data content of the original CAN message using a Python applet is simple and efficient.
[0082] refer to Figure 5 , Figure 5 This is a flowchart illustrating the third embodiment of the data transmission consistency testing method of the present invention.
[0083] Based on the first embodiment described above, step S40 in the data transmission consistency test method of this embodiment includes:
[0084] Step S401: Determine whether there is any mismatched data in the comparison results.
[0085] It should be noted that if the data transmission between the CAN simulator and the MCU is normal, the data content of the printed CAN message should be completely matched with that of the original CAN message. Therefore, the consistency of data transmission can be determined by whether there is any mismatch in the comparison results.
[0086] Step S402: If it exists, report an error and determine that the consistency test result is inconsistent and that there is a fault in the data transmission between the CAN simulator and the MCU.
[0087] It should be noted that if mismatched data is found in the comparison results, an error will be reported, indicating that the data transmission consistency test result is inconsistent, and there is a fault in the data transmission between the CAN simulator and the MCU, so the test cannot be passed.
[0088] Step S403: If it does not exist, then determine that the data transmission between the CAN simulator and the MCU is normal, and further determine whether the data transmission after the MCU is normal.
[0089] It should be noted that if no mismatched data appears in the comparison results, it indicates that the data transmission between the CAN simulator and the MCU is normal. However, it is still necessary to further determine whether the data transmission after the MCU is normal. When the data transmission after the MCU is normal, the data transmission consistency test results are consistent, and the test passes.
[0090] Furthermore, in order to test the data transmission path after the MCU, the further determination of whether the data transmission after the MCU is normal includes: comparing the national standard CAN message and the display CAN message with the printed CAN message respectively; if the data content of the national standard CAN message and the display CAN message are consistent with the data content of the printed CAN message, then the consistency test result is determined to be consistent and the data transmission is normal.
[0091] It is understandable that the GB CAN message is a message obtained by converting the printed CAN message into the GB standard format. The data of the GB CAN message is the data translated from the printed CAN message and sent to the monitoring platform server. The display CAN message is a message that displays real-time log data of vehicle information on the terminal device.
[0092] In practice, if the data content of the national standard CAN message and the displayed CAN message are consistent with the data content of the printed CAN message, it indicates that the transmission path between the MCU and the terminal device is normal and the data transmission consistency test has passed.
[0093] Furthermore, after comparing the national standard CAN message and the display CAN message with the printed CAN message respectively, the method further includes: if the data content of the national standard CAN message or the display CAN message is inconsistent with the data content of the printed CAN message, then the consistency test result is determined to be inconsistent and the data transmission has a fault.
[0094] It should be noted that if the data content of the national standard CAN message or the displayed CAN message is inconsistent with the data content of the printed CAN message, it indicates that there is a fault in the transmission path between the MCU and the terminal device, the data transmission consistency test fails, and further fault location is required.
[0095] Furthermore, the step of transmitting the printed CAN message to the terminal device to obtain a national standard CAN message and a display CAN message includes: forwarding the printed CAN message to the data storage and network forwarding module through the MCU; converting the printed CAN message into national standard format through the translation program of the data storage and network forwarding module to obtain a national standard CAN message, wherein the data format of the printed CAN message and the national standard CAN message are different;
[0096] The national standard CAN message is sent to the monitoring platform server, so that the monitoring platform server converts the national standard CAN message into a display CAN message and sends it to the terminal device for display. The display CAN message is real-time log data of vehicle information, and the data format of the national standard CAN message and the display CAN message is the same.
[0097] It should be noted that the MCU forwards the printed CAN messages to the LINUX system's data storage and network forwarding module. The LINUX system's translation program converts the printed CAN messages into the national standard format, resulting in national standard CAN messages. The data in the national standard CAN messages is the data translated from the printed CAN messages and sent to the monitoring platform server. The data content of the printed CAN messages, national standard CAN messages, and displayed CAN messages should be consistent.
[0098] It is worth noting that the data storage and network forwarding module can send national standard CAN messages to the monitoring platform server via the 4G network, and this embodiment does not impose specific restrictions on this.
[0099] Further, the step of comparing the national standard CAN message and the display CAN message with the printed CAN message includes: obtaining the boundary values of the national standard CAN message, the display CAN message, and the printed CAN message; determining whether the data content of the national standard CAN message and the display CAN message is consistent with the data content of the printed CAN message by testing the boundary values of the national standard CAN message, the display CAN message, and the printed CAN message; if the boundary values are consistent, the data content is considered consistent; if the boundary values are inconsistent, the data content is considered inconsistent.
[0100] It should be noted that, under ideal network conditions, checking the data content of the displayed CAN message is equivalent to checking the data content of the national standard CAN message. Checking the data content of the printed CAN message and the displayed CAN message can be tested by sending boundary values.
[0101] It is understandable that the boundary values of the national standard CAN message, the displayed CAN message, and the printed CAN message are compared round by round from the minimum boundary value to the maximum boundary value to determine whether the data content is consistent.
[0102] like Figure 6 As shown, Figure 6 This embodiment of the data transmission consistency test method is illustrated in the following diagram: The CAN simulator sends the original CAN message DATA1 to the vehicle-mounted T-BOX. The MCU receives the message and prints it as the printed CAN message DATA2, which is then forwarded to the LINUX system of the data storage and network forwarding module. The translation program within the LINUX system converts the printed CAN message DATA2 into the national standard and simultaneously sends the national standard CAN message DATA3 to the monitoring platform server via the 4G network. After the monitoring platform server receives the national standard CAN message DATA3, the text log data displayed by the user on the terminal device will show the CAN message DATA4.
[0103] This embodiment determines whether there is mismatched data in the comparison results. If mismatched data is found, an error is reported, and the consistency test result is determined to be inconsistent, indicating a data transmission failure between the CAN simulator and the MCU. If mismatched data is not found, the data transmission between the CAN simulator and the MCU is determined to be normal, and further, the data transmission after the MCU is determined to be normal. This method, which judges the consistency test results based on the comparison of message data content, is simple to operate, highly efficient, solves the problems of missing and erroneous data transmission, improves data transmission quality, ensures data transmission integrity, and enhances the analysis of vehicle status data.
[0104] Reference Figure 7 , Figure 7This is a structural block diagram of the first embodiment of the data transmission consistency testing device of the present invention.
[0105] like Figure 7 As shown, the data transmission consistency testing device proposed in this embodiment of the invention includes:
[0106] The receiving module 10 receives the real-time updated CAN data continuously sent by the CAN simulator and obtains the original CAN message;
[0107] The printing module 20 is used to print the original CAN message as text through the MCU to obtain the printed CAN message, and to transmit the printed CAN message to the terminal device to obtain the national standard CAN message and the display CAN message;
[0108] The comparison module 30 is used to compare the original CAN message with the printed CAN message to obtain a comparison result;
[0109] Result module 40 is used to obtain consistency test results based on the comparison results.
[0110] This embodiment obtains the original CAN message by receiving continuously updated CAN data from the CAN simulator; the MCU then prints the original CAN message as text to obtain the printed CAN message; the original CAN message and the printed CAN message are compared to obtain the comparison result; and the consistency test result is obtained based on the comparison result. By comparing the original CAN message and the printed CAN message in this way, the consistency of data transmission is determined based on the comparison result, resolving issues of missing and incorrect data transmission, improving data transmission quality, ensuring data transmission integrity, and enhancing the analysis of vehicle status data.
[0111] In one embodiment, the comparison module 30 is further configured to acquire the data content of the printed CAN message, print and save the data content of the printed CAN message to obtain the printed CAN message text; acquire the data content of the original CAN message; and automatically compare the printed CAN message text with the data content of the original CAN message using a Python applet to obtain a comparison result.
[0112] In one embodiment, the result module 40 is further configured to determine whether there is mismatched data in the comparison results; if so, an error is reported and it is determined that the consistency test result is inconsistent and that there is a fault in the data transmission between the CAN simulator and the MCU; if not, it is determined that the data transmission between the CAN simulator and the MCU is normal, and further it is determined whether the data transmission after the MCU is normal.
[0113] In one embodiment, the result module 40 is further configured to, if not present, transmit the printed CAN message to the terminal device to obtain a national standard CAN message and a display CAN message; compare the national standard CAN message and the display CAN message with the printed CAN message respectively; if the data content of the national standard CAN message and the display CAN message is consistent with the data content of the printed CAN message, then determine that the consistency test result is consistent and the data transmission is normal.
[0114] In one embodiment, the result module 40 is further configured to determine that the consistency test result is inconsistent and that there is a data transmission failure if the data content of the national standard CAN message or the display CAN message is inconsistent with the data content of the printed CAN message.
[0115] In one embodiment, the result module 40 is further configured to forward the printed CAN message to the data storage and network forwarding module via the MCU; convert the printed CAN message into a national standard format via the translation program of the data storage and network forwarding module to obtain a national standard CAN message, wherein the data format of the printed CAN message and the national standard CAN message are different; and send the national standard CAN message to the monitoring platform server so that the monitoring platform server converts the national standard CAN message into a display CAN message and sends it to the terminal device for display, wherein the display CAN message is real-time log data of vehicle information, and the data format of the national standard CAN message and the display CAN message are the same.
[0116] In one embodiment, the result module 40 is further configured to acquire the boundary values of the national standard CAN message, the display CAN message, and the printed CAN message; by testing the boundary values of the national standard CAN message, the display CAN message, and the printed CAN message, determine whether the data content of the national standard CAN message and the display CAN message is consistent with the data content of the printed CAN message; if the boundary values are consistent, the data content is determined to be consistent; if the boundary values are inconsistent, the data content is determined to be inconsistent.
[0117] Furthermore, to achieve the above objectives, the present invention also proposes a data transmission consistency testing device, which includes: a memory, a processor, and a data transmission consistency testing program stored in the memory and executable on the processor. The data transmission consistency testing program is configured to implement the steps of the data transmission consistency testing method described above.
[0118] Since this data transmission consistency testing device adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0119] Furthermore, this embodiment of the invention also proposes a storage medium storing a data transmission consistency test program, which, when executed by a processor, implements the steps of the data transmission consistency test method described above.
[0120] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0121] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0122] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0123] In addition, for technical details not described in detail in this embodiment, please refer to the data transmission consistency test method provided in any embodiment of the present invention, which will not be repeated here.
[0124] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0125] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0126] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0127] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for testing data transmission consistency, characterized in that, The data transmission consistency testing method is applied to an in-vehicle T-BOX, which includes an MCU and a data storage and network forwarding module. A CAN simulator is sequentially connected to the MCU, the data storage and network forwarding module, the monitoring platform server, and the terminal device. The method includes: Receive the continuously updated CAN data sent by the CAN simulator in real time to obtain the original CAN message; The MCU prints the original CAN message as text to obtain a printed CAN message, and transmits the printed CAN message to the terminal device to obtain a national standard CAN message and a display CAN message; The original CAN message is compared with the printed CAN message to obtain the comparison result; The consistency test results are obtained based on the comparison results. The process of obtaining the consistency test result based on the comparison result includes: Determine whether there is any mismatched data in the comparison results; If it exists, an error will be reported and the consistency test result will be determined to be inconsistent and the data transmission between the CAN simulator and the MCU will be faulty. If not, it is determined that the data transmission between the CAN simulator and the MCU is normal, and further determined whether the data transmission after the MCU is normal; The further determination of whether the data transmission after the MCU is normal includes: Compare the national standard CAN message and the display CAN message with the print CAN message respectively; If the data content of the national standard CAN message and the display CAN message are consistent with the data content of the printed CAN message, then the consistency test result is determined to be consistent and the data transmission is normal.
2. The method as described in claim 1, characterized in that, The step of comparing the original CAN message with the printed CAN message to obtain the comparison result includes: Obtain the data content of the printed CAN message, print and save the data content of the printed CAN message to obtain the printed CAN message text; Obtain the data content of the original CAN message; The printed CAN message text is automatically compared with the data content of the original CAN message using a Python applet to obtain the comparison result.
3. The method as described in claim 1, characterized in that, After comparing the national standard CAN message and the display CAN message with the printed CAN message respectively, the process further includes: If the data content of the national standard CAN message or the displayed CAN message is inconsistent with the data content of the printed CAN message, then the consistency test result is determined to be inconsistent and there is a data transmission failure.
4. The method as described in claim 1, characterized in that, The step of transmitting the printed CAN message to the terminal device to obtain the national standard CAN message and the display CAN message includes: The MCU forwards the printed CAN message to the data storage and network forwarding module. The printed CAN message is converted into a national standard format by the translation program of the data storage and network forwarding module to obtain a national standard CAN message. The data format of the printed CAN message is different from that of the national standard CAN message. The national standard CAN message is sent to the monitoring platform server, so that the monitoring platform server converts the national standard CAN message into a display CAN message and sends it to the terminal device for display. The display CAN message is real-time log data of vehicle information, and the data format of the national standard CAN message and the display CAN message is the same.
5. The method as described in claim 1, characterized in that, The step of comparing the national standard CAN message and the display CAN message with the printed CAN message respectively includes: Obtain the boundary values of the national standard CAN message, the display CAN message, and the print CAN message; By testing the boundary values of the national standard CAN message, the display CAN message, and the print CAN message, it is determined whether the data content of the national standard CAN message and the display CAN message is consistent with the data content of the print CAN message. If the boundary values are the same, then the data content is considered to be the same. If the boundary values are inconsistent, the data content is determined to be inconsistent.
6. A data transmission consistency testing device, characterized in that, The data transmission consistency testing device includes: The receiving module receives the real-time updated CAN data continuously sent by the CAN simulator and obtains the original CAN message; The printing module is used to print the original CAN message as text through the MCU to obtain the printed CAN message, and transmit the printed CAN message to the terminal device to obtain the national standard CAN message and the display CAN message; The comparison module is used to compare the original CAN message with the printed CAN message to obtain the comparison result; The results module is used to obtain consistency test results based on the comparison results; The result module is also used to determine whether there is any mismatched data in the comparison results; If it exists, an error will be reported and the consistency test result will be determined to be inconsistent and the data transmission between the CAN simulator and the MCU will be faulty. If not, it is determined that the data transmission between the CAN simulator and the MCU is normal, and further determined whether the data transmission after the MCU is normal; Compare the national standard CAN message and the display CAN message with the print CAN message respectively; If the data content of the national standard CAN message and the display CAN message are consistent with the data content of the printed CAN message, then the consistency test result is determined to be consistent and the data transmission is normal.
7. A data transmission consistency testing device, characterized in that, The data transmission consistency testing device includes: a memory, a processor, and a data transmission consistency testing program stored in the memory and executable on the processor, wherein the data transmission consistency testing program is configured to implement the data transmission consistency testing method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores a data transmission consistency test program, which, when executed by a processor, implements the data transmission consistency test method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Automatic test method, device, terminal equipment and system for automobile central control
CN115687149A