Data processing method and device, electronic equipment, vehicle and storage medium
By analyzing the diagnostic questionnaire, generating an XML-type diagnostic database and importing CANoe, the problem of cumbersome addition of diagnostic services in the prior art is solved, and the efficiency of ECU diagnostic function testing is improved.
Patent Information
- Application Number
- CN202310539844.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-12
- Publication Date
- 2024-11-12
AI Technical Summary
The prior art uses CANoe software to conduct diagnostic function testing of electronic control unit (ECU), and add diagnostic service contents, especially when there are many diagnostic service contents, resulting in low efficiency in diagnostic function testing.
The process of adding diagnostic service content is simplified by obtaining and parsing diagnostic questionnaire, generating a diagnostic database of extended markup language (XML) type and importing it into the controller LAN open environment (CANoe) to perform diagnostic service content.
It significantly saves time to add diagnostic service content, improves the efficiency of diagnostic function testing, and simplifies the operation process.
Smart Images

Figure CN118939517A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of automobile technology, and in particular, to a data processing method, device, electronic device, vehicle and storage medium. Background Art
[0002] Controller Area Network open environment (CANoe) software is a graphical development environment that integrates simulation, test analysis and diagnosis functions. Existing tests for the diagnostic function of the Electronic Control Unit (ECU) mostly use CANoe software.
[0003] When using CANoe software to test the diagnostic function of the ECU, the user needs to open the interface for adding diagnostic service content in CANoe, select the required diagnostic service content and add it, adding one diagnostic service content at a time until all the required diagnostic service content has been added.
[0004] The above steps of adding diagnostic service contents are cumbersome. Especially when there are many diagnostic service contents, adding them one by one takes a lot of time, resulting in the problem of low efficiency of diagnostic function testing. Summary of the invention
[0005] The embodiments of the present application provide a data processing method, device, electronic device, vehicle and storage medium, which import a diagnostic database generated based on a diagnostic questionnaire into CANoe, save time for adding diagnostic service content and improve the efficiency of diagnostic function testing.
[0006] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising: obtaining a diagnostic questionnaire corresponding to a target project; parsing the diagnostic questionnaire to obtain a diagnostic database of extensible markup language XML type, the diagnostic database being generated based on information corresponding to diagnostic service content obtained by parsing the diagnostic questionnaire; importing the diagnostic database into a controller local area network open environment, so that when the diagnostic function of the target project is tested in the controller local area network open environment, the diagnostic service content corresponding to the diagnostic database is executed.
[0007] In some embodiments of the present application, a diagnostic questionnaire is parsed to obtain a diagnostic database of extended markup language XML type, including: parsing the diagnostic questionnaire to obtain a diagnostic database, an XML type system variable file and a CAPL code file; the system variable file is generated based on information corresponding to the system variables obtained by parsing the diagnostic questionnaire, and the CAPL code file is generated based on control information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; importing the diagnostic database into a controller LAN open environment, including: importing the diagnostic database, the system variable file and the CAPL code file into the controller LAN open environment, so that when the diagnostic function of the target project is tested in the controller LAN open environment, the diagnostic service content corresponding to the diagnostic database is executed through the CAPL code file based on the system variable file.
[0008] In some embodiments of the present application, after parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file, the method also includes: sending the system variable file to a third-party application, so that the third-party application executes the diagnostic service content corresponding to the diagnostic database through the CAPL code file based on the received system variable file and the controller local area network open environment.
[0009] In some embodiments of the present application, before parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file, the method also includes: verifying whether the file format of the diagnostic questionnaire is correct; parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file, including: when the format of the diagnostic questionnaire is correct, parsing the diagnostic questionnaire to obtain the diagnostic database, the system variable file and the CAPL code file.
[0010] In some embodiments of the present application, after verifying whether the file format of the diagnostic questionnaire is correct, the method further includes: if the format of the diagnostic questionnaire is incorrect, outputting a prompt message, the prompt message being used to indicate that the format of the diagnostic questionnaire is incorrect.
[0011] In some embodiments of the present application, verifying whether the file format of the diagnostic questionnaire is correct includes: verifying whether the file type of the diagnostic questionnaire is a preset type, and verifying whether the format of the diagnostic questionnaire is a preset format.
[0012] In some embodiments of the present application, before obtaining the diagnostic questionnaire corresponding to the target project, the method also includes: displaying a user interface, the user interface including a target control for uploading files; obtaining the diagnostic questionnaire corresponding to the target project, including: receiving the diagnostic questionnaire uploaded by the user in response to the user's operation on the target control.
[0013] In a second aspect, an embodiment of the present application provides a data processing device, including: an acquisition module, used to acquire a diagnostic questionnaire corresponding to a target project; a parsing module, used to parse the diagnostic questionnaire to obtain a diagnostic database of an extended markup language XML type, wherein the diagnostic database is generated based on information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; and an import module, used to import the diagnostic database into an open environment of a controller local area network, so that when the diagnostic function of the target project is tested in the open environment of the controller local area network, the diagnostic service content corresponding to the diagnostic database is executed.
[0014] In some embodiments of the present application, the parsing module is specifically used to parse the diagnostic questionnaire to obtain a diagnostic database, an XML type system variable file and a CAPL code file; the system variable file is generated based on the information corresponding to the system variables obtained by parsing the diagnostic questionnaire, and the CAPL code file is generated based on the control information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; the import module is specifically used to import the diagnostic database, the system variable file and the CAPL code file into the controller local area network open environment, so that when the diagnostic function of the target project is tested in the controller local area network open environment, the diagnostic service content corresponding to the diagnostic database is executed through the CAPL code file based on the system variable file.
[0015] In some embodiments of the present application, the data processing device also includes: a sending module; the sending module is used to send the system variable file to a third-party application after parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file, so that the third-party application can execute the diagnostic service content corresponding to the diagnostic database through the CAPL code file based on the received system variable file and the controller local area network open environment.
[0016] In some embodiments of the present application, the data processing device also includes: a verification module; the verification module is used to verify whether the file format of the diagnostic questionnaire is correct before parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file; parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file includes: when the format of the diagnostic questionnaire is correct, parsing the diagnostic questionnaire to obtain the diagnostic database, the system variable file and the CAPL code file.
[0017] In some embodiments of the present application, the data processing device also includes: an output module; the output module is used to output a prompt message after verifying whether the file format of the diagnostic questionnaire is correct, if the format of the diagnostic questionnaire is incorrect, the prompt message is used to indicate that the format of the diagnostic questionnaire is incorrect.
[0018] In some embodiments of the present application, the verification module is specifically used to verify whether the file type of the diagnostic questionnaire is a preset type, and to verify whether the format of the diagnostic questionnaire is a preset format.
[0019] In some embodiments of the present application, the data processing device also includes: a display module; the display module is used to display a user interface before obtaining the diagnostic questionnaire corresponding to the target project, and the user interface includes a target control for uploading files; the acquisition module is specifically used to receive the diagnostic questionnaire uploaded by the user in response to the user's operation on the target control.
[0020] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, wherein the processor is used to execute a computer program stored in a memory, and when the computer program is executed by the processor, the steps of the data processing method provided in the first aspect are implemented.
[0021] In a fourth aspect, an embodiment of the present application provides a vehicle, comprising: the data processing device provided in the second aspect, or the electronic device provided in the third aspect.
[0022] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the data processing method of the first aspect are implemented.
[0023] In the technical solution provided by the embodiment of the present application, a diagnostic questionnaire corresponding to the target project is obtained; the diagnostic questionnaire is parsed to obtain a diagnostic database of the extensible markup language XML type, and the diagnostic database is generated based on the information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; the diagnostic database is imported into the controller LAN open environment, so that when the diagnostic function of the target project is tested in the controller LAN open environment, the diagnostic service content corresponding to the diagnostic database is executed. This solution is based on the diagnostic questionnaire (including all diagnostic functions that need to be tested for the target project), and the obtained diagnostic database includes all diagnostic service contents corresponding to the diagnostic functions that need to be tested for the target project. Therefore, the diagnostic database is imported into CANoe, that is, all diagnostic service contents are added to CANoe, which saves time compared to adding the required diagnostic service content one by one in the corresponding interface of CANoe, thereby improving the efficiency of diagnostic function testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0026] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application;
[0027] Figure 2 A flowchart of another data processing method provided in an embodiment of the present application;
[0028] Figure 3 A flowchart of another data processing method provided in an embodiment of the present application;
[0029] Figure 4 A flowchart of another data processing method provided in an embodiment of the present application;
[0030] Figure 5 A flowchart of another data processing method provided in an embodiment of the present application;
[0031] Figure 6 A flowchart of another data processing method provided in an embodiment of the present application;
[0032] Figure 7 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0033] Figure 8 A hardware structure block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0035] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0036] First, some nouns or terms involved in the claims and description of the present invention are explained below.
[0037] CANoe: Mainly used for the development of automotive buses, mainly for modeling, simulation, testing and development of Controller Area Network (CAN) communication networks, and can also be used for the development of LIN, FlexRay, MOST and Ethernet. CANoe has three main uses in diagnostic function testing: as a diagnostic instrument; simulating the diagnostic function of the Electronic Control Unit (ECU); and testing the diagnostic function of the ECU.
[0038] Unified Diagnostic Services (UDS) is a diagnostic communication protocol in the ECU environment of automotive electronic equipment. Diagnosis is a service-based process of two-party interaction of data and commands. It mainly adopts a "question-answer" model, that is, the diagnostic instrument sends a request (Request) to the vehicle's designated ECU, and the designated ECU will make a corresponding response (Response) and return the response to the diagnostic instrument. Then, based on the edited diagnostic database, the corresponding data is converted into corresponding questions and descriptions.
[0039] The first step in diagnostic development is to confirm the services and sub-services supported by the project. Because the diagnostic function is jointly developed by vehicle manufacturers and suppliers and the actual requirements change significantly, a diagnostic questionnaire is used in the early stage (both vehicle manufacturers and suppliers need to edit this form) to record the current diagnostic functions.
[0040] The most commonly used diagnostic database in cdd format is based on the diagnostic questionnaire, which is edited by business personnel through the CANdelaStudio tool. However, the diagnostic questionnaires corresponding to different projects (such as different ECUs and different vehicles) are not the same, and the corresponding diagnostic database in cdd format needs to be edited for different projects; and the diagnostic questionnaire of the same project will also need to be updated at different stages of the project. At this time, the diagnostic database in cdd format also needs to be updated synchronously, otherwise the correct information cannot be recognized in CANoe, resulting in incorrect test results or test omissions. In addition, editing the cdd file requires the additional use of Vector's CANdelaStudio tool and Licenses (need to be purchased and expensive), and the edited diagnostic database in cdd format will also have version incompatibility issues when used in different versions of CANoe.
[0041] In the absence of a diagnostic database in cdd format, use the diagnostic module that comes with CANoe to send diagnostic commands, which specifically includes the following steps: open the CANoe software, click Diagnostics, and select Diagnostics / ISO TP; select CAN in the pop-up dialog box; click Add Dignostic Description, and select Add Basic Dignostic Description (UDS) in the drop-down box; click Transport Layer, enter the corresponding CAN ID (obtained from the diagnostic questionnaire), click Apply, and click OK; click Basic Dignostic, select a service, click Add New Service; select the corresponding diagnostic service content, and click OK; at this point, a diagnostic service content has been added, and the process of adding other diagnostic service contents refers to the above steps. This method takes a lot of time and has the problem of low efficiency when there are many diagnostic services that need to be tested.
[0042] The technical solution of the present application is explained in detail below through several specific embodiments.
[0043] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method may include the following steps 101 to 104.
[0044] 101. Obtain a diagnostic questionnaire corresponding to the target project.
[0045] It can be understood that the diagnostic questionnaire is edited according to project requirements. The diagnostic questionnaire is in a preset format and mainly includes: diagnostic services supported by the electronic control unit, diagnostic trouble codes (DTC), data identification codes (DID) and other information.
[0046] It can be understood that the file type of the diagnostic questionnaire can be Excel, or doc, etc., which is not limited in the embodiment of the present application.
[0047] Exemplarily, Table 1 is part of the information of the diagnostic service page included in the diagnostic questionnaire, which mainly identifies the UDS diagnostic service ID, diagnostic service name, sub-service ID and sub-service name. When editing the diagnostic questionnaire, it is necessary to fill in the corresponding information in the preset format in the fixed column in the Excel template. After identifying such information through the method of the embodiment of the present application, it is generated and called in the diagnostic database. Only part of the information is shown in Table 1. At the same time, other UDS diagnostic services and their sub-services can also be supported, such as diagnostic services with diagnostic service IDs: 0x10, 0x11, 0x14, 0x19, 0x22, 0x27, 0x2E, 0x2F, 0x31, 0x3E, 0x34, 0x36, and 0x37.
[0048] Table 2 is part of the information on the DTC page included in the diagnostic questionnaire. DTC is a fault code recorded in the control system memory when the car fails. DTC is user-defined and includes DTC high, medium and low bytes and fault descriptions corresponding to different DTCs. By identifying such information using the method of the embodiment of the present application, the fault description corresponding to the DTC can be directly queried or displayed during testing.
[0049] Table 3 shows part of the information on the DID page included in the diagnostic questionnaire. DID is vehicle data information. Reading and writing DID requires the user to define the DID number, DID description, data length, data type, unit, conversion relationship, and default value. This type of information is identified by the method of the embodiment of the present application. When requesting to read or write a certain DID information of the vehicle, it can be used directly in the generated diagnostic database.
[0050] It should be noted that Table 1, Table 2 and Table 3 are only exemplary illustrations of information on some pages of the diagnostic questionnaire, and each page also only exemplarily shows part of the information. In actual applications, the specific content of the diagnostic questionnaire is determined according to the project.
[0051] Table 1 Diagnostic service page
[0052]
[0053] Table 2 DTC page
[0054]
[0055] Table 2 DID page
[0056]
[0057] 102. Parse the diagnostic questionnaire to obtain a diagnostic database of the extensible markup language XML type.
[0058] The diagnostic database is generated based on the information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire. It can be understood that the diagnostic database includes all the diagnostic service content that needs to be tested in the diagnostic questionnaire.
[0059] 103. Import the diagnostic database into CANoe.
[0060] The diagnostic database is imported into CANoe so that when the diagnostic function of the target project is tested in the controller area network open environment, the diagnostic service content corresponding to the diagnostic database is executed.
[0061] It can be understood that the diagnostic questionnaire includes multiple pages, and parsing the diagnostic questionnaire includes: reading the diagnostic questionnaire, reading the merged cells, reading the offset and coefficient of the DID (the coefficient and offset of the conversion expression in the DID page conversion column, such as phy=xx*0.5-40, the coefficient is 0.5, and the offset is -40), and traversing the information in the table through the row and column indexes, etc. The information corresponding to the parsed diagnostic service content is generated into an XML type diagnostic database.
[0062] It can be understood that the COM interface provided by CANoe enables external scripts to access or control CANoe software. In the embodiment of the present application, CANoe software is controlled through the COM interface. CANoe COM will be registered by default when CANoe is installed. If multiple versions of CANoe are installed in the device, when using a certain version of CANoe, the corresponding version of CANoe COM needs to be registered.
[0063] Exemplarily, if the file type of the diagnostic questionnaire is Excel type, you can develop the ExcelAPI.cs class based on .Net programming using the Microsoft.Office.Interop.Excel.dll library to obtain an application corresponding to the method of the embodiment of the present application, parse the diagnostic questionnaire through the application, and import the parsed diagnostic database into CANoe, specifically, import the diagnostic database into CANoe's Basic Diagnostic.
[0064] In the embodiment of the present application, a diagnostic questionnaire corresponding to the target project is obtained; the diagnostic questionnaire is parsed to obtain a diagnostic database of the extensible markup language XML type, and the diagnostic database is generated based on the information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; the diagnostic database is imported into the controller LAN open environment, so that when the diagnostic function of the target project is tested in the controller LAN open environment, the diagnostic service content corresponding to the diagnostic database is executed. This scheme is based on the diagnostic questionnaire (including all diagnostic functions that need to be tested for the target project), and the obtained diagnostic database includes all diagnostic service contents corresponding to the diagnostic functions that need to be tested for the target project. Therefore, the diagnostic database is imported into CANoe, that is, all diagnostic service contents are added to CANoe, which saves time compared to adding the required diagnostic service content one by one in the corresponding interface of CANoe, thereby improving the efficiency of diagnostic function testing.
[0065] In some embodiments of the present application, Figure 1 ,like Figure 2 As shown, the above step 102 can be specifically implemented through the following step 102a, and the above step 103 can be specifically implemented through the following step 103a.
[0066] 102a. Parse the diagnostic questionnaire to obtain a diagnostic database, an XML-type system variable file and a CAPL code file.
[0067] The system variable file is generated based on the information corresponding to the system variables obtained by parsing the diagnostic questionnaire, and the CAPL code file is generated based on the control information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire.
[0068] It can be understood that all files can be obtained by parsing a diagnostic questionnaire once, and one file can also be obtained by parsing a diagnostic questionnaire once; specifically, by parsing a diagnostic questionnaire once, a diagnostic database, a system variable file and a CAPL code file can be obtained at the same time; or, by parsing a diagnostic questionnaire once, any required file among the diagnostic database, system variable file or CAPL code file can be obtained.
[0069] It can be understood that the CAPL code file includes the diagnostic function control CAPL file, the diagnostic service declaration CIN file, the data parsing CAPL file, the DTC description declaration CIN file, etc.; the diagnostic function control CAPL file is used to control the sending and receiving of diagnostic services, etc., the data parsing CAPL file is used to parse the received ECU data, etc., the diagnostic service declaration CIN file is the declaration file that the diagnostic function control CAPL file depends on, and the DTC description declaration CIN file is the declaration file that the data parsing CAPL file depends on.
[0070] 103a. Import the diagnostic database, system variable file and CAPL code file into CANoe.
[0071] Among them, the diagnostic database, system variable file and CAPL code file are imported into CANoe, so that when the diagnostic function of the target project is tested in CANoe, the diagnostic service content corresponding to the diagnostic database is executed through the CAPL code file based on the system variable file.
[0072] Specifically, import the diagnostic database into Basic Diagnostic in CANoe, import the system variable file into System Variables Configuration in CANoe, and import the CAPL code file into ProgramNode in CANoe.
[0073] In the embodiment of the present application, the diagnostic questionnaire is parsed to obtain a diagnostic database of the extended markup language XML type, including: parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file; the system variable file is generated based on the information corresponding to the system variable obtained by parsing the diagnostic questionnaire, and the CAPL code file is generated based on the control information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; the diagnostic database is imported into the controller LAN open environment, including: importing the diagnostic database, the system variable file and the CAPL code file into the controller LAN open environment, so that when the diagnostic function of the target project is tested in the controller LAN open environment, the diagnostic service content corresponding to the diagnostic database is executed through the CAPL code file based on the system variable file. In this way, the diagnostic function test can be implemented based on the parsed diagnostic database, the system variable file and the CAPL code file, thereby improving the efficiency of the diagnostic function test.
[0074] In some embodiments of the present application, Figure 2 ,like Figure 3 As shown, after the above step 102a, the data processing method of the embodiment of the present application further includes the following step 104.
[0075] 104. Send system variable files to third-party applications.
[0076] The system variable file is sent to the third-party application, so that the third-party application controls CANoe based on the received system variable file and executes the diagnostic service content corresponding to the diagnostic database through the CAPL code file.
[0077] It can be understood that sending the system variable file to the third-party application may be sending the system variable file to the third-party application when the system variable file is generated, or sending the system variable file to the third-party application when receiving a request from the third-party application to obtain the system variable file.
[0078] Exemplarily, the third-party application is ECU-Test (which is automobile testing software used for editing, implementing, executing test cases and generating test reports, etc.). ECU-Test controls CANoe through system variables, and controls sending diagnostic service content corresponding to the diagnostic database to the ECU under test through CAPL code files; the ECU under test sends a diagnostic response after receiving the diagnostic service content sent by CANoe; after CANoe receives the diagnostic response sent by the ECU under test, it parses the diagnostic response through the CAPL code file and passes it to the corresponding system variables; ECU-Test performs test evaluation by reading the value of the corresponding system variable into the test script.
[0079] In the embodiment of the present application, after parsing the diagnostic questionnaire and obtaining the diagnostic database, the XML type system variable file and the CAPL code file, the method further includes: sending the system variable file to the third-party application, so that the third-party application executes the diagnostic service content corresponding to the diagnostic database through the CAPL code file based on the received system variable file and the controller local area network open environment. The system variable file can also be used by third-party software, and the test can be realized in combination with the third-party software, and the application scenario is more flexible.
[0080] In some embodiments of the present application, Figure 2 ,like Figure 4 As shown, before the above step 102a, the data processing method provided in the embodiment of the present application also includes the following step 105. The above step 102a can be specifically implemented by the following step 102b. The method also includes the following step 106.
[0081] 105. Check whether the file format of the diagnostic questionnaire is correct.
[0082] 102b. When the format of the diagnostic questionnaire is correct, parse the diagnostic questionnaire to obtain a diagnostic database, a system variable file and a CAPL code file.
[0083] 106. If the format of the diagnostic questionnaire is incorrect, a prompt message will be output.
[0084] The prompt message is used to indicate that the diagnostic questionnaire format is incorrect.
[0085] It can be understood that the data processing method in the embodiment of the present application requires that the file format of the diagnostic questionnaire be a preset format in order to implement parsing of the diagnostic questionnaire, so as to ensure that the parsed diagnostic database, system variable file and CAPL code file are error-free.
[0086] It can be understood that the output prompt information can be in a log file. If there is a user interface, the prompt information can also be output on the user interface in the form of a pop-up box. The method of outputting the prompt information is determined according to actual needs and is not limited in the embodiments of the present application.
[0087] It can be understood that the prompt information is used to indicate that the diagnostic questionnaire format is wrong, and may include information such as the specific cause of the error and the location of the error, so that the user can correct the diagnostic questionnaire according to the prompt information.
[0088] In the embodiment of the present application, before parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file, the method also includes: verifying whether the file format of the diagnostic questionnaire is correct; parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file, including: when the format of the diagnostic questionnaire is correct, parsing the diagnostic questionnaire to obtain the diagnostic database, the system variable file and the CAPL code file; when the format of the diagnostic questionnaire is incorrect, outputting a prompt message, the prompt message is used to indicate that the format of the diagnostic questionnaire is wrong. In this way, by pre-verifying the format of the diagnostic questionnaire, it is ensured that the diagnostic questionnaire is in a preset format, thereby ensuring that the parsed diagnostic database, the system variable file and the CAPL code file are correct; and when the format of the diagnostic questionnaire is incorrect, outputting a prompt message, it is convenient for the user to correct the diagnostic questionnaire according to the prompt message.
[0089] In some embodiments of the present application, Figure 4 ,like Figure 5 As shown, the above step 105 can be specifically implemented through the following step 105a.
[0090] 105a. Verify whether the file type of the diagnosis questionnaire is a preset type, and verify whether the format of the diagnosis questionnaire is a preset format.
[0091] It can be understood that the preset type can be Excel, doc, docx, pdf, etc. Different preset types correspond to different preset formats. For example, if the preset type is Excel, the preset format is an Excel template with a fixed format.
[0092] In the embodiment of the present application, checking whether the file format of the diagnostic questionnaire is correct includes: checking whether the file type of the diagnostic questionnaire is a preset type, and checking whether the format of the diagnostic questionnaire is a preset format. In this way, it can be ensured that the type and format of the diagnostic questionnaire are correct, thereby ensuring that the diagnostic questionnaire can be successfully parsed to obtain the diagnostic database, the XML type system variable file and the CAPL code file.
[0093] In some embodiments of the present application, Figure 1 ,like Figure 6 As shown, before the above step 101, the data processing method provided in the embodiment of the present application further includes the following step 107, and the above step 101 can be specifically implemented by the following step 101a.
[0094] 107. Display a user interface, where the user interface includes a target control for uploading a file.
[0095] 101a. In response to a user's operation on a target control, receiving a diagnostic questionnaire uploaded by the user.
[0096] It can be understood that the user interface is displayed to facilitate users to upload diagnostic questionnaires, that is, when diagnostic function testing is required, users need to upload the diagnostic questionnaire through the user interface. The data processing method of the embodiment of the present application receives the diagnostic questionnaire uploaded by the user, parses and generates a diagnostic database, XML type system variable files and CAPL code files, and imports them into CANoe, so that the diagnostic function test can be directly performed in CANoe.
[0097] It can be understood that the displayed user interface includes a target control, and the user selects the diagnostic questionnaire to be uploaded and operates the target control to upload it, and the diagnostic questionnaire uploaded by the user is received.
[0098] In the embodiment of the present application, before obtaining the diagnostic questionnaire corresponding to the target project, the method further includes: displaying a user interface, the user interface including a target control for uploading files; obtaining the diagnostic questionnaire corresponding to the target project, including: receiving the diagnostic questionnaire uploaded by the user in response to the user's operation on the target control. In this way, a user interface is provided for users to upload diagnostic questionnaires, which is simpler and more user-friendly for user operation, and improves user experience.
[0099] like Figure 7As shown, a data processing device provided in an embodiment of the present application includes: an acquisition module 701, used to acquire a diagnostic questionnaire corresponding to a target project; a parsing module 702, used to parse the diagnostic questionnaire to obtain a diagnostic database of an extended markup language XML type, wherein the diagnostic database is generated based on information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; an import module 703, used to import the diagnostic database into a controller local area network open environment, so that when the diagnostic function of the target project is tested in the controller local area network open environment, the diagnostic service content corresponding to the diagnostic database is executed.
[0100] In some embodiments of the present application, the parsing module 702 is specifically used to parse the diagnostic questionnaire to obtain a diagnostic database, an XML type system variable file and a CAPL code file; the system variable file is generated based on the information corresponding to the system variables obtained by parsing the diagnostic questionnaire, and the CAPL code file is generated based on the control information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; the import module 703 is specifically used to import the diagnostic database, the system variable file and the CAPL code file into the controller LAN open environment, so that when the diagnostic function of the target project is tested in the controller LAN open environment, the diagnostic service content corresponding to the diagnostic database is executed through the CAPL code file based on the system variable file.
[0101] In some embodiments of the present application, the data processing device also includes: a sending module; the sending module is used to send the system variable file to a third-party application after parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file, so that the third-party application can execute the diagnostic service content corresponding to the diagnostic database through the CAPL code file based on the received system variable file and the controller local area network open environment.
[0102] In some embodiments of the present application, the data processing device also includes: a verification module; the verification module is used to verify whether the file format of the diagnostic questionnaire is correct before parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file; parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file includes: when the format of the diagnostic questionnaire is correct, parsing the diagnostic questionnaire to obtain the diagnostic database, the system variable file and the CAPL code file.
[0103] In some embodiments of the present application, the data processing device also includes: an output module; the output module is used to output a prompt message after verifying whether the file format of the diagnostic questionnaire is correct, if the format of the diagnostic questionnaire is incorrect, the prompt message is used to indicate that the format of the diagnostic questionnaire is incorrect.
[0104] In some embodiments of the present application, the verification module is specifically used to verify whether the file type of the diagnostic questionnaire is a preset type, and to verify whether the format of the diagnostic questionnaire is a preset format.
[0105] In some embodiments of the present application, the data processing device also includes: a display module; the display module is used to display a user interface before obtaining the diagnostic questionnaire corresponding to the target project, and the user interface includes a target control for uploading files; the acquisition module 701 is specifically used to receive the diagnostic questionnaire uploaded by the user in response to the user's operation on the target control.
[0106] The data processing device provided in the embodiment of the present application can be used to execute the steps of the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0107] It should be noted that the above-mentioned data processing device can be the electronic device in the above-mentioned method embodiment of the present application, or it can be a functional module and / or functional entity in the electronic device that can implement the functions of the device embodiment, and the embodiment of the present application is not limited.
[0108] In the embodiments of the present application, each module can implement the data processing method provided in the above method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0109] The present application also provides an electronic device, such as Figure 8 As shown, the electronic device may include: a processor 801, a memory 802, and a program or instruction stored in the memory 802 and executable on the processor 801. When the program or instruction is executed by the processor 801, each process of the data processing method provided in the above method embodiment can be implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0110] An embodiment of the present application also provides a vehicle, which may include the above-mentioned data processing device or electronic device and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0111] An embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the data processing method provided by the above method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0112] An embodiment of the present application also provides a computer program product, wherein the computer program product includes a computer program or instructions. When the computer program product runs on a processor, the processor executes the computer program or instructions to implement the various processes of the data processing method provided by the above method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0113] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0114] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0115] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, servers and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0116] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0117] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0119] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method, characterized in that: include: Obtain the diagnostic questionnaire corresponding to the target project; Parsing the diagnostic questionnaire to obtain an extensible markup language XML type diagnostic database, wherein the diagnostic database is generated based on information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; The diagnostic database is imported into a controller area network open environment, so that when the diagnostic function of the target project is tested in the controller area network open environment, the diagnostic service content corresponding to the diagnostic database is executed.
2. The method according to claim 1, characterized in that The step of parsing the diagnostic questionnaire to obtain a diagnostic database of an extended markup language XML type includes: Parse the diagnostic questionnaire to obtain the diagnostic database, an XML-type system variable file and a CAPL code file; the system variable file is generated based on information corresponding to the system variables obtained by parsing the diagnostic questionnaire, and the CAPL code file is generated based on control information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; The step of importing the diagnostic database into the controller area network open environment includes: The diagnostic database, the system variable file and the CAPL code file are imported into the controller LAN open environment, so that when the diagnostic function of the target project is tested in the controller LAN open environment, the diagnostic service content corresponding to the diagnostic database is executed through the CAPL code file based on the system variable file.
3. The method according to claim 2, characterized in that After parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file, the method further includes: The system variable file is sent to a third-party application, so that the third-party application controls the controller area network open environment based on the received system variable file, and executes the diagnostic service content corresponding to the diagnostic database through the CAPL code file.
4. The method according to claim 2, characterized in that: Before parsing the diagnostic questionnaire to obtain the diagnostic database, the XML type system variable file and the CAPL code file, the method further includes: Verifying whether the file format of the diagnostic questionnaire is correct; The step of parsing the diagnostic questionnaire to obtain the diagnostic database, an XML-type system variable file and a CAPL code file includes: When the format of the diagnostic questionnaire is correct, the diagnostic questionnaire is parsed to obtain the diagnostic database, the system variable file and the CAPL code file.
5. The method according to claim 4, characterized in that After verifying whether the file format of the diagnostic questionnaire is correct, the method further includes: In the case that the format of the diagnostic questionnaire is incorrect, a prompt message is output, where the prompt message is used to indicate that the format of the diagnostic questionnaire is incorrect.
6. The method according to claim 4, characterized in that The step of verifying whether the file format of the diagnostic questionnaire is correct includes: Checking whether the file type of the diagnostic questionnaire is a preset type, and checking whether the format of the diagnostic questionnaire is a preset format.
7. The method according to any one of claims 1 to 6, characterized in that: Before obtaining the diagnostic questionnaire corresponding to the target item, the method further includes: displaying a user interface, the user interface comprising a target control for uploading a file; The step of obtaining a diagnostic questionnaire corresponding to the target item includes: In response to the user's operation on the target control, the diagnostic questionnaire uploaded by the user is received.
8. A data processing device, characterized in that: include: An acquisition module, used to acquire a diagnostic questionnaire corresponding to a target item; A parsing module, used for parsing the diagnostic questionnaire to obtain a diagnostic database of extended markup language XML type, wherein the diagnostic database is generated based on information corresponding to the diagnostic service content obtained by parsing the diagnostic questionnaire; The import module is used to import the diagnostic database into the controller area network open environment, so that when the diagnostic function of the target project is tested in the controller area network open environment, the diagnostic service content corresponding to the diagnostic database is executed.
9. An electronic device, characterized in that: include: A memory and a processor, the memory is used to store a computer program; the processor is used to execute the data processing method described in any one of claims 1 to 7 when calling the computer program.
10. A vehicle, characterized in that: include: The data processing device according to claim 8, or the electronic device according to claim 9.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
UDS diagnosis protocol analysis and execution method and system, electronic equipment and storage medium
CN120729761A
