Communication data test method and system, vehicle and storage medium
By conducting consistency automated testing of communication data between the vehicle and the cloud, the problems of low efficiency and insufficient reliability of manual testing in the prior art are solved, and higher test accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202411132576.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, the consistency verification of vehicle cloud data mainly relies on manual testing, and there are problems of poor subjectivity, low efficiency and insufficient reliability.
A communication data test method is proposed. By controlling the vehicle or cloud to send communication data, obtaining the parameters carried, and conducting consistency tests with preset reference parameters, it realizes automatic testing of the consistency of communication data between the vehicle and the cloud.
It realizes automated testing of consistency of communication data between vehicles and the cloud, reduces the subjectivity of human judgment, improves the accuracy and reliability of the test, quickly discovers data inconsistencies, and improves the testing efficiency.
Smart Images

Figure CN120075867A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle networking, and in particular to a method, a system, a vehicle and a storage medium for testing communication data. Background Art
[0002] Vehicle networking technology refers to the effective utilization of all vehicle dynamic information in an information network platform by in-vehicle devices on vehicles through wireless communication technology, providing different functional services during vehicle operation. Vehicle networking technology plays an increasingly important role in the fields of intelligent driving and intelligent transportation.
[0003] Ensuring the consistency of vehicle-cloud data is the key to vehicle networking technology and is of crucial significance for protecting the life and property safety of users. If the vehicle-cloud data is inconsistent, it may cause the vehicle to receive incorrect information, thus triggering traffic accidents, or it may cause the traffic management department to make incorrect decisions, exacerbating traffic congestion or affecting traffic order.
[0004] Currently, the automotive industry generally uses the method of manual testing to verify the consistency of vehicle-cloud data. The subjective differences among different testers are relatively large, and there may be different understandings and judgments on the same problem, resulting in deviations in test results. At the same time, manual testing may also be affected by personal factors such as fatigue and negligence, thus affecting the accuracy of test efficiency and the reliability of test results. Summary of the Invention
[0005] The present invention aims to at least solve one of the technical problems existing in the prior art. For this purpose, the object of the present invention is to propose a method, a system, a vehicle and a storage medium for testing communication data.
[0006] A method for testing communication data proposed by the present invention, where the communication data is the communication data between a vehicle and a cloud. The testing method includes: controlling a first end to send the communication data to a second end, where the first end is one of the vehicle and the cloud, and the second end is the other of the vehicle and the cloud; obtaining a first parameter carried in the communication data; obtaining a second parameter fed back by the second end, where the second parameter is generated by the second end in response to the communication data; and testing the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter.
[0007] According to the test method of communication data in an embodiment of the present invention, first control the first end to send communication data to the second end; then obtain the first parameter carried in the communication data and obtain the second parameter generated by the second end in response to the communication data; finally, test the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter, so as to complete the test of the communication data; thus, according to the method of the present invention, automatic testing of the consistency of communication data between a vehicle and the cloud can be realized. On the one hand, it can reduce the subjectivity of human judgment, reduce omissions and negligence, improve the accuracy and reliability of testing. On the other hand, by automatically processing a large amount of data, problems of inconsistent data can be quickly discovered, improving the testing efficiency and ensuring the stability of testing. In addition, the present invention directly collects vehicle data and cloud data for testing, and the data directly comes from the vehicle and the cloud, so the authenticity and accuracy of the data are higher, making the authenticity and accuracy of the testing also higher; on the other hand, the present invention can complete two-way interactive data testing from the vehicle to the cloud and from the cloud to the vehicle, further improving the testing efficiency, and making the test data richer and the test content more comprehensive, further improving the accuracy and reliability of testing.
[0008] In addition, the test method of communication data according to an embodiment of the present invention may further have the following additional technical features:
[0009] Further, the testing of the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter includes: when the first parameter, the second parameter and the preset reference parameter are consistent, determining that the consistency test of the communication data is successful; otherwise, determining that the consistency test of the communication data fails.
[0010] Further, after testing the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter, it further includes: outputting a test report, where the test report includes a test result.
[0011] Further, the first end is a vehicle, and the communication data includes periodic communication data and / or event-based communication data.
[0012] Further, before controlling the first end to send the communication data to the second end, it further includes: based on a preset test sequence, completing test configuration, generating the reference parameter; sending the reference parameter to the first end, so that the first end generates the communication data in response to the reference parameter.
[0013] Further, the completing test configuration based on a preset test sequence includes: converting the preset test sequence into test cases; configuring test scripts based on the test cases; loading the test cases and the test scripts into a test environment to complete test configuration.
[0014] Further, before controlling the first end to send the communication data to the second end, it further includes: generating the reference parameter based on the remote control instruction and / or the remote configuration instruction; sending the reference parameter to the first end so that the first end generates the communication data in response to the reference parameter.
[0015] Further, after sending the reference parameter to the first end, it further includes: detecting whether the reference parameter is successfully sent to the first end; if so, the first end generates the communication data in response to the reference parameter, otherwise, outputting a prompt message indicating that the sending fails.
[0016] Further, before controlling the first end to send the communication data to the second end, it further includes: verifying whether the identity information and the configuration parameter of the vehicle are correct; if so, controlling the first end to send the communication data to the second end, otherwise, outputting a prompt message indicating that the test fails.
[0017] In view of the above problems, the present invention further provides a test system for communication data, including: a sending module for controlling the first end to send the communication data to the second end, where the first end is one of a vehicle and a cloud, and the second end is the other of the vehicle and the cloud; a first obtaining module for obtaining a first parameter carried in the communication data; a second obtaining module for obtaining a second parameter fed back by the second end, where the second parameter is generated by the second end in response to the communication data; and a test module for testing the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter.
[0018] The test system for communication data according to an embodiment of the present invention first controls the first end to send communication data to the second end; then obtains the first parameter carried in the communication data and obtains the second parameter generated by the second end in response to the communication data; finally, tests the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter, thereby completing the test of the communication data; thus, the test system for communication data according to an embodiment of the present invention can realize the automated test of the consistency of the communication data between the vehicle and the cloud. On the one hand, it can reduce the subjectivity of human judgment, reduce omissions and negligence, and improve the accuracy and reliability of the test. On the other hand, by automatically processing a large amount of data, it can quickly discover problems of data inconsistency, improve the test efficiency, and ensure the stability of the test. In addition, the present invention directly collects vehicle data and cloud data for testing, and the data directly comes from the vehicle and the cloud, so the authenticity and accuracy of the data are higher, making the authenticity and accuracy of the test also higher; on the other hand, the present invention can complete the two-way interactive data test from the vehicle to the cloud and from the cloud to the vehicle, further improving the test efficiency, and making the test data richer and the test content more comprehensive, further improving the accuracy and reliability of the test.
[0019] In view of the above problems, the present invention also proposes a vehicle, including: the test system for communication data as described in the second aspect embodiment of the present invention above, or, the vehicle includes: a processor, a memory, and a communication data test program stored on the memory and executable on the processor, and when the communication data test program is executed by the processor, it realizes the communication data test method as described in the first aspect embodiment of the present invention above.
[0020] A vehicle according to an embodiment of the present invention uses the method provided in the above embodiment of the present invention to perform communication data testing. First, control the first end to send communication data to the second end; then obtain the first parameter carried in the communication data and obtain the second parameter generated by the second end in response to the communication data; finally, test the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter, so as to complete the testing of the communication data. Thus, the vehicle according to the embodiment of the present invention uses the method provided in the above embodiment of the present invention to perform communication data testing, which can realize the automated testing of the consistency of communication data between the vehicle and the cloud. On the one hand, it can reduce the subjectivity of human judgment, reduce omissions and negligence, and improve the accuracy and reliability of the testing. On the other hand, by automatically processing a large amount of data, it can quickly discover problems of data inconsistency, improve the testing efficiency, and ensure the stability of the testing. In addition, the present invention directly collects vehicle data and cloud data for testing, and the data directly comes from the vehicle and the cloud. Therefore, the authenticity and accuracy of the data are higher, making the authenticity and accuracy of the testing also higher. On the other hand, the present invention can complete the two-way interactive data testing from the vehicle to the cloud and from the cloud to the vehicle, further improving the testing efficiency, and making the testing data richer and the testing content more comprehensive, further improving the accuracy and reliability of the testing.
[0021] In view of the above existing problems, the present invention also proposes a computer-readable storage medium, on which a test program for communication data is stored. When the test program for communication data is executed by a processor, it implements the test method for communication data as described in the above first aspect embodiment of the present invention.
[0022] When the test program of communication data stored on a computer-readable storage medium according to an embodiment of the present invention is executed by a processor, it first controls a first end to send communication data to a second end; then obtains a first parameter carried in the communication data and a second parameter generated by the second end in response to the communication data; and finally tests the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter, so as to complete the test of the communication data. Thus, when the test program of communication data stored on a computer-readable storage medium according to an embodiment of the present invention is executed by a processor, it can realize the automated test of the consistency of communication data between a vehicle and the cloud. On the one hand, it can reduce the subjectivity of human judgment, reduce omissions and negligence, and improve the accuracy and reliability of the test. On the other hand, by automatically processing a large amount of data, it can quickly discover problems of data inconsistency, improve the test efficiency, and ensure the stability of the test. In addition, the present invention directly collects vehicle data and cloud data for testing, and the data directly comes from the vehicle and the cloud, so the authenticity and accuracy of the data are higher, making the authenticity and accuracy of the test also higher. On the other hand, the present invention can complete the two-way interactive data test from the vehicle to the cloud and from the cloud to the vehicle, further improving the test efficiency, and making the test data richer and the test content more comprehensive, further improving the accuracy and reliability of the test.
[0023] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be understood through the practice of the present invention. Description of the Drawings
[0024] The above and / or additional aspects and advantages of the present invention will become apparent and be readily understood from the following description of the embodiments in conjunction with the accompanying drawings, where:
[0025] Figure 1 is an architecture diagram of an automated test module according to a specific embodiment of the present invention;
[0026] Figure 2 is a flowchart of a test method for communication data according to an embodiment of the present invention;
[0027] Figure 3 is an overall process schematic diagram of a test method for communication data according to a specific embodiment of the present invention;
[0028] Figure 4 is a process schematic diagram of automated test for vehicle-to-cloud data consistency according to a specific embodiment of the present invention;
[0029] Figure 5 is a process schematic diagram of automated test for cloud-to-vehicle data consistency according to a specific embodiment of the present invention;
[0030] Figure 6It is a structural block diagram of a test system for communication data according to an embodiment of the present invention.
[0031] Reference numerals:
[0032] 100 - Test system for communication data; 1000 - Sending module; 1001 - First acquisition module; 1002 - Second acquisition module; 1003 - Test module. Detailed implementation manners
[0033] The embodiments of the present invention will be described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. The embodiments of the present invention will be described in detail below.
[0034] Reference will be made below to Figures 1-6 Describe a test method, system, vehicle and storage medium for communication data according to an embodiment of the present invention.
[0035] A test method for communication data according to an embodiment of the present invention, where the communication data is the communication data between a vehicle and a cloud.
[0036] In a specific embodiment, the test method for the communication data can be executed by an automated test module. The automated test module is configured by an operator as needed and is used to complete the automatic test of the communication data.
[0037] Figure 1 It is an architecture diagram of an automated test module according to a specific embodiment of the present invention. As Figure 1 shown, in a specific embodiment, the automated test module (Test Module) loads a test case (Test Case) file and a test script (Test Script) file into a test environment (Test Environment) file to complete the test setup (Test Setup for Test Modules) of the test module. After performing an automated test based on this setup, a test report (Test Report) containing test step analysis and test results is output. The test case file (Test Case) is converted from an automated test configuration table, in which the test sequence is configured. A web crawler (Web Spider) file and a configuration (Config) file are loaded in the test script (Test Script). In the web crawler (Web Spider) file, a python project is encapsulated into an executable file, which mainly processes the data of the background server. The configuration (Config) file is a test case parameter configuration file.
[0038] Figure 2 It is a flowchart of a test method for communication data according to an embodiment of the present invention. As Figure 2 shown, the test method for communication data specifically includes the following steps:
[0039] Step S1: Control the first end to send communication data to the second end, where the first end is one of the vehicle and the cloud, and the second end is the other of the vehicle and the cloud.
[0040] It is not difficult to understand that the communication data is two-way communication data between the vehicle and the cloud. Therefore, the test method for communication data provided by the embodiments of the present invention includes two test modes: the download test from the cloud to the vehicle and the report test from the vehicle to the cloud. Based on this, the communication data includes, but is not limited to, the reported communication data sent from the vehicle to the cloud and the downloaded communication data sent from the cloud to the vehicle. Thus, the embodiments of the present invention directly collect vehicle data and cloud data for testing, and the data directly comes from the vehicle and the cloud. Therefore, the authenticity and accuracy of the data are higher, making the authenticity and accuracy of the test also higher. Specifically, the reported communication data includes, for example, but is not limited to, periodic communication data and event-based communication data, and the downloaded communication data includes, for example, but is not limited to, remote control communication data and remote configuration communication data; the periodic communication data is periodically reported at a certain time interval, such as vehicle speed, etc., and the event-based communication data will only report the event to the background after being triggered by the vehicle, such as fault reporting, etc. The remote control communication data is mainly used for remote air conditioning heating, seat heating, etc., and the remote configuration communication data is mainly used for air conditioning parameter and engine parameter configuration, etc.
[0041] Specifically, the test method for communication data provided by the embodiments of the present invention includes a download test and a report test: in the download test, the first end is the cloud and the second end is the vehicle, and control the cloud to send the downloaded communication data to the vehicle; in the report test, the first end is the vehicle and the second end is the cloud, and control the vehicle to send the reported communication data to the cloud; thus, the transmission of the communication data is completed, facilitating the subsequent extraction of test parameters.
[0042] Step S2: Obtain the first parameter carried in the communication data.
[0043] In a specific embodiment, in the download test, the first end is the cloud, and the second end is the vehicle. The communication data sent by the first end includes, but is not limited to, the download communication data sent from the cloud to the vehicle. The download communication data includes, for example, but is not limited to, remote control communication data and remote configuration communication data. The first parameter carried in the communication data includes, for example, but is not limited to, the remote air - conditioning control parameter. In the reporting test, the first end is the vehicle, and the second end is the cloud. The communication data sent by the first end includes, but is not limited to, the reporting communication data sent from the vehicle to the cloud. The reporting communication data includes, for example, but is not limited to, periodic communication data and event - type communication data. The first parameter carried in the communication data includes, for example, but is not limited to, vehicle speed and warning information. Thus, the embodiments of the present invention can complete the two - way interactive data test between the vehicle and the cloud, further improve the test efficiency, and make the test data richer and the test content more comprehensive, further improving the accuracy and reliability of the test.
[0044] Specifically, by obtaining the first parameter in the communication data sent by the first end during the above - mentioned communication process, it serves as the basis for subsequent testing of the communication data, facilitating the testing of the communication data according to the first parameter.
[0045] Step S3: Obtain the second parameter fed back by the second end, where the second parameter is generated by the second end in response to the communication data.
[0046] In a specific embodiment, in the download test, the first end is the cloud, and the second end is the vehicle. The communication data sent by the first end includes, but is not limited to, the download communication data sent from the cloud to the vehicle. The download communication data includes, for example, but is not limited to, remote control communication data and remote configuration communication data. The first parameter carried in the communication data includes, for example, but is not limited to, the remote air - conditioning control parameter, and the second parameter includes, for example, but is not limited to, the feedback parameter generated by the vehicle in response to the download communication data. In the reporting test, the first end is the vehicle, and the second end is the cloud. The communication data sent by the first end includes, but is not limited to, the reporting communication data sent from the vehicle to the cloud. The reporting communication data includes, for example, but is not limited to, periodic communication data and event - type communication data. The first parameter carried in the communication data includes, for example, but is not limited to, vehicle speed and warning information, and the second parameter includes, for example, but is not limited to, the feedback parameter generated by the vehicle in response to the reporting communication data.
[0047] Specifically, by obtaining the second parameter generated by the second end in response to the communication data during the above - mentioned communication process, it further serves as the basis for subsequent testing of the communication data, facilitating the testing of the communication data by combining the second parameter with the first parameter.
[0048] Step S4: Test the consistency of the communication data according to the first parameter, the second parameter, and the preset reference parameter.
[0049] In a specific embodiment, the preset reference parameters include, for example, but are not limited to, a test sequence, and the test sequence includes, for example, but is not limited to, a test mode, test items, and a test order. Specifically, the preset reference parameters are configured by an operator as needed and are pre-input into the automated test module by the operator.
[0050] Specifically, a consistency test is performed on the first parameter in the communication data sent by the first end during the above-mentioned communication process, the second parameter generated by the second end in response to the communication data during the above-mentioned communication process, and the preset reference parameter, so as to complete the test of the communication data. By testing the communication data according to the method provided by the present invention, on the one hand, the subjectivity of human judgment can be reduced, omissions and oversights can be reduced, and the accuracy and reliability of the test are improved. On the other hand, by automatically processing a large amount of data, problems of data inconsistency can be quickly discovered, the test efficiency is improved, and the quality and stability of the test are improved.
[0051] Therefore, according to the method for testing communication data of an embodiment of the present invention, first, control the first end to send communication data to the second end; then obtain the first parameter carried in the communication data and the second parameter generated by the second end in response to the communication data; finally, perform a consistency test on the communication data according to the first parameter, the second parameter, and the preset reference parameter, so as to complete the test of the communication data. Therefore, according to the method of the present invention, the communication data between the vehicle and the cloud can be tested. On the one hand, the subjectivity of human judgment can be reduced, omissions and oversights can be reduced, and the accuracy and reliability of the test are improved. On the other hand, by automatically processing a large amount of data, problems of data inconsistency can be quickly discovered, the test efficiency is improved, and the quality and stability of the test are improved. In addition, the present invention directly collects vehicle data and cloud data for testing, and the data directly comes from the vehicle and the cloud, so the authenticity and accuracy of the data are higher, making the authenticity and accuracy of the test also higher. On the other hand, the present invention can complete the two-way interactive data test from the vehicle to the cloud and from the cloud to the vehicle, further improving the test efficiency, and making the test data richer and the test content more comprehensive, further improving the accuracy and reliability of the test.
[0052] In an embodiment of the present invention, after step S4 of performing a consistency test on the communication data according to the first parameter, the second parameter, and the preset reference parameter, it further includes: outputting a test report, and the test report includes a test result.
[0053] Specifically, a consistency test is performed on the first parameter in the communication data sent by the first end during the above-mentioned communication process, the second parameter generated by the second end in response to the communication data during the above-mentioned communication process, and the preset reference parameter, and a test report is output according to the test result, so as to facilitate the operator to intuitively view the test result.
[0054] In an embodiment of the present invention, step S4 tests the consistency of communication data according to a first parameter, a second parameter, and a preset reference parameter, including: when the first parameter, the second parameter, and the preset reference parameter are consistent, it is determined that the consistency test of the communication data is successful; otherwise, it is determined that the consistency test of the communication data fails.
[0055] Specifically, that is, a consistency test is performed on the first parameter in the communication data sent by the first end during the above-mentioned communication process, the second parameter generated by the second end in response to the communication data during the above-mentioned communication process, and the preset reference parameter. When the first parameter, the second parameter, and the preset reference parameter are consistent, it is determined that the consistency test of the communication data is successful. When the first parameter, the second parameter, and the preset reference parameter are inconsistent, it is determined that the consistency test of the communication data fails, thereby completing the test of the communication data.
[0056] Therefore, by testing the communication data according to the method provided by the present invention, on the one hand, the subjectivity of human judgment can be reduced, omissions and negligence can be reduced, and the accuracy and reliability of the test are improved. On the other hand, by automatically processing a large amount of data, problems of data inconsistency can be quickly discovered, the test efficiency is improved, and the quality and stability of the test are improved.
[0057] In an embodiment of the present invention, the first end is a vehicle, and the communication data includes periodic communication data and / or event-based communication data.
[0058] Specifically, in the reporting test, the first end is a vehicle, and the second end is the cloud. The vehicle is controlled to send the reporting communication data to the cloud. The reporting communication data includes periodic communication data and / or event-based communication data. Specifically, the periodic communication data is reported periodically at a certain time interval, such as vehicle speed, etc. The event-based communication data will only report the event to the background after being triggered by the vehicle, such as fault reporting, etc.
[0059] Thus, in the reporting test, first, the vehicle is controlled to send periodic communication data and / or event-based communication data to the cloud; then, the first parameter carried in the periodic communication data and / or event-based communication data is obtained, and the second parameter generated by the cloud in response to the periodic communication data and / or event-based communication data is obtained; finally, the consistency of the remote control communication data and / or remote configuration communication data is tested according to the first parameter, the second parameter, and the preset reference parameter, thereby completing the test of the remote control communication data and / or remote configuration communication data.
[0060] Therefore, by testing the remote control communication data and / or the remote configuration communication data according to the method of the present invention, on the one hand, the subjectivity of human judgment can be reduced, omissions and negligence can be reduced, and the accuracy and reliability of the test can be improved. On the other hand, by automatically processing a large amount of data, problems of data inconsistency can be quickly discovered, the test efficiency can be improved, and the quality and stability of the test can be improved.
[0061] In an embodiment of the present invention, the first end is a vehicle. Before controlling the first end to send communication data to the second end, step S1 further includes: based on a preset test sequence, completing test configuration to generate reference parameters; sending the reference parameters to the first end so that the first end generates communication data in response to the reference parameters.
[0062] In a specific embodiment, the preset test sequence is configured by an operator as needed and pre-input into the automated test module. Specifically, the preset test sequence includes but is not limited to test modes, test items, and test orders.
[0063] Specifically, in the reporting test, the first end is a vehicle and the second end is the cloud. Before controlling the vehicle to send communication data to the cloud, first, based on the preset test sequence, determine the test items and test order, complete the test configuration, and generate reference parameters; then send the reference parameters to the vehicle to control the vehicle to generate communication data in response to the reference parameters; this is to facilitate subsequent control of the vehicle to send the communication data to the cloud to complete the transmission of the communication data, serving as the basis for subsequent testing of the communication data.
[0064] In an embodiment of the present invention, step S1, based on the preset test sequence, completes the test configuration, including: converting the preset test sequence into test cases; configuring test scripts based on the test cases; loading the test cases and test scripts into the test environment to complete the test configuration.
[0065] Specifically, referring to Figure 1 , the automated test module first converts the preset test sequence into a test case (TestCase) file; then configures a test script (Test Script) file based on the test case (Test Case) file; finally, loads the test case (Test Case) file and the test script (Test Script) file into the test environment (TestEnvironment) to complete the test setup; this is to facilitate subsequent sending of reference parameters to the first end so that the first end generates communication data in response to the reference parameters, and controlling the vehicle to send the communication data to the cloud to complete the transmission of the communication data, serving as the basis for subsequent testing of the communication data.
[0066] In one embodiment of the present invention, the first end is the cloud, and the communication data includes remote control instruction data and / or remote configuration instruction data for the vehicle.
[0067] Specifically, in the download test, the first end is the cloud, and the second end is the vehicle. The control cloud sends the download communication data to the vehicle. The download communication data includes remote control communication data and / or remote configuration communication data. Specifically, the remote control communication data is mainly applied to remote air-conditioning heating, seat heating, etc., and the remote configuration communication data is mainly applied to air-conditioning parameter and engine parameter configuration, etc.
[0068] Therefore, in the download test, first control the cloud to send remote control communication data and / or remote configuration communication data to the vehicle; then obtain the first parameter carried in the remote control communication data and / or remote configuration communication data, and obtain the second parameter generated by the vehicle in response to the remote control communication data and / or remote configuration communication data; finally, test the consistency of the remote control communication data and / or remote configuration communication data according to the first parameter, the second parameter and the preset reference parameter, so as to complete the test of the remote control communication data and / or remote configuration communication data.
[0069] Therefore, by testing the remote control communication data and / or remote configuration communication data according to the method of the present invention, on the one hand, it can reduce the subjectivity of human judgment, reduce omissions and negligence, and improve the accuracy and reliability of the test. On the other hand, by automatically processing a large amount of data, it can quickly discover problems of data inconsistency, improve the test efficiency, and improve the quality and stability of the test.
[0070] In one embodiment of the present invention, the first end is the cloud. Before controlling the first end to send communication data to the second end, step S1 further includes: generating a reference parameter based on the remote control instruction and / or remote configuration instruction; sending the reference parameter to the first end so that the first end generates communication data in response to the reference parameter.
[0071] In a specific embodiment, the remote control instruction and / or remote configuration instruction are configured by the operator as needed and are pre-input into the automated test module by the operator through a configuration script file, etc. Specifically, the remote control instruction includes but is not limited to remote air-conditioning heating, seat heating, etc., and the remote configuration instruction includes but is not limited to air-conditioning parameter and engine parameter configuration, etc.
[0072] Specifically, in the download test, the first end is the cloud, and the second end is the vehicle. Before controlling the cloud to send communication data to the vehicle, reference parameters are generated based on remote control instructions and / or remote configuration instructions; then the reference parameters are sent to the cloud, and the cloud is controlled to generate communication data in response to the reference parameters; this facilitates subsequent control of the cloud to send the communication data to the vehicle, completing the transmission of the communication data and serving as the basis for subsequent testing of the communication data.
[0073] In an embodiment of the present invention, after sending the reference parameters to the first end, step S1 further includes: detecting whether the reference parameters are successfully sent to the first end; if so, the first end generates communication data in response to the reference parameters, otherwise, a prompt message indicating a failed transmission is output.
[0074] Specifically, after sending the reference parameters to the first end, it is then detected whether the reference parameters are successfully sent to the first end. If it is detected that the reference parameters are successfully sent to the first end, the first end generates communication data in response to the reference parameters; if it is detected that the reference parameters are not successfully sent to the first end, a message indicating a failed transmission is displayed; this visually reflects the error message for easy correction.
[0075] In an embodiment of the present invention, before controlling the first end to send communication data to the second end, step S1 further includes: verifying whether the vehicle's identity information and configuration parameters are correct; if so, controlling the first end to send communication data to the second end, otherwise, a prompt message indicating a failed test is output.
[0076] In a specific embodiment, the vehicle's identity information is the vehicle identification number (VIN). The first few digits and letters of the VIN represent the key information of the vehicle, specifically including: geographical manufacturing region, manufacturer, vehicle type, production year, and assembly plant. These information together constitute the core content of the vehicle identification number, providing important data support for vehicle identification, tracking, and management; by interpreting the VIN, details of vehicle manufacturing, including country of origin, production time, vehicle model, etc., can be quickly obtained, which has important reference value for vehicle history, maintenance records, and possible repair requirements.
[0077] Specifically, before controlling the first end to send communication data to the second end, it is first verified whether the vehicle's identity information and configuration parameters are correct. If the vehicle's identity information and configuration parameters are verified to be correct, the first end is controlled to send communication data to the second end; if the vehicle's identity information and configuration parameters are verified to be incorrect, a prompt message indicating a failed test is output; this ensures the security of communication data transmission and subsequent communication data testing, and at the same time visually reflects the error message for easy correction.
[0078] To facilitate a better understanding of the present invention, the following combination Figures 3-5, the test method of communication data in the embodiments of the present invention will be described in detail with specific embodiments.
[0079] Figure 3 is a schematic diagram of the overall process of the test method of communication data according to a specific embodiment of the present invention. As Figure 3 shown, in a specific embodiment, the test method of the communication data includes the following steps:
[0080] Step 1: Design the architecture of the automated test module.
[0081] Step 2: Automatically test the data consistency from vehicle to cloud.
[0082] Step 3: Automatically test the data consistency from cloud to vehicle.
[0083] In a specific embodiment, for the architecture design of the automated test module in Step 1, reference can be made to Figure 1 , as Figure 1 shown, TestEnvironment is a test environment file. Load the Test Case (test case file) and Test Script (test script file) into the test environment to complete the Test Setup for Test Modules (test setup for test modules). After performing automated testing based on this setup, a Test Report (test report) containing test step analysis and test results is output. The Test Case (test case file) is converted from an automated test configuration table, in which the test sequence is configured. The TestScript contains the written test script and loads the Web Spider and Config file. In the Web Spider, the python project is encapsulated as an executable file, mainly processing the data of the background server. Config is a test case parameter configuration file.
[0084] In a specific embodiment, in the automated test of vehicle-to-cloud data consistency in Step 2, the vehicle information reporting can be divided into two categories: periodic and event-based. The former is reported periodically at a certain time interval, such as vehicle speed, etc. The latter will report the event to the background only after being triggered by the vehicle, such as fault reporting, etc.
[0085] Figure 4 is a schematic diagram of the process of the automated test of vehicle-to-cloud data consistency according to a specific embodiment of the present invention. As Figure 4 shown, in a specific embodiment, the automated test of vehicle-to-cloud data consistency in Step 2 includes the following steps:
[0086] Step 21: Convert the Python processing signal list into an automated test case.
[0087] Step 22: Start running the test environment, trigger test execution, and establish a connection with the backend.
[0088] Step 23: Verify the vehicle five-code information and configuration file content.
[0089] Step 24: Trigger periodic and event information reporting respectively and detect whether the triggering is successful.
[0090] Step 25: Collect vehicle events and the parameters they carry, such as vehicle speed, warning information, etc.
[0091] Step 26: Collect corresponding events and their parameters on the cloud.
[0092] Step 27: Verify that the vehicle, cloud and basic data are consistent.
[0093] Step 28: Output the verification results through a report.
[0094] In a specific embodiment, in step 3, the cloud-to-vehicle data consistency automated test, the data sent from the cloud to the vehicle mainly includes remote control and remote configuration. Remote control is mainly used for remote air conditioning heating, seat heating, etc., and remote configuration is mainly used for air conditioning parameters and engine parameter configuration.
[0095] Figure 5 FIG. 1 is a flow chart of an automated test of data consistency from the cloud to the vehicle according to a specific embodiment of the present invention. Figure 5 As shown, in a specific embodiment, step 3, the automated test of cloud-to-vehicle data consistency includes the following steps:
[0096] Step 31: Start running the test environment, trigger test execution, and establish a connection with the background.
[0097] Step 32: Verify the vehicle five-code information and configuration file path.
[0098] Step 33: Trigger the cloud to send remote control or remote configuration instructions and detect whether the instructions are sent successfully.
[0099] Step 34: Collect the event type and parameters sent from the cloud, such as: remote air conditioning is successfully turned on.
[0100] Step 35: Collect vehicle CAN bus data such as: air conditioning mode is on.
[0101] Step 36: Automatically check whether the data in the cloud, CAN bus and basic data are consistent.
[0102] Step 37: Output the verification results through a report.
[0103] In summary, according to the method for testing communication data of an embodiment of the present invention, first control the first end to send communication data to the second end; then obtain the first parameter carried in the communication data and obtain the second parameter generated by the second end in response to the communication data; finally, test the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter, thereby completing the test of the communication data; thus, according to the method of the present invention, automatic testing of the consistency of communication data between a vehicle and the cloud can be realized. On the one hand, it can reduce the subjectivity of human judgment, reduce omissions and negligence, improve the accuracy and reliability of the test, and on the other hand, by automatically processing a large amount of data, quickly discover problems of inconsistent data, improve the test efficiency, and ensure the stability of the test. In addition, the present invention directly collects vehicle data and cloud data for testing, and the data directly comes from the vehicle and the cloud, so the authenticity and accuracy of the data are higher, making the authenticity and accuracy of the test also higher; on the other hand, the present invention can complete two-way interactive data testing from the vehicle to the cloud and from the cloud to the vehicle, further improving the test efficiency, and making the test data richer and the test content more comprehensive, further improving the accuracy and reliability of the test.
[0104] A further embodiment of the present invention also discloses a test system for communication data. Figure 6 It is a structural block diagram of a test system for communication data according to an embodiment of the present invention, as Figure 6 shown. The test system 100 for communication data includes a sending module 1000, a first obtaining module 1001, a second obtaining module 1002 and a testing module 1003.
[0105] Specifically, the sending module 1000 is used to control the first end to send communication data to the second end, where the first end is one of a vehicle and the cloud, and the second end is the other of the vehicle and the cloud.
[0106] The first obtaining module 1001 is used to obtain the first parameter carried in the communication data.
[0107] The second obtaining module 1002 is used to obtain the second parameter fed back by the second end, where the second parameter is generated by the second end in response to the communication data.
[0108] The testing module 1003 is used to test the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter.
[0109] In an embodiment of the present invention, the testing module 1003 is further used to: after testing the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter, output a test report, and the test report includes a test result.
[0110] In an embodiment of the present invention, the test module 1003 tests the consistency of communication data according to the first parameter, the second parameter, and a preset reference parameter, including: when the first parameter, the second parameter, and the preset reference parameter are consistent, determining that the consistency test of the communication data is successful; otherwise, determining that the consistency test of the communication data fails.
[0111] In an embodiment of the present invention, the first end is a vehicle, and the communication data includes periodic communication data and / or event-based communication data.
[0112] In an embodiment of the present invention, the first end is a vehicle, and the sending module 1000 is further configured to: before controlling the first end to send communication data to the second end, based on a preset test sequence, complete test configuration, generate a reference parameter; send the reference parameter to the first end so that the first end generates communication data in response to the reference parameter.
[0113] In an embodiment of the present invention, the sending module 1000 completes test configuration based on a preset test sequence, including: converting the preset test sequence into test cases; configuring test scripts based on the test cases; loading the test cases and test scripts into the test environment to complete the test configuration.
[0114] In an embodiment of the present invention, the first end is a cloud, and the communication data includes remote control instruction data and / or remote configuration instruction data for the vehicle.
[0115] In an embodiment of the present invention, the first end is a cloud, and the sending module 1000 is further configured to: before controlling the first end to send communication data to the second end, generate a reference parameter based on the remote control instruction and / or remote configuration instruction; send the reference parameter to the first end so that the first end generates communication data in response to the reference parameter.
[0116] In an embodiment of the present invention, the sending module 1000 is further configured to: after sending the reference parameter to the first end, detect whether the reference parameter is successfully sent to the first end; if so, enable the first end to generate communication data in response to the reference parameter; otherwise, output a prompt message indicating that the sending fails.
[0117] In an embodiment of the present invention, the sending module 1000 is further configured to: before controlling the first end to send communication data to the second end, verify whether the identity information and configuration parameters of the vehicle are correct; if so, control the first end to send communication data to the second end; otherwise, output a prompt message indicating that the test fails.
[0118] According to the communication data testing system 100 of the embodiments of the present invention, first control the first end to send communication data to the second end; then obtain the first parameter carried in the communication data and the second parameter generated by the second end in response to the communication data; finally, test the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter, so as to complete the test of the communication data; thus, the communication data testing system 100 according to the embodiments of the present invention can realize the automated test of the communication data consistency between the vehicle and the cloud. On the one hand, it can reduce the subjectivity of human judgment, reduce omissions and negligence, and improve the accuracy and reliability of the test. On the other hand, by automatically processing a large amount of data, it can quickly discover problems of data inconsistency, improve the test efficiency, and ensure the stability of the test. In addition, the present invention directly collects vehicle data and cloud data for testing, and the data directly comes from the vehicle and the cloud, so the authenticity and accuracy of the data are higher, making the authenticity and accuracy of the test also higher; on the other hand, the present invention can complete the two-way interactive data test from the vehicle to the cloud and from the cloud to the vehicle, further improving the test efficiency, and making the test data richer and the test content more comprehensive, further improving the accuracy and reliability of the test.
[0119] A further embodiment of the present invention also discloses a vehicle.
[0120] In some embodiments, the vehicle includes: the communication data testing system 100 described in any of the above embodiments of the present invention.
[0121] In other embodiments, the vehicle includes: a processor, a memory, and a communication data test program stored on the memory and executable on the processor. When the communication data test program is executed by the processor, it realizes the communication data test method described in any of the above embodiments of the present invention.
[0122] In a specific embodiment, the vehicle can be any one of an electric vehicle, a fuel vehicle or a hybrid vehicle.
[0123] For a vehicle according to an embodiment of the present invention, when performing communication data testing using the method provided in the above embodiments of the present invention, first control the first end to send communication data to the second end; then obtain the first parameter carried in the communication data and obtain the second parameter generated by the second end in response to the communication data; finally, test the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter, so as to complete the communication data testing; thus, for a vehicle according to an embodiment of the present invention, using the method provided in the above embodiments of the present invention to perform communication data testing can achieve automatic testing of the consistency of communication data between the vehicle and the cloud. On the one hand, it can reduce the subjectivity of human judgment, reduce omissions and negligence, and improve the accuracy and reliability of the testing. On the other hand, by automatically processing a large amount of data, it can quickly discover problems of data inconsistency, improve the testing efficiency, and ensure the stability of the testing. In addition, the present invention directly collects vehicle data and cloud data for testing, and the data directly comes from the vehicle and the cloud, so the authenticity and accuracy of the data are higher, making the authenticity and accuracy of the testing also higher; on the other hand, the present invention can complete two-way interactive data testing from the vehicle to the cloud and from the cloud to the vehicle, further improving the testing efficiency, and making the testing data richer and the testing content more comprehensive, further improving the accuracy and reliability of the testing.
[0124] A further embodiment of the present invention also discloses a computer-readable storage medium, on which a test program for communication data is stored. When the test program for communication data is executed by a processor, it implements the test method for communication data described in any of the above embodiments of the present invention.
[0125] When the test program of communication data stored on a computer-readable storage medium according to an embodiment of the present invention is executed by a processor, it first controls the first end to send communication data to the second end; then obtains the first parameter carried in the communication data and the second parameter generated by the second end in response to the communication data; finally, tests the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter, so as to complete the test of the communication data; thus, when the test program of communication data stored on a computer-readable storage medium according to an embodiment of the present invention is executed by a processor, it can realize the automated test of the consistency of communication data between a vehicle and the cloud. On the one hand, it can reduce the subjectivity of human judgment, reduce omissions and negligence, and improve the accuracy and reliability of the test. On the other hand, by automatically processing a large amount of data, it can quickly discover problems of data inconsistency, improve the test efficiency, and ensure the stability of the test. In addition, the present invention directly collects vehicle data and cloud data for testing, and the data directly comes from the vehicle and the cloud, so the authenticity and accuracy of the data are higher, making the authenticity and accuracy of the test also higher; on the other hand, the present invention can complete the two-way interactive data test from the vehicle to the cloud and from the cloud to the vehicle, further improving the test efficiency, and making the test data richer and the test content more comprehensive, further improving the accuracy and reliability of the test.
[0126] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example.
[0127] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and purposes of the present invention, and the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A communication data testing method, characterized in that: The communication data is the communication data between the vehicle and the cloud, and the testing method includes: Controlling a first end to send the communication data to a second end, wherein the first end is one of the vehicle and the cloud, and the second end is the other of the vehicle and the cloud; Acquire a first parameter carried in the communication data; Acquire a second parameter fed back by the second end, wherein the second parameter is generated by the second end in response to the communication data; The consistency of the communication data is tested according to the first parameter, the second parameter and a preset reference parameter.
2. The communication data testing method according to claim 1, characterized in that: The first end is a vehicle, and the communication data includes periodic communication data and / or event communication data.
3. The communication data testing method according to claim 2, characterized in that: Before controlling the first end to send the communication data to the second end, the method further includes: Based on a preset test sequence, complete the test configuration and generate the reference parameters; The reference parameter is sent to the first end, so that the first end generates the communication data in response to the reference parameter.
4. The communication data testing method according to claim 3, characterized in that: The test configuration is completed based on the preset test sequence, including: Convert preset test sequences into test cases; Configure a test script based on the test case; The test case and the test script are loaded into the test environment to complete the test configuration.
5. The communication data testing method according to claim 1, characterized in that: The first end is the cloud, and the communication data includes remote control instruction data and / or remote configuration instruction data for the vehicle.
6. The communication data testing method according to claim 5, characterized in that: Before controlling the first end to send the communication data to the second end, the method further includes: Based on the remote control instruction and / or the remote configuration instruction, generating the reference parameter; The reference parameter is sent to the first end, so that the first end generates the communication data in response to the reference parameter.
7. The communication data testing method according to claim 2 or 6, characterized in that: After sending the reference parameter to the first end, the method further includes: detecting whether the reference parameter is successfully sent to the first end; If so, the first end generates the communication data in response to the reference parameter; otherwise, a prompt message indicating that the transmission fails is output.
8. A communication data testing system, characterized in that: include: A sending module, used for controlling the first end to send the communication data to the second end, wherein the first end is one of the vehicle and the cloud, and the second end is the other of the vehicle and the cloud; A first acquisition module, used to acquire a first parameter carried in the communication data; A second acquisition module, configured to acquire a second parameter fed back by the second end, wherein the second parameter is generated by the second end in response to the communication data; A testing module is used to test the consistency of the communication data according to the first parameter, the second parameter and a preset reference parameter.
9. A vehicle, characterized in that: include: The communication data testing system as claimed in claim 8; or, A processor, a memory, and a communication data testing program stored in the memory and executable on the processor, wherein the communication data testing program, when executed by the processor, implements the communication data testing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a communication data testing program, and when the communication data testing program is executed by a processor, the communication data testing method according to any one of claims 1 to 7 is implemented.