Tail line read-write test method, system and device and storage medium
By preconfiguring the unified diagnostic service template in advance, the problem of manually configuring the UDS protocol instructions in tail line testing in the existing technology is solved, which improves testing efficiency and flexibility, and reduces complexity and cost.
Patent Information
- Application Number
- CN202411305398.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-07
AI Technical Summary
The existing tailline test system requires manual configuration of UDS protocol instructions, resulting in high test complexity and cost, and needs to be reconfigured every time the battery is replaced, which is inefficient.
By pre-configuring the unified diagnostic service template, read and write instructions for tail line tests are automatically generated. Users only need to enter the import instructions and select the signal name. The system automatically runs the script program for testing, reducing manual configuration and complex operations.
It significantly improves the efficiency and flexibility of tailline read and write tests, reduces the complexity and cost of testing, and reduces the complexity and cost of manual configuration.
Smart Images

Figure CN119271473A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tail line testing, and in particular to a tail line reading and writing test method, system, equipment and storage medium. Background Art
[0002] The current end of line (EOL) test system has limitations in design. The equipment and battery packs that deploy the end of line test system use scattered hexadecimal instructions to read / write data. The hexadecimal instructions need to be manually configured through the code defined by the Unified Diagnostic Services (UDS) protocol, so it is necessary to rely on the manufacturer's R&D personnel to modify the code according to the battery pack's communication protocol to add instructions to complete the communication. Configuring communication in this way is extremely complex and costly. Every time the battery is replaced for testing, it is necessary to rely on the supplier to reconfigure the UDS protocol instructions before testing. Summary of the invention
[0003] In view of this, the present invention provides a tail line read and write test method, system, device and storage medium to solve the problem that the UDS protocol instructions need to be manually configured each time during the tail line read and write test.
[0004] In a first aspect, the present invention provides a tail line read and write test method, the method comprising: receiving a first import instruction, and obtaining a unified diagnostic service template from a first preset path in response to the first import instruction; receiving a test instruction, and performing a tail line test on a battery pack in response to the test instruction, wherein the read and write instructions sent to the battery pack during the tail line test are automatically generated according to a unified diagnostic service protocol through the unified diagnostic service template.
[0005] According to the above technical means, the present invention pre-configures a unified diagnostic service template, and includes the script program required for the reading and writing link of the EOL test in the unified diagnostic service template. Therefore, when performing the EOL reading and writing test, the unified diagnostic service template pre-configured by the user is obtained in a preset path by receiving a first import instruction input by the user, and the reading and writing link of the EOL test is executed directly by running the script program in the unified diagnostic service template, thereby avoiding the need for the user to manually configure the unified diagnostic service protocol instructions for each test, significantly improving the test efficiency, and reducing the test complexity and test cost.
[0006] In some optional implementations, before receiving the first import instruction, it also includes: receiving a baud rate configuration instruction, and generating baud rate information of the controller local area network bus in response to the baud rate configuration instruction; obtaining a number of script programs for generating the read and write instructions, and saving the script programs required for reading and writing different data types into a program set of corresponding data types; generating a signal name with a mapping relationship for each program set according to the data type corresponding to each program set, the signal name is used to describe the specific read and write test functions in the tail line test; writing each program set configured with a signal name and the baud rate information into a preset text file to obtain the unified diagnostic service template; storing the unified diagnostic service template in the first preset path.
[0007] In some optional embodiments, the step of generating the read and write instructions through the unified diagnostic service template includes: determining a target signal name from a plurality of signal names; reading a corresponding target program set from the unified diagnostic service template according to the target signal name; determining source data that needs to be tested, wherein the source data is data about a battery pack; and generating read and write instructions for reading and writing the source data by running a script program in the target program set.
[0008] According to the above-mentioned technical means, when configuring the unified diagnostic service template, the embodiment of the present invention saves the script programs required for different data types into different program sets, and then names different signal names for each program set. Therefore, when performing subsequent tests, a separate test configuration interface is created to display the names of each signal. The user selects the target signal name from all signal names according to his or her own test requirements. The EOL test system can automatically run the script program in the program set mapped to the target signal name to achieve automated testing, further improve test efficiency, and reduce test complexity and test costs. In addition, the test configuration interface is also provided with a data source control, which is used by the user to determine what the source data being tested is through the data source control. When the source data is variable, the user can use the UDS script instructions of the current signal to read or write the source data arbitrarily selected by the user, further improving the flexibility of the test.
[0009] In some optional implementations, when the tail line test is a write test on the battery pack, the step of acquiring the source data includes: establishing a communication connection with an external device; and receiving the source data sent by the external device.
[0010] According to the above technical means, this embodiment automatically starts the device scanning function according to the external device selected by the user, thereby establishing a communication connection with the corresponding external device and receiving the source data sent by the external device, realizing automated testing of subsequent steps, and significantly improving the efficiency of EOL read and write testing.
[0011] In some optional implementations, before generating the read-write instruction through the unified diagnostic service template, the method further includes: receiving a second import instruction, and obtaining a key file from a second preset path in response to the second import instruction, wherein the key file is configured with a decryption algorithm for decrypting encrypted data in the tail line test read-write link. Based on the above technical means, this embodiment also provides a solution for importing a key file into an EOL test system, which reduces the complexity of manually configuring a decryption algorithm and further reduces labor costs.
[0012] In some optional implementations, the method further includes: receiving a third import instruction, and acquiring at least one controller area network database file from a third preset path in response to the third import instruction, wherein different controller area network database files are used to describe the signal meanings of different controller area network buses.
[0013] According to the above technical means, for EOL tests of various controller area networks, multiple DBC (Database CAN) files (greater than or equal to 1 DBC file) can be imported, so as to flexibly respond to EOL tests of various CAN networks, further improving the flexibility of the EOL test system.
[0014] In some optional embodiments, when the external device is a barcode scanner, receiving the source data sent by the external device includes: starting the barcode scanner; playing a prompt message, wherein the prompt message is used to prompt the user to use the barcode scanner to scan the battery code; and receiving the battery barcode source data sent by the barcode scanner.
[0015] In a second aspect, the present invention provides a tail line read and write test system, including: a template import module, used to receive a first import instruction, and obtain a unified diagnostic service template from a first preset path in response to the first import instruction; an automated test module, used to receive a test instruction, and perform a tail line test on a battery pack in response to the test instruction, wherein the read and write instructions sent to the battery pack during the tail line test are automatically generated according to a unified diagnostic service protocol through the unified diagnostic service template.
[0016] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0017] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to execute the method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 is a flow chart of a tail line read and write test method according to an embodiment of the present invention;
[0020] Figure 2 is a schematic diagram of a test configuration interface according to an embodiment of the present invention;
[0021] Figure 3 is a schematic diagram of a unified diagnostic service template configuration interface according to an embodiment of the present invention;
[0022] Figure 4 is another schematic diagram of a unified diagnostic service template configuration interface according to an embodiment of the present invention;
[0023] Figure 5 is a schematic diagram of a test configuration interface according to an embodiment of the present invention;
[0024] Figure 6 is a schematic diagram of the effect of configuring a key file according to an embodiment of the present invention;
[0025] Figure 7 is a structural schematic diagram of a tail line read and write test system according to an embodiment of the present invention;
[0026] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0028] At present, in the field of tail line testing, every time the battery is replaced for read and write testing, it is necessary to rely on the supplier to reconfigure the UDS protocol instructions on the client side before testing. This process is very complicated and seriously reduces the test efficiency. For example, for the test of writing the barcode of the battery pack, the test steps of the relevant technology are as follows:
[0029] ①Edit the code of the decryption algorithm according to the communication protocol;
[0030] ② Use the UDS script to spell out the 10 03 extended service command and send it to the battery management system (BMS) of the battery pack. When the BMS replies 50, it is an OK command;
[0031] ③After receiving 50, the tail line test system uses the UDS script to spell out 27 01 and sends it to BMS to obtain a 4-byte seed, and waits for BMS to reply with 67 01 + 4-byte seed;
[0032] ④After obtaining the seed, the tail line test system substitutes the seed into the decryption algorithm code to calculate the key, and then uses the UDS script to spell out 27 01+key and send it to BMS. When BMS replies 67 02, the unlocking is successful;
[0033] ⑤ The client's tail line test system uses the UDS script to spell out the 2E+DID+barcode command and send it. When the BMS replies with 6E+DID, the barcode is written successfully;
[0034] In the above steps ① to ⑤, the complex communication logic requires the client to rely on the supplier to develop in order to edit the test process. The UDS script instructions for each step need to be manually edited and sent, which is very complicated and seriously reduces the efficiency of the tail line reading and writing test.
[0035] According to an embodiment of the present invention, an embodiment of a tail line read and write test method is provided. It should be noted that the tail line read and write test method provided by the present invention can be integrated into a software system and executed in a client, so that the client and the BMS of the battery pack communicate with each other to realize the corresponding tail line test process. In addition, the tail line read and write test method provided by the present invention can also be integrated into an independent software system and deployed inside the BMS of the battery pack to communicate with the software module for battery management inside the BMS, so as to complete the tail line test process by executing corresponding instructions. In this embodiment, the client used includes but is not limited to server equipment, personal computer equipment, tablet computer, mobile phone and other intelligent devices with computing control capabilities. The present invention is only used as an example and is not limited thereto. Although the steps shown in the flowchart of the following figure show a logical order in the flowchart, in some cases, the steps shown or described can be performed in an order different from that here.
[0036] In this embodiment, a tail line read and write test method is provided. Figure 1 is a flow chart of a tail line read and write test method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0037] Step S101, receiving a first import instruction, and acquiring a unified diagnostic service template from a first preset path in response to the first import instruction;
[0038] Step S102, receiving a test instruction, and performing a tail line test on the battery pack in response to the test instruction, wherein the read and write instructions sent to the battery pack during the tail line test are automatically generated according to the unified diagnostic service protocol through the unified diagnostic service template.
[0039] Specifically, an embodiment of the present invention provides a solution for pre-configuring a unified diagnostic service template and automatically executing a tail line read and write test by running the unified diagnostic service template. First, this embodiment pre-configures a unified diagnostic service template (hereinafter referred to as a UDS template) through web pages, text documents, tables, etc., and a script program is configured in the UDS template. The function of the script program is to generate read and write instructions for the read and write links of the tail line test according to the UDS protocol. For example: by running the script program, the "10 03" extended service instruction is automatically generated and sent to the BMS of the battery pack. When the execution subject of steps S101 to S102 is the above-mentioned client, the UDS template is configured inside the client. When the execution subject of steps S101 to S102 is an independent software system in the above-mentioned BMS, the UDS template can be directly configured inside the BMS.
[0040] Save the configured script program as an independent file to obtain the UDS template. Later, when performing the tail line read and write test, open the test configuration interface through the display screen of the current device. The test configuration interface is a UI interface used to display and interact with the user on the screen, so that the user can import the UDS template into the running process of the tail line test system software system. Figure 2 The figure shows a schematic diagram of a test configuration interface. The user can click the first import control corresponding to the "Import UDS Template" column to pop up the directory window of the tail line test system, find the path folder where the UDS template is saved from the directory window, and then click the UDS template therein. The tail line test system generates a first import instruction to the tail line test system by detecting this trigger action, so that the tail line test system obtains the UDS template from the preset path in response to the first import instruction.
[0041] After the template import is completed, the template information is displayed on the first import control, such as Figure 2"X03 Project BMU Protocol.xlsx" is displayed, prompting the user that the UDS template has been imported and can be run. After that, when the user needs to perform a tail line read and write test, he only needs to run the unified diagnostic service template with one click, enter the test instructions, and automatically execute the read and write links of the tail line test by running the UDS template. The read and write instructions sent to the battery pack during the tail line test are automatically generated by the unified diagnostic service template in accordance with the unified diagnostic service protocol. The technical solution provided by the embodiment of the present invention avoids the need for users to manually configure UDS protocol instructions for each test, significantly improves test efficiency, and reduces test complexity and test costs.
[0042] In some optional implementation manners, before step S101, the method further includes:
[0043] Step a1, receiving a baud rate configuration instruction, and generating baud rate information of a controller area network bus in response to the baud rate configuration instruction;
[0044] Step a2, obtaining a number of script programs for generating read and write instructions, and saving the script programs required for reading and writing different data types into a program set corresponding to the data type;
[0045] Step a3, generating a signal name with a mapping relationship for each program set according to the data type corresponding to each program set, the signal name is used to describe the specific read and write test function in the tail line test;
[0046] Step a4, writing each program set configured with a signal name and baud rate information into a preset text file to obtain a unified diagnostic service template;
[0047] Step a5: storing the unified diagnostic service template in the first preset path.
[0048] Specifically, in the embodiment of the present invention, the configuration of the UDS template mainly includes two parts, one is the baud rate of the Controller Area Network (CAN) bus, and the other is a specific script program. The baud rate refers to the number of data bits transmitted by the CAN bus per unit time. Selecting a suitable baud rate is very important for the normal operation of the CAN bus. A baud rate that is too low will result in slow data transmission, and a baud rate that is too high will increase the complexity and cost of communication. This embodiment can flexibly configure the CAN bus baud rate in the UDS template according to user needs, so that the transmission speed of the tail line test message can be flexibly adjusted according to user needs, thereby increasing test flexibility. For example Figure 3As shown, this is the configuration page for configuring the CAN communication baud rate in the UDS template. In addition to the baud rate, the configured parameters also include the host computer request ID, BMS response ID, function addressing ID, parameter configuration security access level, parameter configuration entry session and other necessary parameters for CAN communication.
[0049] When configuring a script program, the embodiment of the present invention receives script programs input by several users through a preset template configuration interface. Since the UDS instructions used for reading and writing different data types (i.e., different CAN signals) are not exactly the same, this embodiment configures corresponding script programs independently for the UDS instructions required for reading and writing different data types. Script programs belonging to the same type of signal are saved in a program set of the corresponding data type, and then a signal name with a mapping relationship is generated for each program set according to the data type corresponding to each program set, wherein one signal name is used to describe a specific read and write test function in a tail line test. For example Figure 4 As shown, in a tail line test of a specific embodiment, it mainly includes several signal names such as "barcode writing, shunt writing, main positive relay energized, main positive relay disconnected, main negative relay energized, main negative relay disconnected, and highest single cell voltage", which are divided into script programs corresponding to their respective types, and are used to automatically generate UDS instruction codes of their respective types. In addition, it also includes parameters such as signal DID, data length, data type, scaling, and data format. The relevant parameters are configured in a unified diagnostic service template. The supplier does not need to know the communication core, avoiding the risk of leakage. Finally, this embodiment writes each program set configured with a signal name and the baud rate information into a preset text file to generate a UDS template. In the subsequent test phase, the user only needs to select the corresponding signal name according to the actual test requirements to automatically execute the test of the corresponding signal, further improving the test efficiency and reducing the test complexity and test cost.
[0050] In some optional implementations, the above step S102 includes:
[0051] Step b1, determining a target signal name from a plurality of signal names;
[0052] Step b2, reading a corresponding target program set from the unified diagnostic service template according to the target signal name;
[0053] Step b3, determining the source data required for testing, the source data being data about the battery pack;
[0054] Step b4, generating read and write instructions for reading and writing source data by running the script program in the target program set.
[0055] Specifically, in an embodiment of the present invention, after the UDS template is imported through the test configuration interface, a specific test signal is selected in the UDS template for testing through the UI interactive interface. A UDS template configured based on the aforementioned embodiment. In this embodiment, after the UDS template is imported into the tail line test system, before the formal test, the test configuration interface is first opened. A signal function control is displayed in the test configuration interface. The control can be a drop-down control or a link control for popping up an independent window. The user triggers the signal function control so that the tail line test system receives the first selected instruction and pops up the first interface in the test configuration interface. Figure 5 As shown, the first interface displays various signal names pre-configured in the UDS template of the aforementioned embodiment, including "barcode writing, shunt writing, main positive relay energized, main positive relay disconnected, main negative relay energized, main negative relay disconnected, and maximum single-cell voltage". The user can click on any of the displayed signal names to input the second selected instruction to the tail line test system. The selected signal name is the target signal name, which is the signal that the user actually uses to perform tail line read and write tests. In subsequent test steps, the tail line test system will read the target program set mapped to the target signal name from the UDS template, and execute the test link by running the script program in the target program set.
[0056] In addition, in this embodiment, the test configuration interface is also provided with a data source control, which is used by the user to determine what the source data being tested is through the data source control. The data source control can be a selection control or an input control. The user can select the source data of the read and write test in the pop-up selection page by clicking the data source control, or directly input the corresponding information in the data source control to determine the source data of the read and write test. When the source data is variable, the user can use the UDS script instruction of the current signal to read or write the source data arbitrarily selected by the user, further improving the flexibility of the test. It should be noted that in the embodiment of the present invention, the source data of the battery pack may be internal data such as voltage information, current information, and exit information inside the battery pack, or it may be barcode data that needs to be written to the battery pack from the outside, or it may be external control state data such as relay switch control signals that need to be input from the outside when performing relay testing on the battery pack. Therefore, the source data refers to data associated with the battery pack, and is not limited to data stored inside the battery pack.
[0057] In some optional implementations, when the tail line test is a write test on the battery pack, the above step b3 includes:
[0058] Step b31, establishing a communication connection with an external device;
[0059] Step b32, receiving source data sent by an external device.
[0060] Specifically, in an embodiment of the present invention, in order to further improve the efficiency of the tail line test, the source data determined by this embodiment can be obtained by directly inputting an external device. For this method, this embodiment automatically starts the device scanning function according to the external device selected by the user, thereby establishing a communication connection with the corresponding external device, and receiving the source data sent by the external device, thereby realizing automated testing of subsequent steps, reducing the tedious steps of manually entering data and importing data, and significantly improving the efficiency of the tail line read and write test.
[0061] In a specific embodiment, when the external device is a barcode scanner, the above step b32 includes:
[0062] Step b321, start the barcode scanner;
[0063] Step b322, playing a prompt message, the prompt message is used to prompt the user to use a barcode scanner to scan the battery code;
[0064] Step b323, receiving the battery barcode source data sent by the barcode scanner.
[0065] Specifically, in the embodiment of the present invention, when the user determines through the third selected instruction that the test source data written into the battery is obtained through the barcode scanner, the system automatically drives the barcode scanner to turn on and establishes a communication connection with the barcode scanner, and after the connection is established, a prompt message is played through text, voice, light, etc., prompting the user to use the barcode scanner to scan the battery code in time, for example, Figure 5 It is shown in the figure that the test of writing the battery barcode can determine the barcode source data by scanning the barcode gun, thereby avoiding the tedious operation of the user manually entering the barcode, which can further improve the test efficiency.
[0066] In some optional implementations, before the above step S102, the tail line read and write test method provided by the embodiment of the present invention further includes the following steps:
[0067] Step c1, receiving a second import instruction, and obtaining a key file from a second preset path in response to the second import instruction, wherein the key file is configured with a decryption algorithm for decrypting encrypted data in a tail line test read and write link.
[0068] Specifically, in some test scenarios, the tail line test system needs to verify its identity when reading and writing data to the battery BMS, so the UDS protocol instructions also involve some decryption operations, and the decryption operations involve decryption algorithms. The commonly used technical means at present is still to manually configure the decryption algorithm to decrypt the seed returned by the BMS to verify the identity. Commonly used decryption algorithms include but are not limited to AES (Advanced Encryption Standard) algorithm, DES (Data Encryption Standard) algorithm, RSA algorithm, etc. The present invention only takes this as an example and is not limited to this.
[0069] This operation also leads to complex testing and high labor costs. Based on this, this embodiment also provides a solution for importing a key file into a tail line test system.
[0070] like Figure 6 As shown, taking the X03 project barcode writing as an example, the user can encapsulate the decryption algorithm in advance through the DLL file to obtain the key file, and use the custom function interface / call the DLL file. Before testing, the user clicks the second import control in the test configuration interface, for example Figure 2 In the "Import KEY" in the command, a second import instruction is generated to the tail line test system. In response to the instruction, the tail line test system imports the key file from the second preset path into the tail line test system. When the tail line test system is tested later, the UDS script instruction is executed to the corresponding decryption position to automatically read the key file for the corresponding seed decryption, which further improves the test efficiency and reduces the test complexity.
[0071] In some optional implementation manners, the tail line read and write test method provided by the embodiment of the present invention further includes the following steps:
[0072] Step d1, receiving a third import instruction, and acquiring at least one controller area network database file from a third preset path in response to the third import instruction, wherein different controller area network database files are used to describe the signal meanings of different controller area network buses.
[0073] Specifically, the DBC (Database CAN, controller area network database) file is a configuration file used to translate the actual meaning of the message in the CAN bus. In actual applications, the CAN bus is divided into different sub-networks, such as fast charging CAN, diagnostic CAN, instrument CAN, vehicle CAN, etc. The signal meanings in different CAN networks are usually defined differently, so different DBC files are required. In this embodiment, for the tail line test of various CAN networks, multiple DBC files (greater than or equal to 1 DBC file) can also be imported. The operating principle is the same as that of importing a unified diagnostic service template, which will not be repeated here, so as to flexibly respond to the tail line test of various CAN networks and further improve the flexibility of the tail line test system.
[0074] In the present embodiment, a tail line read and write test system is also provided, which is a software system corresponding to the above-mentioned tail line read and write test method, and is used to implement the above-mentioned method embodiment and preferred implementation mode, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0075] This embodiment provides a tail line read and write test system. Figure 7 As shown, including:
[0076] The template importing module 701 is used to receive a first importing instruction, and acquire a unified diagnostic service template from a first preset path in response to the first importing instruction;
[0077] The automated test module 702 is used to receive test instructions and perform tail line testing on the battery pack in response to the test instructions, wherein the read and write instructions sent to the battery pack during the tail line testing are automatically generated through the unified diagnostic service template according to the unified diagnostic service protocol.
[0078] In some optional implementations, the automated testing module 702 includes:
[0079] A signal name determination unit, used to determine a target signal name from a plurality of signal names;
[0080] A program set determination unit, configured to read a corresponding target program set from a unified diagnostic service template according to a target signal name;
[0081] A source data determination unit, used to determine source data that needs to be involved in the test, where the source data is data about the battery pack;
[0082] The instruction generation unit is used to generate read and write instructions for reading and writing source data by running a script program in a target program set.
[0083] In some optional implementations, the source data determination unit includes:
[0084] Starting the external device unit to establish a communication connection with the external device;
[0085] The source data receiving unit is used to receive source data sent by an external device.
[0086] In some optional implementations, before the automated testing module 702, the following is further included:
[0087] The key import module is used to receive a second import instruction and obtain a key file from a second preset path in response to the second import instruction. The key file is configured with a decryption algorithm for decrypting encrypted data in a tail line test read and write link.
[0088] In some optional implementation manners, the present embodiment provides a tail line read / write test system, further comprising:
[0089] The DBC import module is used to receive a third import instruction and obtain at least one controller area network database file from a third preset path in response to the third import instruction, wherein different controller area network database files are used to describe the signal meanings of different controller area network buses.
[0090] In some optional implementations, the source data receiving unit includes:
[0091] The barcode scanner starter unit is used to start the barcode scanner;
[0092] The prompt subunit is used to play prompt information, which is used to prompt the user to use a barcode scanner to scan the battery code;
[0093] The data receiving subunit is used to receive the battery barcode source data sent by the barcode scanner.
[0094] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0095] The tail line read and write test system in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0096] The embodiment of the present invention also provides a computer device having the above Figure 7 The tail line read and write test system is shown.
[0097] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0098] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0099] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0100] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0101] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0102] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0103] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0104] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A tail line reading and writing test method, characterized in that: The method comprises: receiving a first import instruction, and acquiring a unified diagnostic service template from a first preset path in response to the first import instruction; A test instruction is received, and a tail line test is performed on the battery pack in response to the test instruction, wherein the read and write instructions sent to the battery pack during the tail line test are automatically generated according to the unified diagnostic service protocol through the unified diagnostic service template.
2. The method according to claim 1, characterized in that: Before receiving the first import instruction, the method further includes: receiving a baud rate configuration instruction, and generating baud rate information of a controller area network bus in response to the baud rate configuration instruction; Obtaining several script programs for generating the read and write instructions, and saving the script programs required for reading and writing different data types into a program set corresponding to the data type; Generate a signal name with a mapping relationship for each program set according to the data type corresponding to each program set, wherein the signal name is used to describe a specific read and write test function in a tail line test; Writing each program set configured with the signal name and the baud rate information into a preset text file to obtain the unified diagnostic service template; The unified diagnostic service template is stored in the first preset path.
3. The method according to claim 2, characterized in that The step of generating the read and write instructions through the unified diagnostic service template includes: Determine a target signal name from the plurality of signal names; Reading a corresponding target program set from the unified diagnostic service template according to the target signal name; Determine source data that needs to be involved in the test, where the source data is data about the battery pack; The read and write instructions for reading and writing the source data are generated by running the script program in the target program set.
4. The method according to claim 3, characterized in that: When the tail line test is a write test on the battery pack, the step of obtaining the source data includes: Establishing communication connection with external devices; The source data sent by the external device is received.
5. The method according to claim 1 or 4, characterized in that: Before generating the read and write instructions through the unified diagnostic service template, the method further includes: A second import instruction is received, and a key file is obtained from a second preset path in response to the second import instruction, wherein the key file is configured with a decryption algorithm for decrypting encrypted data in a tail line test read and write link.
6. The method according to claim 5, characterized in that The method further comprises: A third import instruction is received, and in response to the third import instruction, at least one controller area network database file is acquired from a third preset path, wherein different controller area network database files are used to describe the signal meanings of different controller area network buses.
7. The method according to claim 4, characterized in that When the external device is a barcode scanner, receiving the source data sent by the external device includes: Start the barcode scanner; Play a prompt message, which is used to prompt the user to use a barcode scanner to scan the battery code; Receive the battery barcode source data sent by the barcode scanner.
8. A tail line reading and writing test system, characterized in that: The system comprises: A template import module, configured to receive a first import instruction, and acquire a unified diagnostic service template from a first preset path in response to the first import instruction; The automated testing module is used to receive a testing instruction and perform a tail line test on the battery pack in response to the testing instruction, wherein the read and write instructions sent to the battery pack during the tail line test are automatically generated according to the unified diagnostic service protocol through the unified diagnostic service template.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.