Data flashing test method and device, vehicle, system and electronic equipment

The relay processing unit recognizes and generates fault messages for data flashing test, which solves the problem of difficult reproducing abnormal scenarios for data flashing failure, improves the test efficiency and success rate, and ensures the reliability of data flashing.

CN120416094APending Publication Date: 2025-08-01BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410146640.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-01
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the prior art, the abnormal scenarios of occasional or low-probability data flashing failure failure cannot be effectively reproduced and regression verification, resulting in the inability to analyze the cause of failure.

Method used

The relay processing unit recognizes the type of packet to be transmitted, and matches the target fault generation rules in the preset fault generation rule library, generates fault messages for data flushing test, simulates abnormal scenarios, and analyzes the cause of failure.

Benefits of technology

It has achieved intervention in the data flashing test process, created abnormal scenarios, improved testing efficiency, ensured the success rate of data flashing, and timely discovered and repaired bugs in the controller.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416094A_ABST
    Figure CN120416094A_ABST
Patent Text Reader

Abstract

The invention discloses a data flashing test method and device, a vehicle, a system and electronic equipment, and relates to the technical field of vehicles, and the method comprises the steps: receiving a to-be-transmitted message, and carrying out the recognition of the to-be-transmitted message; when it is determined that the identification result of the message type is a data flashing message, whether a target fault generation rule matched with first attribute information of the data flashing message exists or not is determined in a fault generation rule base preset in advance; and under the condition of determining that the target fault generation rule exists, performing fault generation processing on the data flashing message according to at least one fault generation mode in the target fault generation rule to obtain a fault message. Compared with the prior art, the data flashing message is subjected to fault generation processing through at least one fault generation mode in the target fault generation rule, intervention of data flashing is realized, an abnormal scene of data flashing is created, the fault message is obtained, the fault message is sent to the controller, and the fault generation processing is performed on the data flashing message. And the controller performs a data flashing test based on the fault message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of vehicles, and particularly to a test method and device for data writing, a vehicle, a system, and an electronic device. Background Art

[0002] Over-the-Air Technology (OTA) writing refers to remotely upgrading the software of an electronic device through a wireless network. In a vehicle, data writing generally refers to upgrading the software in the Electronic Control Unit (ECU) controller of the vehicle.

[0003] In order to improve the success rate of data writing, it is necessary to test data writing. Currently, the test method for data writing is that a host computer receives the writing message required for testing data writing and sends the writing message to the controller in a point-to-point manner, and the controller performs a test of data writing according to the writing message.

[0004] In the above test process, when data writing fails, it is necessary to analyze the reason for the failure of data writing. However, the generation of abnormal scenarios of data writing failure is accidental or has a low probability. Repeating the test of data writing may not be able to reproduce the abnormal scenario of data writing failure. Since the accidental or low-probability abnormal scenario of data writing failure cannot be effectively reproduced and regression verified, the reason for the failure of data writing cannot be analyzed. Summary of the Invention

[0005] The present disclosure provides a test method and device for data writing, a vehicle, a system, and an electronic device. Its main purpose is to solve the problem that the reason for the failure of data writing cannot be analyzed because the accidental or low-probability abnormal scenario of data writing failure cannot be effectively reproduced and regression verified.

[0006] According to a first aspect of the present disclosure, there is provided a test method for data writing, wherein the method is applied to a relay processing unit for processing data between a controller and a host computer, and includes:

[0007] Receiving a message to be transmitted sent by the host computer and identifying the type of the message to be transmitted;

[0008] When it is determined that the identification result of the message type is a data writing message, determining whether there is a target fault generation rule in a pre-set fault generation rule library that matches first attribute information of the data writing message, wherein second attribute information of the target fault generation rule is the same as the first attribute information and is used to generate a fault message corresponding to the data writing message according to a pre-set fault generation method;

[0009] When it is determined that the target fault generation rule exists, perform fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule to obtain a fault message;

[0010] Send the fault message to the controller so that the controller performs a data flashing test based on the fault message.

[0011] Optionally, after sending the fault message to the controller, the method further includes:

[0012] Receive a test result message sent by the controller based on the data flashing test performed on the fault message;

[0013] Transmit the test result message to the host computer so that the host computer analyzes the test result message.

[0014] Optionally, before determining whether there is a target fault generation rule that matches the first attribute information of the data flashing message, the method further includes:

[0015] Obtain the first attribute information of the data flashing message, and obtain the second attribute information of each fault generation rule in a pre-set fault generation rule library;

[0016] Compare the first attribute information with the second attribute of each fault generation rule to obtain a comparison result, so as to determine whether there is a target fault generation rule that matches the first attribute information of the data flashing message based on the comparison result.

[0017] Optionally, the performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule to obtain a fault message includes:

[0018] Receive a selection instruction for at least one fault generation method of the target fault generation rule;

[0019] Perform fault generation processing on the data flashing message according to at least one fault generation method corresponding to the selection instruction to obtain the fault message.

[0020] Optionally, the performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule to obtain a fault message includes:

[0021] According to the first attribute information of the data flashing message, look up at least one fault generation method in the target fault generation rule corresponding to the first attribute information from the fault generation rule library according to the pre-established correspondence between the attribute information and the fault generation method;

[0022] Perform fault generation processing on the data flashing message according to the at least one fault generation method found, to obtain the fault message.

[0023] Optionally, after performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule, the method further includes:

[0024] Obtain the target fault codes corresponding to the at least one fault generation method respectively;

[0025] Transmit the target fault codes to the host computer, so that the host computer analyzes the test result message obtained from the data flashing test based on the target fault codes.

[0026] According to a second aspect of the present disclosure, there is provided a method for testing data flashing, wherein the method is applied to a controller and includes:

[0027] Receive a fault message sent by a relay processing unit; the fault message is obtained by performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule when it is determined that the first attribute information of the data flashing message is consistent with the second attribute information in the target fault generation rule;

[0028] Call a pre-configured preset data flashing rule to analyze the fault message, to obtain a test result message; the preset data flashing rule is used to determine whether the fault message is executed according to the steps of data flashing and the cause fault code when it is determined that the steps of data flashing are not executed, and the cause fault code corresponds to the fault generation method;

[0029] Transmit the test result message to the relay processing unit, so that the relay processing unit transmits the test result message to the host computer, so that the host computer analyzes the test result message, and the host computer is used to send the flashing message to the relay processing unit.

[0030] According to a third aspect of the present disclosure, there is provided a method for testing data flashing, wherein the method is applied to a host computer and includes:

[0031] Obtain a message to be transmitted, and send the message to be transmitted to a relay processing unit; so that the relay processing unit performs fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule when it is determined that the message to be transmitted is a data flashing message and when it is determined that the first attribute information of the data flashing message is consistent with the second attribute information in the target fault generation rule, to obtain a fault message;

[0032] Receive the test result message transmitted by the relay processing unit. After the controller sends the test result message to the relay processing unit, the relay processing unit sends it to the host computer.

[0033] If the test result message is that the fault message conforms to the preset data writing rule, it is determined that there is an abnormality in the preset data writing rule, where the preset data writing rule is used to determine whether the fault message is executed according to the steps of data writing and the cause fault code when it is determined that the steps of data writing are not executed, and the cause fault code corresponds to the fault generation method.

[0034] Optionally, before receiving the test result message transmitted by the relay processing unit, the method further includes:

[0035] Receive the target fault code corresponding to the target fault generation rule transmitted by the relay processing unit.

[0036] Optionally, after receiving the test result message transmitted by the relay processing unit, the method further includes:

[0037] If the test result message is that the fault message does not conform to the preset data writing rule, compare the target fault code with the cause fault code in the test result message to obtain a comparison result;

[0038] The determination that there is an abnormality in the preset data writing rule includes:

[0039] If the comparison result is that the target fault code is inconsistent with the cause fault code, it is determined that the preset data writing rule is abnormal;

[0040] Output a prompt message indicating an abnormality in the preset data writing rule.

[0041] According to a fourth aspect of the present disclosure, there is provided a test device for data writing. The device is applied to a relay processing unit, and the relay processing unit is used to process data between a controller and a host computer, including:

[0042] An identification unit, configured to receive a message to be transmitted sent by a host computer and identify the message type of the message to be transmitted;

[0043] A first determination unit, configured to determine whether there is a target fault generation rule matching the first attribute information of the data writing message in a preset fault generation rule library when it is determined that the identification result of the message type is a data writing message, where the second attribute information of the target fault generation rule is the same as the first attribute information and is used to generate a fault message corresponding to the data writing message according to a preset fault generation method;

[0044] A processing unit, configured to, when it is determined that there is the target fault generation rule, perform fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message;

[0045] A first sending unit, configured to send the fault message to a controller, so that the controller performs a data writing test based on the fault message.

[0046] Optionally, the device further includes:

[0047] A receiving unit, configured to, after sending the fault message to the controller, receive a test result message sent by the controller based on the data writing test performed on the fault message;

[0048] A transmission unit, configured to transmit the test result message to the host computer, so that the host computer analyzes the test result message.

[0049] Optionally, the device further includes:

[0050] An obtaining unit, configured to obtain the first attribute information of the data writing message and obtain the second attribute information of each fault generation rule in a pre-set fault generation rule library before determining whether there is a target fault generation rule that matches the first attribute information of the data writing message;

[0051] A comparison unit, configured to compare the first attribute information with the second attributes of each fault generation rule respectively to obtain a comparison result, so as to determine whether there is a target fault generation rule that matches the first attribute information of the data writing message based on the comparison result.

[0052] Optionally, the processing unit includes:

[0053] A receiving module, configured to receive a selection instruction of at least one fault generation method of the target fault generation rule;

[0054] A processing module, configured to perform fault generation processing on the data writing message according to at least one fault generation method corresponding to the selection instruction to obtain the fault message.

[0055] Optionally, the processing unit is further configured to

[0056] According to the first attribute information of the data writing message, look up at least one fault generation method in the target fault generation rule corresponding to the first attribute information from the fault generation rule library according to the pre-established correspondence between the attribute information and the fault generation method;

[0057] Perform a fault generation process on the data flashing message according to the at least one fault generation method found, to obtain the fault message.

[0058] Optionally, the device further includes:

[0059] The obtaining unit is further configured to, after performing a fault generation process on the data flashing message according to at least one fault generation method in the target fault generation rule, respectively obtain target fault codes corresponding to the at least one fault generation method;

[0060] The transmission unit is further configured to transmit the target fault codes to the host computer, so that the host computer analyzes a test result message obtained from a data flashing test based on the target fault codes.

[0061] According to a fifth aspect of the present disclosure, there is provided a test device for data flashing, the device is applied to a controller, and includes:

[0062] A first receiving unit, configured to receive a fault message sent by a relay processing unit; the fault message is obtained by performing a fault generation process on the data flashing message according to at least one fault generation method in the target fault generation rule when it is determined that first attribute information of the data flashing message is consistent with second attribute information in the target fault generation rule;

[0063] An analysis unit, configured to call a pre-configured preset data flashing rule to analyze the fault message, to obtain a test result message; the preset data flashing rule is used to determine whether the fault message is executed according to the steps of data flashing and a cause fault code when it is determined that the steps of data flashing are not executed, and the cause fault code corresponds to the fault generation method;

[0064] A transmission unit, configured to transmit the test result message to the relay processing unit, so that the relay processing unit transmits the test result message to the host computer, so that the host computer analyzes the test result message, and the host computer is configured to send the flashing message to the relay processing unit.

[0065] According to a sixth aspect of the present disclosure, there is provided a test device for data flashing, the device is applied to a host computer, and includes:

[0066] A second sending unit, configured to obtain a message to be transmitted and send the message to be transmitted to a relay processing unit; so that the relay processing unit, when determining that the message to be transmitted is a data writing message and when determining that first attribute information of the data writing message is consistent with second attribute information in a target fault generation rule, performs fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message;

[0067] A second receiving unit, configured to receive a test result message transmitted by the relay processing unit, where the test result message is sent by a controller to the relay processing unit and then sent by the relay processing unit to the host computer;

[0068] A second determining unit, configured to determine that the preset data writing rule is abnormal when the test result message is that the fault message conforms to the preset data writing rule, where the preset data writing rule is used to determine whether the fault message is executed according to the steps of data writing and a cause fault code when it is determined that the steps of data writing are not executed, and the cause fault code corresponds to the fault generation method.

[0069] Optionally, the device further includes:

[0070] The second receiving unit is further configured to receive a target fault code corresponding to the target fault generation rule transmitted by the relay processing unit before receiving the test result message transmitted by the relay processing unit.

[0071] Optionally, the device further includes:

[0072] A comparison unit, configured to, after receiving the test result message transmitted by the relay processing unit, when the test result message is that the fault message does not conform to the preset data writing rule, compare the target fault code with the cause fault code in the test result message to obtain a comparison result;

[0073] The second determining unit is further configured to,

[0074] when the target fault code is inconsistent with the cause fault code, determine that the preset data writing rule is abnormal;

[0075] output a prompt message indicating that the preset data writing rule is abnormal.

[0076] According to a seventh aspect of the present disclosure, there is provided a test system for data writing, the system including a relay processing unit, a controller and a host computer, including:

[0077] The relay processing unit includes the test device for data writing as described in the fourth aspect of the present disclosure;

[0078] The controller includes a test device for data writing as described in the fifth aspect of the present disclosure;

[0079] The host computer includes a test device for data writing as described in the sixth aspect of the present disclosure.

[0080] According to an eighth aspect of the present disclosure, there is provided an electronic device, comprising:

[0081] At least one processor; and

[0082] A memory communicatively connected to the at least one processor; wherein,

[0083] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method described in the foregoing first aspect or the method described in the foregoing second aspect or the method described in the foregoing third aspect.

[0084] According to a ninth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method described in the foregoing first aspect or the method described in the foregoing second aspect or the method described in the foregoing third aspect.

[0085] According to a tenth aspect of the present disclosure, there is provided a computer program product including a computer program, and when the computer program is executed by a processor, the method described in the foregoing first aspect or the method described in the foregoing second aspect or the method described in the foregoing third aspect is implemented.

[0086] The test method and device for data flashing, vehicle, system, and electronic device provided by the present disclosure receive a message to be transmitted sent by a host computer and identify the message type of the message to be transmitted; when it is determined that the identification result of the message type is a data flashing message, it is determined whether there is a target fault generation rule that matches the first attribute information of the data flashing message in a pre-set fault generation rule library in advance, where the second attribute information of the target fault generation rule is the same as the first attribute information and is used to generate a fault message corresponding to the data flashing message according to a pre-set fault generation method; when it is determined that there is the target fault generation rule, the data flashing message is subjected to fault generation processing according to at least one fault generation method in the target fault generation rule to obtain a fault message; and the fault message is sent to a controller so that the controller performs a data flashing test based on the fault message. Compared with the related art, in the embodiment of the present disclosure, at least one fault generation method in the target fault generation rule in the relay processing unit is used to perform fault generation processing on the data flashing message, realizing the intervention in the test process of data flashing, creating an abnormal scenario of data flashing, obtaining a fault message, and sending the fault message to the controller. The controller performs a data flashing test based on the fault message, and then analyzes the cause of the data flashing failure.

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

[0088] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:

[0089] Figure 1 is a schematic flowchart of a test method for data flashing provided by an embodiment of the present disclosure;

[0090] Figure 2 is a schematic layout diagram of a host computer, a relay processing unit, and a controller provided by an embodiment of the present disclosure;

[0091] Figure 3 is a schematic flowchart example of a method for determining a target fault generation rule provided by an embodiment of the present disclosure;

[0092] Figure 4 is a schematic flowchart of another test method for data flashing provided by an embodiment of the present disclosure;

[0093] Figure 5 is a schematic flowchart of another test method for data flashing provided by an embodiment of the present disclosure;

[0094] Figure 6 Schematic flowchart of fault generation for data writing provided by an embodiment of the present disclosure;

[0095] Figure 7 Schematic flowchart of a test system for data writing provided by an embodiment of the present disclosure;

[0096] Figure 8 Schematic structural diagram of a test device for data writing provided by an embodiment of the present disclosure;

[0097] Figure 9 Schematic structural diagram of another test device for data writing provided by an embodiment of the present disclosure;

[0098] Figure 10 Schematic structural diagram of another test device for data writing provided by an embodiment of the present disclosure;

[0099] Figure 11 Schematic structural diagram of another test device for data writing provided by an embodiment of the present disclosure;

[0100] Figure 12 Schematic structural diagram of another test device for data writing provided by an embodiment of the present disclosure;

[0101] Figure 13 Schematic structural diagram of a test system for data writing provided by an embodiment of the present disclosure;

[0102] Figure 14 Schematic block diagram of an exemplary electronic device provided by an embodiment of the present disclosure. Detailed implementation manners

[0103] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0104] The following describes a test method, device, vehicle, system, and electronic device for data writing according to embodiments of the present disclosure with reference to the accompanying drawings.

[0105] Figure 1 Schematic flowchart of a test method for data writing provided by an embodiment of the present disclosure.

[0106] As Figure 1 shown, this method is applied to a relay processing unit, and the relay processing unit is used to process data between a controller and a host computer. This method includes the following steps:

[0107] Step 101: Receive the message to be transmitted sent by the host computer, and identify the message type of the message to be transmitted.

[0108] The relay processing unit is a component used to process data between the controller and the host computer, which can receive, forward, and process data. The host computer is a device in the vehicle electronic control system that is responsible for managing the electronic devices and communication buses in the vehicle to achieve the coordinated operation of each subsystem in the vehicle. The controller is used to control and manage various functions of the vehicle.

[0109] Data flashing refers to the process of copying data from one electronic device to another, which can be used for backing up, restoring, migrating, updating, or repairing data. For example, flashing a mobile phone, flashing a new operating system or customized firmware into the mobile phone to add functions or change system behavior; flashing a router, flashing a new firmware into the router to add functions or change router settings; OTA flashing, performing firmware upgrade or software update on the device through a wireless network, which can remotely update the firmware or software of the device without physical contact.

[0110] The data flashing in the embodiments of the present disclosure is illustrated by taking the OTA flashing of the vehicle as an example. However, it should be clear that this statement is not intended to limit that the data flashing can only be OTA flashing, and other data flashing methods are also possible.

[0111] The messages to be transmitted are divided into two types. One is the data flashing message, which is a message for modifying or diagnosing the software in the controller. The data flashing message is an intermittent demand message and is only sent when there is a demand. For example, when receiving an instruction that the software in the controller needs to be updated, the host computer will send a data message for software update to the controller; the other is the application message, which is a message for obtaining the function signals required by the vehicle. The application message is a continuous function message and is sent continuously after the vehicle is powered on. For example, after the vehicle is powered on, the host computer continuously sends an application message to the engine to obtain the engine speed; therefore, the data flashing message may modify the software of the controller, while the application message will not modify the software of the controller.

[0112] The data flashing message and the application message are two completely different messages. There is identification information of the message type in both the data flashing message and the application message. By identifying the identification information, it can be determined whether the message to be transmitted is a data flashing message or an application message. For example, the identification information of the data flashing message is a, the identification information of the application message is b, and the identification information of the message to be transmitted 1 is a. By identifying the identification information of the message to be transmitted 1, it can be determined that the message to be transmitted 1 is a data flashing message.

[0113] Since the data flashing message modifies the software of the controller, if an error occurs during the flashing process of the data flashing message, it may cause the software of the controller to crash, thereby affecting vehicle safety. The test of data flashing refers to the controller analyzing the received data flashing message to obtain a test result message, where the test result message includes whether there is an error in the data flashing message and the error reason in the case of determining that there is an error in the data flashing message; and sending the test result message to the host computer. If the test result is that there is an error in the data flashing message, the host computer stops sending the data flashing message and terminates the data flashing to avoid damaging the software of the controller. Through the test of data flashing, the controller's ability to identify whether there is an error in the data flashing message can be detected.

[0114] In the embodiment of the present disclosure, by connecting a relay processing unit between the host computer and the controller, and performing fault generation processing on the data flashing message through the relay processing unit, the test of data flashing can be improved. The relay processor receives the message to be transmitted sent by the host computer. Since the message to be transmitted includes a data flashing message and an application message, it is necessary to identify the message type of the message to be transmitted.

[0115] To facilitate a better understanding of the connection relationship between the host computer, the relay processing unit, and the controller, as Figure 2 shown, Figure 2 is a layout schematic diagram of a host computer, a relay processing unit, and a controller provided by an embodiment of the present disclosure. The host computer is connected to the relay processing unit, and the relay processing unit is connected to the controller. The host computer obtains the message to be transmitted for OTA flashing, and the host computer sends the message to be transmitted to the relay processing unit. The relay processing unit performs type identification on the message to be transmitted. When it is determined that the message type of the message to be transmitted is a data flashing message, the relay processing unit performs fault generation processing on the data flashing message to obtain a fault message, and the relay processing unit sends the fault message to the controller.

[0116] Step 102, when it is determined that the identification result of the message type is a data flashing message, determine whether there is a target fault generation rule in a pre-set fault generation rule library that matches the first attribute information of the data flashing message, where the second attribute information of the target fault generation rule is the same as the first attribute information and is used to generate a fault message corresponding to the data flashing message according to a pre-set fault generation method.

[0117] Specifically, the attribute information is the execution information of data flashing. The execution information is used to determine the execution time or opportunity of the data flashing message or the target fault generation rule. The target fault generation rule is a fault generation rule used to perform fault generation processing on the data flashing message. Among them, the target fault generation rule includes at least one fault generation method, and the fault generation method is used to simulate possible fault situations during the transmission of the data flashing message.

[0118] When it is determined that the recognition result of the message type is a data flashing message, the data flashing is divided into multiple steps. For example, the data flashing can be divided into four steps. Step 1: The host computer sends a data flashing message for pre-programming condition judgment to determine whether the controller meets the data flashing requirements; Step 2: The host computer sends a data flashing message to switch the mode of the controller to the programming mode to enable the control machine to update data in the programming mode; Step 3: The host computer sends a data refresh message to check the download address of the controller and the size of the updated software package for verifying the controller; Step 4: The host computer splits the updated software package into at least two data block data flashing messages and sends the at least two data block data flashing messages in the arranged order. Therefore, the types of data flashing messages in each step of the data flashing process may be different.

[0119] Since the types of data flashing messages in each step of the data flashing process may be different, the fault generation rules applied to the data flashing messages in each step are also different. The fault generation rule includes second attribute information and at least one fault generation method. The second attribute information is used to compare with the first attribute information of the data flashing message to determine whether the data flashing message is applicable to the fault generation rule. The fault generation method is used to perform fault generation processing on the data flashing message. For example, the fault generation methods in the fault generation rule corresponding to Step 4 include but are not limited to loss processing, multiple sending processing, mis-sending processing, and missing sending processing of the data flashing message.

[0120] For the sake of easy understanding, an example is provided. The fault generation rule 1 is used to perform fault generation processing on the data flashing message of the type in Step 2, and the fault generation rule 2 is used to perform fault generation processing on the data flashing message of the type in Step 4. Since the data flashing message of the type in Step 2 is very different from the data flashing message of the type in Step 4, the fault generation rule 1 can only perform fault generation processing on the data flashing message of the type in Step 2 and is not applicable to perform fault generation processing on the data flashing message of the type in Step 4. Similarly, the fault generation rule 2 is similar; therefore, in order to apply the target fault generation rule to the appropriate data flashing message, when it is determined that the recognition result of the message type is a data flashing message, it is necessary to determine whether the first attribute information of the data flashing message is consistent with the second attribute information in the target fault generation rule.

[0121] Step 103, when it is determined that the target fault generation rule exists, perform fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message.

[0122] The second attribute information is used to determine the execution timing or moment of the target fault generation rule. The fault generation rule includes at least one fault generation method, and each fault generation method is different.

[0123] In the prior art, for the test of data writing, the upper computer receives the writing message required for the test of data writing and sends the writing message to the controller in a point-to-point manner. The controller performs the test of data writing according to the writing message. A large number of tests are required to cause the fault generation of the data writing message. In the embodiment of the present disclosure, when it is determined that the first attribute information of the data writing message is consistent with the second attribute information in the target fault generation rule, the relay processing unit performs fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message. By performing fault generation processing on the data writing message through the relay processing unit to obtain a fault message, it can cause the fault generation of the data writing message in each data writing test, and improve the efficiency of the test of data writing.

[0124] To better understand the fault generation processing of the data writing message, an example is provided. The second step of data writing is to switch the mode of the controller to the programming mode. Only when the controller enters the programming mode can the software in the controller be updated. Normally, the second step of data writing is to send a data writing message for switching the mode of the controller to the programming mode. Since the data writing message in the embodiment of the present disclosure needs to pass through the relay processing unit, the relay processing unit can stop sending the data writing message for switching the mode of the controller to the programming mode, so that the mode of the controller cannot be switched to the programming mode. The relay processing unit can stop sending the data writing message for switching the mode of the controller to the programming mode as a fault generation method.

[0125] Step 104, send the fault message to the controller so that the controller performs a data writing test based on the fault message.

[0126] To enable the controller to perform a data rewrite test based on the fault message, the relay processing unit needs to send the fault message to the controller. The controller analyzes the fault message to obtain a test result message, which includes whether the controller complies with a preset data rewrite rule. The preset data rewrite rule is used to determine whether the fault message is executed according to the steps of data rewrite and the cause fault code when it is determined that the steps of data rewrite are not executed. The cause fault code corresponds to the fault generation method.

[0127] The data rewrite test method provided by the present disclosure receives a to-be-transmitted message sent by a host computer and identifies the message type of the to-be-transmitted message; when it is determined that the identification result of the message type is a data rewrite message, it is determined whether there is a target fault generation rule that matches the first attribute information of the data rewrite message in a pre-set fault generation rule library. The second attribute information of the target fault generation rule is the same as the first attribute information and is used to generate a fault message corresponding to the data rewrite message according to a preset fault generation method; when it is determined that the target fault generation rule exists, the data rewrite message is subjected to fault generation processing according to at least one fault generation method in the target fault generation rule to obtain a fault message; the fault message is sent to the controller so that the controller performs a data rewrite test based on the fault message. Compared with the related art, the embodiment of the present disclosure performs fault generation processing on the data rewrite message through at least one fault generation method in the target fault generation rule in the relay processing unit, realizes the intervention in the test process of data rewrite, creates an abnormal scenario of data rewrite, obtains a fault message, and sends the fault message to the controller. The controller performs a data rewrite test based on the fault message, and then analyzes the reason for the failure of data rewrite.

[0128] In practical applications, after the fault message is sent to the controller, the controller analyzes the fault message by invoking a pre-configured preset data rewrite rule to obtain a test result message, which needs to be transmitted to the host computer so that the host computer can analyze based on the test result message. This can be implemented in but not limited to the following manner. Since a relay processing unit is connected between the host computer and the controller, to transmit the test result message to the host computer, it needs to pass through the relay processing unit. Therefore, the relay processing unit receives the test result message obtained by the controller based on the data rewrite test of the fault message, but the relay processing unit only forwards the test result message without performing other processing, and transmits the test result message to the host computer so that the host computer can analyze the test result message.

[0129] Specifically, the pre-configured preset data writing rule is used to detect whether there is a fault in the data writing message (fault message). Exemplarily, the preset data writing rule is to detect whether there is a data writing message that maintains the programming mode in the data writing message (fault message). If there is no data writing message that maintains the programming mode in the data writing message (fault message), it is determined that the data writing message (fault message) has a fault.

[0130] Specifically, the test result message is the detection result of the controller based on the preset data writing message for the data writing message (fault message). Exemplarily, the data writing message (fault message) has a fault, and the reason for the fault is that there is no data writing message that maintains the programming mode in the data writing message (fault message).

[0131] In practical applications, before determining whether there is a target fault generation rule that matches the first attribute information of the data writing message, the pre-set fault generation rule library may contain multiple fault generation rules. Not every fault generation rule needs to be applied. Only the story generation rule that is adapted to the data writing message can be applied. Therefore, it is necessary to determine a target fault generation rule from multiple fault generation rules for application, which can be implemented by but not limited to the following methods, such as Figure 3 as shown Figure 3 is a flowchart example of a method for determining a target fault generation rule provided by an embodiment of the present disclosure, including:

[0132] Step 201, obtain the first attribute information of the data writing message, and obtain the second attribute information of each fault generation rule in the pre-set fault generation rule library.

[0133] The data writing messages in different steps correspond to different fault generation rules. Each data writing message in each step has first attribute information, and each fault generation rule has second attribute information. Among them, the attribute information includes information for determining the execution timing or moment of the target fault generation rule. For example, the first attribute information is executed in the second step of data writing, and the second attribute information is executed in the second step of data writing.

[0134] Exemplarily, the pre-set fault generation library in advance includes Fault Generation Rule 1 and Fault Generation Rule 2. The second attribute information of Fault Generation Rule 1 is executed when switching the programming mode of data flashing. The attribute information of Fault Generation Rule 2 is executed when transmitting the update software package for data flashing. Fault Generation Rule 1 includes Fault Generation Method 1 (3E 80 stop transmission), where 3E 80 is to switch the mode of the controller to the programming mode. Fault Generation Rule 2 includes Fault Generation Method 1 (message loss), Fault Generation Method 2 (message multiple transmission), Fault Generation Method 3 (message mistransmission), Fault Generation Method 4 (message omission), and Fault Generation Method 5 (message timing anomaly).

[0135] Step 202: Compare the first attribute information with the second attribute of each fault generation rule respectively to obtain a comparison result, so as to determine whether there is a target fault generation rule that matches the first attribute information of the data flashing message based on the comparison result.

[0136] To determine the target fault generation rule corresponding to the data flashing message, it is necessary to compare the first attribute information with the second attribute respectively, so as to determine the target fault generation rule corresponding to the data flashing message based on the comparison result. If the first attribute information is consistent with the second attribute information, it is determined that the data flashing message corresponding to the first attribute information and the fault generation rule corresponding to the second attribute information are executed in the same step. Therefore, it is necessary to determine the fault generation rule corresponding to the second attribute information as the target fault generation rule.

[0137] As a refinement of step 103, when performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule to obtain a fault message, it can be implemented by, but not limited to, the following methods: receiving a selection instruction for at least one fault generation method of the target fault generation rule; performing fault generation processing on the data flashing message according to at least one fault generation method corresponding to the selection instruction to obtain the fault message; for example, the fault generation methods of the target fault generation rule include stopping the transmission of the data flashing message that switches the mode of the controller to the programming mode and multiple transmission of the data flashing message that switches the mode of the controller to the programming mode. For the test of data flashing, when only detecting that the controller stops the transmission of the data flashing message that switches the mode of the controller to the programming mode, only select to stop the transmission of the data flashing message that switches the mode of the controller to the programming mode, and do not select multiple transmission of the data flashing message that switches the mode of the controller to the programming mode.

[0138] Specifically, the selection instruction can be any instruction capable of selecting the fault generation method in the target fault generation rule, and the selection instruction can select one or more fault generation methods. The selection instruction includes but is not limited to voice instructions and touch instructions.

[0139] Select a suitable fault generation method to more accurately simulate the possible fault conditions in the controller, so as to discover potential problems and vulnerabilities existing in the controller.

[0140] As an extension of the above embodiment, when performing fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message, it can also be implemented by but not limited to the following method. According to the first attribute information of the data writing message, in accordance with the pre-established correspondence between the attribute information and the fault generation method, at least one fault generation method in the target fault generation rule corresponding to the first attribute information is searched from the fault generation rule library; the fault generation processing is performed on the data writing message according to the at least one fault generation method found, to obtain the fault message. Instead of selecting the fault generation method, the fault generation method to be executed is determined according to the pre-established correspondence between the attribute information and the fault generation method.

[0141] Specifically, the pre-established correspondence between the attribute information and the fault generation method is to execute the fault generation rule according to the execution time or timing of the attribute information.

[0142] The pre-established correspondence between the attribute information and the fault generation method can simplify the operation process and improve the test efficiency.

[0143] Performing fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message can be implemented by any one of the above two embodiments.

[0144] In practical applications, after performing fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule, in order to detect whether the test result message of the controller for the fault message is correct, the host computer needs to obtain the target fault code corresponding to at least one fault generation method for which the fault generation processing is performed. This can be achieved by, but is not limited to, the following methods: respectively obtaining the target fault code corresponding to at least one fault generation method; transmitting the target fault code to the host computer so that the host computer can analyze the test result message obtained from the data writing test based on the target fault code. Among them, the test result message includes the cause fault code obtained by the controller analyzing the fault message, and the cause fault code corresponds to the fault generation method. By comparing the target fault code with the cause fault code, it can be determined whether the test result message is correct.

[0145] The above embodiments illustrate the test method for data writing applied to the relay processing unit. The following embodiments illustrate the application to the controller. Figure 4 FIG. is a schematic flowchart of another test method for data writing provided by an embodiment of the present disclosure.

[0146] As Figure 4 shown, this method is applied to the controller and includes the following steps:

[0147] Step 301, receiving a fault message sent by the relay processing unit; the fault message is obtained by performing fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule when it is determined that the first attribute information of the data writing message is consistent with the second attribute information in the target fault generation rule.

[0148] In order to detect the controller's ability to correctly identify the fault message, the relay processing unit performs fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message, and sends the fault message to the controller. The controller receives the fault message sent by the relay processing unit so that the controller can perform a data writing test based on the fault message.

[0149] Step 302, calling a pre-configured preset data writing rule to analyze the fault message to obtain a test result message; the preset data writing rule is used to determine whether the fault message is executed according to the steps of data writing and the cause fault code when it is determined that the steps of data writing are not executed. The cause fault code corresponds to the fault generation method.

[0150] The preset data flashing rule is used to determine whether the fault message is executed according to the steps of data flashing and the cause fault code when it is determined that the data flashing steps are not followed. The cause fault code corresponds to the fault generation method. However, there may be bugs in the preset data flashing rule. In some special scenarios, the error in the fault message cannot be identified, or the error in the fault message is identified, but the cause fault code is incorrectly identified. Therefore, by calling the pre-configured preset data flashing rule, the fault message is analyzed to obtain a test result message. According to the test result message, it can be judged whether there are bugs in the preset data flashing rule, and then the preset data flashing rule can be optimized.

[0151] Step 303: Transmit the test result message to the relay processing unit so that the relay processing unit can transmit the test result message to the host computer, and the host computer is used to analyze the test result message. The host computer is used to send the flashing message to the relay processing unit.

[0152] In order for the host computer to analyze the test result message, it is necessary to transmit the test result message to the relay processing unit so that the relay processing unit can transmit the test result message to the host computer. Among them, the host computer is used to send the flashing message to the relay processing unit. By transmitting the test result message to the relay processing unit and then enabling the relay processing unit to transmit the test result message to the host computer, the host computer can judge whether there are bugs in the preset data flashing rule, thereby providing help for optimizing the preset data flashing rule.

[0153] The test method for data writing provided by the present disclosure receives a message to be transmitted sent by a host computer and identifies the type of the message to be transmitted; when it is determined that the identification result of the message type is a data writing message, it is determined whether there is a target fault generation rule in a pre-set fault generation rule library that matches the first attribute information of the data writing message, where the second attribute information of the target fault generation rule is the same as the first attribute information and is used to generate a fault message corresponding to the data writing message according to a pre-set fault generation method; when it is determined that the target fault generation rule exists, the data writing message is subjected to fault generation processing according to at least one fault generation method in the target fault generation rule to obtain a fault message; and the fault message is sent to a controller so that the controller performs a data writing test based on the fault message. Compared with the related art, in the embodiment of the present disclosure, at least one fault generation method in the target fault generation rule in a relay processing unit is used to perform fault generation processing on a data writing message, realizing the intervention in the test process of data writing, creating an abnormal scenario for data writing, obtaining a fault message, and sending the fault message to the controller. The controller performs a data writing test based on the fault message, and then analyzes the reason for the failure of data writing.

[0154] The above embodiments illustrate the test method for data writing applied to a controller and the test method for data writing applied to a relay processing unit. The following embodiments illustrate the test method for data writing applied to a host computer. Figure 5 It is a schematic flowchart of another test method for data writing provided by an embodiment of the present disclosure.

[0155] As Figure 5 shown, this method is applied to a host computer and includes the following steps:

[0156] Step 401, obtain a message to be transmitted and send the message to be transmitted to a relay processing unit; so that when the relay processing unit determines that the message to be transmitted is a data writing message and determines that the first attribute information of the data writing message is consistent with the second attribute information in a target fault generation rule, the data writing message is subjected to fault generation processing according to at least one fault generation method in the target fault generation rule to obtain a fault message.

[0157] The host computer remotely obtains the message to be transmitted through OTA. However, it should be clear that this statement is not intended to limit the way of obtaining the message to be transmitted to only OTA, and it can also be obtained through other means. Among them, the messages to be transmitted are divided into two types. One is the data writing message, which is an intermittent demand message and is only sent when there is a demand. For example, when receiving an instruction to update the software in the controller, the host computer will send a data message for software update to the controller. The other is the application message, which is a continuous function message and is sent continuously after the vehicle is powered on. For example, after the vehicle is powered on, the host computer continuously sends an application message to the engine to obtain the engine speed.

[0158] Since a relay processing unit is connected between the host computer and the controller, in order to enable the message to be transmitted to reach the controller, the message to be transmitted needs to be sent to the relay processing unit first, and the relay processing unit forwards the message to be transmitted to the controller.

[0159] Step 402: Receive the test result message transmitted by the relay processing unit. After the test result message is sent from the controller to the relay processing unit, the relay processing unit sends it to the host computer.

[0160] Since a relay processing unit is connected between the host computer and the controller, in order to enable the test result message to be transmitted to the host computer, the controller needs to send the test result message to the relay processing unit, and the relay processing unit forwards the test result message to the host computer.

[0161] Step 403: If the test result message indicates that the fault message conforms to the preset data writing rule, it is determined that there is an abnormality in the preset data writing rule. Among them, the preset data writing rule is used to determine whether the fault message is executed according to the steps of data writing and the cause fault code when it is determined that the steps of data writing are not executed. The cause fault code corresponds to the fault generation method.

[0162] If the test result message indicates that the fault message conforms to the preset data writing rule, since the fault message is a message generated by the relay processing unit for fault generation, the fault message must be incorrect. And if the test result message indicates that the fault message conforms to the preset data writing rule, it is determined that there is an abnormality in the preset data writing rule, and a prompt message indicating that there is an abnormality in the preset data writing rule is output, so that developers can optimize the preset data writing rule according to the prompt message.

[0163] Exemplarily, if the fault message is a data writing message with multiple occurrences of messages, but when the preset data writing rule of the controller analyzes the data writing message with multiple occurrences of messages and does not find the fault of multiple occurrences of messages, the test result message obtained by the controller is that the data writing message with multiple occurrences of messages conforms to the preset data writing rule. Since there must be a fault in the data writing message with multiple occurrences of messages, but the controller believes that the data writing message with multiple occurrences of messages conforms to the preset data writing rule, it is determined that the preset data writing rule is abnormal and does not recognize the data writing message with multiple occurrences of messages as a fault message.

[0164] For better understanding of the process of generating faults in data writing, as Figure 6 shown, Figure 6 FIG. is a schematic diagram of a process for generating faults in data writing provided by an embodiment of the present disclosure. During data writing, the host computer sends a message to be transmitted to a relay processing unit, and the relay processing unit determines whether the message to be transmitted is a data writing message. If it is determined that the message to be transmitted is a data writing message, the execution timing or moment of the fault generation rule is judged. If it meets the execution timing or moment of the fault generation rule, the relay processing unit performs multiple transmissions, tampering, filtering, etc. on the data writing message and forwards the fault message to the controller; if it is determined that the message to be transmitted is an application message, the application message is transparently transmitted, that is, the application message is not processed at all and directly sent to the controller.

[0165] The data writing test method provided by the present disclosure receives a message to be transmitted sent by a host computer and identifies the message type of the message to be transmitted; when it is determined that the identification result of the message type is a data writing message, it is determined whether there is a target fault generation rule in a preset fault generation rule library that matches the first attribute information of the data writing message, where the second attribute information of the target fault generation rule is the same as the first attribute information and is used to generate a fault message corresponding to the data writing message according to a preset fault generation method; when it is determined that the target fault generation rule exists, the data writing message is subjected to fault generation processing according to at least one fault generation method in the target fault generation rule to obtain a fault message; the fault message is sent to the controller so that the controller performs a data writing test based on the fault message. Compared with the related art, the embodiment of the present disclosure performs fault generation processing on the data writing message through at least one fault generation method in the target fault generation rule in the relay processing unit, realizes the intervention in the data writing test process, creates an abnormal scenario for data writing, obtains a fault message, and sends the fault message to the controller. The controller performs a data writing test based on the fault message, and then analyzes the reason for the failure of data writing.

[0166] In practical applications, before receiving the test result message transmitted by the relay processing unit, in order to detect whether the test result message of the controller for the fault message is correct, the host computer needs to obtain the target fault code corresponding to at least one fault generation method for fault generation processing, and receive the target fault code corresponding to the target fault generation rule transmitted by the relay processing unit, so as to compare the cause fault code in the test result message based on the target fault code, and determine whether the test result message is correct.

[0167] In practical applications, after receiving the test result message transmitted by the relay processing unit, there may be other different conclusions in the test result message, including: if the test result message indicates that the fault message does not conform to the preset data writing rule, in this case, although the preset data writing rule analyzes that there is an error in the fault message, it is still necessary to analyze the reason for the error in the fault message. Therefore, it is necessary to compare the target fault code with the cause fault code in the test result message to obtain a comparison result. If the comparison result shows that the target fault code is inconsistent with the cause fault code, it means that the reason for the error in the fault message analyzed by the preset data writing rule is incorrect. Furthermore, it is determined that the preset data writing rule cannot correctly analyze the reason for the error in the fault message, and it is determined that the preset data writing rule is abnormal, and a prompt message indicating the abnormality of the preset data writing rule is output to remind the developer to optimize the preset data writing rule.

[0168] In summary, the embodiments of the present disclosure can achieve the following effects:

[0169] 1. The embodiments of the present disclosure perform fault generation processing on the data writing message through at least one fault generation method in the target fault generation rule in the relay processing unit, realize the intervention in the test process of data writing, create an abnormal scenario of data writing, obtain a fault message, and send the fault message to the controller. The controller performs data writing test based on the fault message, and then analyzes the reason for the failure of data writing.

[0170] 2. The embodiments of the present disclosure perform fault generation test on data writing, simulate data writing in extreme abnormal scenarios of the vehicle, make up for the current situation of no fault generation test for data writing. Through the fault generation test, bugs existing in the controller are timely discovered and repaired, so as to ensure the upgrade success rate of data writing to the greatest extent.

[0171] To facilitate understanding of the interaction relationship among the relay processing unit, the controller, and the host computer in the embodiments of the present disclosure, please refer to 7, Figure 7 is a schematic flowchart of a test system for data writing provided by the embodiments of the present disclosure, as Figure 7 shown, including:

[0172] Step 501, the host computer obtains the message to be transmitted and sends the message to be transmitted to the relay processing unit; so that when the relay processing unit determines that the message to be transmitted is a data flashing message and determines that the first attribute information of the data flashing message is consistent with the second attribute information in the target fault generation rule, the relay processing unit performs fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule to obtain a fault message.

[0173] Step 502, the relay processing unit receives the message to be transmitted sent by the host computer and identifies the message type of the message to be transmitted.

[0174] Step 503, when the relay processing unit determines that the identification result of the message type is a data flashing message, it determines whether there is a target fault generation rule matching the first attribute information of the data flashing message in a pre-set fault generation rule library in advance, where the second attribute information of the target fault generation rule is the same as the first attribute information and is used to generate a fault message corresponding to the data flashing message according to a pre-set fault generation method.

[0175] Step 504, when the relay processing unit determines that there is the target fault generation rule, it performs fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule to obtain a fault message.

[0176] Step 505, the relay processing unit respectively obtains the target fault codes corresponding to the at least one fault generation method.

[0177] Step 506, the relay processing unit transmits the target fault code to the host computer so that the host computer analyzes the test result message obtained from the data flashing test based on the target fault code.

[0178] Step 507, the relay processing unit sends the fault message to the controller so that the controller performs a data flashing test based on the fault message.

[0179] Step 508, the controller receives the fault message sent by the relay processing unit; the fault message is obtained by performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule when it is determined that the first attribute information of the data flashing message is consistent with the second attribute information in the target fault generation rule.

[0180] Step 509, the controller invokes a pre-configured preset data writing rule to analyze the fault message and obtain a test result message; the preset data writing rule is used to determine whether the fault message is executed according to the steps of data writing and the cause fault code when it is determined that the data writing steps are not followed, and the cause fault code corresponds to the fault generation method.

[0181] Step 510, the controller transmits the test result message to the relay processing unit so that the relay processing unit transmits the test result message to the host computer, so that the host computer analyzes the test result message, and the host computer is used to send the writing message to the relay processing unit.

[0182] Step 511, the relay processing unit receives the test result message obtained by performing a data writing test on the fault message sent by the controller.

[0183] Step 512, the relay processing unit transmits the test result message to the host computer so that the host computer analyzes the test result message.

[0184] Step 513, the host computer receives the target fault code corresponding to the target fault generation rule transmitted by the relay processing unit.

[0185] Step 514, the host computer receives the test result message transmitted by the relay processing unit. After the controller sends the test result message to the relay processing unit, the relay processing unit sends it to the host computer.

[0186] Step 515, if the test result message indicates that the fault message conforms to the preset data writing rule, the host computer determines that the preset data writing rule is abnormal. Among them, the preset data writing rule is used to determine whether the fault message is executed according to the steps of data writing and the cause fault code when it is determined that the data writing steps are not followed, and the cause fault code corresponds to the fault generation method.

[0187] Step 516, if the test result message indicates that the fault message does not conform to the preset data writing rule, the host computer compares the target fault code with the cause fault code in the test result message to obtain a comparison result.

[0188] Step 517, if the comparison result shows that the target fault code is inconsistent with the cause fault code, the host computer determines that the preset data writing rule is abnormal.

[0189] Step 518, the host computer outputs a prompt message indicating that the preset data writing rule is abnormal.

[0190] The test system for data flashing provided by the present disclosure receives the message to be transmitted sent by the host computer and identifies the message type of the message to be transmitted; when it is determined that the identification result of the message type is a data flashing message, it is determined whether there is a target fault generation rule that matches the first attribute information of the data flashing message in a pre-set fault generation rule library in advance, where the second attribute information of the target fault generation rule is the same as the first attribute information, and is used to generate a fault message corresponding to the data flashing message according to a pre-set fault generation method; when it is determined that there is the target fault generation rule, the data flashing message is subjected to fault generation processing according to at least one fault generation method in the target fault generation rule to obtain a fault message; and the fault message is sent to the controller so that the controller performs a data flashing test based on the fault message. Compared with the related art, in the embodiment of the present disclosure, at least one fault generation method in the target fault generation rule in the relay processing unit is used to perform fault generation processing on the data flashing message, realizing the intervention in the test process of data flashing, creating an abnormal scenario of data flashing, obtaining a fault message, and sending the fault message to the controller. The controller performs a data flashing test based on the fault message, and then analyzes the reason for the failure of data flashing.

[0191] Corresponding to the above data flashing test method, the present invention also provides a data flashing test device. Since the device embodiment of the present invention corresponds to the above method embodiment, details not disclosed in the device embodiment can be referred to the above method embodiment, and will not be elaborated in the present invention.

[0192] Figure 8 As shown in the structural schematic diagram of a data flashing test device provided by an embodiment of the present disclosure, the device is applied to a relay processing unit, and the relay processing unit is used to process data between a controller and a host computer, such as Figure 7 shown, and includes:

[0193] An identification unit 61, configured to receive a message to be transmitted sent by a host computer and identify the message type of the message to be transmitted;

[0194] A first determination unit 62, configured to, when it is determined that the identification result of the message type is a data flashing message, determine whether there is a target fault generation rule that matches the first attribute information of the data flashing message in a pre-set fault generation rule library in advance, where the second attribute information of the target fault generation rule is the same as the first attribute information, and is used to generate a fault message corresponding to the data flashing message according to a pre-set fault generation method;

[0195] A processing unit 63, configured to, when it is determined that there is a target fault generation rule, perform fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message;

[0196] A first sending unit 64, configured to send the fault message to a controller, so that the controller performs a data writing test based on the fault message.

[0197] The data writing test device provided by the present disclosure receives a message to be transmitted sent by a host computer and identifies the message type of the message to be transmitted; when it is determined that the identification result of the message type is a data writing message, it is determined whether there is a target fault generation rule matching the first attribute information of the data writing message in a pre-set fault generation rule library in advance, where the second attribute information of the target fault generation rule is the same as the first attribute information, and is used to generate a fault message corresponding to the data writing message according to a pre-set fault generation method; when it is determined that there is the target fault generation rule, perform fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message; and send the fault message to a controller, so that the controller performs a data writing test based on the fault message. Compared with the related art, in the embodiment of the present disclosure, at least one fault generation method in the target fault generation rule in the relay processing unit is used to perform fault generation processing on the data writing message, so as to intervene in the data writing test process, create an abnormal scenario for data writing, obtain a fault message, and send the fault message to the controller. The controller performs a data writing test based on the fault message, and then analyzes the reason for the failure of data writing.

[0198] Further, in a possible implementation manner of the embodiment of the present disclosure, as Figure 9 shown, the device further includes:

[0199] A receiving unit 65, configured to, after sending the fault message to the controller, receive a test result message sent by the controller based on the data writing test performed on the fault message;

[0200] A transmission unit 66, configured to transmit the test result message to the host computer, so that the host computer analyzes the test result message.

[0201] Further, in a possible implementation manner of the embodiment of the present disclosure, as Figure 9 shown, the device further includes:

[0202] An acquisition unit 67, configured to acquire first attribute information of the data flashing message and second attribute information of each fault generation rule in a pre-set fault generation rule library before determining whether there is a target fault generation rule that matches the first attribute information of the data flashing message;

[0203] A comparison unit 68, configured to compare the first attribute information with the second attributes of each fault generation rule respectively to obtain a comparison result, so as to determine whether there is a target fault generation rule that matches the first attribute information of the data flashing message based on the comparison result.

[0204] Further, in a possible implementation manner of the embodiment of the present disclosure, as Figure 9 shown, the processing unit 63 includes:

[0205] A receiving module 631, configured to receive a selection instruction for at least one fault generation method of the target fault generation rule;

[0206] A processing module 632, configured to perform fault generation processing on the data flashing message according to at least one fault generation method corresponding to the selection instruction to obtain the fault message.

[0207] Further, in a possible implementation manner of the embodiment of the present disclosure, as Figure 9 shown, the processing unit 63 is further configured to

[0208] According to the first attribute information of the data flashing message, and in accordance with the pre-established correspondence between the attribute information and the fault generation method, find at least one fault generation method in the target fault generation rule corresponding to the first attribute information from the fault generation rule library;

[0209] Perform fault generation processing on the data flashing message according to the found at least one fault generation method to obtain the fault message.

[0210] Further, in a possible implementation manner of the embodiment of the present disclosure, as Figure 9 shown, the device further includes:

[0211] The acquisition unit 67 is further configured to, after performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule, acquire target fault codes corresponding to the at least one fault generation method respectively;

[0212] The transmission unit 66 is further configured to transmit the target fault codes to the host computer, so that the host computer analyzes a test result message obtained by data flashing test based on the target fault codes.

[0213] Figure 10 The following is a schematic structural diagram of another test device for data writing provided by an embodiment of the present disclosure. The device is applied to a controller, such as Figure 10 shown, and includes:

[0214] A first receiving unit 71, configured to receive a fault message sent by a relay processing unit; the fault message is obtained by performing fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule when it is determined that the first attribute information of the data writing message is consistent with the second attribute information in the target fault generation rule;

[0215] An analysis unit 72, configured to call a pre-configured preset data writing rule to analyze the fault message to obtain a test result message; the preset data writing rule is used to determine whether the fault message is executed according to the steps of data writing and the cause fault code when it is determined that the steps of data writing are not executed, and the cause fault code corresponds to the fault generation method;

[0216] A transmission unit 73, configured to transmit the test result message to the relay processing unit, so that the relay processing unit transmits the test result message to a host computer, so that the host computer analyzes the test result message, and the host computer is configured to send the writing message to the relay processing unit.

[0217] The test device for data writing provided by the present disclosure receives a message to be transmitted sent by a host computer, and identifies the message type of the message to be transmitted; when it is determined that the identification result of the message type is a data writing message, it is determined whether there is a target fault generation rule that matches the first attribute information of the data writing message in a pre-set fault generation rule library in advance, where the second attribute information of the target fault generation rule is the same as the first attribute information, and is used to generate a fault message corresponding to the data writing message according to a preset fault generation method; when it is determined that the target fault generation rule exists, performing fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message; sending the fault message to a controller, so that the controller performs a data writing test based on the fault message. Compared with the related art, in the embodiment of the present disclosure, at least one fault generation method in the target fault generation rule in the relay processing unit is used to perform fault generation processing on the data writing message, realizing the intervention in the test process of data writing, creating an abnormal scenario of data writing, obtaining a fault message, and sending the fault message to the controller. The controller performs a data writing test based on the fault message, and further analyzes the cause of data writing failure.

[0218] Figure 11Schematic diagram of another test device for data writing provided by an embodiment of the present disclosure. The device is applied to a host computer, such as Figure 11 shown, and includes:

[0219] A second sending unit 81, configured to obtain a message to be transmitted, and send the message to be transmitted to a relay processing unit; so that when the relay processing unit determines that the message to be transmitted is a data writing message, and when it determines that the first attribute information of the data writing message is consistent with the second attribute information in a target fault generation rule, perform fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message;

[0220] A second receiving unit 82, configured to receive a test result message transmitted by the relay processing unit. After the controller sends the test result message to the relay processing unit, the relay processing unit sends it to the host computer;

[0221] A second determining unit 83, configured to determine that there is an abnormality in the preset data writing rule when the test result message is that the fault message conforms to the preset data writing rule. The preset data writing rule is used to determine whether the fault message is executed according to the steps of data writing and the cause fault code when it is determined that the steps of data writing are not executed. The cause fault code corresponds to the fault generation method.

[0222] The test device for data writing provided by the present disclosure receives a message to be transmitted sent by a host computer, and identifies the message type of the message to be transmitted; when it is determined that the identification result of the message type is a data writing message, in a preset fault generation rule library in advance, determine whether there is a target fault generation rule that matches the first attribute information of the data writing message. The second attribute information of the target fault generation rule is the same as the first attribute information, and is used to generate a fault message corresponding to the data writing message according to a preset fault generation method; when it is determined that there is the target fault generation rule, perform fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule to obtain a fault message; send the fault message to a controller so that the controller performs a data writing test based on the fault message. Compared with the related art, the embodiment of the present disclosure performs fault generation processing on the data writing message through at least one fault generation method in the target fault generation rule in the relay processing unit, realizes the intervention in the test process of data writing, creates an abnormal scenario of data writing, obtains a fault message, and sends the fault message to the controller. The controller performs a data writing test based on the fault message, and then analyzes the cause of the data writing failure.

[0223] Further, in a possible implementation manner of the embodiments of the present disclosure, as Figure 12 shown, the device further includes:

[0224] The second receiving unit 82 is further configured to receive the target fault code corresponding to the target fault generation rule transmitted by the relay processing unit before receiving the test result message transmitted by the relay processing unit.

[0225] Further, in a possible implementation manner of the embodiments of the present disclosure, as Figure 12 shown, the device further includes:

[0226] A comparison unit 84, configured to compare the target fault code with the cause fault code in the test result message to obtain a comparison result after receiving the test result message transmitted by the relay processing unit and when the test result message is that the fault message does not conform to the preset data writing rule.

[0227] The second determination unit 83 is further configured to

[0228] when the target fault code is inconsistent with the cause fault code, determine that the preset data writing rule is abnormal;

[0229] output a prompt message indicating that the preset data writing rule is abnormal.

[0230] Figure 12 A test system for data writing provided by an embodiment of the present disclosure, as Figure 13 shown, includes:

[0231] A relay processing unit 91, a controller 92, and a host computer 93. Among them, the relay processing unit 91 is a device configured in the relay processing unit, the controller 92 is a device configured in the controller, and the host computer 93 is a device configured in the host computer.

[0232] It should be noted that the foregoing explanations of the method embodiments also apply to the devices in this embodiment, with the same principle, and will not be limited in this embodiment.

[0233] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0234] Figure 14FIG. 0 shows a schematic block diagram of an exemplary electronic device 1000 that may be used to implement embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, for example, personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0235] As Figure 14 shown, the device 1000 includes a computing unit 1001 that can perform various appropriate actions and processes in accordance with a computer program stored in a ROM (Read-Only Memory) 1002 or a computer program loaded from a storage unit 1008 into a RAM (Random Access Memory) 1003. In the RAM 1003, various programs and data required for the operation of the device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An I / O (Input / Output) interface 1005 is also connected to the bus 1004.

[0236] A plurality of components in the device 1000 are connected to the I / O interface 1005, including: an input unit 1006, such as a keyboard, a mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a magnetic disk, an optical disk, etc.; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the device 1000 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0237] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 executes the various methods and processes described above, such as the test method for data brushing. For example, in some embodiments, the test method for data brushing can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the method described above can be executed. Alternatively, in other embodiments, the computing unit 1001 can be configured to execute the aforementioned test method for data brushing in any other suitable manner (e.g., by means of firmware).

[0238] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chip), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0239] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.

[0240] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory), or a flash memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0241] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or an LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and the input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0242] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0243] A computer system can include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services ("Virtual Private Server", or simply "VPS"). The server can also be a server of a distributed system, or a server combined with blockchain.

[0244] Herein, it should be noted that artificial intelligence is a discipline that studies enabling a computer to simulate certain thinking processes and intelligent behaviors of humans (such as learning, reasoning, thinking, planning, etc.), and it has both hardware-level technologies and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include several major directions such as computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, and knowledge graph technology.

[0245] It should be understood that various forms of processes shown above can be used, reordering, adding, or deleting steps. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitations are imposed herein.

[0246] The above specific embodiments do not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.

Claims

1. A test method for data flashing, characterized in that, The method is applied to a relay processing unit, which is used to process data between a controller and a host computer, and includes: Receiving a message to be transmitted sent by the host computer, and identifying the message type of the message to be transmitted; When it is determined that the identification result of the message type is a data flashing message, determining whether there is a target fault generation rule in a pre-set fault generation rule library that matches the first attribute information of the data flashing message, where the second attribute information of the target fault generation rule is the same as the first attribute information, and is used to generate a fault message corresponding to the data flashing message according to a pre-set fault generation method; When it is determined that there is the target fault generation rule, performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule to obtain a fault message; Sending the fault message to the controller so that the controller performs a data flashing test based on the fault message.

2. The method according to claim 1, wherein After sending the fault message to the controller, the method further includes: Receiving a test result message obtained by the controller performing a data flashing test based on the fault message; Transmitting the test result message to the host computer so that the host computer analyzes the test result message.

3. The method according to claim 1, characterized in that, Before determining whether there is a target fault generation rule that matches the first attribute information of the data flashing message, the method further includes: Obtaining the first attribute information of the data flashing message, and obtaining the second attribute information of each fault generation rule in the fault generation rule library; Comparing the first attribute information with the second attribute of each fault generation rule respectively to obtain a comparison result, so as to determine whether there is a target fault generation rule that matches the first attribute information of the data flashing message based on the comparison result.

4. The method according to claim 1, wherein The performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule to obtain a fault message includes: Receiving a selection instruction of at least one fault generation method of the target fault generation rule; Performing fault generation processing on the data flashing message according to at least one fault generation method corresponding to the selection instruction to obtain the fault message.

5. The method according to claim 1, wherein The performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule to obtain a fault message includes: According to the first attribute information of the data flashing message, searching for at least one fault generation method in the target fault generation rule corresponding to the first attribute information from the fault generation rule library according to a pre-established correspondence between attribute information and fault generation methods; Performing fault generation processing on the data flashing message according to the at least one fault generation method found to obtain the fault message.

6. The method according to claim 5, wherein After performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule, the method further includes: Respectively obtaining target fault codes corresponding to the at least one fault generation method; Transmit the target fault code to the host computer so that the host computer analyzes the test result message obtained from the data flashing test based on the target fault code.

7. A test method for data flashing, characterized in that, The method is applied to a controller and includes: Receiving a fault message sent by a relay processing unit; the fault message is obtained by performing fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule when it is determined that the first attribute information of the data flashing message is consistent with the second attribute information in the target fault generation rule. Invoking a pre-configured preset data flashing rule to analyze the fault message to obtain a test result message; the preset data flashing rule is used to determine whether the fault message is executed according to the steps of data flashing and the cause fault code when it is determined that the steps of data flashing are not executed, and the cause fault code corresponds to the fault generation method. Transmit the test result message to the relay processing unit so that the relay processing unit transmits the test result message to the host computer so that the host computer analyzes the test result message, and the host computer is used to send the flashing message to the relay processing unit.

8. A test method for data flashing, characterized in that, The method is applied to a host computer and includes: Obtaining a message to be transmitted and sending the message to be transmitted to the relay processing unit; so that the relay processing unit performs fault generation processing on the data flashing message according to at least one fault generation method in the target fault generation rule when it is determined that the message to be transmitted is a data flashing message and the first attribute information of the data flashing message is consistent with the second attribute information in the target fault generation rule, to obtain a fault message. Receiving the test result message transmitted by the relay processing unit, where the test result message is sent to the host computer by the relay processing unit after being sent by the controller to the relay processing unit. If the test result message indicates that the fault message conforms to the preset data flashing rule, it is determined that the preset data flashing rule is abnormal, where the preset data flashing rule is used to determine whether the fault message is executed according to the steps of data flashing and the cause fault code when it is determined that the steps of data flashing are not executed, and the cause fault code corresponds to the fault generation method.

9. The method according to claim 8, wherein Before receiving the test result message transmitted by the relay processing unit, the method further includes: Receiving the target fault code corresponding to the target fault generation rule transmitted by the relay processing unit.

10. According to the method described in claim 9, after receiving the test result message transmitted by the relay processing unit, the method further includes: If the test result message indicates that the fault message does not conform to the preset data flashing rule, comparing the target fault code with the cause fault code in the test result message to obtain a comparison result. The determination that the preset data flashing rule is abnormal includes: If the comparison result is that the target fault code is inconsistent with the cause fault code, it is determined that the preset data flashing rule is abnormal. Outputting a prompt message indicating that the preset data flashing rule is abnormal.

11. A test device for data flashing, characterized in that, The device is applied to a relay processing unit, which is used to process data between a controller and a host computer, and includes: An identification unit, configured to receive a message to be transmitted sent by the host computer and identify the message type of the message to be transmitted; A first determination unit, configured to determine whether there is a target fault generation rule matching the first attribute information of the data writing message in a pre-set fault generation rule library when it is determined that the identification result of the message type is a data writing message, where the second attribute information of the target fault generation rule is the same as the first attribute information, and is used to generate a fault message corresponding to the data writing message according to a pre-set fault generation method; A processing unit, configured to perform fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule when it is determined that the target fault generation rule exists, so as to obtain a fault message; A first sending unit, configured to send the fault message to the controller, so that the controller performs a data writing test based on the fault message.

12. A test device for data flashing, characterized in that, The device is applied to a controller and includes: A first receiving unit, configured to receive the fault message sent by the relay processing unit; the fault message is obtained by performing fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule when it is determined that the first attribute information of the data writing message is consistent with the second attribute information in the target fault generation rule; An analysis unit, configured to call a pre-configured preset data writing rule to analyze the fault message to obtain a test result message; the preset data writing rule is used to determine whether the fault message is executed according to the steps of data writing and the cause fault code when it is determined that the steps of data writing are not executed, and the cause fault code corresponds to the fault generation method; A transmission unit, configured to transmit the test result message to the relay processing unit, so that the relay processing unit transmits the test result message to the host computer, so that the host computer analyzes the test result message, and the host computer is used to send the writing message to the relay processing unit.

13. A test device for data flashing, characterized in that, The device is applied to a host computer and includes: A second sending unit, configured to obtain a message to be transmitted and send the message to be transmitted to the relay processing unit; so that the relay processing unit performs fault generation processing on the data writing message according to at least one fault generation method in the target fault generation rule when it is determined that the message to be transmitted is a data writing message and it is determined that the first attribute information of the data writing message is consistent with the second attribute information in the target fault generation rule, so as to obtain a fault message; A second receiving unit, configured to receive the test result message transmitted by the relay processing unit, and the test result message is sent by the controller to the relay processing unit and then sent by the relay processing unit to the host computer; A second determination unit, configured to determine that there is an abnormality in the preset data writing rule when the test result message is that the fault message conforms to the preset data writing rule, where the preset data writing rule is used to determine whether the fault message is executed according to the steps of data writing and the cause fault code when it is determined that the steps of data writing are not executed, and the cause fault code corresponds to the fault generation method.

14. A vehicle, characterized in that, The vehicle includes the data writing test device according to claim 11 or claim 12 or claim 13.

15. A test system for data flashing, characterized in that, The system includes a relay processing unit, a controller, and a host computer, and includes: The relay processing unit includes the data writing test device according to claim 11; The controller includes the data writing test device according to claim 12; The host computer includes the data writing test device according to claim 13.

16. An electronic device, characterized in that, Includes: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1-6 or the method according to claim 7 or the method according to any one of claims 8-10.

17. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6 or the method according to claim 7 or the method according to any one of claims 8-10.

18. A computer program product, characterized in that, Includes a computer program, and the computer program, when executed by a processor, implements the method according to any one of claims 1-6 or the method according to claim 7 or the method according to any one of claims 8-10.